mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-29 14:53:55 +01:00
add room service
This commit is contained in:
parent
0cdab790dc
commit
c1dd3fca21
@ -1842,6 +1842,39 @@ BattleScript_EffectMagnetRise:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTrickRoom:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
setroom
|
||||
attackanimation
|
||||
waitanimation
|
||||
printfromtable gRoomsStringIds
|
||||
waitmessage 0x40
|
||||
savetarget
|
||||
setbyte gBattlerTarget, 0
|
||||
RoomServiceLoop:
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
jumpifnoholdeffect BS_TARGET, HOLD_EFFECT_ROOM_SERVICE, RoomServiceLoop_NextBattler
|
||||
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPEED, MIN_STAT_STAGE, RoomServiceLoop_NextBattler
|
||||
setstatchanger STAT_SPEED, 1, TRUE
|
||||
statbuffchange 0, RoomServiceLoop_NextBattler
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, RoomServiceLoop_NextBattler
|
||||
playanimation BS_TARGET, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
waitanimation
|
||||
playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_NEGATIVE
|
||||
|
||||
@ setgraphicalstatchangevalues
|
||||
@ playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
@ waitanimation
|
||||
printstring STRINGID_USINGXTHEYOFZN
|
||||
waitmessage 0x40
|
||||
removeitem BS_TARGET
|
||||
RoomServiceLoop_NextBattler:
|
||||
addbyte gBattlerTarget, 0x1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, RoomServiceLoop
|
||||
restoretarget
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectWonderRoom:
|
||||
BattleScript_EffectMagicRoom:
|
||||
attackcanceler
|
||||
|
@ -5299,6 +5299,20 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
BattleScriptPushCursorAndCallback(BattleScript_AirBaloonMsgIn);
|
||||
RecordItemEffectBattle(battlerId, HOLD_EFFECT_AIR_BALLOON);
|
||||
break;
|
||||
case HOLD_EFFECT_ROOM_SERVICE:
|
||||
if (gFieldStatuses & STATUS_FIELD_TRICK_ROOM && gBattleMons[battlerId].statStages[STAT_SPEED] > MIN_STAT_STAGE)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPEED);
|
||||
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATFELL);
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_SPEED, 1, TRUE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_SPEED;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (effect)
|
||||
|
Loading…
x
Reference in New Issue
Block a user