Skip to content

Commit

Permalink
Partial fix for Teeter Dance and Ability Dancer interaction (rh-hideo…
Browse files Browse the repository at this point in the history
…ut#4129)

* Parial fix for Teeter Dance and Ability Dancer interaction

* Removes rest of teeter dance checks and make it work with effect_confuse

* Update test/battle/ability/dancer.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* Update test/battle/ability/dancer.c

Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>
  • Loading branch information
3 people authored and Tclark61 committed Feb 22, 2024
1 parent 1d0594b commit 9a5481a
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 315 deletions.
58 changes: 0 additions & 58 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectHit @ EFFECT_LOW_KICK
.4byte BattleScript_EffectSecretPower @ EFFECT_SECRET_POWER
.4byte BattleScript_EffectHit @ EFFECT_RECOIL_33
.4byte BattleScript_EffectTeeterDance @ EFFECT_TEETER_DANCE
.4byte BattleScript_EffectHitEscape @ EFFECT_HIT_ESCAPE
.4byte BattleScript_EffectMudSport @ EFFECT_MUD_SPORT
.4byte BattleScript_EffectPoisonFang @ EFFECT_POISON_FANG
Expand Down Expand Up @@ -6129,63 +6128,6 @@ BattleScript_EffectRecoilHP25:
incrementgamestat GAME_STAT_USED_STRUGGLE
goto BattleScript_EffectHit

BattleScript_EffectTeeterDance::
attackcanceler
attackstring
ppreduce
setbyte gBattlerTarget, 0
BattleScript_TeeterDanceLoop::
movevaluescleanup
setmoveeffect MOVE_EFFECT_CONFUSION
jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_TeeterDanceLoopIncrement
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_TeeterDanceOwnTempoPrevents
jumpifsubstituteblocks BattleScript_TeeterDanceSubstitutePrevents
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_TeeterDanceAlreadyConfused
jumpifhasnohp BS_TARGET, BattleScript_TeeterDanceLoopIncrement
accuracycheck BattleScript_TeeterDanceMissed, ACC_CURR_MOVE
jumpifsafeguard BattleScript_TeeterDanceSafeguardProtected
attackanimation
waitanimation
seteffectprimary
resultmessage
waitmessage B_WAIT_TIME_LONG
BattleScript_TeeterDanceDoMoveEndIncrement::
moveendto MOVEEND_NEXT_TARGET
BattleScript_TeeterDanceLoopIncrement::
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop
end

BattleScript_TeeterDanceOwnTempoPrevents::
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNPREVENTSCONFUSIONWITH
waitmessage B_WAIT_TIME_LONG
goto BattleScript_TeeterDanceDoMoveEndIncrement

BattleScript_TeeterDanceSafeguardProtected::
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNUSEDSAFEGUARD
waitmessage B_WAIT_TIME_LONG
goto BattleScript_TeeterDanceDoMoveEndIncrement

BattleScript_TeeterDanceSubstitutePrevents::
pause B_WAIT_TIME_SHORT
printstring STRINGID_BUTITFAILED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_TeeterDanceDoMoveEndIncrement

BattleScript_TeeterDanceAlreadyConfused::
setalreadystatusedmoveattempt BS_ATTACKER
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNALREADYCONFUSED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_TeeterDanceDoMoveEndIncrement

BattleScript_TeeterDanceMissed::
resultmessage
waitmessage B_WAIT_TIME_LONG
goto BattleScript_TeeterDanceDoMoveEndIncrement

BattleScript_EffectMudSport::
BattleScript_EffectWaterSport::
attackcanceler
Expand Down
2 changes: 1 addition & 1 deletion include/battle_ai_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool32 HasSnatchAffectedMove(u32 battler);
// status checks
bool32 AI_CanBeBurned(u32 battler, u32 ability);
bool32 AI_CanGetFrostbite(u32 battler, u32 ability);
bool32 AI_CanBeConfused(u32 battler, u32 ability);
bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability);
bool32 AI_CanSleep(u32 battler, u32 ability);
bool32 IsBattlerIncapacitated(u32 battler, u32 ability);
bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
Expand Down
Loading

0 comments on commit 9a5481a

Please sign in to comment.