- Fix Sheer Force interaction (needed after adding | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN)
- Fix "X Transformed!" target
- Allow switching between both forms
- Allow form change if target is KO'ed
This commit is contained in:
BuffelSaft 2021-11-03 17:56:16 +13:00
parent 74c85b5818
commit 18b87416d5
2 changed files with 13 additions and 4 deletions

View File

@ -735,7 +735,7 @@ BattleScript_EffectAttackerDefenseDownHit:
goto BattleScript_EffectHit
BattleScript_EffectRelicSong:
setmoveeffect MOVE_EFFECT_RELIC_SONG | MOVE_EFFECT_CERTAIN
setmoveeffect MOVE_EFFECT_RELIC_SONG | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
@ -6966,6 +6966,7 @@ BattleScript_AttackerFormChangeMoveEffect::
handleformchange BS_ATTACKER, 1
playanimation BS_ATTACKER, B_ANIM_FORM_CHANGE, NULL
waitanimation
copybyte sBATTLER, gBattlerAttacker
printstring STRINGID_PKMNTRANSFORMED
waitmessage B_WAIT_TIME_LONG
handleformchange BS_ATTACKER, 2

View File

@ -3394,10 +3394,18 @@ void SetMoveEffect(bool32 primary, u32 certain)
}
break;
case MOVE_EFFECT_RELIC_SONG:
if (gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA)
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_SHEER_FORCE)
{
gBattleMons[gBattlerAttacker].species = SPECIES_MELOETTA_PIROUETTE;
BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeMoveEffect);
if (gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA)
{
gBattleMons[gBattlerAttacker].species = SPECIES_MELOETTA_PIROUETTE;
BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeMoveEffect);
}
else if (gBattleMons[gBattlerAttacker].species == SPECIES_MELOETTA_PIROUETTE)
{
gBattleMons[gBattlerAttacker].species = SPECIES_MELOETTA;
BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeMoveEffect);
}
}
break;
}