Skip to content

Commit

Permalink
Fix protect recoil issue and add tests for protect (#3321)
Browse files Browse the repository at this point in the history
* fix protect recoil issue and add tests for protect

* test for #3312 and baneful bunker fix

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* more recoil moves for protect test

* Update test/battle/move_effect/protect.c

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>

* rename spiky shield test

---------

Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>
  • Loading branch information
DizzyEggg and AsparagusEduardo authored Sep 26, 2023
1 parent a264083 commit e0e49a9
Show file tree
Hide file tree
Showing 2 changed files with 391 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -9304,6 +9304,7 @@ BattleScript_SpikyShieldEffect::
printstring STRINGID_PKMNHURTSWITH
waitmessage B_WAIT_TIME_LONG
tryfaintmon BS_ATTACKER
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
BattleScript_SpikyShieldRet::
return

Expand All @@ -9315,13 +9316,15 @@ BattleScript_KingsShieldEffect::
copybyte sBATTLER, gBattlerTarget
copybyte gBattlerTarget, gBattlerAttacker
copybyte gBattlerAttacker, sBATTLER
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
return

BattleScript_BanefulBunkerEffect::
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_PASSIVE_DAMAGE
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
seteffectsecondary
setmoveeffect 0
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
return

BattleScript_CuteCharmActivates::
Expand Down
Loading

0 comments on commit e0e49a9

Please sign in to comment.