A few fixes, added effects for Meteor Beam/Electro Shot
This commit is contained in:
parent
4556ecc71e
commit
59d76c9321
4 changed files with 14 additions and 8 deletions
|
@ -938,7 +938,7 @@ BattleScript_FirstChargingTurnMeteorBeam::
|
|||
copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID
|
||||
printfromtable gFirstTurnOfTwoStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
seteffectprimary MOVE_EFFECT_SP_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
||||
setadditionaleffects @ only onChargeTurnOnly effects will work here
|
||||
return
|
||||
|
||||
BattleScript_EffectSkyDrop:
|
||||
|
|
|
@ -517,16 +517,11 @@ struct BattleMove
|
|||
|
||||
#define EFFECTS_ARR(...) (const struct AdditionalEffect[]) {__VA_ARGS__}
|
||||
|
||||
#define PRIMARY_EFFECT(_moveEffect) {.self = FALSE, .chance = 0, .moveEffect = _moveEffect}
|
||||
#define PRIMARY_EFFECT_SELF(_moveEffect) {.self = TRUE, .chance = 0, .moveEffect = _moveEffect}
|
||||
#define SECONDARY_EFFECT(_moveEffect, _chance) {.self = FALSE, .chance = _chance, .moveEffect = _moveEffect}
|
||||
#define SECONDARY_EFFECT_SELF(_moveEffect, _chance) {.self = TRUE, .chance = _chance, .moveEffect = _moveEffect}
|
||||
|
||||
struct AdditionalEffect
|
||||
{
|
||||
u8 self:1;
|
||||
u8 onChargeTurnOnly:1;
|
||||
u8 onlyIfTargetRaisedStats:1;
|
||||
u8 onChargeTurnOnly:1;
|
||||
u8 chance; // 0% = effect certain, primary effect
|
||||
u16 moveEffect;
|
||||
};
|
||||
|
|
|
@ -3806,8 +3806,9 @@ static void Cmd_setadditionaleffects(void)
|
|||
// self-targeting move effects cannot occur multiple times per turn
|
||||
// only occur on the last setmoveeffect when there are multiple targets
|
||||
if (!(gBattleMoves[gCurrentMove].additionalEffects[gBattleStruct->additionalEffectsCounter].self
|
||||
&& GetNextTarget(gBattleMoves[gCurrentMove].target, TRUE) != MAX_BATTLERS_COUNT)
|
||||
&& !(additionalEffect->onlyIfTargetRaisedStats && !gProtectStructs[gBattlerTarget].statRaised)
|
||||
&& GetNextTarget(gBattleMoves[gCurrentMove].target, TRUE) != MAX_BATTLERS_COUNT))
|
||||
&& additionalEffect->onChargeTurnOnly == gProtectStructs[gBattlerAttacker].chargingTurn)
|
||||
{
|
||||
percentChance = CalcSecondaryEffectChance(gBattlerAttacker, GetBattlerAbility(gBattlerAttacker), additionalEffect);
|
||||
|
||||
|
@ -3872,7 +3873,11 @@ static void Cmd_clearstatusfromeffect(void)
|
|||
if (gBattleScripting.moveEffect <= PRIMARY_STATUS_MOVE_EFFECT)
|
||||
gBattleMons[battler].status1 &= (~sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]);
|
||||
else
|
||||
{
|
||||
gBattleMons[battler].status2 &= (~sStatusFlagsForMoveEffects[gBattleScripting.moveEffect]);
|
||||
if (gBattleScripting.moveEffect == MOVE_EFFECT_CHARGING)
|
||||
gProtectStructs[battler].chargingTurn = FALSE;
|
||||
}
|
||||
|
||||
gBattleScripting.moveEffect = 0;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
|
|
|
@ -3947,6 +3947,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
#if B_SPEED_BUFFING_RAPID_SPIN >= GEN_8
|
||||
,{
|
||||
.moveEffect = MOVE_EFFECT_SPD_PLUS_1,
|
||||
.self = TRUE,
|
||||
.chance = 100,
|
||||
}
|
||||
#endif
|
||||
|
@ -14017,6 +14018,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_DYNAMAX] =
|
|||
.priority = 0,
|
||||
.category = BATTLE_CATEGORY_SPECIAL,
|
||||
.sheerForceBoost = TRUE,
|
||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||
.moveEffect = MOVE_EFFECT_SP_ATK_PLUS_1,
|
||||
.self = TRUE,
|
||||
.onChargeTurnOnly = TRUE,
|
||||
}),
|
||||
},
|
||||
|
||||
[MOVE_TERA_STARSTORM] =
|
||||
|
|
Loading…
Reference in a new issue