Added Setting that makes trainer-owned Pokémon give more Exp, other tweaks

This commit is contained in:
Maruno17
2022-07-03 17:39:44 +01:00
parent a2327c6280
commit 2976ee93ce
7 changed files with 24 additions and 2 deletions

View File

@@ -76,6 +76,9 @@ module Settings
# that much Exp (false). This also applies to Exp gained via the Exp Share
# (held item version) being distributed to all Exp Share holders.
SPLIT_EXP_BETWEEN_GAINERS = (MECHANICS_GENERATION <= 5)
# Whether the Exp gained from beating a Pokémon is multiplied by 1.5 if that
# Pokémon is owned by another trainer.
MORE_EXP_FROM_TRAINER_POKEMON = (MECHANICS_GENERATION <= 6)
# Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in
# the relevant stat.
MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7)

View File

@@ -32,6 +32,8 @@ module GameData
@after_evolution_proc = hash[:after_evolution_proc]
end
alias name real_name
def call_level_up(*args)
return (@level_up_proc) ? @level_up_proc.call(*args) : nil
end

View File

@@ -60,6 +60,8 @@ module GameData
@ignore_passability = hash[:ignore_passability] || false
end
alias name real_name
def can_surf_freely
return @can_surf && !@waterfall && !@waterfall_crest
end

View File

@@ -44,6 +44,8 @@ module GameData
@tone_proc = hash[:tone_proc]
end
alias name real_name
def has_particles?
return @graphics[0] && @graphics[0].length > 0
end

View File

@@ -19,6 +19,8 @@ module GameData
@type = hash[:type] || :none
@trigger_chance = hash[:trigger_chance] || 0
end
alias name real_name
end
end

View File

@@ -121,7 +121,7 @@ class Battle
end
return if exp <= 0
# Pokémon gain more Exp from trainer battles
exp = (exp * 1.5).floor if trainerBattle?
exp = (exp * 1.5).floor if Settings::MORE_EXP_FROM_TRAINER_POKEMON && trainerBattle?
# Scale the gained Exp based on the gainer's level (or not)
if Settings::SCALED_EXP_FORMULA
exp /= 5

View File

@@ -522,7 +522,18 @@ MenuHandlers.add(:debug_menu, :add_pokemon, {
params.setInitialValue(5)
params.setCancelValue(0)
level = pbMessageChooseNumber(_INTL("Set the Pokémon's level."), params)
pbAddPokemon(species, level) if level > 0
if level > 0
goes_to_party = !$player.party_full?
if pbAddPokemonSilent(species, level)
if goes_to_party
pbMessage(_INTL("Added {1} to party.", GameData::Species.get(species).name))
else
pbMessage(_INTL("Added {1} to Pokémon storage.", GameData::Species.get(species).name))
end
else
pbMessage(_INTL("Couldn't add Pokémon because party and storage are full."))
end
end
end
}
})