Fixed Cotton Down
It was tough, but the nightmare is finally over. Ghoulslash, Blurose, Cancer Fairy, thanks to all of you guys!
This commit is contained in:
parent
c83c67ff8e
commit
c9824a8dd9
2 changed files with 19 additions and 17 deletions
|
@ -6196,23 +6196,28 @@ BattleScript_IllusionOff::
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_CottonDownActivates::
|
BattleScript_CottonDownActivates::
|
||||||
setbyte gBattlerTarget, 0x1
|
call BattleScript_AbilityPopUp
|
||||||
|
copybyte gEffectBattler, gBattlerTarget
|
||||||
|
savetarget
|
||||||
|
setbyte gBattlerTarget, 0x0
|
||||||
BattleScript_CottonDownLoop:
|
BattleScript_CottonDownLoop:
|
||||||
setstatchanger STAT_SPEED, 1, TRUE
|
setstatchanger STAT_SPEED, 1, TRUE
|
||||||
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_CottonDownActivatesLoopIncrement
|
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_CottonDownEnd
|
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
|
||||||
call BattleScript_AbilityPopUp
|
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
setbyte gBattleCommunication STAT_SPEED
|
|
||||||
stattextbuffer BS_TARGET
|
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
BattleScript_CottonDownActivatesLoopIncrement:
|
goto BattleScript_CottonDownLoopIncrement
|
||||||
|
BattleScript_CottonDownTargetSpeedCantGoLower:
|
||||||
|
printstring STRINGID_STATSWONTDECREASE
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_CottonDownLoopIncrement:
|
||||||
addbyte gBattlerTarget, 0x1
|
addbyte gBattlerTarget, 0x1
|
||||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
|
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
|
||||||
BattleScript_CottonDownEnd:
|
BattleScript_CottonDownReturn:
|
||||||
end3
|
restoretarget
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_AnticipationActivates::
|
BattleScript_AnticipationActivates::
|
||||||
pause 0x5
|
pause 0x5
|
||||||
|
|
|
@ -4627,17 +4627,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||||
break;
|
break;
|
||||||
case ABILITY_COTTON_DOWN:
|
case ABILITY_COTTON_DOWN:
|
||||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
&& gBattleMons[gBattlerTarget].hp != 0
|
&& gBattleMons[gBattlerAttacker].hp != 0
|
||||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||||
&& TARGET_TURN_DAMAGED)
|
&& TARGET_TURN_DAMAGED)
|
||||||
{
|
{
|
||||||
for (i = 0; i < gBattlersCount; i++)
|
gEffectBattler = gBattlerTarget;
|
||||||
{
|
BattleScriptPushCursor();
|
||||||
gBattlerAttacker = i;
|
gBattlescriptCurrInstr = BattleScript_CottonDownActivates;
|
||||||
BattleScriptPushCursorAndCallback(BattleScript_CottonDownActivates);
|
|
||||||
effect++;
|
effect++;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue