implemented G-Max Chi Strike, finished G-Max Gold Rush
This commit is contained in:
parent
da24b717e4
commit
3cdcf2a356
5 changed files with 45 additions and 3 deletions
|
@ -10496,6 +10496,7 @@ BattleScript_Status2FoesIncrement:
|
|||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_Status2FoesLoop
|
||||
BattleScript_Status2FoesEnd:
|
||||
restoretarget
|
||||
jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 1, BattleScript_PrintCoinsScattered
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_DoConfuseAnim:
|
||||
|
@ -10506,11 +10507,34 @@ BattleScript_DoInfatuationAnim:
|
|||
status2animation BS_TARGET, STATUS2_INFATUATION
|
||||
goto BattleScript_Status2FoesPrintMessage
|
||||
|
||||
BattleScript_PrintCoinsScattered:
|
||||
printstring STRINGID_COINSSCATTERED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_TormentEnds::
|
||||
printstring STRINGID_TORMENTEDNOMORE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_EffectRaiseCritAlliesAnim::
|
||||
savetarget
|
||||
setbyte gBattlerTarget, 0
|
||||
BattleScript_RaiseCritAlliesLoop:
|
||||
jumpiftargetnotally BattleScript_RaiseCritAlliesIncrement
|
||||
jumpiftargetabsent BattleScript_RaiseCritAlliesIncrement
|
||||
setstatchanger STAT_ATK, 0, FALSE @ for animation
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printstring STRINGID_PKMNGETTINGPUMPED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_RaiseCritAlliesIncrement:
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
addbyte gBattlerTarget, 1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_RaiseCritAlliesLoop
|
||||
BattleScript_RaiseCritAlliesEnd:
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_PokemonCantUseTheMove::
|
||||
attackstring
|
||||
ppreduce
|
||||
|
|
|
@ -677,6 +677,7 @@ struct BattleStruct
|
|||
u8 battleBondTransformed[NUM_BATTLE_SIDES]; // Bitfield for each party.
|
||||
u8 storedHealingWish:4; // Each battler as a bit.
|
||||
u8 storedLunarDance:4; // Each battler as a bit.
|
||||
u8 sideCritStages[NUM_BATTLE_SIDES]; // G-Max Chi Strike boosts crit stages of allies.
|
||||
};
|
||||
|
||||
#define F_DYNAMIC_TYPE_1 (1 << 6)
|
||||
|
|
|
@ -481,5 +481,6 @@ extern const u8 BattleScript_EffectTryReducePP[];
|
|||
extern const u8 BattleScript_EffectStatus1Foes[];
|
||||
extern const u8 BattleScript_EffectStatus2Foes[];
|
||||
extern const u8 BattleScript_TormentEnds[];
|
||||
extern const u8 BattleScript_EffectRaiseCritAlliesAnim[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
|
@ -29,7 +29,7 @@ static const u16 sMaxMoveTable[] =
|
|||
[TYPE_STEEL] = MOVE_MAX_STEELSPIKE,
|
||||
[TYPE_FIRE] = MOVE_MAX_FLARE,
|
||||
[TYPE_WATER] = MOVE_MAX_GEYSER,
|
||||
[TYPE_GRASS] = MOVE_MAX_OVERGROWTH,
|
||||
[TYPE_GRASS] = MOVE_G_MAX_CHI_STRIKE,
|
||||
[TYPE_ELECTRIC] = MOVE_G_MAX_DEPLETION,
|
||||
[TYPE_PSYCHIC] = MOVE_MAX_MINDSTORM,
|
||||
[TYPE_ICE] = MOVE_MAX_HAILSTORM,
|
||||
|
@ -92,7 +92,7 @@ bool8 ShouldUseMaxMove(u16 battlerId, u16 baseMove)
|
|||
// return !IsRaidBossUsingRegularMove(battlerId, baseMove);
|
||||
if (gBattleStruct->dynamax.dynamaxTurns[battlerId] > 0)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return battlerId == B_POSITION_PLAYER_LEFT;
|
||||
}
|
||||
|
||||
// Returns the appropriate Max Move or G-Max Move for a battler to use.
|
||||
|
@ -494,6 +494,15 @@ u16 SetMaxMoveEffect(u16 move)
|
|||
effect++;
|
||||
break;
|
||||
case MAX_EFFECT_CONFUSE_FOES_PAY_DAY:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
{
|
||||
u16 payday = gPaydayMoney;
|
||||
gPaydayMoney += (gBattleMons[gBattlerAttacker].level * 100);
|
||||
if (payday > gPaydayMoney)
|
||||
gPaydayMoney = 0xFFFF;
|
||||
gBattleCommunication[CURSOR_POSITION] = 1; // add "Coins scattered." message
|
||||
}
|
||||
// fall through
|
||||
case MAX_EFFECT_CONFUSE_FOES:
|
||||
case MAX_EFFECT_INFATUATE_FOES:
|
||||
case MAX_EFFECT_TORMENT_FOES:
|
||||
|
@ -502,6 +511,12 @@ u16 SetMaxMoveEffect(u16 move)
|
|||
gBattlescriptCurrInstr = BattleScript_EffectStatus2Foes;
|
||||
effect++;
|
||||
break;
|
||||
case MAX_EFFECT_CRIT_PLUS:
|
||||
gBattleStruct->sideCritStages[GetBattlerSide(gBattlerAttacker)]++;
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_EffectRaiseCritAlliesAnim;
|
||||
effect++;
|
||||
break;
|
||||
}
|
||||
return effect;
|
||||
}
|
||||
|
|
|
@ -2054,7 +2054,8 @@ s32 CalcCritChanceStage(u8 battlerAtk, u8 battlerDef, u32 move, bool32 recordAbi
|
|||
#if B_AFFECTION_MECHANICS == TRUE
|
||||
+ 2 * (GetBattlerFriendshipScore(gBattlerAttacker) >= FRIENDSHIP_200_TO_254)
|
||||
#endif
|
||||
+ (abilityAtk == ABILITY_SUPER_LUCK);
|
||||
+ (abilityAtk == ABILITY_SUPER_LUCK)
|
||||
+ gBattleStruct->sideCritStages[GetBattlerSide(gBattlerAttacker)];
|
||||
|
||||
if (critChance >= ARRAY_COUNT(sCriticalHitChance))
|
||||
critChance = ARRAY_COUNT(sCriticalHitChance) - 1;
|
||||
|
|
Loading…
Reference in a new issue