mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Add Imposter
This commit is contained in:
parent
d628d1f5fd
commit
3d93da7133
@ -1393,6 +1393,11 @@
|
||||
various \battler, VARIOUS_TRY_ACTIVATE_FELL_STINGER
|
||||
.endm
|
||||
|
||||
.macro playmoveanimation battler move
|
||||
various \battler, VARIOUS_PLAY_MOVE_ANIMATION
|
||||
.2byte \move
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat, stages, down
|
||||
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7
|
||||
|
@ -4858,6 +4858,14 @@ BattleScript_SwitchInAbilityMsg::
|
||||
printfromtable gSwitchInAbilityStringIds
|
||||
waitmessage 0x40
|
||||
end3
|
||||
|
||||
BattleScript_ImposterActivates::
|
||||
transformdataexecution
|
||||
playmoveanimation BS_ATTACKER MOVE_TRANSFORM
|
||||
waitanimation
|
||||
printstring STRINGID_IMPOSTERTRANSFORM
|
||||
waitmessage 0x40
|
||||
end3
|
||||
|
||||
BattleScript_RoughSkinActivates::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
|
@ -324,5 +324,6 @@ extern const u8 BattleScript_WeakArmorActivates[];
|
||||
extern const u8 BattleScript_FellStingerRaisesStat[];
|
||||
extern const u8 BattleScript_SnowWarningActivates[];
|
||||
extern const u8 BattleScript_HarvestActivates[];
|
||||
extern const u8 BattleScript_ImposterActivates[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -81,6 +81,7 @@
|
||||
#define VARIOUS_RESTORE_PP 33
|
||||
#define VARIOUS_TRY_ACTIVATE_MOXIE 34
|
||||
#define VARIOUS_TRY_ACTIVATE_FELL_STINGER 35
|
||||
#define VARIOUS_PLAY_MOVE_ANIMATION 36
|
||||
|
||||
// atk80, dmg manipulation
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
|
@ -485,6 +485,7 @@
|
||||
#define STRINGID_TARGETABILITYSTATLOWER 482
|
||||
#define STRINGID_TARGETSTATWONTGOHIGHER 483
|
||||
#define STRINGID_PKMNMOVEBOUNCEDABILITY 484
|
||||
#define STRINGID_IMPOSTERTRANSFORM 485
|
||||
|
||||
#define BATTLESTRINGS_COUNT 496
|
||||
|
||||
|
@ -626,6 +626,7 @@ static const u8 sText_CursedBodyDisabled[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_
|
||||
static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired {B_LAST_ABILITY}!");
|
||||
static const u8 sText_TargetStatWontGoHigher[] = _("{B_DEF_NAME_WITH_PREFIX}’s {B_BUFF1}\nwon’t go higher!");
|
||||
static const u8 sText_PkmnMoveBouncedViaAbility[] = _("{B_ATK_NAME_WITH_PREFIX}’s {B_CURRENT_MOVE} was\nbounced back by {B_DEF_NAME_WITH_PREFIX}’s\l{B_DEF_ABILITY}!");
|
||||
static const u8 sText_ImposterTransform[] = _("{B_ATK_NAME_WITH_PREFIX} transformed into\n{B_DEF_NAME_WITH_PREFIX} using {B_LAST_ABILITY}!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
@ -1103,6 +1104,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
sText_TargetAbilityLoweredStat,
|
||||
sText_TargetStatWontGoHigher,
|
||||
sText_PkmnMoveBouncedViaAbility,
|
||||
sText_ImposterTransform,
|
||||
};
|
||||
|
||||
const u16 gMagicCoatBounceStringIds[] =
|
||||
|
@ -6355,6 +6355,11 @@ static void atk76_various(void)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case VARIOUS_PLAY_MOVE_ANIMATION:
|
||||
BtlController_EmitMoveAnimation(0, T1_READ_16(gBattlescriptCurrInstr + 3), gBattleScripting.animTurn, 0, 0, gBattleMons[gActiveBattler].friendship, &gDisableStructs[gActiveBattler], gMultiHitCounter);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattlescriptCurrInstr += 5;
|
||||
return;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 3;
|
||||
|
@ -2429,6 +2429,16 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
BattleScriptPushCursorAndCallback(BattleScript_OverworldWeatherStarts);
|
||||
}
|
||||
break;
|
||||
case ABILITY_IMPOSTER:
|
||||
if (IsBattlerAlive(BATTLE_OPPOSITE(battler))
|
||||
&& !(gBattleMons[BATTLE_OPPOSITE(battler)].status2 & (STATUS2_TRANSFORMED | STATUS2_SUBSTITUTE))
|
||||
&& !(gBattleMons[battler].status2 & STATUS2_TRANSFORMED))
|
||||
{
|
||||
gBattlerTarget = BATTLE_OPPOSITE(battler);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_ImposterActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_MOLD_BREAKER:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user