Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/engine/duel/effect_functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ PlayAttackAnimationOverAttackingPokemon:
ret

; apply a status condition of type 1 identified by register a to the target
ApplySubstatus1ToDefendingCard:
ApplySubstatus1ToAttackingCard:
push af
ld a, DUELVARS_ARENA_CARD_SUBSTATUS1
call GetTurnDuelistVariable
Expand Down Expand Up @@ -1553,7 +1553,7 @@ KakunaStiffenEffect:
ld a, ATK_ANIM_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_STIFFEN
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

KakunaPoisonPowder_AIEffect:
Expand All @@ -1564,15 +1564,15 @@ KakunaPoisonPowder_AIEffect:
GolbatLeechLifeEffect:
ld hl, wDealtDamage
ld e, [hl]
inc hl ; wDamageEffectiveness
inc hl
ld d, [hl]
call ApplyAndAnimateHPRecovery
ret

VenonatLeechLifeEffect:
ld hl, wDealtDamage
ld e, [hl]
inc hl ; wDamageEffectiveness
inc hl
ld d, [hl]
call ApplyAndAnimateHPRecovery
ret
Expand All @@ -1583,7 +1583,7 @@ SwordsDanceEffect:
cp SCYTHER
ret nz
ld a, SUBSTATUS1_NEXT_TURN_DOUBLE_DAMAGE
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; If heads, defending Pokemon becomes confused
Expand Down Expand Up @@ -1654,7 +1654,7 @@ MetapodStiffenEffect:
ld a, ATK_ANIM_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_STIFFEN
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; returns carry if no cards in Deck or if
Expand Down Expand Up @@ -2316,7 +2316,7 @@ CheckIfCardHasGrassEnergyAttached:

GrimerMinimizeEffect:
ld a, SUBSTATUS1_REDUCE_BY_20
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

ToxicGasEffect:
Expand Down Expand Up @@ -2830,7 +2830,7 @@ WartortleWithdrawEffect:
ld a, ATK_ANIM_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_10
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

RainDanceEffect:
Expand Down Expand Up @@ -3052,7 +3052,7 @@ SeadraAgilityEffect:
ld a, ATK_ANIM_AGILITY_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_AGILITY
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

ShellderSupersonicEffect:
Expand All @@ -3067,7 +3067,7 @@ HideInShellEffect:
ld a, ATK_ANIM_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_11
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

VaporeonQuickAttack_AIEffect:
Expand Down Expand Up @@ -3142,7 +3142,7 @@ SquirtleWithdrawEffect:
ld a, ATK_ANIM_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_10
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

HorseaSmokescreenEffect:
Expand Down Expand Up @@ -3493,7 +3493,7 @@ FocusEnergyEffect:
cp VAPOREON_LV29
ret nz ; return if no VaporeonLv29
ld a, SUBSTATUS1_NEXT_TURN_DOUBLE_DAMAGE
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

PlayerPickFireEnergyCardToDiscard:
Expand Down Expand Up @@ -3629,7 +3629,7 @@ RapidashAgilityEffect:
ld a, ATK_ANIM_AGILITY_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_AGILITY
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; returns carry if Opponent has no Pokemon in bench
Expand Down Expand Up @@ -4607,7 +4607,7 @@ DestinyBond_DiscardEffect:

DestinyBond_DestinyBondEffect:
ld a, SUBSTATUS1_DESTINY_BOND
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; returns carry if no Energy cards in Discard Pile.
Expand Down Expand Up @@ -5407,7 +5407,7 @@ Barrier_DiscardEffect:

Barrier_BarrierEffect:
ld a, SUBSTATUS1_BARRIER
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

MewtwoAltLV60EnergyAbsorption_CheckDiscardPile:
Expand Down Expand Up @@ -5874,7 +5874,7 @@ StoneBarrage_MultiplierEffect:

OnixHardenEffect:
ld a, SUBSTATUS1_HARDEN
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

PrimeapeFurySwipes_AIEffect:
Expand Down Expand Up @@ -6121,7 +6121,7 @@ GolemSelfdestructEffect:

GravelerHardenEffect:
ld a, SUBSTATUS1_HARDEN
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

Ram_SelectSwitchEffect:
Expand Down Expand Up @@ -6408,7 +6408,7 @@ Thunderpunch_RecoilEffect:

LightScreenEffect:
ld a, SUBSTATUS1_HALVE_DAMAGE
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

ElectabuzzQuickAttack_AIEffect:
Expand Down Expand Up @@ -6622,7 +6622,7 @@ Fly_Success50PercentEffect:
ld a, ATK_ANIM_AGILITY_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_FLY
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

ThunderJolt_Recoil50PercentEffect:
Expand Down Expand Up @@ -6758,7 +6758,7 @@ RaichuAgilityEffect:
ld a, ATK_ANIM_AGILITY_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_AGILITY
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

RaichuThunder_Recoil50PercentEffect:
Expand Down Expand Up @@ -7662,7 +7662,7 @@ FearowAgilityEffect:
ld a, ATK_ANIM_AGILITY_PROTECT
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_AGILITY
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; return carry if cannot use Step In
Expand Down Expand Up @@ -7943,7 +7943,7 @@ ClefableMetronome_UseAttackEffect:

ClefableMinimizeEffect:
ld a, SUBSTATUS1_REDUCE_BY_20
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

HurricaneEffect:
Expand Down Expand Up @@ -8393,7 +8393,7 @@ ScrunchEffect:
ld a, ATK_ANIM_SCRUNCH
ld [wLoadedAttackAnimation], a
ld a, SUBSTATUS1_NO_DAMAGE_17
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

ChanseyDoubleEdgeEffect:
Expand Down Expand Up @@ -8801,7 +8801,7 @@ FriendshipSong_AddToBench50PercentEffect:

ExpandEffect:
ld a, SUBSTATUS1_REDUCE_BY_10
call ApplySubstatus1ToDefendingCard
call ApplySubstatus1ToAttackingCard
ret

; returns carry if either there are no damage counters
Expand Down