Merge pull request #2199 from AsparagusEduardo/BE_charge

Config for Charge raising Sp. Def., adjusted Growth's config
This commit is contained in:
ghoulslash 2022-07-20 18:09:59 -04:00 committed by GitHub
commit 6b28ff6ccf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 11 deletions

View File

@ -2154,9 +2154,7 @@ BattleScript_GrowthDoMoveAnim::
waitanimation
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPATK, 0
.if B_GROWTH_UNDER_SUN >= GEN_5
jumpifweatheraffected BS_ATTACKER, B_WEATHER_SUN, BattleScript_GrowthAtk2
.endif
setstatchanger STAT_ATK, 1, FALSE
goto BattleScript_GrowthAtk
BattleScript_GrowthAtk2:
@ -2167,9 +2165,7 @@ BattleScript_GrowthAtk:
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_GrowthTrySpAtk::
.if B_GROWTH_UNDER_SUN >= GEN_5
jumpifweatheraffected BS_ATTACKER, B_WEATHER_SUN, BattleScript_GrowthSpAtk2
.endif
setstatchanger STAT_SPATK, 1, FALSE
goto BattleScript_GrowthSpAtk
BattleScript_GrowthSpAtk2:
@ -5544,6 +5540,7 @@ BattleScript_EffectCharge::
setcharge
attackanimation
waitanimation
.if B_CHARGE_SPDEF_RAISE >= GEN_5
setstatchanger STAT_SPDEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_EffectChargeString
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_EffectChargeString
@ -5552,6 +5549,7 @@ BattleScript_EffectCharge::
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_EffectChargeString:
.endif
printstring STRINGID_PKMNCHARGINGPOWER
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd

View File

@ -183,14 +183,10 @@
// Move data settings
#define B_UPDATED_MOVE_DATA GEN_8 // Updates move data in gBattleMoves, including Power, Accuracy, PP, stat changes, targets, chances of secondary effects, etc.
#define B_PHYSICAL_SPECIAL_SPLIT GEN_7 // In Gen3, the move's type determines if it will do physical or special damage. The split icon in the summary will reflect this.
#define B_FELL_STINGER_STAT_RAISE GEN_7 // In Gen7+, it raises Atk by 3 stages instead of 2 if it causes the target to faint.
#define B_KINGS_SHIELD_LOWER_ATK GEN_7 // In Gen7+, it lowers Atk by 1 stage instead of 2 of oponents that hit it.
#define B_SPEED_BUFFING_RAPID_SPIN GEN_8 // In Gen8, Rapid Spin raises the user's Speed by 1 stage.
#define B_RECOIL_IF_MISS_DMG GEN_7 // In Gen5+, Jump Kick and High Jump Kick will always do half of the user's max HP when missing.
#define B_KLUTZ_FLING_INTERACTION GEN_7 // In Gen5+, Pokémon with the Klutz ability can't use Fling.
#define B_UPDATED_CONVERSION GEN_7 // In Gen6+, Conversion changes the user's type to match their first move's. Before, it would choose a move at random.
#define B_PP_REDUCED_BY_SPITE GEN_7 // In Gen4+, Spite reduces the foe's last move's PP by 4, instead of 2 to 5.
#define B_MINIMIZE_EVASION GEN_7 // In Gen5+, Minimize raises evasion by 2 stages instead of 1.
// Move accuracy settings
#define B_TOXIC_NEVER_MISS GEN_7 // In Gen6+, if Toxic is used by a Poison-type Pokémon, it will never miss.
@ -198,6 +194,14 @@
#define B_BLIZZARD_HAIL GEN_7 // In Gen4+, Blizzard bypasses accuracy checks if it's hailing.
#define B_SHEER_COLD_ACC GEN_7 // In Gen7+, Sheer Cold's base chance of hitting is reduced to 20% if the user isn't Ice-typed.
// Move stat change settings
#define B_FELL_STINGER_STAT_RAISE GEN_7 // In Gen7+, it raises Atk by 3 stages instead of 2 if it causes the target to faint.
#define B_KINGS_SHIELD_LOWER_ATK GEN_7 // In Gen7+, it lowers Atk by 1 stage instead of 2 of oponents that hit it.
#define B_SPEED_BUFFING_RAPID_SPIN GEN_8 // In Gen8, Rapid Spin raises the user's Speed by 1 stage.
#define B_CHARGE_SPDEF_RAISE GEN_7 // In Gen5+, Charge raises the user's Special Defense by 1 stage.
#define B_MINIMIZE_EVASION GEN_7 // In Gen5+, Minimize raises evasion by 2 stages instead of 1.
#define B_GROWTH_STAT_RAISE GEN_7 // In Gen5+, Growth raises Attack in addition to Special Attack by 1 stage each. Under the effects of the sun, it raises them by 2 stages each instead.
// Other move settings
#define B_SOUND_SUBSTITUTE GEN_7 // In Gen6+, sound moves bypass Substitute.
#define B_INCINERATE_GEMS GEN_7 // In Gen6+, Incinerate can destroy Gems.
@ -212,7 +216,6 @@
#define B_HEAL_BLOCKING GEN_7 // In Gen5+, Heal Block prevents healing by Black Sludge, Leftovers, Shell Bell. Affected Pokémon will not consume held HP-restoring Berries or Berry Juice.
// Draining abilities will not heal but will prevent damage. In Gen6+, Heal Block prevents the use of most HP-draining moves.
#define B_ROOTED_GROUNDING GEN_7 // In Gen4+, Ingrain causes the affected Pokémon to become grounded.
#define B_GROWTH_UNDER_SUN GEN_7 // In Gen5+, Growth's effects are doubled when under the effects of the sun.
// Ability settings
#define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters.

View File

@ -985,8 +985,10 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
score -= 20;
else if (!HasMoveWithType(battlerAtk, TYPE_ELECTRIC))
score -= 10;
#if B_CHARGE_SPDEF_RAISE >= GEN_5
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF))
score -= 5;
#endif
break;
case EFFECT_QUIVER_DANCE:
case EFFECT_GEOMANCY:
@ -4051,8 +4053,9 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
case EFFECT_CHARGE:
if (HasDamagingMoveOfType(battlerAtk, TYPE_ELECTRIC))
score += 2;
#if B_CHARGE_SPDEF_RAISE >= GEN_5
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score);
#endif
break;
case EFFECT_TAUNT:
if (IS_MOVE_STATUS(predictedMove))

View File

@ -2063,7 +2063,9 @@ bool32 IsStatRaisingEffect(u16 effect)
case EFFECT_EVASION_UP_2:
case EFFECT_MINIMIZE:
case EFFECT_DEFENSE_CURL:
#if B_CHARGE_SPDEF_RAISE >= GEN_5
case EFFECT_CHARGE:
#endif
case EFFECT_CALM_MIND:
case EFFECT_COSMIC_POWER:
case EFFECT_DRAGON_DANCE:

View File

@ -1321,7 +1321,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
#else
.pp = 40,
#endif
.effect = EFFECT_GROWTH,
#if B_GROWTH_STAT_RAISE >= GEN_5
.effect = EFFECT_GROWTH,
#else
.effect = EFFECT_SPECIAL_ATTACK_UP,
#endif
.power = 0,
.type = TYPE_NORMAL,
.accuracy = 0,