This commit is contained in:
gechangfu 2025-08-22 12:32:05 +08:00
parent 532dab80a0
commit 2bcb438e65
30 changed files with 703 additions and 46 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,10 @@
local RuneWeaponTag = {}
RuneWeaponTag = {
[1] = "RuneTagKnife",
[2] = "RuneTagSword",
[3] = "RuneTagStick",
[4] = "RuneTagHeavySword",
}
return RuneWeaponTag

View File

@ -24,11 +24,19 @@
{"id":26,"type":1,"specialType":null,"effectAttribute":"mpRecoverBonus","battleValue":[1,10],"iconId":23,"nameId":226}, {"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":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":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":29,"type":2,"specialType":1,"effectAttribute":"critRateFire","battleValue":[1,10],"iconId":26,"nameId":229},
{"id":51,"type":1,"specialType":null,"effectAttribute":"skillNumber","battleValue":[1,10],"iconId":27,"nameId":251}, {"id":30,"type":2,"specialType":1,"effectAttribute":"critRateIce","battleValue":[1,10],"iconId":27,"nameId":230},
{"id":52,"type":1,"specialType":null,"effectAttribute":"extraAttributeNumber","battleValue":[1,10],"iconId":28,"nameId":252}, {"id":31,"type":2,"specialType":1,"effectAttribute":"critRateLight","battleValue":[1,10],"iconId":28,"nameId":231},
{"id":53,"type":1,"specialType":null,"effectAttribute":"elementNumber","battleValue":[1,10],"iconId":29,"nameId":253}, {"id":32,"type":2,"specialType":1,"effectAttribute":"critRateDark","battleValue":[1,10],"iconId":29,"nameId":232},
{"id":54,"type":1,"specialType":null,"effectAttribute":"elementDefNumber","battleValue":[1,10],"iconId":30,"nameId":254}, {"id":33,"type":2,"specialType":1,"effectAttribute":"critDamageRateFire","battleValue":[1,10],"iconId":26,"nameId":233},
{"id":55,"type":1,"specialType":null,"effectAttribute":"gemNumber","battleValue":[1,10],"iconId":31,"nameId":255}, {"id":34,"type":2,"specialType":1,"effectAttribute":"critDamageRateIce","battleValue":[1,10],"iconId":27,"nameId":234},
{"id":56,"type":1,"specialType":null,"effectAttribute":"runeNumber","battleValue":[1,10],"iconId":32,"nameId":256} {"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}
] ]

View File

@ -96,7 +96,59 @@
{"id":50013,"type":3,"typeArgs":[],"quality":14,"iconId":14,"nameId":50013,"textId":70013,"buyPrice":[],"sellPrice":[],"use":[],"showPackage":null}, {"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":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":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":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}
] ]

View File

@ -4,27 +4,27 @@
{"id":60002,"quality":1,"type":3,"icon":1,"nameId":60002,"runeName":"RuneLightDamage","behaviorName":null,"recycle":[],"isInPool":1}, {"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":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":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":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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":null,"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":"RuneIceCoffin","behaviorName":"IceCoffine","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":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":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}, {"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":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":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":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":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":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}, {"id":61026,"quality":2,"type":null,"icon":1,"nameId":61026,"runeName":null,"behaviorName":null,"recycle":[],"isInPool":1},

View File

@ -57,9 +57,9 @@ function Filter:AddHandler(handlerFunction: (data: any) -> any, priority: number
self._weakRefs[owner] = handlerId self._weakRefs[owner] = handlerId
end end
-- 按优先级排序(优先级高的先执行) -- 按优先级排序(优先级数值越小的越先执行)
table.sort(self._handlers, function(a, b) table.sort(self._handlers, function(a, b)
return a.priority > b.priority return a.priority < b.priority
end) end)
return handlerId return handlerId

View File

@ -277,6 +277,11 @@ function Utils:TableSafeAddValue(AttributesData: table, AttributeName: string, A
AttributesData[AttributeName] = (AttributesData[AttributeName] or 0) + AttributeValue AttributesData[AttributeName] = (AttributesData[AttributeName] or 0) + AttributeValue
end end
-- 给表设置keyvalue
function Utils:TableSafeSetValue(AttributesData: table, AttributeName: string, AttributeValue: number)
AttributesData[AttributeName] = AttributeValue
end
-- 给表增加keyvalue加法计算按第二个参数表的内容增加 -- 给表增加keyvalue加法计算按第二个参数表的内容增加
function Utils:TableSafeAddTableValue(AttributesData: table, AddTableValue: table) function Utils:TableSafeAddTableValue(AttributesData: table, AddTableValue: table)
for AttributeName, AttributeValue in AddTableValue do for AttributeName, AttributeValue in AddTableValue do

View File

@ -24,6 +24,15 @@ function Rune:Init(PlayerAI: Player, Character: TypeList.Character, ScriptName:
return self return self
end end
function Rune:InitFinish()
self:OnInitFinish()
end
function Rune:OnInitFinish()
-- 子类可以重写这个方法(主要是初始化时WearingSlot等还没赋值)
-- 监听事件用到参数是部分还没赋值,所以增加这个函数
end
-- 开始记录 -- 开始记录
function Rune:StartRecording() function Rune:StartRecording()
self.isRecording = true self.isRecording = true
@ -150,9 +159,9 @@ end
-- 销毁 -- 销毁
function Rune:OnDestroy() function Rune:OnDestroy()
self.executionRecords = nil -- 清理所有属性引用
for _, data in self do for key, _ in pairs(self) do
data = nil self[key] = nil
end end
self = nil self = nil
end end

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -22,6 +22,10 @@ function RuneFirstAttack:Init(PlayerAI, Character: TypeList.Character)
setmetatable(self, RuneFirstAttack) setmetatable(self, RuneFirstAttack)
self.FirstAttack = true self.FirstAttack = true
return self
end
function RuneFirstAttack:OnInitFinish()
EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_ATTACK, function(eventData) EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_ATTACK, function(eventData)
if self.FirstAttack then if self.FirstAttack then
self.FirstAttack = false self.FirstAttack = false
@ -30,9 +34,8 @@ function RuneFirstAttack:Init(PlayerAI, Character: TypeList.Character)
end end
end end
return eventData return eventData
end, 10, self) end, self.TriggerSlot, self)
return self
end end
function RuneFirstAttack:Check(index: number, AttributesData: table, BehaviorNameList: table) function RuneFirstAttack:Check(index: number, AttributesData: table, BehaviorNameList: table)

View File

@ -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

View File

@ -25,16 +25,19 @@ function RuneKillEnemyHeal:Init(PlayerAI, Character: TypeList.Character)
setmetatable(self, RuneKillEnemyHeal) setmetatable(self, RuneKillEnemyHeal)
self.FirstAttack = true self.FirstAttack = true
return self
end
function RuneKillEnemyHeal:OnInitFinish()
EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_KILL_MONSTER, function(eventData) EventFilter.SubscribeGlobalFilter(EventFilterEnum.BEFORE_KILL_MONSTER, function(eventData)
if self.FirstAttack then if self.FirstAttack then
self.FirstAttack = false 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
end, 10, self) end, self.TriggerSlot, self)
return self
end end
function RuneKillEnemyHeal:Check(index: number, AttributesData: table, BehaviorNameList: table) function RuneKillEnemyHeal:Check(index: number, AttributesData: table, BehaviorNameList: table)
return true return true
end end

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage")
local Utils = require(ReplicatedStorage.Tools.Utils) local Utils = require(ReplicatedStorage.Tools.Utils)
local TypeList = require(ServerStorage.Base.TypeList) local TypeList = require(ServerStorage.Base.TypeList)
local Rune = require(ServerStorage.Base.Rune) local Rune = require(ServerStorage.Base.Rune)
local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag)
local RuneWearHeavySword = {} local RuneWearHeavySword = {}
RuneWearHeavySword.__index = RuneWearHeavySword RuneWearHeavySword.__index = RuneWearHeavySword
@ -45,7 +46,7 @@ function RuneWearHeavySword:OnExecute(index: number, AttributesData: table, Beha
end end
end end
local CheckShareName = "RuneTagHeavySword" local CheckShareName = RuneWeaponTag[4]
if self.PlayerAI:GetSharedData(CheckShareName) then if self.PlayerAI:GetSharedData(CheckShareName) then
subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName)
end end

View File

@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage")
local Utils = require(ReplicatedStorage.Tools.Utils) local Utils = require(ReplicatedStorage.Tools.Utils)
local TypeList = require(ServerStorage.Base.TypeList) local TypeList = require(ServerStorage.Base.TypeList)
local Rune = require(ServerStorage.Base.Rune) local Rune = require(ServerStorage.Base.Rune)
local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag)
local RuneWearKnife = {} local RuneWearKnife = {}
RuneWearKnife.__index = RuneWearKnife RuneWearKnife.__index = RuneWearKnife
@ -45,7 +46,7 @@ function RuneWearKnife:OnExecute(index: number, AttributesData: table, BehaviorN
end end
end end
local CheckShareName = "RuneTagKnife" local CheckShareName = RuneWeaponTag[1]
if self.PlayerAI:GetSharedData(CheckShareName) then if self.PlayerAI:GetSharedData(CheckShareName) then
subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName)
end end

View File

@ -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

View File

@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage")
local Utils = require(ReplicatedStorage.Tools.Utils) local Utils = require(ReplicatedStorage.Tools.Utils)
local TypeList = require(ServerStorage.Base.TypeList) local TypeList = require(ServerStorage.Base.TypeList)
local Rune = require(ServerStorage.Base.Rune) local Rune = require(ServerStorage.Base.Rune)
local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag)
local RuneWearStick = {} local RuneWearStick = {}
RuneWearStick.__index = RuneWearStick RuneWearStick.__index = RuneWearStick
@ -45,7 +46,7 @@ function RuneWearStick:OnExecute(index: number, AttributesData: table, BehaviorN
end end
end end
local CheckShareName = "RuneTagStick" local CheckShareName = RuneWeaponTag[3]
if self.PlayerAI:GetSharedData(CheckShareName) then if self.PlayerAI:GetSharedData(CheckShareName) then
subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName)
end end

View File

@ -6,6 +6,7 @@ local ServerStorage = game:GetService("ServerStorage")
local Utils = require(ReplicatedStorage.Tools.Utils) local Utils = require(ReplicatedStorage.Tools.Utils)
local TypeList = require(ServerStorage.Base.TypeList) local TypeList = require(ServerStorage.Base.TypeList)
local Rune = require(ServerStorage.Base.Rune) local Rune = require(ServerStorage.Base.Rune)
local RuneWeaponTag = require(ReplicatedStorage.Data.RuneWeaponTag)
local RuneWearSword = {} local RuneWearSword = {}
RuneWearSword.__index = RuneWearSword RuneWearSword.__index = RuneWearSword
@ -45,7 +46,7 @@ function RuneWearSword:OnExecute(index: number, AttributesData: table, BehaviorN
end end
end end
local CheckShareName = "RuneTagSword" local CheckShareName = RuneWeaponTag[2]
if self.PlayerAI:GetSharedData(CheckShareName) then if self.PlayerAI:GetSharedData(CheckShareName) then
subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName) subTypeNumber = subTypeNumber + self.PlayerAI:GetSharedData(CheckShareName)
end end

View File

@ -113,6 +113,13 @@ function PlayerAI:AddRune(RuneName: string, WearingSlot: number?)
self:UpdateRuneTriggerSlots() self:UpdateRuneTriggerSlots()
end end
-- 触发所有符文初始化完成
function PlayerAI:TriggerAllRunesInitFinish()
for _, data in self.RuneList do
data.rune:InitFinish()
end
end
-- 更新所有符文的TriggerSlot -- 更新所有符文的TriggerSlot
function PlayerAI:UpdateRuneTriggerSlots() function PlayerAI:UpdateRuneTriggerSlots()
-- 收集所有符文并按WearingSlot排序 -- 收集所有符文并按WearingSlot排序

View File

@ -314,6 +314,7 @@ end
-- 接收符文执行记录 -- 接收符文执行记录
function RuneStateWindow:OnRuneExecutionRecord(executionRecords: table) function RuneStateWindow:OnRuneExecutionRecord(executionRecords: table)
print("OnRuneExecutionRecord", executionRecords)
-- 自动刷新符文列表(获取最新的穿戴符文数据) -- 自动刷新符文列表(获取最新的穿戴符文数据)
self:RefreshRuneList() self:RefreshRuneList()