feat(server): save economy hardening and CH5 continuation work
This commit is contained in:
@@ -21,7 +21,11 @@ constants=source('game/src/constants.cpp')
|
||||
table=constants[constants.index('aApplyInfo[MAX_APPLY_NUM]'):]
|
||||
table=table[table.index('{')+1:table.index('};')]
|
||||
rows=re.findall(r'\{\s*(POINT_[A-Z_]+)',table)
|
||||
assert len(rows)==141 and rows[139:]==['POINT_ATTBONUS_STONE','POINT_ATTBONUS_BOSS'] and set(rows[92:123]+rows[129:139])=={'POINT_NONE'},len(rows)
|
||||
assert len(rows)==141 and rows[139:]==['POINT_ATTBONUS_STONE','POINT_ATTBONUS_BOSS'] and set(rows[92:98]+rows[100:123]+rows[129:139])=={'POINT_NONE'},len(rows)
|
||||
assert rows[98]=='POINT_RESIST_MAGIC_REDUCTION' and names[98]=='APPLY_RESIST_MAGIC_REDUCTION'
|
||||
assert 'APPLY_RESIST_MAGIC_REDUCTION = 98,' in enum
|
||||
assert rows[99]=='POINT_RESIST_HUMAN' and names[99]=='APPLY_RESIST_HUMAN'
|
||||
assert 'APPLY_RESIST_HUMAN = 99,' in enum
|
||||
ELEM=('ELEC','FIRE','ICE','WIND','EARTH','DARK')
|
||||
# P7 talisman: APPLY_ENCHANT_* 123-128 (AVA2 names, ELECT for the db) -> POINT_ENCHANT_* 242-247
|
||||
assert rows[123:129]==['POINT_ENCHANT_'+e for e in ELEM],rows[123:129]
|
||||
@@ -32,6 +36,7 @@ char=source('game/src/char.cpp')
|
||||
apply=char[char.index('void CHARACTER::ApplyPoint('):char.index('void CHARACTER::MotionPacketEncode(')]
|
||||
assert all('case APPLY_ENCHANT_%s:'%e in apply for e in ELEM)
|
||||
assert 'case APPLY_ATTBONUS_STONE:' in apply and 'case APPLY_ATTBONUS_BOSS:' in apply
|
||||
assert 'case APPLY_RESIST_MAGIC_REDUCTION:' in apply
|
||||
points=source('game/src/char.h')
|
||||
assert all('POINT_ENCHANT_%s = %d,'%(e,242+i) in points for i,e in enumerate(ELEM)),'enchant points'
|
||||
assert 'POINT_ATTBONUS_STONE = 240,' in points and 'POINT_ATTBONUS_BOSS = 241,' in points
|
||||
|
||||
Reference in New Issue
Block a user