mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Applied review suggestions
-Merged EFFECT_CEASELESS_EDGE and EFFECT_STONE_AXE into EFFECT_HIT_SET_ENTRY_HAZARD -Updated gDmgHazardsStringIds and relevant battle scripts. Can't say that I like it at all. String tables are stupid imo. -Coupled Barb Barrage's effect in CalcMoveBasePower with Venoshock's
This commit is contained in:
parent
fe74dd938b
commit
fe735f9700
@ -418,39 +418,13 @@ gBattleScriptsForMoveEffects::
|
|||||||
.4byte BattleScript_EffectTeatime @ EFFECT_TEATIME
|
.4byte BattleScript_EffectTeatime @ EFFECT_TEATIME
|
||||||
.4byte BattleScript_EffectAttackUpUserAlly @ EFFECT_ATTACK_UP_USER_ALLY
|
.4byte BattleScript_EffectAttackUpUserAlly @ EFFECT_ATTACK_UP_USER_ALLY
|
||||||
.4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP
|
.4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP
|
||||||
.4byte BattleScript_EffectCeaselessEdge @ EFFECT_CEASELESS_EDGE
|
.4byte BattleScript_EffectHitSetEntryHazard @ EFFECT_HIT_SET_ENTRY_HAZARD
|
||||||
.4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW
|
.4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW
|
||||||
.4byte BattleScript_EffectStoneAxe @ EFFECT_STONE_AXE
|
|
||||||
.4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE
|
.4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE
|
||||||
|
|
||||||
BattleScript_EffectStoneAxe::
|
|
||||||
attackcanceler
|
|
||||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
|
||||||
attackstring
|
|
||||||
ppreduce
|
|
||||||
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
|
|
||||||
tryfaintmon BS_TARGET
|
|
||||||
setmoveeffect MOVE_EFFECT_STEALTH_ROCK
|
|
||||||
seteffectprimary
|
|
||||||
moveendall
|
|
||||||
end
|
|
||||||
|
|
||||||
BattleScript_StealthRockActivates::
|
BattleScript_StealthRockActivates::
|
||||||
setstealthrock BattleScript_MoveEnd
|
setstealthrock BattleScript_MoveEnd
|
||||||
printstring STRINGID_POINTEDSTONESFLOAT
|
printfromtable gDmgHazardsStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
@ -458,7 +432,7 @@ BattleScript_EffectDireClaw::
|
|||||||
setmoveeffect MOVE_EFFECT_DIRE_CLAW
|
setmoveeffect MOVE_EFFECT_DIRE_CLAW
|
||||||
goto BattleScript_EffectHit
|
goto BattleScript_EffectHit
|
||||||
|
|
||||||
BattleScript_EffectCeaselessEdge::
|
BattleScript_EffectHitSetEntryHazard::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||||
attackstring
|
attackstring
|
||||||
@ -478,14 +452,14 @@ BattleScript_EffectCeaselessEdge::
|
|||||||
resultmessage
|
resultmessage
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
tryfaintmon BS_TARGET
|
tryfaintmon BS_TARGET
|
||||||
setmoveeffect MOVE_EFFECT_SPIKES
|
argumenttomoveeffect
|
||||||
seteffectprimary
|
seteffectprimary
|
||||||
moveendall
|
moveendall
|
||||||
end
|
end
|
||||||
|
|
||||||
BattleScript_SpikesActivate::
|
BattleScript_SpikesActivate::
|
||||||
trysetspikes BattleScript_MoveEnd
|
trysetspikes BattleScript_MoveEnd
|
||||||
printstring STRINGID_SPIKESSCATTERED
|
printfromtable gDmgHazardsStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
|
@ -399,11 +399,10 @@
|
|||||||
#define EFFECT_TEATIME 393
|
#define EFFECT_TEATIME 393
|
||||||
#define EFFECT_ATTACK_UP_USER_ALLY 394 // Howl 8th Gen
|
#define EFFECT_ATTACK_UP_USER_ALLY 394 // Howl 8th Gen
|
||||||
#define EFFECT_SHELL_TRAP 395
|
#define EFFECT_SHELL_TRAP 395
|
||||||
#define EFFECT_CEASELESS_EDGE 396
|
#define EFFECT_HIT_SET_ENTRY_HAZARD 396
|
||||||
#define EFFECT_DIRE_CLAW 397
|
#define EFFECT_DIRE_CLAW 397
|
||||||
#define EFFECT_STONE_AXE 398
|
#define EFFECT_BARB_BARRAGE 398
|
||||||
#define EFFECT_BARB_BARRAGE 399
|
|
||||||
|
|
||||||
#define NUM_BATTLE_MOVE_EFFECTS 400
|
#define NUM_BATTLE_MOVE_EFFECTS 399
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
@ -921,4 +921,10 @@
|
|||||||
#define B_MSG_Z_STAT_UP 5
|
#define B_MSG_Z_STAT_UP 5
|
||||||
#define B_MSG_Z_HP_TRAP 6
|
#define B_MSG_Z_HP_TRAP 6
|
||||||
|
|
||||||
|
// gDmgHazardsStringIds
|
||||||
|
#define B_MSG_PKMNHURTBYSPIKES 0
|
||||||
|
#define B_MSG_STEALTHROCKDMG 1
|
||||||
|
#define B_MSG_POINTEDSTONESFLOAT 2
|
||||||
|
#define B_MSG_SPIKESSCATTERED 3
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -3872,9 +3872,8 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EFFECT_SPIKES:
|
case EFFECT_SPIKES:
|
||||||
case EFFECT_CEASELESS_EDGE:
|
case EFFECT_HIT_SET_ENTRY_HAZARD:
|
||||||
case EFFECT_STEALTH_ROCK:
|
case EFFECT_STEALTH_ROCK:
|
||||||
case EFFECT_STONE_AXE:
|
|
||||||
case EFFECT_STICKY_WEB:
|
case EFFECT_STICKY_WEB:
|
||||||
case EFFECT_TOXIC_SPIKES:
|
case EFFECT_TOXIC_SPIKES:
|
||||||
if (AI_DATA->abilities[battlerDef] == ABILITY_MAGIC_BOUNCE || CountUsablePartyMons(battlerDef) == 0)
|
if (AI_DATA->abilities[battlerDef] == ABILITY_MAGIC_BOUNCE || CountUsablePartyMons(battlerDef) == 0)
|
||||||
@ -4910,7 +4909,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
|||||||
case EFFECT_HAIL:
|
case EFFECT_HAIL:
|
||||||
case EFFECT_GEOMANCY:
|
case EFFECT_GEOMANCY:
|
||||||
case EFFECT_VICTORY_DANCE:
|
case EFFECT_VICTORY_DANCE:
|
||||||
case EFFECT_STONE_AXE:
|
case EFFECT_HIT_SET_ENTRY_HAZARD:
|
||||||
score += 2;
|
score += 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1462,7 +1462,10 @@ const u16 gHealingWishStringIds[] =
|
|||||||
|
|
||||||
const u16 gDmgHazardsStringIds[] =
|
const u16 gDmgHazardsStringIds[] =
|
||||||
{
|
{
|
||||||
STRINGID_PKMNHURTBYSPIKES, STRINGID_STEALTHROCKDMG
|
[B_MSG_PKMNHURTBYSPIKES] = STRINGID_PKMNHURTBYSPIKES,
|
||||||
|
[B_MSG_STEALTHROCKDMG] = STRINGID_STEALTHROCKDMG,
|
||||||
|
[B_MSG_POINTEDSTONESFLOAT] = STRINGID_POINTEDSTONESFLOAT,
|
||||||
|
[B_MSG_SPIKESSCATTERED] = STRINGID_SPIKESSCATTERED
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gSwitchInAbilityStringIds[] =
|
const u16 gSwitchInAbilityStringIds[] =
|
||||||
|
@ -3768,6 +3768,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
case MOVE_EFFECT_STEALTH_ROCK:
|
case MOVE_EFFECT_STEALTH_ROCK:
|
||||||
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_STEALTH_ROCK))
|
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_STEALTH_ROCK))
|
||||||
{
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_POINTEDSTONESFLOAT;
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
gBattlescriptCurrInstr = BattleScript_StealthRockActivates;
|
gBattlescriptCurrInstr = BattleScript_StealthRockActivates;
|
||||||
}
|
}
|
||||||
@ -3775,6 +3776,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
case MOVE_EFFECT_SPIKES:
|
case MOVE_EFFECT_SPIKES:
|
||||||
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_SPIKES))
|
if (!(gSideStatuses[GetBattlerSide(gEffectBattler)] & SIDE_STATUS_SPIKES))
|
||||||
{
|
{
|
||||||
|
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SPIKESSCATTERED;
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
gBattlescriptCurrInstr = BattleScript_SpikesActivate;
|
gBattlescriptCurrInstr = BattleScript_SpikesActivate;
|
||||||
}
|
}
|
||||||
@ -7045,7 +7047,7 @@ static void Cmd_switchineffects(void)
|
|||||||
gBattleMoveDamage = 1;
|
gBattleMoveDamage = 1;
|
||||||
|
|
||||||
gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED;
|
gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_SPIKES_DAMAGED;
|
||||||
SetDmgHazardsBattlescript(gActiveBattler, 0);
|
SetDmgHazardsBattlescript(gActiveBattler, B_MSG_PKMNHURTBYSPIKES);
|
||||||
}
|
}
|
||||||
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK_DAMAGED)
|
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK_DAMAGED)
|
||||||
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK)
|
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_STEALTH_ROCK)
|
||||||
@ -7056,7 +7058,7 @@ static void Cmd_switchineffects(void)
|
|||||||
gBattleMoveDamage = GetStealthHazardDamage(gBattleMoves[MOVE_STEALTH_ROCK].type, gActiveBattler);
|
gBattleMoveDamage = GetStealthHazardDamage(gBattleMoves[MOVE_STEALTH_ROCK].type, gActiveBattler);
|
||||||
|
|
||||||
if (gBattleMoveDamage != 0)
|
if (gBattleMoveDamage != 0)
|
||||||
SetDmgHazardsBattlescript(gActiveBattler, 1);
|
SetDmgHazardsBattlescript(gActiveBattler, B_MSG_STEALTHROCKDMG);
|
||||||
}
|
}
|
||||||
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES_DAMAGED)
|
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES_DAMAGED)
|
||||||
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES)
|
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES)
|
||||||
|
@ -8761,10 +8761,6 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
|||||||
basePower = CalcBeatUpPower();
|
basePower = CalcBeatUpPower();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case EFFECT_BARB_BARRAGE:
|
|
||||||
if (gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY)
|
|
||||||
basePower *= 2;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move-specific base power changes
|
// Move-specific base power changes
|
||||||
@ -9130,6 +9126,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
|||||||
if (gBattleMons[battlerDef].hp <= (gBattleMons[battlerDef].maxHP / 2))
|
if (gBattleMons[battlerDef].hp <= (gBattleMons[battlerDef].maxHP / 2))
|
||||||
MulModifier(&modifier, UQ_4_12(2.0));
|
MulModifier(&modifier, UQ_4_12(2.0));
|
||||||
break;
|
break;
|
||||||
|
case EFFECT_BARB_BARRAGE:
|
||||||
case EFFECT_VENOSHOCK:
|
case EFFECT_VENOSHOCK:
|
||||||
if (gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY)
|
if (gBattleMons[battlerDef].status1 & STATUS1_PSN_ANY)
|
||||||
MulModifier(&modifier, UQ_4_12(2.0));
|
MulModifier(&modifier, UQ_4_12(2.0));
|
||||||
|
@ -13323,7 +13323,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
|||||||
|
|
||||||
[MOVE_STONE_AXE] =
|
[MOVE_STONE_AXE] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_STONE_AXE,
|
.effect = EFFECT_HIT_SET_ENTRY_HAZARD,
|
||||||
.power = 65,
|
.power = 65,
|
||||||
.type = TYPE_ROCK,
|
.type = TYPE_ROCK,
|
||||||
.accuracy = 90,
|
.accuracy = 90,
|
||||||
@ -13335,6 +13335,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
|||||||
.split = SPLIT_PHYSICAL,
|
.split = SPLIT_PHYSICAL,
|
||||||
.zMovePower = 120,
|
.zMovePower = 120,
|
||||||
.zMoveEffect = Z_EFFECT_NONE,
|
.zMoveEffect = Z_EFFECT_NONE,
|
||||||
|
.argument = MOVE_EFFECT_STEALTH_ROCK,
|
||||||
},
|
},
|
||||||
|
|
||||||
[MOVE_SPRINGTIDE_STORM] =
|
[MOVE_SPRINGTIDE_STORM] =
|
||||||
@ -13599,7 +13600,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
|||||||
|
|
||||||
[MOVE_CEASELESS_EDGE] =
|
[MOVE_CEASELESS_EDGE] =
|
||||||
{
|
{
|
||||||
.effect = EFFECT_CEASELESS_EDGE,
|
.effect = EFFECT_HIT_SET_ENTRY_HAZARD,
|
||||||
.power = 65,
|
.power = 65,
|
||||||
.type = TYPE_DARK,
|
.type = TYPE_DARK,
|
||||||
.accuracy = 90,
|
.accuracy = 90,
|
||||||
@ -13611,6 +13612,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
|||||||
.split = SPLIT_PHYSICAL,
|
.split = SPLIT_PHYSICAL,
|
||||||
.zMovePower = 120,
|
.zMovePower = 120,
|
||||||
.zMoveEffect = Z_EFFECT_NONE,
|
.zMoveEffect = Z_EFFECT_NONE,
|
||||||
|
.argument = MOVE_EFFECT_SPIKES,
|
||||||
},
|
},
|
||||||
|
|
||||||
[MOVE_BLEAKWIND_STORM] =
|
[MOVE_BLEAKWIND_STORM] =
|
||||||
|
Loading…
Reference in New Issue
Block a user