mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 19:54:14 +01:00
Merge pull request #1349 from LOuroboros/gulp_missile
Implemented Gulp Missile
This commit is contained in:
commit
f616760fc9
@ -1925,6 +1925,12 @@
|
|||||||
1:
|
1:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro jumpifflowerveilattacker jumpptr:req
|
||||||
|
jumpifnottype BS_ATTACKER, TYPE_GRASS, 1f
|
||||||
|
jumpifability BS_ATTACKER_SIDE, ABILITY_FLOWER_VEIL, \jumpptr
|
||||||
|
1:
|
||||||
|
.endm
|
||||||
|
|
||||||
.macro setallytonexttarget jumpptr:req
|
.macro setallytonexttarget jumpptr:req
|
||||||
jumpifbyte CMP_GREATER_THAN, gBattlerTarget, 0x1, 1f
|
jumpifbyte CMP_GREATER_THAN, gBattlerTarget, 0x1, 1f
|
||||||
addbyte gBattlerTarget, 0x2
|
addbyte gBattlerTarget, 0x2
|
||||||
|
@ -822,6 +822,7 @@ gBattleAnims_General::
|
|||||||
.4byte General_SlideOffScreen @ B_ANIM_SLIDE_OFFSCREEN
|
.4byte General_SlideOffScreen @ B_ANIM_SLIDE_OFFSCREEN
|
||||||
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
|
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
|
||||||
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
|
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
|
||||||
|
.4byte General_GulpMissile @ B_ANIM_GULP_MISSILE
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleAnims_Special::
|
gBattleAnims_Special::
|
||||||
@ -24397,6 +24398,20 @@ General_TotemFlare::
|
|||||||
clearmonbg ANIM_ATTACKER
|
clearmonbg ANIM_ATTACKER
|
||||||
end
|
end
|
||||||
|
|
||||||
|
General_GulpMissile: @ Tackle anim (placeholder)
|
||||||
|
loadspritegfx ANIM_TAG_IMPACT
|
||||||
|
monbg ANIM_ATTACKER
|
||||||
|
setalpha 12, 8
|
||||||
|
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4
|
||||||
|
delay 6
|
||||||
|
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_ATTACKER, 2
|
||||||
|
createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 3, 0, 6, 1
|
||||||
|
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
|
||||||
|
waitforvisualfinish
|
||||||
|
clearmonbg ANIM_ATTACKER
|
||||||
|
blendoff
|
||||||
|
end
|
||||||
|
|
||||||
RainbowEndureEffect:
|
RainbowEndureEffect:
|
||||||
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
|
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
|
||||||
delay 0x3
|
delay 0x3
|
||||||
|
@ -6000,6 +6000,76 @@ BattleScript_PerishBodyActivates::
|
|||||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_GulpMissileGorging::
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||||
|
waitanimation
|
||||||
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||||
|
effectivenesssound
|
||||||
|
hitanimation BS_ATTACKER
|
||||||
|
waitstate
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_GulpMissileNoDmgGorging
|
||||||
|
healthbarupdate BS_ATTACKER
|
||||||
|
datahpupdate BS_ATTACKER
|
||||||
|
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||||
|
getbattlerfainted BS_ATTACKER
|
||||||
|
jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_GulpMissileNoSecondEffectGorging
|
||||||
|
BattleScript_GulpMissileNoDmgGorging:
|
||||||
|
handleformchange BS_TARGET, 0
|
||||||
|
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||||
|
waitanimation
|
||||||
|
swapattackerwithtarget
|
||||||
|
setmoveeffect MOVE_EFFECT_PARALYSIS
|
||||||
|
seteffectprimary
|
||||||
|
swapattackerwithtarget
|
||||||
|
return
|
||||||
|
BattleScript_GulpMissileNoSecondEffectGorging:
|
||||||
|
handleformchange BS_TARGET, 0
|
||||||
|
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||||
|
waitanimation
|
||||||
|
return
|
||||||
|
|
||||||
|
BattleScript_GulpMissileGulping::
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||||
|
waitanimation
|
||||||
|
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||||
|
effectivenesssound
|
||||||
|
hitanimation BS_ATTACKER
|
||||||
|
waitstate
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_GulpMissileNoDmgGulping
|
||||||
|
healthbarupdate BS_ATTACKER
|
||||||
|
datahpupdate BS_ATTACKER
|
||||||
|
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||||
|
getbattlerfainted BS_ATTACKER
|
||||||
|
jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_CLEAR_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_FULL_METAL_BODY, BattleScript_GulpMissileNoSecondEffectGulping
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_WHITE_SMOKE, BattleScript_GulpMissileNoSecondEffectGulping
|
||||||
|
jumpifflowerveilattacker BattleScript_GulpMissileNoSecondEffectGulping
|
||||||
|
BattleScript_GulpMissileNoDmgGulping:
|
||||||
|
handleformchange BS_TARGET, 0
|
||||||
|
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||||
|
waitanimation
|
||||||
|
swapattackerwithtarget @ to make gStatDownStringIds down below print the right battler
|
||||||
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
|
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED, BattleScript_GulpMissileGorgingTargetDefenseCantGoLower
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
|
printfromtable gStatDownStringIds
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
swapattackerwithtarget @ restore the battlers, just in case
|
||||||
|
return
|
||||||
|
BattleScript_GulpMissileNoSecondEffectGulping:
|
||||||
|
handleformchange BS_TARGET, 0
|
||||||
|
playanimation BS_TARGET, B_ANIM_FORM_CHANGE, NULL
|
||||||
|
waitanimation
|
||||||
|
return
|
||||||
|
BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
|
||||||
|
printstring STRINGID_STATSWONTDECREASE
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_PerishSongCountGoesDown::
|
BattleScript_PerishSongCountGoesDown::
|
||||||
printstring STRINGID_PKMNPERISHCOUNTFELL
|
printstring STRINGID_PKMNPERISHCOUNTFELL
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
@ -386,5 +386,7 @@ extern const u8 BattleScript_TerrainPreventsEnd2[];
|
|||||||
extern const u8 BattleScript_MistyTerrainPrevents[];
|
extern const u8 BattleScript_MistyTerrainPrevents[];
|
||||||
extern const u8 BattleScript_ElectricTerrainPrevents[];
|
extern const u8 BattleScript_ElectricTerrainPrevents[];
|
||||||
extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
||||||
|
extern const u8 BattleScript_GulpMissileGorging[];
|
||||||
|
extern const u8 BattleScript_GulpMissileGulping[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -523,6 +523,7 @@
|
|||||||
#define B_ANIM_SLIDE_OFFSCREEN 26 // for Emergency Exit
|
#define B_ANIM_SLIDE_OFFSCREEN 26 // for Emergency Exit
|
||||||
#define B_ANIM_RESTORE_BG 27 // for Terrain Endings
|
#define B_ANIM_RESTORE_BG 27 // for Terrain Endings
|
||||||
#define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare
|
#define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare
|
||||||
|
#define B_ANIM_GULP_MISSILE 29
|
||||||
|
|
||||||
// special animations table (gBattleAnims_Special)
|
// special animations table (gBattleAnims_Special)
|
||||||
#define B_ANIM_LVL_UP 0
|
#define B_ANIM_LVL_UP 0
|
||||||
|
@ -40,6 +40,9 @@
|
|||||||
#define SPECIES_BURMY 0
|
#define SPECIES_BURMY 0
|
||||||
#define SPECIES_BURMY_SANDY_CLOAK 10013
|
#define SPECIES_BURMY_SANDY_CLOAK 10013
|
||||||
#define SPECIES_BURMY_TRASH_CLOAK 10014
|
#define SPECIES_BURMY_TRASH_CLOAK 10014
|
||||||
|
#define SPECIES_CRAMORANT 0
|
||||||
|
#define SPECIES_CRAMORANT_GORGING 10015
|
||||||
|
#define SPECIES_CRAMORANT_GULPING 10016
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Items with peculiar battle effects.
|
// Items with peculiar battle effects.
|
||||||
|
@ -2213,6 +2213,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
|
|||||||
case B_ANIM_DOOM_DESIRE_HIT:
|
case B_ANIM_DOOM_DESIRE_HIT:
|
||||||
case B_ANIM_WISH_HEAL:
|
case B_ANIM_WISH_HEAL:
|
||||||
case B_ANIM_MEGA_EVOLUTION:
|
case B_ANIM_MEGA_EVOLUTION:
|
||||||
|
case B_ANIM_GULP_MISSILE:
|
||||||
hideHpBoxes = TRUE;
|
hideHpBoxes = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -3730,6 +3730,8 @@ static bool32 ShouldChangeFormHpBased(u32 battler)
|
|||||||
{ABILITY_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET, 2},
|
{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_SHIELDS_DOWN, SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW, 2},
|
||||||
{ABILITY_SCHOOLING, SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI, 4},
|
{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;
|
u32 i;
|
||||||
|
|
||||||
@ -4982,6 +4984,42 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_GULP_MISSILE:
|
||||||
|
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
|
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||||
|
&& TARGET_TURN_DAMAGED
|
||||||
|
&& IsBattlerAlive(battler))
|
||||||
|
{
|
||||||
|
if (gBattleMons[gBattlerTarget].species == SPECIES_CRAMORANT_GORGING)
|
||||||
|
{
|
||||||
|
gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerTarget]] = gBattleMons[gBattlerTarget].species;
|
||||||
|
gBattleMons[gBattlerTarget].species = SPECIES_CRAMORANT;
|
||||||
|
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD)
|
||||||
|
{
|
||||||
|
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4;
|
||||||
|
if (gBattleMoveDamage == 0)
|
||||||
|
gBattleMoveDamage = 1;
|
||||||
|
}
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_GulpMissileGorging;
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
else if (gBattleMons[gBattlerTarget].species == SPECIES_CRAMORANT_GULPING)
|
||||||
|
{
|
||||||
|
gBattleStruct->changedSpecies[gBattlerPartyIndexes[gBattlerTarget]] = gBattleMons[gBattlerTarget].species;
|
||||||
|
gBattleMons[gBattlerTarget].species = SPECIES_CRAMORANT;
|
||||||
|
if (GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD)
|
||||||
|
{
|
||||||
|
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 4;
|
||||||
|
if (gBattleMoveDamage == 0)
|
||||||
|
gBattleMoveDamage = 1;
|
||||||
|
}
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_GulpMissileGulping;
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||||
@ -5018,6 +5056,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_GULP_MISSILE:
|
||||||
|
if (((gCurrentMove == MOVE_SURF && TARGET_TURN_DAMAGED) || gStatuses3[gBattlerAttacker] & STATUS3_UNDERWATER)
|
||||||
|
&& (effect = ShouldChangeFormHpBased(gBattlerAttacker)))
|
||||||
|
{
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_AttackerFormChange;
|
||||||
|
effect++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITYEFFECT_MOVE_END_OTHER: // Abilities that activate on *another* battler's moveend: Dancer, Soul-Heart, Receiver, Symbiosis
|
case ABILITYEFFECT_MOVE_END_OTHER: // Abilities that activate on *another* battler's moveend: Dancer, Soul-Heart, Receiver, Symbiosis
|
||||||
@ -8677,6 +8724,8 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
|||||||
{SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET},
|
{SPECIES_MINIOR_METEOR_VIOLET, SPECIES_MINIOR_CORE_VIOLET},
|
||||||
{SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW},
|
{SPECIES_MINIOR_METEOR_YELLOW, SPECIES_MINIOR_CORE_YELLOW},
|
||||||
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
||||||
|
{SPECIES_CRAMORANT_GORGING, SPECIES_CRAMORANT},
|
||||||
|
{SPECIES_CRAMORANT_GULPING, SPECIES_CRAMORANT},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isSwitchingOut) // Don't revert Mimikyu Busted when switching out
|
if (isSwitchingOut) // Don't revert Mimikyu Busted when switching out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user