mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Implemented Cramorant's Gulp Missile form change
This commit is contained in:
parent
fba17a96a4
commit
c2f718d3d3
@ -826,6 +826,7 @@ gBattleAnims_General::
|
||||
.4byte General_SlideOffScreen
|
||||
.4byte General_RestoreBg
|
||||
.4byte General_TotemFlare
|
||||
.4byte General_GulpMissile
|
||||
|
||||
.align 2
|
||||
gBattleAnims_Special::
|
||||
@ -24420,6 +24421,22 @@ General_TotemFlare::
|
||||
clearmonbg ANIM_ATTACKER
|
||||
end
|
||||
|
||||
General_GulpMissile: @ Modified Tackle anim (placeholder)
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
monbg ANIM_ATTACKER
|
||||
setalpha 12, 8
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_TARGET, 2, 4, 4
|
||||
delay 6
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_ATTACKER, 2
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 3, 0, 6, 1
|
||||
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
delay 10
|
||||
playse SE_EFFECTIVE
|
||||
clearmonbg ANIM_ATTACKER
|
||||
blendoff
|
||||
end
|
||||
|
||||
RainbowEndureEffect:
|
||||
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
|
||||
delay 0x3
|
||||
|
@ -5761,6 +5761,42 @@ BattleScript_PerishBodyActivates::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
return
|
||||
|
||||
BattleScript_GulpMissileGorging::
|
||||
call BattleScript_AbilityPopUp
|
||||
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||
waitanimation
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
handleformchange BS_TARGET, 0
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||
waitanimation
|
||||
swapattackerwithtarget
|
||||
setmoveeffect MOVE_EFFECT_PARALYSIS
|
||||
seteffectprimary
|
||||
swapattackerwithtarget
|
||||
return
|
||||
|
||||
BattleScript_GulpMissileGulping::
|
||||
call BattleScript_AbilityPopUp
|
||||
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||
waitanimation
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
handleformchange BS_TARGET, 0
|
||||
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||
waitanimation
|
||||
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
waitanimation
|
||||
printstring STRINGID_PKMNSSTATCHANGED
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_PerishSongCountGoesDown::
|
||||
printstring STRINGID_PKMNPERISHCOUNTFELL
|
||||
waitmessage 0x40
|
||||
|
@ -357,5 +357,7 @@ extern const u8 BattleScript_CottonDownActivates[];
|
||||
extern const u8 BattleScript_BallFetch[];
|
||||
extern const u8 BattleScript_SandSpitActivates[];
|
||||
extern const u8 BattleScript_PerishBodyActivates[];
|
||||
extern const u8 BattleScript_GulpMissileGorging[];
|
||||
extern const u8 BattleScript_GulpMissileGulping[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -527,6 +527,7 @@
|
||||
#define B_ANIM_SLIDE_OFFSCREEN 0x1E // for Emergency Exit
|
||||
#define B_ANIM_RESTORE_BG 0x1F // for Terrain Endings
|
||||
#define B_ANIM_TOTEM_FLARE 0x20 // Totem boosts aura flare
|
||||
#define B_ANIM_GULP_MISSILE 0x21
|
||||
|
||||
// special animations table
|
||||
#define B_ANIM_LVL_UP 0x0
|
||||
|
@ -35,6 +35,9 @@
|
||||
#define SPECIES_ZYGARDE 0 // 50%
|
||||
#define SPECIES_ZYGARDE_10 10011 // 10 %
|
||||
#define SPECIES_ZYGARDE_COMPLETE 10012 // 100 %
|
||||
#define SPECIES_CRAMORANT 0
|
||||
#define SPECIES_CRAMORANT_GORGING 10013
|
||||
#define SPECIES_CRAMORANT_GULPING 10014
|
||||
#endif
|
||||
|
||||
// Items with peculiar battle effects.
|
||||
|
@ -969,6 +969,7 @@ static void TryToggleHealboxVisibility(u8 priority, u8 healthboxLeftSpriteId, u8
|
||||
case B_ANIM_TERRAIN_GRASSY:
|
||||
case B_ANIM_TERRAIN_ELECTRIC:
|
||||
case B_ANIM_TERRAIN_PSYCHIC:
|
||||
case B_ANIM_GULP_MISSILE:
|
||||
break;
|
||||
}
|
||||
return; //all other special anims dont hide
|
||||
|
@ -3488,6 +3488,8 @@ static bool32 ShouldChangeFormHpBased(u32 battler)
|
||||
{ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET, 2},
|
||||
{ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW, 2},
|
||||
{ABILITY_SCHOOLING, SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI, 4},
|
||||
{ABILITY_GULP_MISSILE, SPECIES_CRAMORANT, SPECIES_CRAMORANT_GORGING, 2},
|
||||
{ABILITY_GULP_MISSILE, SPECIES_CRAMORANT, SPECIES_CRAMORANT_GULPING, 1},
|
||||
};
|
||||
u32 i;
|
||||
|
||||
@ -4689,6 +4691,39 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_GULP_MISSILE:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(battler)
|
||||
&& gBattleMons[battler].species == SPECIES_CRAMORANT_GORGING)
|
||||
{
|
||||
gBattleStruct->changedSpecies[gBattlerPartyIndexes[battler]] = gBattleMons[battler].species;
|
||||
gBattleMons[battler].species = SPECIES_CRAMORANT;
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_GulpMissileGorging;
|
||||
effect++;
|
||||
}
|
||||
else if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(battler)
|
||||
&& gBattleMons[battler].species == SPECIES_CRAMORANT_GULPING)
|
||||
{
|
||||
gBattleStruct->changedSpecies[gBattlerPartyIndexes[battler]] = gBattleMons[battler].species;
|
||||
gBattleMons[battler].species = SPECIES_CRAMORANT;
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
SET_STATCHANGER(STAT_DEF, 1, TRUE);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_GulpMissileGulping;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||
@ -4714,6 +4749,16 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_GULP_MISSILE:
|
||||
if ((effect = ShouldChangeFormHpBased(battler))
|
||||
&& (gCurrentMove == MOVE_SURF
|
||||
|| gStatuses3[battler] & STATUS3_UNDERWATER))
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_AttackerFormChange;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_OTHER: // Abilities that activate on *another* battler's moveend: Dancer, Soul-Heart, Receiver, Symbiosis
|
||||
@ -7798,6 +7843,8 @@ void UndoFormChange(u32 monId, u32 side)
|
||||
{SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET},
|
||||
{SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW},
|
||||
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
||||
{SPECIES_CRAMORANT_GORGING, SPECIES_CRAMORANT},
|
||||
{SPECIES_CRAMORANT_GULPING, SPECIES_CRAMORANT},
|
||||
};
|
||||
|
||||
currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user