Skip to content

Commit

Permalink
Use new names for trigger buffs
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Apr 23, 2024
1 parent a49b01f commit b4a026a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 44 deletions.
48 changes: 24 additions & 24 deletions app/schemas/gameenums.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class BuffType(IntEnum):
DAMAGE_FUNCTION = 86
UP_GIVEGAIN_HP = 87
DOWN_GIVEGAIN_HP = 88
COMMANDATTACK_FUNCTION = 89
COMMANDATTACK_AFTER_FUNCTION = 89
DEADATTACK_FUNCTION = 90
UP_SPECIALDEFENCE = 91
DOWN_SPECIALDEFENCE = 92
Expand Down Expand Up @@ -700,17 +700,17 @@ class BuffType(IntEnum):
DOWN_FUNCGAIN_NP = 125
UP_FUNC_HP_REDUCE = 126
DOWN_FUNC_HP_REDUCE = 127
UP_DEFENCECOMMAN_DAMAGE = 128
DOWN_DEFENCECOMMAN_DAMAGE = 129
UP_DEFENCE_COMMANDDAMAGE = 128
DOWN_DEFENCE_COMMANDDAMAGE = 129
NPATTACK_PREV_BUFF = 130
FIX_COMMANDCARD = 131
DONOT_GAINNP = 132
FIELD_INDIVIDUALITY = 133
DONOT_ACT_COMMANDTYPE = 134
UP_DAMAGE_EVENT_POINT = 135
UP_DAMAGE_SPECIAL = 136
ATTACK_FUNCTION = 137
COMMANDCODEATTACK_FUNCTION = 138
ATTACK_AFTER_FUNCTION = 137
COMMANDCODEATTACK_BEFORE_FUNCTION = 138
DONOT_NOBLE_COND_MISMATCH = 139
DONOT_SELECT_COMMANDCARD = 140
DONOT_REPLACE = 141
Expand Down Expand Up @@ -844,7 +844,7 @@ class NiceBuffType(StrEnum):
damageFunction = "damageFunction"
upGivegainHp = "upGivegainHp"
downGivegainHp = "downGivegainHp"
commandattackFunction = "commandattackFunction"
commandattackAfterFunction = "commandattackAfterFunction"
deadattackFunction = "deadattackFunction"
upSpecialdefence = "upSpecialdefence"
downSpecialdefence = "downSpecialdefence"
Expand Down Expand Up @@ -883,17 +883,17 @@ class NiceBuffType(StrEnum):
downFuncgainNp = "downFuncgainNp"
upFuncHpReduce = "upFuncHpReduce"
downFuncHpReduce = "downFuncHpReduce"
upDefencecommanDamage = "upDefencecommanDamage"
downDefencecommanDamage = "downDefencecommanDamage"
upDefenceCommanddamage = "upDefenceCommanddamage"
downDefenceCommanddamage = "downDefenceCommanddamage"
npattackPrevBuff = "npattackPrevBuff"
fixCommandcard = "fixCommandcard"
donotGainnp = "donotGainnp"
fieldIndividuality = "fieldIndividuality"
donotActCommandtype = "donotActCommandtype"
upDamageEventPoint = "upDamageEventPoint"
upDamageSpecial = "upDamageSpecial"
attackFunction = "attackFunction"
commandcodeattackFunction = "commandcodeattackFunction"
attackAfterFunction = "attackAfterFunction"
commandcodeattackBeforeFunction = "commandcodeattackBeforeFunction"
donotNobleCondMismatch = "donotNobleCondMismatch"
donotSelectCommandcard = "donotSelectCommandcard"
donotReplace = "donotReplace"
Expand Down Expand Up @@ -1025,7 +1025,7 @@ class NiceBuffType(StrEnum):
86: NiceBuffType.damageFunction,
87: NiceBuffType.upGivegainHp,
88: NiceBuffType.downGivegainHp,
89: NiceBuffType.commandattackFunction,
89: NiceBuffType.commandattackAfterFunction,
90: NiceBuffType.deadattackFunction,
91: NiceBuffType.upSpecialdefence,
92: NiceBuffType.downSpecialdefence,
Expand Down Expand Up @@ -1064,17 +1064,17 @@ class NiceBuffType(StrEnum):
125: NiceBuffType.downFuncgainNp,
126: NiceBuffType.upFuncHpReduce,
127: NiceBuffType.downFuncHpReduce,
128: NiceBuffType.upDefencecommanDamage,
129: NiceBuffType.downDefencecommanDamage,
128: NiceBuffType.upDefenceCommanddamage,
129: NiceBuffType.downDefenceCommanddamage,
130: NiceBuffType.npattackPrevBuff,
131: NiceBuffType.fixCommandcard,
132: NiceBuffType.donotGainnp,
133: NiceBuffType.fieldIndividuality,
134: NiceBuffType.donotActCommandtype,
135: NiceBuffType.upDamageEventPoint,
136: NiceBuffType.upDamageSpecial,
137: NiceBuffType.attackFunction,
138: NiceBuffType.commandcodeattackFunction,
137: NiceBuffType.attackAfterFunction,
138: NiceBuffType.commandcodeattackBeforeFunction,
139: NiceBuffType.donotNobleCondMismatch,
140: NiceBuffType.donotSelectCommandcard,
141: NiceBuffType.donotReplace,
Expand Down Expand Up @@ -1190,7 +1190,7 @@ class BuffAction(IntEnum):
FUNCTION_WAVESTART = 54
FUNCTION_SELFTURNEND = 55
GIVE_GAIN_HP = 56
FUNCTION_COMMANDATTACK = 57
FUNCTION_COMMANDATTACK_AFTER = 57
FUNCTION_DEADATTACK = 58
FUNCTION_ENTRY = 59
CHAGETD = 60
Expand All @@ -1213,8 +1213,8 @@ class BuffAction(IntEnum):
DONOT_ACT_COMMANDTYPE = 77
DAMAGE_EVENT_POINT = 78
DAMAGE_SPECIAL = 79
FUNCTION_ATTACK = 80
FUNCTION_COMMANDCODEATTACK = 81
FUNCTION_ATTACK_AFTER = 80
FUNCTION_COMMANDCODEATTACK_BEFORE = 81
DONOT_NOBLE_COND_MISMATCH = 82
DONOT_SELECT_COMMANDCARD = 83
DONOT_REPLACE = 84
Expand Down Expand Up @@ -1324,7 +1324,7 @@ class NiceBuffAction(StrEnum):
functionWavestart = "functionWavestart"
functionSelfturnend = "functionSelfturnend"
giveGainHp = "giveGainHp"
functionCommandattack = "functionCommandattack"
functionCommandattackAfter = "functionCommandattackAfter"
functionDeadattack = "functionDeadattack"
functionEntry = "functionEntry"
chagetd = "chagetd"
Expand All @@ -1347,8 +1347,8 @@ class NiceBuffAction(StrEnum):
donotActCommandtype = "donotActCommandtype"
damageEventPoint = "damageEventPoint"
damageSpecial = "damageSpecial"
functionAttack = "functionAttack"
functionCommandcodeattack = "functionCommandcodeattack"
functionAttackAfter = "functionAttackAfter"
functionCommandcodeattackBefore = "functionCommandcodeattackBefore"
donotNobleCondMismatch = "donotNobleCondMismatch"
donotSelectCommandcard = "donotSelectCommandcard"
donotReplace = "donotReplace"
Expand Down Expand Up @@ -1456,7 +1456,7 @@ class NiceBuffAction(StrEnum):
54: NiceBuffAction.functionWavestart,
55: NiceBuffAction.functionSelfturnend,
56: NiceBuffAction.giveGainHp,
57: NiceBuffAction.functionCommandattack,
57: NiceBuffAction.functionCommandattackAfter,
58: NiceBuffAction.functionDeadattack,
59: NiceBuffAction.functionEntry,
60: NiceBuffAction.chagetd,
Expand All @@ -1479,8 +1479,8 @@ class NiceBuffAction(StrEnum):
77: NiceBuffAction.donotActCommandtype,
78: NiceBuffAction.damageEventPoint,
79: NiceBuffAction.damageSpecial,
80: NiceBuffAction.functionAttack,
81: NiceBuffAction.functionCommandcodeattack,
80: NiceBuffAction.functionAttackAfter,
81: NiceBuffAction.functionCommandcodeattackBefore,
82: NiceBuffAction.donotNobleCondMismatch,
83: NiceBuffAction.donotSelectCommandcard,
84: NiceBuffAction.donotReplace,
Expand Down
16 changes: 8 additions & 8 deletions scripts/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export enum NiceBuffType {
DAMAGE_FUNCTION = "damageFunction",
UP_GIVEGAIN_HP = "upGivegainHp",
DOWN_GIVEGAIN_HP = "downGivegainHp",
COMMANDATTACK_FUNCTION = "commandattackFunction",
COMMANDATTACK_AFTER_FUNCTION = "commandattackAfterFunction",
DEADATTACK_FUNCTION = "deadattackFunction",
UP_SPECIALDEFENCE = "upSpecialdefence",
DOWN_SPECIALDEFENCE = "downSpecialdefence",
Expand Down Expand Up @@ -301,17 +301,17 @@ export enum NiceBuffType {
DOWN_FUNCGAIN_NP = "downFuncgainNp",
UP_FUNC_HP_REDUCE = "upFuncHpReduce",
DOWN_FUNC_HP_REDUCE = "downFuncHpReduce",
UP_DEFENCECOMMAN_DAMAGE = "upDefencecommanDamage",
DOWN_DEFENCECOMMAN_DAMAGE = "downDefencecommanDamage",
UP_DEFENCE_COMMANDDAMAGE = "upDefenceCommanddamage",
DOWN_DEFENCE_COMMANDDAMAGE = "downDefenceCommanddamage",
NPATTACK_PREV_BUFF = "npattackPrevBuff",
FIX_COMMANDCARD = "fixCommandcard",
DONOT_GAINNP = "donotGainnp",
FIELD_INDIVIDUALITY = "fieldIndividuality",
DONOT_ACT_COMMANDTYPE = "donotActCommandtype",
UP_DAMAGE_EVENT_POINT = "upDamageEventPoint",
UP_DAMAGE_SPECIAL = "upDamageSpecial",
ATTACK_FUNCTION = "attackFunction",
COMMANDCODEATTACK_FUNCTION = "commandcodeattackFunction",
ATTACK_AFTER_FUNCTION = "attackAfterFunction",
COMMANDCODEATTACK_BEFORE_FUNCTION = "commandcodeattackBeforeFunction",
DONOT_NOBLE_COND_MISMATCH = "donotNobleCondMismatch",
DONOT_SELECT_COMMANDCARD = "donotSelectCommandcard",
DONOT_REPLACE = "donotReplace",
Expand Down Expand Up @@ -426,7 +426,7 @@ export enum NiceBuffAction {
FUNCTION_WAVESTART = "functionWavestart",
FUNCTION_SELFTURNEND = "functionSelfturnend",
GIVE_GAIN_HP = "giveGainHp",
FUNCTION_COMMANDATTACK = "functionCommandattack",
FUNCTION_COMMANDATTACK_AFTER = "functionCommandattackAfter",
FUNCTION_DEADATTACK = "functionDeadattack",
FUNCTION_ENTRY = "functionEntry",
CHAGETD = "chagetd",
Expand All @@ -449,8 +449,8 @@ export enum NiceBuffAction {
DONOT_ACT_COMMANDTYPE = "donotActCommandtype",
DAMAGE_EVENT_POINT = "damageEventPoint",
DAMAGE_SPECIAL = "damageSpecial",
FUNCTION_ATTACK = "functionAttack",
FUNCTION_COMMANDCODEATTACK = "functionCommandcodeattack",
FUNCTION_ATTACK_AFTER = "functionAttackAfter",
FUNCTION_COMMANDCODEATTACK_BEFORE = "functionCommandcodeattackBefore",
DONOT_NOBLE_COND_MISMATCH = "donotNobleCondMismatch",
DONOT_SELECT_COMMANDCARD = "donotSelectCommandcard",
DONOT_REPLACE = "donotReplace",
Expand Down
12 changes: 0 additions & 12 deletions scripts/extract_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ def convert_name(name: str) -> str:


RAW_NAME_OVERRIDE = {
"BuffType": {
"COMMANDATTACK_AFTER_FUNCTION": "COMMANDATTACK_FUNCTION",
"UP_DEFENCE_COMMANDDAMAGE": "UP_DEFENCECOMMAN_DAMAGE",
"DOWN_DEFENCE_COMMANDDAMAGE": "DOWN_DEFENCECOMMAN_DAMAGE",
"ATTACK_AFTER_FUNCTION": "ATTACK_FUNCTION",
"COMMANDCODEATTACK_BEFORE_FUNCTION": "COMMANDCODEATTACK_FUNCTION",
},
"BuffAction": {
"FUNCTION_COMMANDATTACK_AFTER": "FUNCTION_COMMANDATTACK",
"FUNCTION_ATTACK_AFTER": "FUNCTION_ATTACK",
"FUNCTION_COMMANDCODEATTACK_BEFORE": "FUNCTION_COMMANDCODEATTACK",
},
"BattleFieldEnvironmentDataGrantType": {
"None": "None_",
},
Expand Down

0 comments on commit b4a026a

Please sign in to comment.