diff --git a/excel/Rune.xlsx b/excel/Rune.xlsx index 5da1663..5ef1a1e 100644 Binary files a/excel/Rune.xlsx and b/excel/Rune.xlsx differ diff --git a/excel/attribute.xlsx b/excel/attribute.xlsx index ebf49af..7827a40 100644 Binary files a/excel/attribute.xlsx and b/excel/attribute.xlsx differ diff --git a/excel/item.xlsx b/excel/item.xlsx index 86c23a9..c4725b8 100644 Binary files a/excel/item.xlsx and b/excel/item.xlsx differ diff --git a/src/ReplicatedStorage/Data/RuneWeaponTag.luau b/src/ReplicatedStorage/Data/RuneWeaponTag.luau new file mode 100644 index 0000000..37dd0a3 --- /dev/null +++ b/src/ReplicatedStorage/Data/RuneWeaponTag.luau @@ -0,0 +1,10 @@ +local RuneWeaponTag = {} + +RuneWeaponTag = { + [1] = "RuneTagKnife", + [2] = "RuneTagSword", + [3] = "RuneTagStick", + [4] = "RuneTagHeavySword", +} + +return RuneWeaponTag \ No newline at end of file diff --git a/src/ReplicatedStorage/Json/Attributes.json b/src/ReplicatedStorage/Json/Attributes.json index c9efaa9..4e578ac 100644 --- a/src/ReplicatedStorage/Json/Attributes.json +++ b/src/ReplicatedStorage/Json/Attributes.json @@ -24,11 +24,19 @@ {"id":26,"type":1,"specialType":null,"effectAttribute":"mpRecoverBonus","battleValue":[1,10],"iconId":23,"nameId":226}, {"id":27,"type":2,"specialType":null,"effectAttribute":"vampireRate","battleValue":[1,10],"iconId":24,"nameId":227}, {"id":28,"type":2,"specialType":null,"effectAttribute":"coinBonus","battleValue":[1,10],"iconId":25,"nameId":228}, -{"id":50,"type":1,"specialType":null,"effectAttribute":"wearNumber","battleValue":[1,10],"iconId":26,"nameId":250}, -{"id":51,"type":1,"specialType":null,"effectAttribute":"skillNumber","battleValue":[1,10],"iconId":27,"nameId":251}, -{"id":52,"type":1,"specialType":null,"effectAttribute":"extraAttributeNumber","battleValue":[1,10],"iconId":28,"nameId":252}, -{"id":53,"type":1,"specialType":null,"effectAttribute":"elementNumber","battleValue":[1,10],"iconId":29,"nameId":253}, -{"id":54,"type":1,"specialType":null,"effectAttribute":"elementDefNumber","battleValue":[1,10],"iconId":30,"nameId":254}, -{"id":55,"type":1,"specialType":null,"effectAttribute":"gemNumber","battleValue":[1,10],"iconId":31,"nameId":255}, -{"id":56,"type":1,"specialType":null,"effectAttribute":"runeNumber","battleValue":[1,10],"iconId":32,"nameId":256} +{"id":29,"type":2,"specialType":1,"effectAttribute":"critRateFire","battleValue":[1,10],"iconId":26,"nameId":229}, +{"id":30,"type":2,"specialType":1,"effectAttribute":"critRateIce","battleValue":[1,10],"iconId":27,"nameId":230}, +{"id":31,"type":2,"specialType":1,"effectAttribute":"critRateLight","battleValue":[1,10],"iconId":28,"nameId":231}, +{"id":32,"type":2,"specialType":1,"effectAttribute":"critRateDark","battleValue":[1,10],"iconId":29,"nameId":232}, +{"id":33,"type":2,"specialType":1,"effectAttribute":"critDamageRateFire","battleValue":[1,10],"iconId":26,"nameId":233}, +{"id":34,"type":2,"specialType":1,"effectAttribute":"critDamageRateIce","battleValue":[1,10],"iconId":27,"nameId":234}, +{"id":35,"type":2,"specialType":1,"effectAttribute":"critDamageRateLight","battleValue":[1,10],"iconId":28,"nameId":235}, +{"id":36,"type":2,"specialType":1,"effectAttribute":"critDamageRateDark","battleValue":[1,10],"iconId":29,"nameId":236}, +{"id":50,"type":1,"specialType":null,"effectAttribute":"wearNumber","battleValue":[1,10],"iconId":50,"nameId":250}, +{"id":51,"type":1,"specialType":null,"effectAttribute":"skillNumber","battleValue":[1,10],"iconId":51,"nameId":251}, +{"id":52,"type":1,"specialType":null,"effectAttribute":"extraAttributeNumber","battleValue":[1,10],"iconId":52,"nameId":252}, +{"id":53,"type":1,"specialType":null,"effectAttribute":"elementNumber","battleValue":[1,10],"iconId":53,"nameId":253}, +{"id":54,"type":1,"specialType":null,"effectAttribute":"elementDefNumber","battleValue":[1,10],"iconId":54,"nameId":254}, +{"id":55,"type":1,"specialType":null,"effectAttribute":"gemNumber","battleValue":[1,10],"iconId":55,"nameId":255}, +{"id":56,"type":1,"specialType":null,"effectAttribute":"runeNumber","battleValue":[1,10],"iconId":56,"nameId":256} ] \ No newline at end of file diff --git a/src/ReplicatedStorage/Json/ItemProp.json b/src/ReplicatedStorage/Json/ItemProp.json index 19221b5..b03d2df 100644 --- a/src/ReplicatedStorage/Json/ItemProp.json +++ b/src/ReplicatedStorage/Json/ItemProp.json @@ -96,7 +96,59 @@ {"id":50013,"type":3,"typeArgs":[],"quality":14,"iconId":14,"nameId":50013,"textId":70013,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, {"id":50014,"type":3,"typeArgs":[],"quality":15,"iconId":15,"nameId":50014,"textId":70014,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, {"id":50015,"type":3,"typeArgs":[],"quality":16,"iconId":16,"nameId":50015,"textId":70015,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, -{"id":60000,"type":7,"typeArgs":[],"quality":4,"iconId":60000,"nameId":60000,"textId":80000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60000,"type":7,"typeArgs":[],"quality":4,"iconId":60000,"nameId":60000,"textId":60000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60000,"type":7,"typeArgs":[],"quality":4,"iconId":60000,"nameId":60000,"textId":60000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60001,"type":7,"typeArgs":[],"quality":4,"iconId":60001,"nameId":60001,"textId":60001,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60002,"type":7,"typeArgs":[],"quality":4,"iconId":60002,"nameId":60002,"textId":60002,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60003,"type":7,"typeArgs":[],"quality":4,"iconId":60003,"nameId":60003,"textId":60003,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60004,"type":7,"typeArgs":[],"quality":4,"iconId":60004,"nameId":60004,"textId":60004,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60005,"type":7,"typeArgs":[],"quality":4,"iconId":60005,"nameId":60005,"textId":60005,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60006,"type":7,"typeArgs":[],"quality":4,"iconId":60006,"nameId":60006,"textId":60006,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60007,"type":7,"typeArgs":[],"quality":4,"iconId":60007,"nameId":60007,"textId":60007,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60008,"type":7,"typeArgs":[],"quality":4,"iconId":60008,"nameId":60008,"textId":60008,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60009,"type":7,"typeArgs":[],"quality":4,"iconId":60009,"nameId":60009,"textId":60009,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60010,"type":7,"typeArgs":[],"quality":4,"iconId":60010,"nameId":60010,"textId":60010,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60011,"type":7,"typeArgs":[],"quality":4,"iconId":60011,"nameId":60011,"textId":60011,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60012,"type":7,"typeArgs":[],"quality":4,"iconId":60012,"nameId":60012,"textId":60012,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60013,"type":7,"typeArgs":[],"quality":4,"iconId":60013,"nameId":60013,"textId":60013,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60014,"type":7,"typeArgs":[],"quality":4,"iconId":60014,"nameId":60014,"textId":60014,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60015,"type":7,"typeArgs":[],"quality":4,"iconId":60015,"nameId":60015,"textId":60015,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60016,"type":7,"typeArgs":[],"quality":4,"iconId":60016,"nameId":60016,"textId":60016,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60017,"type":7,"typeArgs":[],"quality":4,"iconId":60017,"nameId":60017,"textId":60017,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60018,"type":7,"typeArgs":[],"quality":4,"iconId":60018,"nameId":60018,"textId":60018,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60019,"type":7,"typeArgs":[],"quality":4,"iconId":60019,"nameId":60019,"textId":60019,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60020,"type":7,"typeArgs":[],"quality":4,"iconId":60020,"nameId":60020,"textId":60020,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60021,"type":7,"typeArgs":[],"quality":4,"iconId":60021,"nameId":60021,"textId":60021,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60022,"type":7,"typeArgs":[],"quality":4,"iconId":60022,"nameId":60022,"textId":60022,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60023,"type":7,"typeArgs":[],"quality":4,"iconId":60023,"nameId":60023,"textId":60023,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":60024,"type":7,"typeArgs":[],"quality":4,"iconId":60024,"nameId":60024,"textId":60024,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, {"id":61000,"type":7,"typeArgs":[],"quality":5,"iconId":61000,"nameId":61000,"textId":61000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, -{"id":62000,"type":7,"typeArgs":[],"quality":6,"iconId":62000,"nameId":62000,"textId":62000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null} +{"id":61001,"type":7,"typeArgs":[],"quality":5,"iconId":61001,"nameId":61001,"textId":61001,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61002,"type":7,"typeArgs":[],"quality":5,"iconId":61002,"nameId":61002,"textId":61002,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61003,"type":7,"typeArgs":[],"quality":5,"iconId":61003,"nameId":61003,"textId":61003,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61004,"type":7,"typeArgs":[],"quality":5,"iconId":61004,"nameId":61004,"textId":61004,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61005,"type":7,"typeArgs":[],"quality":5,"iconId":61005,"nameId":61005,"textId":61005,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61006,"type":7,"typeArgs":[],"quality":5,"iconId":61006,"nameId":61006,"textId":61006,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61007,"type":7,"typeArgs":[],"quality":5,"iconId":61007,"nameId":61007,"textId":61007,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61008,"type":7,"typeArgs":[],"quality":5,"iconId":61008,"nameId":61008,"textId":61008,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61009,"type":7,"typeArgs":[],"quality":5,"iconId":61009,"nameId":61009,"textId":61009,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61010,"type":7,"typeArgs":[],"quality":5,"iconId":61010,"nameId":61010,"textId":61010,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61011,"type":7,"typeArgs":[],"quality":5,"iconId":61011,"nameId":61011,"textId":61011,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61012,"type":7,"typeArgs":[],"quality":5,"iconId":61012,"nameId":61012,"textId":61012,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61013,"type":7,"typeArgs":[],"quality":5,"iconId":61013,"nameId":61013,"textId":61013,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61014,"type":7,"typeArgs":[],"quality":5,"iconId":61014,"nameId":61014,"textId":61014,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61015,"type":7,"typeArgs":[],"quality":5,"iconId":61015,"nameId":61015,"textId":61015,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61016,"type":7,"typeArgs":[],"quality":5,"iconId":61016,"nameId":61016,"textId":61016,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61017,"type":7,"typeArgs":[],"quality":5,"iconId":61017,"nameId":61017,"textId":61017,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61018,"type":7,"typeArgs":[],"quality":5,"iconId":61018,"nameId":61018,"textId":61018,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61019,"type":7,"typeArgs":[],"quality":5,"iconId":61019,"nameId":61019,"textId":61019,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61020,"type":7,"typeArgs":[],"quality":5,"iconId":61020,"nameId":61020,"textId":61020,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61021,"type":7,"typeArgs":[],"quality":5,"iconId":61021,"nameId":61021,"textId":61021,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61022,"type":7,"typeArgs":[],"quality":5,"iconId":61022,"nameId":61022,"textId":61022,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61023,"type":7,"typeArgs":[],"quality":5,"iconId":61023,"nameId":61023,"textId":61023,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61024,"type":7,"typeArgs":[],"quality":5,"iconId":61024,"nameId":61024,"textId":61024,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61025,"type":7,"typeArgs":[],"quality":5,"iconId":61025,"nameId":61025,"textId":61025,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61026,"type":7,"typeArgs":[],"quality":5,"iconId":61026,"nameId":61026,"textId":61026,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":61027,"type":7,"typeArgs":[],"quality":5,"iconId":61027,"nameId":61027,"textId":61027,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, +{"id":62000,"type":7,"typeArgs":[],"quality":5,"iconId":62000,"nameId":62000,"textId":62000,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null} ] \ No newline at end of file diff --git a/src/ReplicatedStorage/Json/Rune.json b/src/ReplicatedStorage/Json/Rune.json index e8e16bd..b1a366c 100644 --- a/src/ReplicatedStorage/Json/Rune.json +++ b/src/ReplicatedStorage/Json/Rune.json @@ -4,27 +4,27 @@ {"id":60002,"quality":1,"type":3,"icon":1,"nameId":60002,"runeName":"RuneLightDamage","behaviorName":null,"recycle":[],"isInPool":1}, {"id":60003,"quality":1,"type":4,"icon":1,"nameId":60003,"runeName":"RuneShadowDamage","behaviorName":null,"recycle":[],"isInPool":1}, {"id":60004,"quality":1,"type":null,"icon":1,"nameId":60004,"runeName":"RuneBookQualityPurple","behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60005,"quality":1,"type":null,"icon":1,"nameId":60005,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60006,"quality":1,"type":null,"icon":1,"nameId":60006,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60007,"quality":1,"type":null,"icon":1,"nameId":60007,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60008,"quality":1,"type":null,"icon":1,"nameId":60008,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60009,"quality":1,"type":null,"icon":1,"nameId":60009,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60010,"quality":1,"type":null,"icon":1,"nameId":60010,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60011,"quality":1,"type":null,"icon":1,"nameId":60011,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60012,"quality":1,"type":null,"icon":1,"nameId":60012,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60013,"quality":1,"type":null,"icon":1,"nameId":60013,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60014,"quality":1,"type":null,"icon":1,"nameId":60014,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60015,"quality":1,"type":null,"icon":1,"nameId":60015,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60016,"quality":1,"type":null,"icon":1,"nameId":60016,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60017,"quality":1,"type":null,"icon":1,"nameId":60017,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60018,"quality":1,"type":null,"icon":1,"nameId":60018,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60019,"quality":1,"type":null,"icon":1,"nameId":60019,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60020,"quality":1,"type":null,"icon":1,"nameId":60020,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60021,"quality":1,"type":null,"icon":1,"nameId":60021,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60022,"quality":1,"type":null,"icon":1,"nameId":60022,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60023,"quality":1,"type":null,"icon":1,"nameId":60023,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":60024,"quality":1,"type":null,"icon":1,"nameId":60024,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":61000,"quality":2,"type":1,"icon":1,"nameId":61000,"runeName":"RuneIceCoffin","behaviorName":"IceCoffine","recycle":[],"isInPool":1}, +{"id":60005,"quality":1,"type":null,"icon":1,"nameId":60005,"runeName":"RuneWearKnife","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60006,"quality":1,"type":null,"icon":1,"nameId":60006,"runeName":"RuneWearSword","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60007,"quality":1,"type":null,"icon":1,"nameId":60007,"runeName":"RuneWearStick","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60008,"quality":1,"type":null,"icon":1,"nameId":60008,"runeName":"RuneWearHeavyStick","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60009,"quality":1,"type":null,"icon":1,"nameId":60009,"runeName":"RuneCritDamageRateFire","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60010,"quality":1,"type":null,"icon":1,"nameId":60010,"runeName":"RuneCritDamageRateIce","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60011,"quality":1,"type":null,"icon":1,"nameId":60011,"runeName":"RuneCritDamageRateLight","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60012,"quality":1,"type":null,"icon":1,"nameId":60012,"runeName":"RuneCritDamageRateShadow","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60013,"quality":1,"type":null,"icon":1,"nameId":60013,"runeName":"RuneWearEmptySlot","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60014,"quality":1,"type":null,"icon":1,"nameId":60014,"runeName":"RuneWearFillSlot","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60015,"quality":1,"type":null,"icon":1,"nameId":60015,"runeName":"RuneWearElementAttack","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60016,"quality":1,"type":null,"icon":1,"nameId":60016,"runeName":"RuneFirstAttack","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60017,"quality":1,"type":null,"icon":1,"nameId":60017,"runeName":"RuneKillEnemyHeal","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60018,"quality":1,"type":null,"icon":1,"nameId":60018,"runeName":"RuneWearExAttributeAttack","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60019,"quality":1,"type":null,"icon":1,"nameId":60019,"runeName":"RuneBossAtk","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60020,"quality":1,"type":null,"icon":1,"nameId":60020,"runeName":"RuneBossHp","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60021,"quality":1,"type":null,"icon":1,"nameId":60021,"runeName":"RuneHpToAtk","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60022,"quality":1,"type":null,"icon":1,"nameId":60022,"runeName":"RuneAtkSpeed","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60023,"quality":1,"type":null,"icon":1,"nameId":60023,"runeName":"RuneThunderDoubleDamage","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":60024,"quality":1,"type":null,"icon":1,"nameId":60024,"runeName":"RuneWearElementAttackSpeed","behaviorName":null,"recycle":[],"isInPool":1}, +{"id":61000,"quality":2,"type":1,"icon":1,"nameId":61000,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61001,"quality":2,"type":null,"icon":1,"nameId":61001,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61002,"quality":2,"type":null,"icon":1,"nameId":61002,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61003,"quality":2,"type":null,"icon":1,"nameId":61003,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, @@ -47,7 +47,7 @@ {"id":61020,"quality":2,"type":null,"icon":1,"nameId":61020,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61021,"quality":2,"type":null,"icon":1,"nameId":61021,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61022,"quality":2,"type":null,"icon":1,"nameId":61022,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, -{"id":61023,"quality":2,"type":null,"icon":1,"nameId":61023,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, +{"id":61023,"quality":2,"type":null,"icon":1,"nameId":61023,"runeName":"RuneIceCoffin","behaviorName":"IceCoffine","recycle":[],"isInPool":1}, {"id":61024,"quality":2,"type":null,"icon":1,"nameId":61024,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61025,"quality":2,"type":null,"icon":1,"nameId":61025,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, {"id":61026,"quality":2,"type":null,"icon":1,"nameId":61026,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1}, diff --git a/src/ReplicatedStorage/Modules/Filter.luau b/src/ReplicatedStorage/Modules/Filter.luau index 55b862e..1e1944f 100644 --- a/src/ReplicatedStorage/Modules/Filter.luau +++ b/src/ReplicatedStorage/Modules/Filter.luau @@ -57,9 +57,9 @@ function Filter:AddHandler(handlerFunction: (data: any) -> any, priority: number self._weakRefs[owner] = handlerId end - -- 按优先级排序(优先级高的先执行) + -- 按优先级排序(优先级数值越小的越先执行) table.sort(self._handlers, function(a, b) - return a.priority > b.priority + return a.priority < b.priority end) return handlerId diff --git a/src/ReplicatedStorage/Tools/Utils.luau b/src/ReplicatedStorage/Tools/Utils.luau index 4798de8..d072b55 100644 --- a/src/ReplicatedStorage/Tools/Utils.luau +++ b/src/ReplicatedStorage/Tools/Utils.luau @@ -277,6 +277,11 @@ function Utils:TableSafeAddValue(AttributesData: table, AttributeName: string, A AttributesData[AttributeName] = (AttributesData[AttributeName] or 0) + AttributeValue end +-- 给表设置key,value +function Utils:TableSafeSetValue(AttributesData: table, AttributeName: string, AttributeValue: number) + AttributesData[AttributeName] = AttributeValue +end + -- 给表增加key,value(加法计算),按第二个参数表的内容增加 function Utils:TableSafeAddTableValue(AttributesData: table, AddTableValue: table) for AttributeName, AttributeValue in AddTableValue do diff --git a/src/ServerStorage/Base/Rune.luau b/src/ServerStorage/Base/Rune.luau index bdd9a12..0b59c31 100644 --- a/src/ServerStorage/Base/Rune.luau +++ b/src/ServerStorage/Base/Rune.luau @@ -24,6 +24,15 @@ function Rune:Init(PlayerAI: Player, Character: TypeList.Character, ScriptName: return self end +function Rune:InitFinish() + self:OnInitFinish() +end + +function Rune:OnInitFinish() + -- 子类可以重写这个方法(主要是,初始化时WearingSlot等还没赋值) + -- 监听事件用到参数是部分还没赋值,所以增加这个函数 +end + -- 开始记录 function Rune:StartRecording() self.isRecording = true @@ -150,9 +159,9 @@ end -- 销毁 function Rune:OnDestroy() - self.executionRecords = nil - for _, data in self do - data = nil + -- 清理所有属性引用 + for key, _ in pairs(self) do + self[key] = nil end self = nil end diff --git a/src/ServerStorage/Modules/Runes/RuneAtkSpeed.luau b/src/ServerStorage/Modules/Runes/RuneAtkSpeed.luau new file mode 100644 index 0000000..6a96caf --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneAtkSpeed.luau @@ -0,0 +1,33 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneAtkSpeed = {} +RuneAtkSpeed.__index = RuneAtkSpeed +setmetatable(RuneAtkSpeed, {__index = Rune}) + + +function RuneAtkSpeed:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneAtkSpeed) + + return self +end + +function RuneAtkSpeed:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneAtkSpeed:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local baseAttribute = AttributesData.atkSpeed or 1 + local addAttribute = baseAttribute - math.floor(baseAttribute * 25) / 100 + Utils:TableSafeSetValue(AttributesData, "atkSpeed", addAttribute) + return nil +end + +return RuneAtkSpeed \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneBookQualityYellow.luau b/src/ServerStorage/Modules/Runes/RuneBookQualityYellow.luau new file mode 100644 index 0000000..a180cca --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneBookQualityYellow.luau @@ -0,0 +1,53 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneBookQualityYellow = {} +RuneBookQualityYellow.__index = RuneBookQualityYellow +setmetatable(RuneBookQualityYellow, {__index = Rune}) + + +function RuneBookQualityYellow:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneBookQualityYellow) + + return self +end + +function RuneBookQualityYellow:Check(index: number, AttributesData: table, BehaviorNameList: table) + local pDataFolder = ReplicatedStorage:FindFirstChild("PlayerData") + if not pDataFolder then return nil end + local pData = pDataFolder:FindFirstChild(self.PlayerAI.Player.UserId) + if not pData then return nil end + + local bookFolder = pData:FindFirstChild("Book") + if not bookFolder then return nil end + local bookList = bookFolder:GetChildren() + if #bookList == 0 then return nil end + + self.Data = bookList + + return true +end + +function RuneBookQualityYellow:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local qualityNumber = 0 + for _, book in self.Data do + local bookQuality = book:GetAttribute("quality") + if bookQuality >= 4 then + qualityNumber = qualityNumber + 1 + end + end + local attackRate = math.floor(qualityNumber * 50 / 100) + Utils:TableSafeAddValue(AttributesData, "attackRate", attackRate) + + return nil +end + + +return RuneBookQualityYellow \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneCritToAttackRate.luau b/src/ServerStorage/Modules/Runes/RuneCritToAttackRate.luau new file mode 100644 index 0000000..d7f9021 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneCritToAttackRate.luau @@ -0,0 +1,37 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneCritToAttackRate = {} +RuneCritToAttackRate.__index = RuneCritToAttackRate +setmetatable(RuneCritToAttackRate, {__index = Rune}) + + +function RuneCritToAttackRate:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneCritToAttackRate) + + return self +end + +function RuneCritToAttackRate:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneCritToAttackRate:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local nowAttribute = AttributesData.critRate + if not nowAttribute then return nil end + + local addAttribute = math.floor(nowAttribute * 10) + Utils:TableSafeAddValue(AttributesData, "attackRate", addAttribute) + Utils:TableSafeSetValue(AttributesData, "critRate", 0) + return nil +end + + +return RuneCritToAttackRate \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneFirstAttack.luau b/src/ServerStorage/Modules/Runes/RuneFirstAttack.luau index f93fcf6..20adb0f 100644 --- a/src/ServerStorage/Modules/Runes/RuneFirstAttack.luau +++ b/src/ServerStorage/Modules/Runes/RuneFirstAttack.luau @@ -22,6 +22,10 @@ function RuneFirstAttack:Init(PlayerAI, Character: TypeList.Character) setmetatable(self, RuneFirstAttack) self.FirstAttack = true + return self +end + +function RuneFirstAttack:OnInitFinish() EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_ATTACK, function(eventData) if self.FirstAttack then self.FirstAttack = false @@ -30,9 +34,8 @@ function RuneFirstAttack:Init(PlayerAI, Character: TypeList.Character) end end return eventData - end, 10, self) + end, self.TriggerSlot, self) - return self end function RuneFirstAttack:Check(index: number, AttributesData: table, BehaviorNameList: table) diff --git a/src/ServerStorage/Modules/Runes/RuneKillCoin.luau b/src/ServerStorage/Modules/Runes/RuneKillCoin.luau new file mode 100644 index 0000000..8fde1ed --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneKillCoin.luau @@ -0,0 +1,49 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local PlayerInfoProxy = require(ServerStorage.Proxy.PlayerInfoProxy) +local Rng = require(ReplicatedStorage.Tools.Rng) + +--> EventFilter +local EventFilter = require(ReplicatedStorage.Modules.EventFilter) +local EventFilterEnum = require(ReplicatedStorage.Data.EventFilterEnum) + + + + +local RuneKillCoin = {} +RuneKillCoin.__index = RuneKillCoin +setmetatable(RuneKillCoin, {__index = Rune}) + + +function RuneKillCoin:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneKillCoin) + + return self +end + +function RuneKillCoin:OnInitFinish() + EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_KILL_MONSTER, function(eventData) + if Rng:RandomPercent(25) then + PlayerInfoProxy:ChangeItemCount(self.PlayerAI.Player, 1, 10) + end + return eventData + end, self.TriggerSlot, self) +end + +function RuneKillCoin:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneKillCoin:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + return nil +end + + +return RuneKillCoin \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneKillEnemyHeal.luau b/src/ServerStorage/Modules/Runes/RuneKillEnemyHeal.luau index 185e128..7527aee 100644 --- a/src/ServerStorage/Modules/Runes/RuneKillEnemyHeal.luau +++ b/src/ServerStorage/Modules/Runes/RuneKillEnemyHeal.luau @@ -25,16 +25,19 @@ function RuneKillEnemyHeal:Init(PlayerAI, Character: TypeList.Character) setmetatable(self, RuneKillEnemyHeal) self.FirstAttack = true + return self +end + +function RuneKillEnemyHeal:OnInitFinish() EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_KILL_MONSTER, function(eventData) if self.FirstAttack then self.FirstAttack = false - DamageProxy:Heal(PlayerAI, PlayerAI, math.floor(self.Character.Config.maxhp * 0.01)) + DamageProxy:Heal(self.PlayerAI, self.PlayerAI, math.floor(self.Character.Config.maxhp * 0.01)) end - end, 10, self) - - return self + end, self.TriggerSlot, self) end + function RuneKillEnemyHeal:Check(index: number, AttributesData: table, BehaviorNameList: table) return true end diff --git a/src/ServerStorage/Modules/Runes/RuneNormalCritRate.luau b/src/ServerStorage/Modules/Runes/RuneNormalCritRate.luau new file mode 100644 index 0000000..c960dd6 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneNormalCritRate.luau @@ -0,0 +1,31 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local RuneNormalCritRate = {} +RuneNormalCritRate.__index = RuneNormalCritRate +setmetatable(RuneNormalCritRate, {__index = Rune}) + + +function RuneNormalCritRate:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneNormalCritRate) + + return self +end + +function RuneNormalCritRate:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneNormalCritRate:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + Utils:TableSafeAddValue(AttributesData, "critDamageRate", 100) + return nil +end + + +return RuneNormalCritRate \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneNormalNoElement.luau b/src/ServerStorage/Modules/Runes/RuneNormalNoElement.luau new file mode 100644 index 0000000..8224ed9 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneNormalNoElement.luau @@ -0,0 +1,51 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local RuneNormalNoElement = {} +RuneNormalNoElement.__index = RuneNormalNoElement +setmetatable(RuneNormalNoElement, {__index = Rune}) + + +function RuneNormalNoElement:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneNormalNoElement) + + return self +end + +function RuneNormalNoElement:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneNormalNoElement:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local pDataFolder = ReplicatedStorage:FindFirstChild("PlayerData") + if not pDataFolder then return nil end + local pData = pDataFolder:FindFirstChild(self.PlayerAI.Player.UserId) + if not pData then return nil end + + local equipmentFolder = pData:FindFirstChild("Equipment") + if not equipmentFolder then return nil end + local equipmentList = equipmentFolder:GetChildren() + if #equipmentList == 0 then return nil end + + local elementNumber = 0 + for _, equipment in equipmentList do + local equipmentWearing = equipment:GetAttribute("wearing") + if equipmentWearing > 0 and #equipment:FindFirstChild("Element"):GetAttributes() == 0 then + elementNumber = elementNumber + 1 + end + end + + local attackRate = math.floor((AttributesData.attackRate or 100) * elementNumber * 50 / 100) + Utils:TableSafeAddValue(AttributesData, "attackRate", attackRate) + + return nil +end + + +return RuneNormalNoElement \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneSacrifice.luau b/src/ServerStorage/Modules/Runes/RuneSacrifice.luau new file mode 100644 index 0000000..0df0833 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneSacrifice.luau @@ -0,0 +1,38 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneSacrifice = {} +RuneSacrifice.__index = RuneSacrifice +setmetatable(RuneSacrifice, {__index = Rune}) + + +function RuneSacrifice:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneSacrifice) + + return self +end + +function RuneSacrifice:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneSacrifice:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local hpAttribute = AttributesData.hp + + local reduceHp = math.floor(hpAttribute * 0.25) + + Utils:TableSafeAddValue(AttributesData, "attackRate", 50) + Utils:TableSafeSetValue(AttributesData, "hp", RuneSacrifice - reduceHp) + + return nil +end + + +return RuneSacrifice \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneThunderAddDamageTime.luau b/src/ServerStorage/Modules/Runes/RuneThunderAddDamageTime.luau new file mode 100644 index 0000000..3c07054 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneThunderAddDamageTime.luau @@ -0,0 +1,47 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local DamageProxy = require(ServerStorage.Proxy.DamageProxy) + +--> EventFilter +local EventFilter = require(ReplicatedStorage.Modules.EventFilter) +local EventFilterEnum = require(ReplicatedStorage.Data.EventFilterEnum) + +local RuneThunderAddDamageTime = {} +RuneThunderAddDamageTime.__index = RuneThunderAddDamageTime +setmetatable(RuneThunderAddDamageTime, {__index = Rune}) + + +function RuneThunderAddDamageTime:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneThunderAddDamageTime) + + return self +end + +function RuneThunderAddDamageTime:OnInitFinish() + EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_ATTACK, function(eventData) + for _, damageData in eventData.damageData do + if damageData.ElementType == DamageProxy.ElementType.LIGHT then + local newDamageData = Utils:DeepCopyTable(damageData) + table.insert(eventData.damageData, newDamageData) + end + end + return eventData + end, self.TriggerSlot, self) +end + +function RuneThunderAddDamageTime:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneThunderAddDamageTime:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + return nil +end + +return RuneThunderAddDamageTime \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneThunderDoubleDamage.luau b/src/ServerStorage/Modules/Runes/RuneThunderDoubleDamage.luau new file mode 100644 index 0000000..09b6bb8 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneThunderDoubleDamage.luau @@ -0,0 +1,53 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local DamageProxy = require(ServerStorage.Proxy.DamageProxy) + +--> EventFilter +local EventFilter = require(ReplicatedStorage.Modules.EventFilter) +local EventFilterEnum = require(ReplicatedStorage.Data.EventFilterEnum) + +local RuneThunderDoubleDamage = {} +RuneThunderDoubleDamage.__index = RuneThunderDoubleDamage +setmetatable(RuneThunderDoubleDamage, {__index = Rune}) + + +function RuneThunderDoubleDamage:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneThunderDoubleDamage) + + return self +end + +function RuneThunderDoubleDamage:OnInitFinish() + EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_ATTACK, function(eventData) + local newDamageDataList = {} + for _, damageData in eventData.damageData do + if damageData.ElementType == DamageProxy.ElementType.LIGHT then + local newDamageData = Utils:DeepCopyTable(damageData) + table.insert(newDamageDataList, newDamageData) + end + end + if #newDamageDataList > 0 then + for _, newDamageData in newDamageDataList do + table.insert(eventData.damageData, newDamageData) + end + end + return eventData + end, self.TriggerSlot, self) +end + +function RuneThunderDoubleDamage:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneThunderDoubleDamage:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + return nil +end + +return RuneThunderDoubleDamage \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneWearElementAttackSpeed.luau b/src/ServerStorage/Modules/Runes/RuneWearElementAttackSpeed.luau new file mode 100644 index 0000000..f874079 --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneWearElementAttackSpeed.luau @@ -0,0 +1,52 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneWearElementAttackSpeed = {} +RuneWearElementAttackSpeed.__index = RuneWearElementAttackSpeed +setmetatable(RuneWearElementAttackSpeed, {__index = Rune}) + + +function RuneWearElementAttackSpeed:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneWearElementAttackSpeed) + + return self +end + +function RuneWearElementAttackSpeed:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneWearElementAttackSpeed:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local pDataFolder = ReplicatedStorage:FindFirstChild("PlayerData") + if not pDataFolder then return nil end + local pData = pDataFolder:FindFirstChild(self.PlayerAI.Player.UserId) + if not pData then return nil end + + local equipmentFolder = pData:FindFirstChild("Equipment") + if not equipmentFolder then return nil end + local equipmentList = equipmentFolder:GetChildren() + if #equipmentList == 0 then return nil end + + local elementNumber = 0 + for _, equipment in equipmentList do + local equipmentWearing = equipment:GetAttribute("wearing") + if equipmentWearing > 0 then + elementNumber = elementNumber + #equipment:FindFirstChild("Element"):GetAttributes() + end + end + + local baseAttribute = AttributesData.atkSpeed or 1 + local addAttribute = baseAttribute - math.floor(baseAttribute * elementNumber * 25) / 100 + Utils:TableSafeSetValue(AttributesData, "atkSpeed", addAttribute) + + return nil +end + +return RuneWearElementAttackSpeed \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneWearGenWeapon.luau b/src/ServerStorage/Modules/Runes/RuneWearGenWeapon.luau new file mode 100644 index 0000000..c877f4f --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneWearGenWeapon.luau @@ -0,0 +1,59 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) +local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag) + +local RuneWearGenWeapon = {} +RuneWearGenWeapon.__index = RuneWearGenWeapon +setmetatable(RuneWearGenWeapon, {__index = Rune}) + + +function RuneWearGenWeapon:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneWearGenWeapon) + + return self +end + +function RuneWearGenWeapon:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneWearGenWeapon:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local pDataFolder = ReplicatedStorage:FindFirstChild("PlayerData") + if not pDataFolder then return nil end + local pData = pDataFolder:FindFirstChild(self.PlayerAI.Player.UserId) + if not pData then return nil end + + local equipmentFolder = pData:FindFirstChild("Equipment") + if not equipmentFolder then return nil end + local equipmentList = equipmentFolder:GetChildren() + if #equipmentList == 0 then return nil end + + -- 找到自己穿戴的装备所有类型 + local wearingTypeList = {} + for _, equipment in equipmentList do + local equipmentSubType = equipment:GetAttribute("subType") + local equipmentWearing = equipment:GetAttribute("wearing") + if equipmentWearing > 0 and not table.find(wearingTypeList, RuneWeaponTag[equipmentSubType]) then + table.insert(wearingTypeList, RuneWeaponTag[equipmentSubType]) + end + end + + -- 如果没有对应类型就加在ShareData中 + for _, wearingType in RuneWeaponTag do + if not table.find(wearingTypeList, wearingType) then + self.PlayerAI:SetSharedData(wearingType, 1) + end + end + + return nil +end + + +return RuneWearGenWeapon \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneWearHeavySword.luau b/src/ServerStorage/Modules/Runes/RuneWearHeavySword.luau index 8de30b3..92a4dbe 100644 --- a/src/ServerStorage/Modules/Runes/RuneWearHeavySword.luau +++ b/src/ServerStorage/Modules/Runes/RuneWearHeavySword.luau @@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage") local Utils = require(ReplicatedStorage.Tools.Utils) local TypeList = require(ServerStorage.Base.TypeList) local Rune = require(ServerStorage.Base.Rune) +local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag) local RuneWearHeavySword = {} RuneWearHeavySword.__index = RuneWearHeavySword @@ -45,7 +46,7 @@ function RuneWearHeavySword:OnExecute(index: number, AttributesData: table, Beha end end - local CheckShareName = "RuneTagHeavySword" + local CheckShareName = RuneWeaponTag[4] if self.PlayerAI:GetSharedData(CheckShareName) then subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) end diff --git a/src/ServerStorage/Modules/Runes/RuneWearKnife.luau b/src/ServerStorage/Modules/Runes/RuneWearKnife.luau index bffcd68..4ca465b 100644 --- a/src/ServerStorage/Modules/Runes/RuneWearKnife.luau +++ b/src/ServerStorage/Modules/Runes/RuneWearKnife.luau @@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage") local Utils = require(ReplicatedStorage.Tools.Utils) local TypeList = require(ServerStorage.Base.TypeList) local Rune = require(ServerStorage.Base.Rune) +local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag) local RuneWearKnife = {} RuneWearKnife.__index = RuneWearKnife @@ -45,7 +46,7 @@ function RuneWearKnife:OnExecute(index: number, AttributesData: table, BehaviorN end end - local CheckShareName = "RuneTagKnife" + local CheckShareName = RuneWeaponTag[1] if self.PlayerAI:GetSharedData(CheckShareName) then subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) end diff --git a/src/ServerStorage/Modules/Runes/RuneWearSingleRuneSlot.luau b/src/ServerStorage/Modules/Runes/RuneWearSingleRuneSlot.luau new file mode 100644 index 0000000..d1c00bf --- /dev/null +++ b/src/ServerStorage/Modules/Runes/RuneWearSingleRuneSlot.luau @@ -0,0 +1,52 @@ +--> Services +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local ServerStorage = game:GetService("ServerStorage") + +--> Dependencies +local Utils = require(ReplicatedStorage.Tools.Utils) +local TypeList = require(ServerStorage.Base.TypeList) +local Rune = require(ServerStorage.Base.Rune) + +local RuneWearSingleRuneSlot = {} +RuneWearSingleRuneSlot.__index = RuneWearSingleRuneSlot +setmetatable(RuneWearSingleRuneSlot, {__index = Rune}) + + +function RuneWearSingleRuneSlot:Init(PlayerAI, Character: TypeList.Character) + local self = Rune:Init(PlayerAI, Character, script.Name) + setmetatable(self, RuneWearSingleRuneSlot) + + return self +end + +function RuneWearSingleRuneSlot:Check(index: number, AttributesData: table, BehaviorNameList: table) + return true +end + +function RuneWearSingleRuneSlot:OnExecute(index: number, AttributesData: table, BehaviorNameList: table) + local pDataFolder = ReplicatedStorage:FindFirstChild("PlayerData") + if not pDataFolder then return nil end + local pData = pDataFolder:FindFirstChild(self.PlayerAI.Player.UserId) + if not pData then return nil end + + local equipmentFolder = pData:FindFirstChild("Equipment") + if not equipmentFolder then return nil end + local equipmentList = equipmentFolder:GetChildren() + if #equipmentList == 0 then return nil end + + local singleRuneSlotNumber = 0 + for _, equipment in equipmentList do + local equipmentMaxRuneNumber = equipment:GetAttribute("maxRuneNumber") + if equipmentMaxRuneNumber == 1 then + singleRuneSlotNumber = singleRuneSlotNumber + 1 + end + end + + local baseAttribute = AttributesData.attackRate or 100 + local addAttribute = baseAttribute * (math.floor(singleRuneSlotNumber * 25) / 100) + Utils:TableSafeSetValue(AttributesData, "attackRate", addAttribute) + + return nil +end + +return RuneWearSingleRuneSlot \ No newline at end of file diff --git a/src/ServerStorage/Modules/Runes/RuneWearStick.luau b/src/ServerStorage/Modules/Runes/RuneWearStick.luau index 4aa1a87..ab4ff0e 100644 --- a/src/ServerStorage/Modules/Runes/RuneWearStick.luau +++ b/src/ServerStorage/Modules/Runes/RuneWearStick.luau @@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage") local Utils = require(ReplicatedStorage.Tools.Utils) local TypeList = require(ServerStorage.Base.TypeList) local Rune = require(ServerStorage.Base.Rune) +local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag) local RuneWearStick = {} RuneWearStick.__index = RuneWearStick @@ -45,7 +46,7 @@ function RuneWearStick:OnExecute(index: number, AttributesData: table, BehaviorN end end - local CheckShareName = "RuneTagStick" + local CheckShareName = RuneWeaponTag[3] if self.PlayerAI:GetSharedData(CheckShareName) then subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) end diff --git a/src/ServerStorage/Modules/Runes/RuneWearSword.luau b/src/ServerStorage/Modules/Runes/RuneWearSword.luau index b0ee014..0487e62 100644 --- a/src/ServerStorage/Modules/Runes/RuneWearSword.luau +++ b/src/ServerStorage/Modules/Runes/RuneWearSword.luau @@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage") local Utils = require(ReplicatedStorage.Tools.Utils) local TypeList = require(ServerStorage.Base.TypeList) local Rune = require(ServerStorage.Base.Rune) +local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag) local RuneWearSword = {} RuneWearSword.__index = RuneWearSword @@ -45,7 +46,7 @@ function RuneWearSword:OnExecute(index: number, AttributesData: table, BehaviorN end end - local CheckShareName = "RuneTagSword" + local CheckShareName = RuneWeaponTag[2] if self.PlayerAI:GetSharedData(CheckShareName) then subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) end diff --git a/src/ServerStorage/Proxy/PlayerFightProxy/PlayerAI.luau b/src/ServerStorage/Proxy/PlayerFightProxy/PlayerAI.luau index 5e315c0..7d3961a 100644 --- a/src/ServerStorage/Proxy/PlayerFightProxy/PlayerAI.luau +++ b/src/ServerStorage/Proxy/PlayerFightProxy/PlayerAI.luau @@ -113,6 +113,13 @@ function PlayerAI:AddRune(RuneName: string, WearingSlot: number?) self:UpdateRuneTriggerSlots() end +-- 触发所有符文初始化完成 +function PlayerAI:TriggerAllRunesInitFinish() + for _, data in self.RuneList do + data.rune:InitFinish() + end +end + -- 更新所有符文的TriggerSlot function PlayerAI:UpdateRuneTriggerSlots() -- 收集所有符文并按WearingSlot排序 diff --git a/src/StarterPlayerScripts/UI/Windows/RuneStateWindow/init.luau b/src/StarterPlayerScripts/UI/Windows/RuneStateWindow/init.luau index 9e29ffc..c6fe8e6 100644 --- a/src/StarterPlayerScripts/UI/Windows/RuneStateWindow/init.luau +++ b/src/StarterPlayerScripts/UI/Windows/RuneStateWindow/init.luau @@ -314,6 +314,7 @@ end -- 接收符文执行记录 function RuneStateWindow:OnRuneExecutionRecord(executionRecords: table) + print("OnRuneExecutionRecord", executionRecords) -- 自动刷新符文列表(获取最新的穿戴符文数据) self:RefreshRuneList()