mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Merge pull request #2107 from Sneed69/steelbeam
Steel Beam Move Effect Implementation
This commit is contained in:
commit
e5b777695c
@ -410,6 +410,51 @@ gBattleScriptsForMoveEffects::
|
|||||||
.4byte BattleScript_EffectHit @ EFFECT_RISING_VOLTAGE
|
.4byte BattleScript_EffectHit @ EFFECT_RISING_VOLTAGE
|
||||||
.4byte BattleScript_EffectHit @ EFFECT_BEAK_BLAST
|
.4byte BattleScript_EffectHit @ EFFECT_BEAK_BLAST
|
||||||
.4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE
|
.4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE
|
||||||
|
.4byte BattleScript_EffectSteelBeam @ EFFECT_STEEL_BEAM
|
||||||
|
|
||||||
|
BattleScript_EffectSteelBeam::
|
||||||
|
attackcanceler
|
||||||
|
attackstring
|
||||||
|
ppreduce
|
||||||
|
accuracycheck BattleScript_SteelBeamMiss, ACC_CURR_MOVE
|
||||||
|
critcalc
|
||||||
|
damagecalc
|
||||||
|
adjustdamage
|
||||||
|
attackanimation
|
||||||
|
waitanimation
|
||||||
|
effectivenesssound
|
||||||
|
hitanimation BS_TARGET
|
||||||
|
waitstate
|
||||||
|
healthbarupdate BS_TARGET
|
||||||
|
datahpupdate BS_TARGET
|
||||||
|
critmessage
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
resultmessage
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
seteffectwithchance
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_SteelBeamAfterSelfDamage
|
||||||
|
call BattleScript_SteelBeamSelfDamage
|
||||||
|
BattleScript_SteelBeamAfterSelfDamage::
|
||||||
|
waitstate
|
||||||
|
tryfaintmon BS_ATTACKER
|
||||||
|
tryfaintmon BS_TARGET
|
||||||
|
goto BattleScript_MoveEnd
|
||||||
|
BattleScript_SteelBeamMiss::
|
||||||
|
pause B_WAIT_TIME_SHORT
|
||||||
|
effectivenesssound
|
||||||
|
resultmessage
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_MoveEnd
|
||||||
|
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||||
|
call BattleScript_SteelBeamSelfDamage
|
||||||
|
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||||
|
goto BattleScript_SteelBeamAfterSelfDamage
|
||||||
|
|
||||||
|
BattleScript_SteelBeamSelfDamage::
|
||||||
|
dmg_1_2_attackerhp
|
||||||
|
healthbarupdate BS_ATTACKER
|
||||||
|
datahpupdate BS_ATTACKER
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_EffectCourtChange::
|
BattleScript_EffectCourtChange::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
|
@ -393,7 +393,8 @@
|
|||||||
#define EFFECT_RISING_VOLTAGE 387
|
#define EFFECT_RISING_VOLTAGE 387
|
||||||
#define EFFECT_BEAK_BLAST 388
|
#define EFFECT_BEAK_BLAST 388
|
||||||
#define EFFECT_COURT_CHANGE 389
|
#define EFFECT_COURT_CHANGE 389
|
||||||
|
#define EFFECT_STEEL_BEAM 390
|
||||||
|
|
||||||
#define NUM_BATTLE_MOVE_EFFECTS 390
|
#define NUM_BATTLE_MOVE_EFFECTS 391
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -9882,7 +9882,7 @@ static void Cmd_manipulatedamage(void)
|
|||||||
gBattleMoveDamage = GetDrainedBigRootHp(gBattlerAttacker, gBattleMoveDamage);
|
gBattleMoveDamage = GetDrainedBigRootHp(gBattlerAttacker, gBattleMoveDamage);
|
||||||
break;
|
break;
|
||||||
case DMG_1_2_ATTACKER_HP:
|
case DMG_1_2_ATTACKER_HP:
|
||||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
|
gBattleMoveDamage = (gBattleMons[gBattlerAttacker].maxHP + 1) / 2; // Half of Max HP Rounded UP
|
||||||
break;
|
break;
|
||||||
case DMG_RECOIL_FROM_IMMUNE:
|
case DMG_RECOIL_FROM_IMMUNE:
|
||||||
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
|
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
|
||||||
|
@ -11221,7 +11221,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||||||
|
|
||||||
[MOVE_STEEL_BEAM] =
|
[MOVE_STEEL_BEAM] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_RECOIL_50,
|
.effect = EFFECT_STEEL_BEAM,
|
||||||
.power = 140,
|
.power = 140,
|
||||||
.type = TYPE_STEEL,
|
.type = TYPE_STEEL,
|
||||||
.accuracy = 95,
|
.accuracy = 95,
|
||||||
|
Loading…
Reference in New Issue
Block a user