This commit is contained in:
Evan 2021-01-04 11:43:36 -07:00
commit 5ae1e3c25b
12 changed files with 261 additions and 16 deletions

View File

@ -768,7 +768,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::
@ -14021,6 +14029,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:
@ -23955,6 +23987,7 @@ General_TurnTrap:
jumpargeq 0, TRAP_ANIM_WHIRLPOOL, Status_Whirlpool
jumpargeq 0, TRAP_ANIM_CLAMP, Status_Clamp
jumpargeq 0, TRAP_ANIM_SAND_TOMB, Status_SandTomb
jumpargeq 0, TRAP_ANIM_INFESTATION, Status_Infestation
goto Status_BindWrap
Status_BindWrap:
loadspritegfx ANIM_TAG_TENDRILS
@ -24028,6 +24061,22 @@ Status_SandTomb:
stopsound
end
Status_Infestation:
loadspritegfx ANIM_TAG_HANDS_AND_FEET @black color
loadspritegfx ANIM_TAG_SMALL_BUBBLES @circle particles
monbg ANIM_DEF_PARTNER
monbgprio_28 ANIM_TARGET
createvisualtask AnimTask_BlendBattleAnimPal, 10, ANIM_PAL_DEF, 0x2, 0x0, 0x9, 0x7320
launchtask AnimTask_ShakeMon 0x2 0x5 ANIM_TARGET 0x3 0x0 30 0x1
loopsewithpan SE_M_CHARGE, SOUND_PAN_ATTACKER, 0x0, 30
call InfestationVortex
call InfestationVortex
waitforvisualfinish
launchtask AnimTask_BlendBattleAnimPal 0xA 0x5 ANIM_PAL_DEF 0x2 0x9 0x0 0x7320
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
end
General_HeldItemEffect:
loadspritegfx ANIM_TAG_THIN_RING
loadspritegfx ANIM_TAG_SPARKLE_2

View File

@ -1082,16 +1082,15 @@ BattleScript_EffectFinalGambit:
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchance
tryfaintmon BS_TARGET, FALSE, NULL
jumpifmovehadnoeffect BattleScript_MoveEnd
dmgtocurrattackerhp
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
seteffectwithchance
tryfaintmon BS_ATTACKER, FALSE, NULL
tryfaintmon BS_TARGET, FALSE, NULL
jumpifmovehadnoeffect BattleScript_MoveEnd
goto BattleScript_MoveEnd
BattleScript_EffectHitSwitchTarget:
@ -2806,6 +2805,10 @@ BattleScript_EffectDoubleHit::
BattleScript_EffectRecoilIfMiss::
attackcanceler
accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
typecalc
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveMissedDoDamage
.endif
goto BattleScript_HitFromAtkString
BattleScript_MoveMissedDoDamage::
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_PrintMoveMissed
@ -2814,19 +2817,33 @@ BattleScript_MoveMissedDoDamage::
pause 0x40
resultmessage
waitmessage 0x40
.if B_CRASH_IF_TARGET_IMMUNE < GEN_4
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
.endif
printstring STRINGID_PKMNCRASHED
waitmessage 0x40
damagecalc
typecalc
adjustdamage
.if B_CRASH_IF_TARGET_IMMUNE == GEN_4
manipulatedamage DMG_RECOIL_FROM_IMMUNE
.else
manipulatedamage DMG_RECOIL_FROM_MISS
.endif
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
.else
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
.endif
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
.else
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
.endif
goto BattleScript_MoveEnd
BattleScript_EffectMist::

View File

@ -559,6 +559,7 @@
#define TRAP_ANIM_WHIRLPOOL 2
#define TRAP_ANIM_CLAMP 3
#define TRAP_ANIM_SAND_TOMB 4
#define TRAP_ANIM_INFESTATION 5
// Weather defines for battle animation scripts.
#define ANIM_WEATHER_NONE 0

View File

@ -111,9 +111,10 @@
#define B_MINIMIZE_DMG_ACC GEN_6 // In Gen6+, moves that causes double damage to minimized Pokémon will also skip accuracy checks.
#define B_PP_REDUCED_BY_SPITE GEN_6 // In Gen4+, Spite reduces the foe's last move's PP by 4, instead of 2 to 5.
#define B_CAN_SPITE_FAIL GEN_6 // In Gen4+, Spite can no longer fail if the foe's last move only has 1 remaining PP.
#define B_CRASH_IF_TARGET_IMMUNE GEN_6 // In Gen4+, The user of Jump Kick or Hi Jump Kick will "keep going and crash" if it attacks a target that is immune to the move.
// Ability settings
#define B_ABILITY_WEATHER GEN_6 // In Gen5+, weather caused by abilities lasts the same amount of turns as induced from a move. Before, they lasted till the battle's end or weather change by a move.
#define B_ABILITY_WEATHER GEN_6 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move.
#define B_GALE_WINGS GEN_6 // In Gen7+ requires full HP to trigger.
#define B_STANCE_CHANGE_FAIL GEN_7 // In Gen7+, Stance Change fails if the Pokémon is unable to use a move because of confusion, paralysis, etc. In Gen6, it doesn't.
#define B_GHOSTS_ESCAPE GEN_6 // In Gen6+, ghosts can escape even when blocked by abilities such as Shadow Tag.
@ -127,8 +128,9 @@
#define B_BERRIES_INSTANT GEN_6 // In Gen4+, most berries activate on battle start/switch-in if applicable. In gen3, they only activate either at the move end or turn end.
#define B_MENTAL_HERB GEN_5 // In Gen5+, mental herb cures Taunt, Encore, Heal Block, and Disable
// Flag settings.
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag for toggling the feature.
// Flag settings
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
#define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water.
#define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles.

View File

@ -177,6 +177,7 @@
#define DMG_CURR_ATTACKER_HP 5
#define DMG_BIG_ROOT 6
#define DMG_1_2_ATTACKER_HP 7
#define DMG_RECOIL_FROM_IMMUNE 8 // Used to calculate recoil for the Gen 4 version of Jump Kick
// Cmd_jumpifcantswitch
#define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80

View File

@ -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

View File

@ -2494,6 +2494,8 @@ void AnimTask_GetTrappedMoveAnimId(u8 taskId)
gBattleAnimArgs[0] = TRAP_ANIM_CLAMP;
else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_SAND_TOMB)
gBattleAnimArgs[0] = TRAP_ANIM_SAND_TOMB;
else if (gBattleSpritesDataPtr->animationData->animArg == MOVE_INFESTATION)
gBattleAnimArgs[0] = TRAP_ANIM_INFESTATION;
else
gBattleAnimArgs[0] = TRAP_ANIM_BIND;

View File

@ -8555,7 +8555,9 @@ static void Cmd_manipulatedamage(void)
gBattleMoveDamage /= 2;
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
if (B_RECOIL_IF_MISS_DMG >= GEN_5 || ((gBattleMons[gBattlerTarget].maxHP / 2) < gBattleMoveDamage))
if (B_RECOIL_IF_MISS_DMG >= GEN_5)
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
if ((B_RECOIL_IF_MISS_DMG <= GEN_4) && ((gBattleMons[gBattlerTarget].maxHP / 2) < gBattleMoveDamage))
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
break;
case DMG_DOUBLED:
@ -8578,6 +8580,9 @@ static void Cmd_manipulatedamage(void)
case DMG_1_2_ATTACKER_HP:
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
break;
case DMG_RECOIL_FROM_IMMUNE:
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
break;
}
gBattlescriptCurrInstr += 2;

View File

@ -7083,7 +7083,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
}
break;
case ABILITY_FLOWER_GIFT:
if (gBattleMons[battlerAtk].species == SPECIES_CHERRIM && WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY)
if (gBattleMons[battlerAtk].species == SPECIES_CHERRIM && WEATHER_HAS_EFFECT && (gBattleWeather & WEATHER_SUN_ANY) && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.5));
break;
case ABILITY_HUSTLE:
@ -7119,7 +7119,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
switch (GetBattlerAbility(BATTLE_PARTNER(battlerAtk)))
{
case ABILITY_FLOWER_GIFT:
if (gBattleMons[BATTLE_PARTNER(battlerAtk)].species == SPECIES_CHERRIM)
if (gBattleMons[BATTLE_PARTNER(battlerAtk)].species == SPECIES_CHERRIM && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.5));
break;
}

View File

@ -7986,7 +7986,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
[MOVE_FINAL_GAMBIT] =
{
.effect = EFFECT_HIT_SWITCH_TARGET,
.effect = EFFECT_FINAL_GAMBIT,
.power = 1,
.type = TYPE_FIGHTING,
.accuracy = 100,
@ -7994,7 +7994,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 0,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED,
.flags = FLAG_PROTECT_AFFECTED | FLAG_KINGSROCK_AFFECTED,
.split = SPLIT_SPECIAL,
},
@ -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_ERUPTION,
.power = 150,
.type = TYPE_DRAGON,
.accuracy = 100,
.pp = 5,
.secondaryEffectChance = 0,
.target = MOVE_TARGET_BOTH,
.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_PROTECT_AFFECTED | 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_BOTH,
.priority = 0,
.flags = FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_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_BOTH,
.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_BOTH,
.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,
},
};

View File

@ -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[] = _(
"Attacks with psychic power.\n"
"Foe's last move has 3 PP cut.");
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,
};

View File

@ -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"),
};