Swallow/Spit Up Gen 5 Behavior and tests for Swallow/Spit Up/Stockpile (#2790)

This commit is contained in:
ghoulslash authored and GitHub committed 2023-03-05 09:50:47 -05:00
commit dec1b16138
10 files changed
+331 -17

No files matched your search

+20
View File
@@ -5545,6 +5545,9 @@ BattleScript_EffectStockpile::
waitanimation
printfromtable gStockpileUsedStringIds
waitmessage B_WAIT_TIME_LONG
.if B_STOCKPILE_RAISES_DEFS < GEN_4
goto BattleScript_EffectStockpileEnd
.endif
jumpifmovehadnoeffect BattleScript_EffectStockpileEnd
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_EffectStockpileDef
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_EffectStockpileEnd
@@ -5565,6 +5568,23 @@ BattleScript_EffectStockpileSpDef::
BattleScript_EffectStockpileEnd:
stockpile 1
goto BattleScript_MoveEnd
BattleScript_MoveEffectStockpileWoreOff::
.if B_STOCKPILE_RAISES_DEFS >= GEN_4
dostockpilestatchangeswearoff BS_ATTACKER, BattleScript_StockpileStatChangeDown
printstring STRINGID_STOCKPILEDEFFECTWOREOFF
waitmessage B_WAIT_TIME_SHORT
.endif
return
BattleScript_StockpileStatChangeDown:
statbuffchange MOVE_EFFECT_AFFECTS_USER, BattleScript_StockpileStatChangeDown_Ret
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_StockpileStatChangeDown_Ret:
return
BattleScript_EffectSpitUp::
attackcanceler