From f4e8389779da1d3a16c524dade408c9072a14ecd Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 16 Mar 2023 17:58:39 -0300 Subject: [PATCH] Added Psyblade and Hydro Steam --- data/battle_anim_scripts.s | 4 ++++ data/battle_scripts_1.s | 4 +++- include/constants/battle_move_effects.h | 4 +++- include/constants/moves.h | 4 +++- src/battle_util.c | 6 ++++- src/data/battle_moves.h | 30 +++++++++++++++++++++++++ src/data/contest_moves.h | 4 ++++ src/data/text/move_descriptions.h | 10 +++++++++ src/data/text/move_names.h | 4 ++++ 9 files changed, 66 insertions(+), 4 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 4663fdcaf..cca8706cb 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -854,6 +854,8 @@ gBattleAnims_Moves:: .4byte Move_NOXIOUS_TORQUE .4byte Move_COMBAT_TORQUE .4byte Move_MAGICAL_TORQUE + .4byte Move_PSYBLADE + .4byte Move_HYDRO_STEAM @@@@ Z MOVES .4byte Move_BREAKNECK_BLITZ .4byte Move_ALL_OUT_PUMMELING @@ -14464,6 +14466,8 @@ Move_WICKED_TORQUE:: Move_NOXIOUS_TORQUE:: Move_COMBAT_TORQUE:: Move_MAGICAL_TORQUE:: +Move_PSYBLADE:: +Move_HYDRO_STEAM:: end @to do @@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@ diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 8b93edb78..52c135294 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -417,7 +417,9 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE .4byte BattleScript_EffectTeatime @ EFFECT_TEATIME .4byte BattleScript_EffectAttackUpUserAlly @ EFFECT_ATTACK_UP_USER_ALLY - .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP + .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP + .4byte BattleScript_EffectHit @ EFFECT_PSYBLADE + .4byte BattleScript_EffectHit @ EFFECT_HYDRO_STEAM BattleScript_EffectAttackUpUserAlly: jumpifnoally BS_ATTACKER, BattleScript_EffectAttackUp diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 061271dd5..c374ce436 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -399,7 +399,9 @@ #define EFFECT_TEATIME 393 #define EFFECT_ATTACK_UP_USER_ALLY 394 // Howl 8th Gen #define EFFECT_SHELL_TRAP 395 +#define EFFECT_PSYBLADE 396 +#define EFFECT_HYDRO_STEAM 397 -#define NUM_BATTLE_MOVE_EFFECTS 396 +#define NUM_BATTLE_MOVE_EFFECTS 398 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/moves.h b/include/constants/moves.h index 20cb32c54..dd00aacb4 100644 --- a/include/constants/moves.h +++ b/include/constants/moves.h @@ -858,8 +858,10 @@ #define MOVE_NOXIOUS_TORQUE 824 #define MOVE_COMBAT_TORQUE 825 #define MOVE_MAGICAL_TORQUE 826 +#define MOVE_PSYBLADE 827 +#define MOVE_HYDRO_STEAM 828 -#define MOVES_COUNT_GEN9 827 +#define MOVES_COUNT_GEN9 829 #define MOVES_COUNT MOVES_COUNT_GEN9 diff --git a/src/battle_util.c b/src/battle_util.c index 4b50bc704..fcfec90c2 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8769,6 +8769,10 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) basePower = CalcBeatUpPower(); #endif break; + case EFFECT_PSYBLADE: + if (IsBattlerTerrainAffected(gBattlerAttacker, STATUS_FIELD_ELECTRIC_TERRAIN)) + MulModifier(&basePower, UQ_4_12(1.5)); + break; } // Move-specific base power changes @@ -9586,7 +9590,7 @@ static u32 CalcFinalDmg(u32 dmg, u16 move, u8 battlerAtk, u8 battlerDef, u8 move } else if (IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN)) { - if (moveType == TYPE_FIRE) + if (moveType == TYPE_FIRE || gBattleMoves[move].effect == EFFECT_HYDRO_STEAM) dmg = ApplyModifier(UQ_4_12(1.5), dmg); else if (moveType == TYPE_WATER) dmg = ApplyModifier(UQ_4_12(0.5), dmg); diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index dc18893de..7ce5a669e 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13593,6 +13593,36 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .zMoveEffect = Z_EFFECT_NONE }, + [MOVE_PSYBLADE] = + { + .effect = EFFECT_PSYBLADE, + .power = 80, + .type = TYPE_PSYCHIC, + .accuracy = 100, + .pp = 15, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SLICING_MOVE, + .split = SPLIT_PHYSICAL, + .zMoveEffect = Z_EFFECT_NONE, + }, + + [MOVE_HYDRO_STEAM] = + { + .effect = EFFECT_HYDRO_STEAM, + .power = 80, + .type = TYPE_WATER, + .accuracy = 100, + .pp = 15, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED, + .split = SPLIT_SPECIAL, + .zMoveEffect = Z_EFFECT_NONE, + }, + // Z-Moves [MOVE_BREAKNECK_BLITZ] = { diff --git a/src/data/contest_moves.h b/src/data/contest_moves.h index 2de44b348..3d633a256 100644 --- a/src/data/contest_moves.h +++ b/src/data/contest_moves.h @@ -6062,6 +6062,10 @@ const struct ContestMove gContestMoves[MOVES_COUNT] = [MOVE_COMBAT_TORQUE] = {0}, // TODO [MOVE_MAGICAL_TORQUE] = {0}, // TODO + + [MOVE_PSYBLADE] = {0}, // TODO + + [MOVE_HYDRO_STEAM] = {0}, // TODO }; const struct ContestEffect gContestEffects[] = diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 7000759f7..c2b7e0b23 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -3236,6 +3236,14 @@ static const u8 sCombatTorqueDescription[] = _( static const u8 sMagicalTorqueDescription[] = _( "---"); +static const u8 sPsybladeDescription[] = _( + "This move's power increases\n" + "when on Electric Terrain."); + +static const u8 sHydroSteamDescription[] = _( + "This move's power increases\n" + "under harsh sunlight."); + const u8 gNotDoneYetDescription[] = _( "This move can't be used. Its\n" "effect is in development."); @@ -4073,4 +4081,6 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = [MOVE_NOXIOUS_TORQUE - 1] = sNoxiousTorqueDescription, [MOVE_COMBAT_TORQUE - 1] = sCombatTorqueDescription, [MOVE_MAGICAL_TORQUE - 1] = sMagicalTorqueDescription, + [MOVE_PSYBLADE - 1] = sPsybladeDescription, + [MOVE_HYDRO_STEAM - 1] = sHydroSteamDescription, }; diff --git a/src/data/text/move_names.h b/src/data/text/move_names.h index 221d3db73..85d406dca 100644 --- a/src/data/text/move_names.h +++ b/src/data/text/move_names.h @@ -829,6 +829,8 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] = [MOVE_NOXIOUS_TORQUE] = _("Noxious Torque"), [MOVE_COMBAT_TORQUE] = _("Combat Torque"), [MOVE_MAGICAL_TORQUE] = _("Magical Torque"), + [MOVE_PSYBLADE] = _("Psyblade"), + [MOVE_HYDRO_STEAM] = _("Hydro Steam"), }; #else // 12 letters @@ -1661,6 +1663,8 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] = [MOVE_NOXIOUS_TORQUE] = _("NoxiusTorque"), [MOVE_COMBAT_TORQUE] = _("CombatTorque"), [MOVE_MAGICAL_TORQUE] = _("MagiclTorque"), + [MOVE_PSYBLADE] = _("Psyblade"), + [MOVE_HYDRO_STEAM] = _("Hydro Steam"), }; #endif