mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Implemented Cotton Down
This commit is contained in:
parent
3d8308844c
commit
0c4c6fc778
@ -6189,6 +6189,25 @@ BattleScript_IllusionOff::
|
|||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_CottonDownActivates::
|
||||||
|
setbyte gBattlerTarget, 0x1
|
||||||
|
BattleScript_CottonDownLoop:
|
||||||
|
setstatchanger STAT_SPEED, 1, TRUE
|
||||||
|
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_CottonDownActivatesLoopIncrement
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CottonDownEnd
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
|
setbyte gBattleCommunication STAT_SPEED
|
||||||
|
stattextbuffer BS_TARGET
|
||||||
|
printfromtable gStatDownStringIds
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_CottonDownActivatesLoopIncrement:
|
||||||
|
addbyte gBattlerTarget, 0x1
|
||||||
|
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
|
||||||
|
BattleScript_CottonDownEnd:
|
||||||
|
end3
|
||||||
|
|
||||||
BattleScript_AnticipationActivates::
|
BattleScript_AnticipationActivates::
|
||||||
pause 0x5
|
pause 0x5
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
|
@ -351,5 +351,6 @@ extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
|
|||||||
extern const u8 BattleScript_CheekPouchActivates[];
|
extern const u8 BattleScript_CheekPouchActivates[];
|
||||||
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
||||||
extern const u8 BattleScript_TargetAbilityStatRaiseOnSwitchin[];
|
extern const u8 BattleScript_TargetAbilityStatRaiseOnSwitchin[];
|
||||||
|
extern const u8 BattleScript_CottonDownActivates[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -4608,6 +4608,21 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_COTTON_DOWN:
|
||||||
|
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& gBattleMons[gBattlerTarget].hp != 0
|
||||||
|
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||||
|
&& TARGET_TURN_DAMAGED)
|
||||||
|
{
|
||||||
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
|
{
|
||||||
|
gBattlerAttacker = i;
|
||||||
|
BattleScriptPushCursorAndCallback(BattleScript_CottonDownActivates);
|
||||||
|
effect++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user