Fixed SetMoveEffect + Sheer Force
This commit is contained in:
parent
0980253cce
commit
daeba066e0
4 changed files with 23 additions and 24 deletions
|
@ -112,7 +112,10 @@
|
||||||
.byte 0x17
|
.byte 0x17
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro clearstatusfromeffect battler:req
|
.macro clearstatusfromeffect battler:req, moveEffect=0
|
||||||
|
.if \moveEffect != 0
|
||||||
|
setmoveeffect \moveEffect
|
||||||
|
.endif
|
||||||
.byte 0x18
|
.byte 0x18
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -938,7 +938,7 @@ BattleScript_FirstChargingTurnMeteorBeam::
|
||||||
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
|
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
|
||||||
printfromtable gFirstTurnOfTwoStringIds
|
printfromtable gFirstTurnOfTwoStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
seteffectsecondary MOVE_EFFECT_SP_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
seteffectprimary MOVE_EFFECT_SP_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_EffectSkyDrop:
|
BattleScript_EffectSkyDrop:
|
||||||
|
@ -963,9 +963,8 @@ BattleScript_SkyDropWork:
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
BattleScript_SkyDropTurn2:
|
BattleScript_SkyDropTurn2:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
|
||||||
setbyte sB_ANIM_TURN, 0x1
|
setbyte sB_ANIM_TURN, 0x1
|
||||||
clearstatusfromeffect BS_ATTACKER
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
||||||
clearsemiinvulnerablebit
|
clearsemiinvulnerablebit
|
||||||
attackstring
|
attackstring
|
||||||
|
@ -991,8 +990,7 @@ BattleScript_SkyDropChangedTarget:
|
||||||
BattleScript_SkyDropFlyingConfuseLock:
|
BattleScript_SkyDropFlyingConfuseLock:
|
||||||
seteffectprimary MOVE_EFFECT_CONFUSION
|
seteffectprimary MOVE_EFFECT_CONFUSION
|
||||||
BattleScript_SkyDropFlyingAlreadyConfused:
|
BattleScript_SkyDropFlyingAlreadyConfused:
|
||||||
setmoveeffect MOVE_EFFECT_THRASH
|
clearstatusfromeffect BS_TARGET, MOVE_EFFECT_THRASH
|
||||||
clearstatusfromeffect BS_TARGET
|
|
||||||
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_MoveEnd
|
jumpifstatus2 BS_TARGET, STATUS2_CONFUSION, BattleScript_MoveEnd
|
||||||
setbyte BS_ATTACKER, BS_TARGET
|
setbyte BS_ATTACKER, BS_TARGET
|
||||||
goto BattleScript_ThrashConfuses
|
goto BattleScript_ThrashConfuses
|
||||||
|
@ -3797,9 +3795,8 @@ BattleScript_KOFail::
|
||||||
|
|
||||||
BattleScript_TwoTurnMovesSecondTurn::
|
BattleScript_TwoTurnMovesSecondTurn::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
|
||||||
setbyte sB_ANIM_TURN, 1
|
setbyte sB_ANIM_TURN, 1
|
||||||
clearstatusfromeffect BS_ATTACKER
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
||||||
goto BattleScript_HitFromAccCheck
|
goto BattleScript_HitFromAccCheck
|
||||||
|
|
||||||
|
@ -4127,9 +4124,8 @@ BattleScript_EffectGeomancy:
|
||||||
call BattleScript_PowerHerbActivation
|
call BattleScript_PowerHerbActivation
|
||||||
BattleScript_GeomancySecondTurn:
|
BattleScript_GeomancySecondTurn:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
|
||||||
setbyte sB_ANIM_TURN, 1
|
setbyte sB_ANIM_TURN, 1
|
||||||
clearstatusfromeffect BS_ATTACKER
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
||||||
attackstring
|
attackstring
|
||||||
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_GeomancyDoMoveAnim
|
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_GeomancyDoMoveAnim
|
||||||
|
@ -4197,8 +4193,7 @@ BattleScript_EffectRage::
|
||||||
seteffectprimary MOVE_EFFECT_RAGE
|
seteffectprimary MOVE_EFFECT_RAGE
|
||||||
goto BattleScript_HitFromAtkString
|
goto BattleScript_HitFromAtkString
|
||||||
BattleScript_RageMiss::
|
BattleScript_RageMiss::
|
||||||
setmoveeffect MOVE_EFFECT_RAGE
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_RAGE
|
||||||
clearstatusfromeffect BS_ATTACKER
|
|
||||||
goto BattleScript_PrintMoveMissed
|
goto BattleScript_PrintMoveMissed
|
||||||
|
|
||||||
BattleScript_EffectMimic::
|
BattleScript_EffectMimic::
|
||||||
|
@ -5108,9 +5103,8 @@ BattleScript_FirstTurnSemiInvulnerable::
|
||||||
call BattleScript_PowerHerbActivation
|
call BattleScript_PowerHerbActivation
|
||||||
BattleScript_SecondTurnSemiInvulnerable::
|
BattleScript_SecondTurnSemiInvulnerable::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
|
||||||
setbyte sB_ANIM_TURN, 1
|
setbyte sB_ANIM_TURN, 1
|
||||||
clearstatusfromeffect BS_ATTACKER
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
orword gHitMarker, HITMARKER_NO_PPDEDUCT
|
||||||
BattleScript_SemiInvulnerableTryHit::
|
BattleScript_SemiInvulnerableTryHit::
|
||||||
accuracycheck BattleScript_SemiInvulnerableMiss, ACC_CURR_MOVE
|
accuracycheck BattleScript_SemiInvulnerableMiss, ACC_CURR_MOVE
|
||||||
|
@ -5739,7 +5733,6 @@ BattleScript_EffectTeeterDance::
|
||||||
setbyte gBattlerTarget, 0
|
setbyte gBattlerTarget, 0
|
||||||
BattleScript_TeeterDanceLoop::
|
BattleScript_TeeterDanceLoop::
|
||||||
movevaluescleanup
|
movevaluescleanup
|
||||||
setmoveeffect MOVE_EFFECT_CONFUSION
|
|
||||||
jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_TeeterDanceLoopIncrement
|
jumpifbyteequal gBattlerAttacker, gBattlerTarget, BattleScript_TeeterDanceLoopIncrement
|
||||||
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_TeeterDanceOwnTempoPrevents
|
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_TeeterDanceOwnTempoPrevents
|
||||||
jumpifsubstituteblocks BattleScript_TeeterDanceSubstitutePrevents
|
jumpifsubstituteblocks BattleScript_TeeterDanceSubstitutePrevents
|
||||||
|
@ -5749,7 +5742,7 @@ BattleScript_TeeterDanceLoop::
|
||||||
jumpifsafeguard BattleScript_TeeterDanceSafeguardProtected
|
jumpifsafeguard BattleScript_TeeterDanceSafeguardProtected
|
||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
seteffectprimary
|
seteffectprimary MOVE_EFFECT_CONFUSION
|
||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_TeeterDanceDoMoveEndIncrement::
|
BattleScript_TeeterDanceDoMoveEndIncrement::
|
||||||
|
@ -6573,8 +6566,7 @@ BattleScript_BideStoringEnergy::
|
||||||
|
|
||||||
BattleScript_BideAttack::
|
BattleScript_BideAttack::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
clearstatusfromeffect BS_ATTACKER
|
|
||||||
printstring STRINGID_PKMNUNLEASHEDENERGY
|
printstring STRINGID_PKMNUNLEASHEDENERGY
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
accuracycheck BattleScript_MoveMissed, ACC_CURR_MOVE
|
accuracycheck BattleScript_MoveMissed, ACC_CURR_MOVE
|
||||||
|
@ -6597,8 +6589,7 @@ BattleScript_BideAttack::
|
||||||
|
|
||||||
BattleScript_BideNoEnergyToAttack::
|
BattleScript_BideNoEnergyToAttack::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
setmoveeffect MOVE_EFFECT_CHARGING
|
clearstatusfromeffect BS_ATTACKER, MOVE_EFFECT_CHARGING
|
||||||
clearstatusfromeffect BS_ATTACKER
|
|
||||||
printstring STRINGID_PKMNUNLEASHEDENERGY
|
printstring STRINGID_PKMNUNLEASHEDENERGY
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
goto BattleScript_ButItFailed
|
goto BattleScript_ButItFailed
|
||||||
|
|
|
@ -2820,7 +2820,7 @@ void SetMoveEffect(bool32 primary, bool32 certain)
|
||||||
&& !primary && gBattleScripting.moveEffect <= MOVE_EFFECT_CONFUSION)
|
&& !primary && gBattleScripting.moveEffect <= MOVE_EFFECT_CONFUSION)
|
||||||
INCREMENT_RESET_RETURN
|
INCREMENT_RESET_RETURN
|
||||||
|
|
||||||
if (TestSheerForceFlag(gBattlerAttacker, gCurrentMove) && gBattleScripting.moveEffect != MOVE_EFFECT_CHARGING)
|
if (TestSheerForceFlag(gBattlerAttacker, gCurrentMove) && !primary && gBattleScripting.moveEffect != MOVE_EFFECT_CHARGING)
|
||||||
INCREMENT_RESET_RETURN
|
INCREMENT_RESET_RETURN
|
||||||
|
|
||||||
if (gBattleMons[gEffectBattler].hp == 0 && !activateAfterFaint)
|
if (gBattleMons[gEffectBattler].hp == 0 && !activateAfterFaint)
|
||||||
|
|
|
@ -20,8 +20,12 @@ SINGLE_BATTLE_TEST("Sheer Force boosts power, but removes secondary effects of m
|
||||||
PLAYER(SPECIES_TAUROS) { Ability(ability); Status1(move == MOVE_SNORE ? STATUS1_SLEEP : STATUS1_NONE); }
|
PLAYER(SPECIES_TAUROS) { Ability(ability); Status1(move == MOVE_SNORE ? STATUS1_SLEEP : STATUS1_NONE); }
|
||||||
OPPONENT(SPECIES_WOBBUFFET);
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
} WHEN {
|
} WHEN {
|
||||||
|
if (move == MOVE_ALLURING_VOICE) // Alluring Voice requires the target to boost stats to have an effect
|
||||||
|
TURN { MOVE(opponent, MOVE_AGILITY); MOVE(player, move); }
|
||||||
|
else
|
||||||
TURN { MOVE(player, move); }
|
TURN { MOVE(player, move); }
|
||||||
if (gBattleMoves[move].effect == EFFECT_TWO_TURNS_ATTACK || gBattleMoves[move].effect == EFFECT_SEMI_INVULNERABLE) {
|
if (gBattleMoves[move].effect == EFFECT_TWO_TURNS_ATTACK || gBattleMoves[move].effect == EFFECT_SEMI_INVULNERABLE
|
||||||
|
|| gBattleMoves[move].effect == EFFECT_METEOR_BEAM) {
|
||||||
TURN { SKIP_TURN(player); }
|
TURN { SKIP_TURN(player); }
|
||||||
TURN { ; }
|
TURN { ; }
|
||||||
}
|
}
|
||||||
|
@ -31,6 +35,7 @@ SINGLE_BATTLE_TEST("Sheer Force boosts power, but removes secondary effects of m
|
||||||
if (ability == ABILITY_SHEER_FORCE) {
|
if (ability == ABILITY_SHEER_FORCE) {
|
||||||
NONE_OF {
|
NONE_OF {
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||||
|
if (move != MOVE_ALLURING_VOICE)
|
||||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||||
STATUS_ICON(opponent, STATUS1_FREEZE);
|
STATUS_ICON(opponent, STATUS1_FREEZE);
|
||||||
STATUS_ICON(opponent, STATUS1_POISON);
|
STATUS_ICON(opponent, STATUS1_POISON);
|
||||||
|
|
Loading…
Reference in a new issue