Skip to content

Commit

Permalink
Merge pull request #188 from BuffelSaft/exp-print
Browse files Browse the repository at this point in the history
1.3.1 Bug fixes
  • Loading branch information
BuffelSaft authored Sep 2, 2021
2 parents 9879285 + 8058a3f commit b331263
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 97 deletions.
2 changes: 2 additions & 0 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ struct BattleStruct
u8 focusPunchBattlerId;
u8 battlerPreventingSwitchout;
u8 moneyMultiplier;
u8 moneyModifierItem:1;
u8 moneyModifierMove:1;
u8 savedTurnActionNumber;
u8 switchInAbilitiesCounter;
u8 faintedActionsState;
Expand Down
1 change: 0 additions & 1 deletion include/constants/spreads.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@
#define SPREAD_HP_FIRE_MODEST_BULKY 48 // Roxanne's Probopass
#define SPREAD_LYCANROC_MIDDAY 49 // Roxanne's Lycanroc
#define SPREAD_STAKATAKA 50 // Roxanne's Stakataka
#define SPREAD_31_IV_HP_SPATK_MIXED 51 // Max HP, Sp Atk, Quiet. Maxie 1's Camerupt

#endif // GUARD_CONSTANTS_TRAINER_SPREADS
3 changes: 2 additions & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -2882,9 +2882,10 @@ void SetMoveEffect(bool32 primary, u32 certain)
gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleScripting.moveEffect];
break;
case MOVE_EFFECT_HAPPY_HOUR:
if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER)
if (GET_BATTLER_SIDE(gBattlerAttacker) == B_SIDE_PLAYER && !gBattleStruct->moneyModifierMove)
{
gBattleStruct->moneyMultiplier *= 2;
gBattleStruct->moneyModifierMove = 1;
}
gBattlescriptCurrInstr++;
break;
Expand Down
3 changes: 2 additions & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -5663,8 +5663,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
switch (battlerHoldEffect)
{
case HOLD_EFFECT_DOUBLE_PRIZE:
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER && !gBattleStruct->moneyModifierItem)
gBattleStruct->moneyMultiplier *= 2;
gBattleStruct->moneyModifierItem = 1;
break;
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
Expand Down
2 changes: 1 addition & 1 deletion src/data/battle_moves.h
Original file line number Diff line number Diff line change
Expand Up @@ -10429,7 +10429,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
.secondaryEffectChance = 20,
.target = MOVE_TARGET_SELECTED,
.priority = 0,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED,
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST,
.split = SPLIT_PHYSICAL,
},

Expand Down
8 changes: 4 additions & 4 deletions src/data/pokemon/evolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] =
[SPECIES_EEVEE] = {{EVO_ITEM, ITEM_THUNDER_STONE, SPECIES_JOLTEON},
{EVO_ITEM, ITEM_WATER_STONE, SPECIES_VAPOREON},
{EVO_ITEM, ITEM_FIRE_STONE, SPECIES_FLAREON},
{EVO_MOVE_TYPE, TYPE_FAIRY, SPECIES_SYLVEON},
{EVO_FRIENDSHIP_DAY, 0, SPECIES_ESPEON},
{EVO_FRIENDSHIP_NIGHT, 0, SPECIES_UMBREON},
{EVO_ITEM, ITEM_SUN_STONE, SPECIES_ESPEON},
{EVO_ITEM, ITEM_MOON_STONE, SPECIES_UMBREON},
{EVO_ITEM, ITEM_LEAF_STONE, SPECIES_LEAFEON},
{EVO_ITEM, ITEM_ICE_STONE, SPECIES_GLACEON}},
{EVO_ITEM, ITEM_ICE_STONE, SPECIES_GLACEON},
{EVO_MOVE_TYPE, TYPE_FAIRY, SPECIES_SYLVEON}},
[SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2},
{EVO_ITEM_HOLD, ITEM_UPGRADE, SPECIES_PORYGON2}},
[SPECIES_OMANYTE] = {{EVO_LEVEL, 40, SPECIES_OMASTAR}},
Expand Down
67 changes: 34 additions & 33 deletions src/data/pokemon/level_up_learnsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -2454,48 +2454,46 @@ static const struct LevelUpMove sStaryuLevelUpLearnset[] = {
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
LEVEL_UP_MOVE( 1, MOVE_HARDEN),
LEVEL_UP_MOVE( 4, MOVE_WATER_GUN),
LEVEL_UP_MOVE( 8, MOVE_CONFUSE_RAY),
LEVEL_UP_MOVE( 7, MOVE_RAPID_SPIN),
LEVEL_UP_MOVE(10, MOVE_RECOVER),
LEVEL_UP_MOVE(12, MOVE_RAPID_SPIN),
LEVEL_UP_MOVE(13, MOVE_PSYWAVE),
LEVEL_UP_MOVE(16, MOVE_MINIMIZE),
LEVEL_UP_MOVE(16, MOVE_SWIFT),
LEVEL_UP_MOVE(18, MOVE_BUBBLE_BEAM),
LEVEL_UP_MOVE(20, MOVE_SWIFT),
LEVEL_UP_MOVE(22, MOVE_CAMOUFLAGE),
LEVEL_UP_MOVE(24, MOVE_PSYBEAM),
LEVEL_UP_MOVE(24, MOVE_GYRO_BALL),
LEVEL_UP_MOVE(28, MOVE_BRINE),
LEVEL_UP_MOVE(32, MOVE_LIGHT_SCREEN),
LEVEL_UP_MOVE(36, MOVE_POWER_GEM),
LEVEL_UP_MOVE(40, MOVE_PSYCHIC),
LEVEL_UP_MOVE(44, MOVE_SURF),
LEVEL_UP_MOVE(48, MOVE_REFLECT_TYPE),
LEVEL_UP_MOVE(52, MOVE_COSMIC_POWER),
LEVEL_UP_MOVE(56, MOVE_HYDRO_PUMP),
LEVEL_UP_MOVE(31, MOVE_MINIMIZE),
LEVEL_UP_MOVE(35, MOVE_REFLECT_TYPE),
LEVEL_UP_MOVE(37, MOVE_POWER_GEM),
LEVEL_UP_MOVE(40, MOVE_CONFUSE_RAY),
LEVEL_UP_MOVE(42, MOVE_PSYCHIC),
LEVEL_UP_MOVE(46, MOVE_LIGHT_SCREEN),
LEVEL_UP_MOVE(49, MOVE_COSMIC_POWER),
LEVEL_UP_MOVE(53, MOVE_HYDRO_PUMP),
LEVEL_UP_END
};

static const struct LevelUpMove sStarmieLevelUpLearnset[] = {
LEVEL_UP_MOVE( 0, MOVE_SPOTLIGHT),
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
LEVEL_UP_MOVE( 1, MOVE_HARDEN),
LEVEL_UP_MOVE( 1, MOVE_WATER_GUN),
LEVEL_UP_MOVE( 1, MOVE_CONFUSE_RAY),
LEVEL_UP_MOVE( 1, MOVE_RECOVER),
LEVEL_UP_MOVE( 1, MOVE_RAPID_SPIN),
LEVEL_UP_MOVE( 1, MOVE_PSYWAVE),
LEVEL_UP_MOVE( 1, MOVE_MINIMIZE),
LEVEL_UP_MOVE( 1, MOVE_BUBBLE_BEAM),
LEVEL_UP_MOVE( 1, MOVE_SWIFT),
LEVEL_UP_MOVE( 1, MOVE_BUBBLE_BEAM),
LEVEL_UP_MOVE( 1, MOVE_CAMOUFLAGE),
LEVEL_UP_MOVE( 1, MOVE_PSYBEAM),
LEVEL_UP_MOVE(32, MOVE_BRINE),
LEVEL_UP_MOVE(36, MOVE_LIGHT_SCREEN),
LEVEL_UP_MOVE( 1, MOVE_GYRO_BALL),
LEVEL_UP_MOVE( 1, MOVE_BRINE),
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
LEVEL_UP_MOVE( 1, MOVE_HARDEN),
LEVEL_UP_MOVE( 1, MOVE_WATER_GUN),
LEVEL_UP_MOVE( 1, MOVE_RAPID_SPIN),
LEVEL_UP_MOVE(35, MOVE_MINIMIZE),
LEVEL_UP_MOVE(37, MOVE_REFLECT_TYPE),
LEVEL_UP_MOVE(40, MOVE_POWER_GEM),
LEVEL_UP_MOVE(44, MOVE_PSYCHIC),
LEVEL_UP_MOVE(48, MOVE_SURF),
LEVEL_UP_MOVE(52, MOVE_REFLECT_TYPE),
LEVEL_UP_MOVE(56, MOVE_COSMIC_POWER),
LEVEL_UP_MOVE(60, MOVE_HYDRO_PUMP),
LEVEL_UP_MOVE(42, MOVE_CONFUSE_RAY),
LEVEL_UP_MOVE(46, MOVE_PSYCHIC),
LEVEL_UP_MOVE(49, MOVE_LIGHT_SCREEN),
LEVEL_UP_MOVE(53, MOVE_COSMIC_POWER),
LEVEL_UP_MOVE(57, MOVE_HYDRO_PUMP),
LEVEL_UP_END
};

Expand Down Expand Up @@ -3259,13 +3257,14 @@ static const struct LevelUpMove sTotodileLevelUpLearnset[] = {
LEVEL_UP_MOVE(10, MOVE_BITE),
LEVEL_UP_MOVE(12, MOVE_SCARY_FACE),
LEVEL_UP_MOVE(15, MOVE_ICE_FANG),
LEVEL_UP_MOVE(17, MOVE_SLASH),
LEVEL_UP_MOVE(18, MOVE_FLAIL),
LEVEL_UP_MOVE(21, MOVE_CRUNCH),
LEVEL_UP_MOVE(24, MOVE_CHIP_AWAY),
LEVEL_UP_MOVE(28, MOVE_SLASH),
LEVEL_UP_MOVE(28, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(30, MOVE_SCREECH),
LEVEL_UP_MOVE(34, MOVE_THRASH),
LEVEL_UP_MOVE(36, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(36, MOVE_WATERFALL),
LEVEL_UP_MOVE(40, MOVE_SUPERPOWER),
LEVEL_UP_MOVE(44, MOVE_HYDRO_PUMP),
LEVEL_UP_END
Expand All @@ -3279,13 +3278,14 @@ static const struct LevelUpMove sCroconawLevelUpLearnset[] = {
LEVEL_UP_MOVE(10, MOVE_BITE),
LEVEL_UP_MOVE(12, MOVE_SCARY_FACE),
LEVEL_UP_MOVE(15, MOVE_ICE_FANG),
LEVEL_UP_MOVE(18, MOVE_SLASH),
LEVEL_UP_MOVE(20, MOVE_FLAIL),
LEVEL_UP_MOVE(24, MOVE_CRUNCH),
LEVEL_UP_MOVE(28, MOVE_CHIP_AWAY),
LEVEL_UP_MOVE(32, MOVE_SLASH),
LEVEL_UP_MOVE(32, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(35, MOVE_SCREECH),
LEVEL_UP_MOVE(38, MOVE_THRASH),
LEVEL_UP_MOVE(45, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(45, MOVE_WATERFALL),
LEVEL_UP_MOVE(49, MOVE_SUPERPOWER),
LEVEL_UP_MOVE(53, MOVE_HYDRO_PUMP),
LEVEL_UP_END
Expand All @@ -3300,13 +3300,14 @@ static const struct LevelUpMove sFeraligatrLevelUpLearnset[] = {
LEVEL_UP_MOVE(10, MOVE_BITE),
LEVEL_UP_MOVE(12, MOVE_SCARY_FACE),
LEVEL_UP_MOVE(15, MOVE_ICE_FANG),
LEVEL_UP_MOVE(18, MOVE_SLASH),
LEVEL_UP_MOVE(20, MOVE_FLAIL),
LEVEL_UP_MOVE(24, MOVE_CRUNCH),
LEVEL_UP_MOVE(28, MOVE_CHIP_AWAY),
LEVEL_UP_MOVE(35, MOVE_SLASH),
LEVEL_UP_MOVE(32, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(38, MOVE_SCREECH),
LEVEL_UP_MOVE(43, MOVE_THRASH),
LEVEL_UP_MOVE(49, MOVE_AQUA_TAIL),
LEVEL_UP_MOVE(49, MOVE_WATERFALL),
LEVEL_UP_MOVE(54, MOVE_SUPERPOWER),
LEVEL_UP_MOVE(61, MOVE_HYDRO_PUMP),
LEVEL_UP_END
Expand Down
Loading

0 comments on commit b331263

Please sign in to comment.