From 0ac026e6ca0075ecbcfdfe855998c3c4371e2ac9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Fri, 11 Dec 2020 20:21:40 -0300 Subject: [PATCH 1/5] Added the data of SwSh's Crown Tundra's moves And Dragon Energy's effect. Eerie Spell's is the only one missing out of this bunch. --- data/battle_scripts_1.s | 2 + include/constants/battle_move_effects.h | 1 + include/constants/moves.h | 11 ++- src/battle_util.c | 3 + src/data/battle_moves.h | 112 ++++++++++++++++++++++++ src/data/text/move_descriptions.h | 41 ++++++++- src/data/text/move_names.h | 8 ++ 7 files changed, 176 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0ccaa7ef6..982507ac8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -365,6 +365,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8 .4byte BattleScript_EffectFairyLock .4byte BattleScript_EffectAllySwitch .4byte BattleScript_EffectSleepHit + .4byte BattleScript_EffectDragonEnergy BattleScript_EffectSleepHit: setmoveeffect MOVE_EFFECT_SLEEP @@ -2007,6 +2008,7 @@ BattleScript_EffectPlaceholder: printstring STRINGID_NOTDONEYET goto BattleScript_MoveEnd +BattleScript_EffectDragonEnergy: BattleScript_EffectStompingTantrum: BattleScript_EffectEvasionDownHit: BattleScript_EffectVitalThrow: diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index b018429de..5bd0c6a46 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -351,5 +351,6 @@ #define EFFECT_FAIRY_LOCK 345 #define EFFECT_ALLY_SWITCH 346 #define EFFECT_SLEEP_HIT 347 // Relic Song +#define EFFECT_DRAGON_ENERGY 348 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/moves.h b/include/constants/moves.h index 711aa3023..1c38d54e9 100644 --- a/include/constants/moves.h +++ b/include/constants/moves.h @@ -772,8 +772,17 @@ #define MOVE_JUNGLE_HEALING 744 #define MOVE_WICKED_BLOW 745 #define MOVE_SURGING_STRIKES 746 +// Crown Tundra Moves +#define MOVE_THUNDER_CAGE 747 +#define MOVE_DRAGON_ENERGY 748 +#define MOVE_FREEZING_GLARE 749 +#define MOVE_FIERY_WRATH 750 +#define MOVE_THUNDEROUS_KICK 751 +#define MOVE_GLACIAL_LANCE 752 +#define MOVE_ASTRAL_BARRAGE 753 +#define MOVE_EERIE_SPELL 754 -#define MOVES_COUNT_GEN8 747 +#define MOVES_COUNT_GEN8 755 #define MOVES_COUNT MOVES_COUNT_GEN8 diff --git a/src/battle_util.c b/src/battle_util.c index b929b7499..14f7a6e93 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6581,6 +6581,9 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) if (gBattleMoves[gLastUsedMove].effect == EFFECT_FUSION_COMBO && move != gLastUsedMove) basePower *= 2; break; + case EFFECT_DRAGON_ENERGY: + basePower = 150 * gBattleMons[battlerAtk].hp / gBattleMons[battlerAtk].maxHP; + break; } if (basePower == 0) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 0b0c0b553..175c623f3 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11386,4 +11386,116 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_IRON_FIST_BOOST, .split = SPLIT_PHYSICAL, }, + + [MOVE_THUNDER_CAGE] = + { + .effect = EFFECT_TRAP, + .power = 80, + .type = TYPE_ELECTRIC, + .accuracy = 90, + .pp = 15, + .secondaryEffectChance = 100, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_SPECIAL, + }, + + [MOVE_DRAGON_ENERGY] = + { + .effect = EFFECT_DRAGON_ENERGY, + .power = 150, + .type = TYPE_DRAGON, + .accuracy = 100, + .pp = 5, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_SPECIAL, + }, + + [MOVE_FREEZING_GLARE] = + { + .power = 90, + .effect = EFFECT_FREEZE_HIT, + .type = TYPE_PSYCHIC, + .accuracy = 100, + .pp = 10, + .secondaryEffectChance = 10, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_SPECIAL, + }, + + [MOVE_FIERY_WRATH] = + { + .effect = EFFECT_FLINCH_HIT, + .power = 90, + .type = TYPE_DARK, + .accuracy = 100, + .pp = 10, + .secondaryEffectChance = 20, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_SPECIAL, + }, + + [MOVE_THUNDEROUS_KICK] = + { + .effect = EFFECT_DEFENSE_DOWN_HIT, + .power = 90, + .type = TYPE_FIGHTING, + .accuracy = 100, + .pp = 10, + .secondaryEffectChance = 100, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_PHYSICAL, + }, + + [MOVE_GLACIAL_LANCE] = + { + .effect = EFFECT_HIT, + .power = 130, + .type = TYPE_ICE, + .accuracy = 100, + .pp = 5, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_PHYSICAL, + }, + + [MOVE_ASTRAL_BARRAGE] = + { + .effect = EFFECT_HIT, + .power = 120, + .type = TYPE_GHOST, + .accuracy = 100, + .pp = 5, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .split = SPLIT_SPECIAL, + }, + + [MOVE_EERIE_SPELL] = + { + .effect = EFFECT_HIT, // To do. It's a copy of Spite that inflicts damage and reduced the target's last move's PP by 3 instead of 4. + .power = 80, + .type = TYPE_PSYCHIC, + .accuracy = 100, + .pp = 5, + .secondaryEffectChance = 0, + .target = MOVE_TARGET_SELECTED, + .priority = 0, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED | FLAG_SOUND, + .split = SPLIT_SPECIAL, + }, }; diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 96b04d342..2792f33ce 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -2910,6 +2910,38 @@ static const u8 sSURGING_STRIKESDescription[] = _( "Mastering the Water style,\n" "strikes with 3 critical hits."); +static const u8 sTHUNDER_CAGEDescription[] = _( + "Traps the foe in a cage of\n" + "electricity for 2 to 5 turns."); + +static const u8 sDRAGON_ENERGYDescription[] = _( + "The higher the user's HP\n" + "the more damage caused."); + +static const u8 sFREEZING_GLAREDescription[] = _( + "Shoots psychic power from\n" + "the eyes. May freeze the foe."); + +static const u8 sFIERY_WRATHDescription[] = _( + "An attack fueled by your\n" + "wrath. May cause flinching."); + +static const u8 sTHUNDEROUS_KICKDescription[] = _( + "Uses a lightning-like kick\n" + "to hit. Lowers foe's DEFENSE."); + +static const u8 sGLACIAL_LANCEDescription[] = _( + "Strikes by hurling a blizzard-\n" + "cloaked icicle lance at a foe."); + +static const u8 sASTRAL_BARRAGEDescription[] = _( + "Strikes by sending a frightful\n" + "amount of ghosts at a foe."); + +static const u8 sEERIE_SPELLDescription[] = _( + "Eeriely inflicts damage and\n" + "cuts a foe's las move's PP."); + static const u8 sNotDoneYetDescription[] = _( "Not done yet."); @@ -3664,5 +3696,12 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] = [MOVE_JUNGLE_HEALING - 1] = sJUNGLE_HEALINGDescription, [MOVE_WICKED_BLOW - 1] = sWICKED_BLOWDescription, [MOVE_SURGING_STRIKES - 1] = sSURGING_STRIKESDescription, - + [MOVE_THUNDER_CAGE - 1] = sTHUNDER_CAGEDescription, + [MOVE_DRAGON_ENERGY - 1] = sDRAGON_ENERGYDescription, + [MOVE_FREEZING_GLARE - 1] = sFREEZING_GLAREDescription, + [MOVE_FIERY_WRATH - 1] = sFIERY_WRATHDescription, + [MOVE_THUNDEROUS_KICK - 1] = sTHUNDEROUS_KICKDescription, + [MOVE_GLACIAL_LANCE - 1] = sGLACIAL_LANCEDescription, + [MOVE_ASTRAL_BARRAGE - 1] = sASTRAL_BARRAGEDescription, + [MOVE_EERIE_SPELL - 1] = sEERIE_SPELLDescription, }; diff --git a/src/data/text/move_names.h b/src/data/text/move_names.h index 1eaf3137d..8df3a514d 100644 --- a/src/data/text/move_names.h +++ b/src/data/text/move_names.h @@ -748,4 +748,12 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] = [MOVE_JUNGLE_HEALING] = _("Jungle Heal"), [MOVE_WICKED_BLOW] = _("Wicked Blow"), [MOVE_SURGING_STRIKES] = _("SurgeStrikes"), + [MOVE_THUNDER_CAGE] = _("Thunder Cage"), + [MOVE_DRAGON_ENERGY] = _("DragonEnergy"), + [MOVE_FREEZING_GLARE] = _("FreezngGlare"), + [MOVE_FIERY_WRATH] = _("Fiery Wrath"), + [MOVE_THUNDEROUS_KICK] = _("ThnderusKick"), + [MOVE_GLACIAL_LANCE] = _("GlacialLance"), + [MOVE_ASTRAL_BARRAGE] = _("AstrlBarrage"), + [MOVE_EERIE_SPELL] = _("Eerie Spell"), }; From c5e04cf2437623acafdcf3904a2839ef98bb3cc7 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 12 Dec 2020 01:19:15 -0300 Subject: [PATCH 2/5] Removed the unnecessary Dragon Energy effect The move is an Eruption clone, whose effect was already done. Thanks to BuffelSaft for the heads up. I took the chance and fixed its target too. --- data/battle_scripts_1.s | 2 -- include/constants/battle_move_effects.h | 1 - src/battle_util.c | 3 --- src/data/battle_moves.h | 4 ++-- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 982507ac8..0ccaa7ef6 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -365,7 +365,6 @@ gBattleScriptsForMoveEffects:: @ 82D86A8 .4byte BattleScript_EffectFairyLock .4byte BattleScript_EffectAllySwitch .4byte BattleScript_EffectSleepHit - .4byte BattleScript_EffectDragonEnergy BattleScript_EffectSleepHit: setmoveeffect MOVE_EFFECT_SLEEP @@ -2008,7 +2007,6 @@ BattleScript_EffectPlaceholder: printstring STRINGID_NOTDONEYET goto BattleScript_MoveEnd -BattleScript_EffectDragonEnergy: BattleScript_EffectStompingTantrum: BattleScript_EffectEvasionDownHit: BattleScript_EffectVitalThrow: diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 5bd0c6a46..b018429de 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -351,6 +351,5 @@ #define EFFECT_FAIRY_LOCK 345 #define EFFECT_ALLY_SWITCH 346 #define EFFECT_SLEEP_HIT 347 // Relic Song -#define EFFECT_DRAGON_ENERGY 348 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/battle_util.c b/src/battle_util.c index 14f7a6e93..b929b7499 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6581,9 +6581,6 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef) if (gBattleMoves[gLastUsedMove].effect == EFFECT_FUSION_COMBO && move != gLastUsedMove) basePower *= 2; break; - case EFFECT_DRAGON_ENERGY: - basePower = 150 * gBattleMons[battlerAtk].hp / gBattleMons[battlerAtk].maxHP; - break; } if (basePower == 0) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 175c623f3..7031fdc22 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11403,13 +11403,13 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_DRAGON_ENERGY] = { - .effect = EFFECT_DRAGON_ENERGY, + .effect = EFFECT_ERUPTION, .power = 150, .type = TYPE_DRAGON, .accuracy = 100, .pp = 5, .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, From ffa35a33c169780a6154eb4976218b499e63d3c7 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 19 Dec 2020 07:44:34 -0300 Subject: [PATCH 3/5] Review corrections --- src/data/battle_moves.h | 10 +++++----- src/data/text/move_descriptions.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 7031fdc22..138f4f86c 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11425,7 +11425,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .secondaryEffectChance = 10, .target = MOVE_TARGET_SELECTED, .priority = 0, - .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, }, @@ -11437,9 +11437,9 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .accuracy = 100, .pp = 10, .secondaryEffectChance = 20, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, }, @@ -11465,7 +11465,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_PHYSICAL, @@ -11479,7 +11479,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .accuracy = 100, .pp = 5, .secondaryEffectChance = 0, - .target = MOVE_TARGET_SELECTED, + .target = MOVE_TARGET_BOTH, .priority = 0, .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, .split = SPLIT_SPECIAL, diff --git a/src/data/text/move_descriptions.h b/src/data/text/move_descriptions.h index 2792f33ce..354094ad0 100644 --- a/src/data/text/move_descriptions.h +++ b/src/data/text/move_descriptions.h @@ -2928,7 +2928,7 @@ static const u8 sFIERY_WRATHDescription[] = _( static const u8 sTHUNDEROUS_KICKDescription[] = _( "Uses a lightning-like kick\n" - "to hit. Lowers foe's DEFENSE."); + "to hit. Lowers foe's Defense."); static const u8 sGLACIAL_LANCEDescription[] = _( "Strikes by hurling a blizzard-\n" @@ -2939,8 +2939,8 @@ static const u8 sASTRAL_BARRAGEDescription[] = _( "amount of ghosts at a foe."); static const u8 sEERIE_SPELLDescription[] = _( - "Eeriely inflicts damage and\n" - "cuts a foe's las move's PP."); + "Attacks with psychic power.\n" + "Foe's last move has 3 PP cut."); static const u8 sNotDoneYetDescription[] = _( "Not done yet."); From 89989943b37b6ce91e2eea7b803bd7f8957c1851 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 19 Dec 2020 19:11:17 -0300 Subject: [PATCH 4/5] Added placeholders for the anims of CT's moves --- data/battle_anim_scripts.s | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index cf11f4d6a..9fb69e1e4 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -767,7 +767,15 @@ gBattleAnims_Moves:: .4byte Move_JUNGLE_HEALING .4byte Move_WICKED_BLOW .4byte Move_SURGING_STRIKES - .4byte Move_COUNT @ cannot be reached, because last move is Surging Strikes + .4byte Move_THUNDER_CAGE + .4byte Move_DRAGON_ENERGY + .4byte Move_FREEZING_GLARE + .4byte Move_FIERY_WRATH + .4byte Move_THUNDEROUS_KICK + .4byte Move_GLACIAL_LANCE + .4byte Move_ASTRAL_BARRAGE + .4byte Move_EERIE_SPELL + .4byte Move_COUNT @ cannot be reached, because last move is Eerie Spell .align 2 gBattleAnims_StatusConditions:: @@ -14006,6 +14014,30 @@ Move_WICKED_BLOW:: Move_SURGING_STRIKES:: end @to do: +Move_THUNDER_CAGE:: + end @to do: + +Move_DRAGON_ENERGY:: + end @to do: + +Move_FREEZING_GLARE:: + end @to do: + +Move_FIERY_WRATH:: + end @to do: + +Move_THUNDEROUS_KICK:: + end @to do: + +Move_GLACIAL_LANCE:: + end @to do: + +Move_ASTRAL_BARRAGE:: + end @to do: + +Move_EERIE_SPELL:: + end @to do: + @@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@ Move_NONE: Move_MIRROR_MOVE: From 0aae069db88550f703856f9833e0b6ae68622c46 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 19 Dec 2020 21:11:17 -0300 Subject: [PATCH 5/5] Made Fiery Wrath unaffected by King's Rock --- src/data/battle_moves.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 138f4f86c..13cef869b 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11439,7 +11439,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = .secondaryEffectChance = 20, .target = MOVE_TARGET_BOTH, .priority = 0, - .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED, + .flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED, .split = SPLIT_SPECIAL, },