mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-06 07:27:47 +01:00
Add Aromatic Mist
This commit is contained in:
parent
d8063e66ad
commit
a0699dba52
@ -338,6 +338,32 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectFeint
|
||||
.4byte BattleScript_EffectSparklingAria
|
||||
.4byte BattleScript_EffectAcupressure
|
||||
.4byte BattleScript_EffectAromaticMist
|
||||
|
||||
BattleScript_EffectAromaticMist:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_ButItFailed
|
||||
jumpiftargetally BattleScript_EffectAromaticMistWorks
|
||||
goto BattleScript_ButItFailed
|
||||
BattleScript_EffectAromaticMistWorks:
|
||||
setstatchanger STAT_SPDEF, 1, FALSE
|
||||
statbuffchange 0x1, BattleScript_EffectAromaticMistEnd
|
||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AromaticMistAnim
|
||||
pause 0x10
|
||||
printstring STRINGID_TARGETSTATWONTGOHIGHER
|
||||
waitmessage 0x40
|
||||
goto BattleScript_EffectAromaticMistEnd
|
||||
BattleScript_AromaticMistAnim:
|
||||
attackanimation
|
||||
waitanimation
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
BattleScript_EffectAromaticMistEnd:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectAcupressure:
|
||||
attackcanceler
|
||||
|
@ -49,8 +49,8 @@ EverGrandeCity_PokemonLeague_1F_Pokemart_229624: @ 8229624
|
||||
EverGrandeCity_PokemonLeague_1F_EventScript_229636:: @ 8229636
|
||||
special SavePlayerParty
|
||||
|
||||
trainerbattle 10, TRAINER_DRAKE, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
|
||||
trainerbattle 11, TRAINER_GLACIA, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
|
||||
trainerbattle 10, TRAINER_ALBERT, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2296E8
|
||||
trainerbattle 11, TRAINER_ALEXA, 0, NULL, EverGrandeCity_PokemonLeague_1F_Text_2297EF
|
||||
|
||||
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
|
||||
setvar VAR_0x8005, 0
|
||||
|
@ -326,5 +326,6 @@
|
||||
#define EFFECT_FEINT 320
|
||||
#define EFFECT_SPARKLING_ARIA 321
|
||||
#define EFFECT_ACUPRESSURE 322
|
||||
#define EFFECT_AROMATIC_MIST 323
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -542,7 +542,7 @@ static void HandleInputChooseMove(void)
|
||||
}
|
||||
else // double battle
|
||||
{
|
||||
if (!(moveTarget & (MOVE_TARGET_RANDOM | MOVE_TARGET_BOTH | MOVE_TARGET_DEPENDS | MOVE_TARGET_FOES_AND_ALLY | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER)))
|
||||
if (!(moveTarget & (MOVE_TARGET_RANDOM | MOVE_TARGET_BOTH | MOVE_TARGET_DEPENDS | MOVE_TARGET_FOES_AND_ALLY | MOVE_TARGET_OPPONENTS_FIELD | MOVE_TARGET_USER | MOVE_TARGET_ALLY)))
|
||||
canSelectTarget++; // either selected or user
|
||||
if (moveTarget == (MOVE_TARGET_USER | MOVE_TARGET_ALLY) && IsBattlerAlive(BATTLE_PARTNER(gActiveBattler)))
|
||||
canSelectTarget++;
|
||||
|
@ -5638,6 +5638,13 @@ static void HandleAction_UseMove(void)
|
||||
gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerTarget) ^ BIT_FLANK);
|
||||
}
|
||||
}
|
||||
else if (gBattleMoves[gChosenMove].target == MOVE_TARGET_ALLY)
|
||||
{
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(gBattlerAttacker)))
|
||||
gBattlerTarget = BATTLE_PARTNER(gBattlerAttacker);
|
||||
else
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlerTarget = *(gBattleStruct->moveTarget + gBattlerAttacker);
|
||||
|
@ -4246,8 +4246,15 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
|
||||
break;
|
||||
case MOVE_TARGET_USER_OR_SELECTED:
|
||||
case MOVE_TARGET_USER:
|
||||
default:
|
||||
targetBattler = gBattlerAttacker;
|
||||
break;
|
||||
case MOVE_TARGET_ALLY:
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(gBattlerAttacker)))
|
||||
targetBattler = BATTLE_PARTNER(gBattlerAttacker);
|
||||
else
|
||||
targetBattler = gBattlerAttacker;
|
||||
break;
|
||||
}
|
||||
|
||||
*(gBattleStruct->moveTarget + gBattlerAttacker) = targetBattler;
|
||||
|
@ -7134,7 +7134,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_SPECIAL,
|
||||
},
|
||||
{ // MOVE_HYPERSPACE_HOLE
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_FEINT,
|
||||
.power = 80,
|
||||
.type = TYPE_PSYCHIC,
|
||||
.accuracy = 0,
|
||||
@ -7182,13 +7182,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_AROMATIC_MIST
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
.effect = EFFECT_AROMATIC_MIST,
|
||||
.power = 0,
|
||||
.type = TYPE_FAIRY,
|
||||
.accuracy = 0,
|
||||
.pp = 20,
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_USER,
|
||||
.target = MOVE_TARGET_ALLY,
|
||||
.priority = 0,
|
||||
.flags = 0,
|
||||
.split = SPLIT_STATUS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user