commit
29e37a0025
4 changed files with 54 additions and 4 deletions
|
@ -8016,9 +8016,12 @@ BattleScript_SupremeOverlordActivates::
|
|||
|
||||
BattleScript_CostarActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
savetarget
|
||||
copybyte gBattlerTarget, sBATTLER
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNCOPIEDSTATCHANGES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
restoretarget
|
||||
end3
|
||||
|
||||
BattleScript_ZeroToHeroActivates::
|
||||
|
|
|
@ -4873,10 +4873,10 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
&& CountBattlerStatIncreases(BATTLE_PARTNER(battler), FALSE))
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
gBattlerAttacker = battler;
|
||||
gBattlerAttacker = gBattlerAbility = battler;
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[battler].statStages[i] = gBattleMons[BATTLE_PARTNER(battler)].statStages[i];
|
||||
gBattlerTarget = BATTLE_PARTNER(battler);
|
||||
gBattleScripting.battler = BATTLE_PARTNER(battler);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CostarActivates);
|
||||
effect++;
|
||||
}
|
||||
|
@ -6312,7 +6312,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
}
|
||||
break;
|
||||
case ABILITY_PROTOSYNTHESIS:
|
||||
if (!gDisableStructs[battler].weatherAbilityDone
|
||||
if (!gDisableStructs[battler].weatherAbilityDone
|
||||
&& (gBattleWeather & B_WEATHER_SUN) && WEATHER_HAS_EFFECT
|
||||
&& !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED)
|
||||
&& !(gBattleStruct->boosterEnergyActivates & (1u << battler)))
|
||||
|
|
|
@ -1,7 +1,29 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Costar copies an ally's stat stages upon entering battle");
|
||||
DOUBLE_BATTLE_TEST("Costar copies an ally's stat stages upon entering battle")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_FLAMIGO) { Ability(ABILITY_COSTAR); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponentLeft, MOVE_SWORDS_DANCE); }
|
||||
TURN { SWITCH(opponentRight, 2); MOVE(playerLeft, MOVE_CELEBRATE); }
|
||||
} SCENE {
|
||||
// Turn 1 - buff up
|
||||
MESSAGE("Foe Wobbuffet used Swords Dance!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft);
|
||||
// Turn 2 - Switch into Flamigo
|
||||
MESSAGE("2 sent out Flamigo!");
|
||||
ABILITY_POPUP(opponentRight, ABILITY_COSTAR);
|
||||
MESSAGE("Foe Flamigo copied Foe Wobbuffet's stat changes!");
|
||||
} THEN {
|
||||
EXPECT_EQ(opponentRight->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 2);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy from Ruin ability tests
|
||||
TO_DO_BATTLE_TEST("Costar's message displays correctly after all battlers fainted - Player");
|
||||
|
|
|
@ -94,3 +94,28 @@ SINGLE_BATTLE_TEST("Download doesn't activate if target hasn't been sent out yet
|
|||
EXPECT_MUL_EQ(results[0].damageSpecial, Q_4_12(1.5), results[1].damageSpecial);
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Download raises Sp.Attack if enemies have lower total Sp. Def than Def", s16 damage)
|
||||
{
|
||||
u32 ability;
|
||||
PARAMETRIZE { ability = ABILITY_TRACE; }
|
||||
PARAMETRIZE { ability = ABILITY_DOWNLOAD; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_PORYGON) { Ability(ability); SpAttack(100); }
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Defense(200); SpDefense(100); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Defense(100); SpDefense(150); }
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_TRI_ATTACK, target: opponentLeft ); }
|
||||
} SCENE {
|
||||
if (ability == ABILITY_DOWNLOAD)
|
||||
{
|
||||
ABILITY_POPUP(playerLeft, ABILITY_DOWNLOAD);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
||||
MESSAGE("Porygon's Download raised its Sp. Atk!");
|
||||
}
|
||||
HP_BAR(opponentLeft, captureDamage: &results[i].damage);
|
||||
} FINALLY {
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue