mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added "beneath map" height for overworld animations, fixed new games inheriting Jukebox BGM from save file, added PokeBall property for trainer types, fixed Cramorant form changing effects
This commit is contained in:
@@ -134,7 +134,7 @@ module Settings
|
||||
# The odds of a newly generated Pokémon being shiny (out of 65536).
|
||||
SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8
|
||||
# Whether super shininess is enabled (uses a different shiny animation).
|
||||
SUPER_SHINY = (MECHANICS_GENERATION >= 8)
|
||||
SUPER_SHINY = (MECHANICS_GENERATION == 8)
|
||||
# Whether Pokémon with the "Legendary", "Mythical" or "Ultra Beast" flags will
|
||||
# have at least 3 perfect IVs.
|
||||
LEGENDARIES_HAVE_SOME_PERFECT_IVS = (MECHANICS_GENERATION >= 6)
|
||||
|
||||
@@ -22,6 +22,7 @@ SaveData.register(:game_system) do
|
||||
save_value { $game_system }
|
||||
load_value { |value| $game_system = value }
|
||||
new_game_value { Game_System.new }
|
||||
reset_on_new_game
|
||||
end
|
||||
|
||||
SaveData.register(:pokemon_system) do
|
||||
|
||||
@@ -197,10 +197,11 @@ class SpriteAnimation
|
||||
sprite.visible = true
|
||||
sprite.src_rect.set((pattern % 5) * 192, (pattern / 5) * 192, 192, 192)
|
||||
case @_animation_height
|
||||
when 0 then sprite.z = 1
|
||||
when 1 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3 / 2) + 1
|
||||
when 2 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3) + 1
|
||||
else sprite.z = 2000
|
||||
when -1 then sprite.z = -25
|
||||
when 0 then sprite.z = 1
|
||||
when 1 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3 / 2) + 1
|
||||
when 2 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3) + 1
|
||||
else sprite.z = 2000
|
||||
end
|
||||
sprite.ox = 96
|
||||
sprite.oy = 96
|
||||
|
||||
@@ -5,6 +5,7 @@ module GameData
|
||||
attr_reader :gender
|
||||
attr_reader :base_money
|
||||
attr_reader :skill_level
|
||||
attr_reader :poke_ball
|
||||
attr_reader :flags
|
||||
attr_reader :intro_BGM
|
||||
attr_reader :battle_BGM
|
||||
@@ -24,6 +25,7 @@ module GameData
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2}],
|
||||
"BaseMoney" => [:base_money, "u"],
|
||||
"SkillLevel" => [:skill_level, "u"],
|
||||
"PokeBall" => [:poke_ball, "e", :Item],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"IntroBGM" => [:intro_BGM, "s"],
|
||||
"BattleBGM" => [:battle_BGM, "s"],
|
||||
@@ -42,6 +44,7 @@ module GameData
|
||||
["Gender", EnumProperty.new(gender_array), _INTL("Gender of this Trainer Type.")],
|
||||
["BaseMoney", LimitProperty.new(9999), _INTL("Player earns this much money times the highest level among the trainer's Pokémon.")],
|
||||
["SkillLevel", LimitProperty2.new(9999), _INTL("Skill level of this Trainer Type.")],
|
||||
["PokeBall", ItemProperty, _INTL("Default Poké Ball that all Pokémon of trainers of this Trainer Type are in.")],
|
||||
["Flags", StringListProperty, _INTL("Words/phrases that can be used to make trainers of this type behave differently to others.")],
|
||||
["IntroBGM", BGMProperty, _INTL("BGM played before battles against trainers of this type.")],
|
||||
["BattleBGM", BGMProperty, _INTL("BGM played in battles against trainers of this type.")],
|
||||
@@ -104,6 +107,7 @@ module GameData
|
||||
@gender = hash[:gender] || 2
|
||||
@base_money = hash[:base_money] || 30
|
||||
@skill_level = hash[:skill_level] || @base_money
|
||||
@poke_ball = hash[:poke_ball]
|
||||
@flags = hash[:flags] || []
|
||||
@intro_BGM = hash[:intro_BGM]
|
||||
@battle_BGM = hash[:battle_BGM]
|
||||
|
||||
@@ -171,7 +171,11 @@ module GameData
|
||||
pkmn.makeShadow
|
||||
pkmn.shiny = false
|
||||
end
|
||||
pkmn.poke_ball = pkmn_data[:poke_ball] if pkmn_data[:poke_ball]
|
||||
if pkmn_data[:poke_ball]
|
||||
pkmn.poke_ball = pkmn_data[:poke_ball]
|
||||
elsif trainer.default_poke_ball
|
||||
pkmn.poke_ball = trainer.default_poke_ball
|
||||
end
|
||||
pkmn.calc_stats
|
||||
end
|
||||
return trainer
|
||||
|
||||
@@ -18,12 +18,13 @@ class Battle::Battler
|
||||
# target Cramorant attacking the user) and the ability splash
|
||||
# shouldn't be shown.
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
target_form = target.form
|
||||
target.pbChangeForm(0, nil)
|
||||
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||
@battle.scene.pbDamageAnimation(user)
|
||||
user.pbReduceHP(user.totalhp / 4, false)
|
||||
end
|
||||
case target.form
|
||||
case target_form
|
||||
when 1 # Gulping Form
|
||||
user.pbLowerStatStageByAbility(:DEFENSE, 1, target, false)
|
||||
when 2 # Gorging Form
|
||||
|
||||
@@ -49,6 +49,7 @@ class Trainer
|
||||
def male?; return GameData::TrainerType.get(self.trainer_type).male?; end
|
||||
def female?; return GameData::TrainerType.get(self.trainer_type).female?; end
|
||||
def skill_level; return GameData::TrainerType.get(self.trainer_type).skill_level; end
|
||||
def default_poke_ball; return GameData::TrainerType.get(self.trainer_type).poke_ball; end
|
||||
def flags; return GameData::TrainerType.get(self.trainer_type).flags; end
|
||||
def has_flag?(flag); return GameData::TrainerType.get(self.trainer_type).has_flag?(flag); end
|
||||
|
||||
|
||||
@@ -495,6 +495,7 @@ MenuHandlers.add(:options_menu, :speech_frame, {
|
||||
"type" => NumberOption,
|
||||
"parameters" => 1..Settings::SPEECH_WINDOWSKINS.length,
|
||||
"description" => _INTL("Choose the appearance of dialogue boxes."),
|
||||
"condition" => proc { next Settings::SPEECH_WINDOWSKINS.length > 1 },
|
||||
"get_proc" => proc { next $PokemonSystem.textskin },
|
||||
"set_proc" => proc { |value, scene|
|
||||
$PokemonSystem.textskin = value
|
||||
@@ -510,6 +511,7 @@ MenuHandlers.add(:options_menu, :menu_frame, {
|
||||
"type" => NumberOption,
|
||||
"parameters" => 1..Settings::MENU_WINDOWSKINS.length,
|
||||
"description" => _INTL("Choose the appearance of menu boxes."),
|
||||
"condition" => proc { next Settings::MENU_WINDOWSKINS.length > 1 },
|
||||
"get_proc" => proc { next $PokemonSystem.frame },
|
||||
"set_proc" => proc { |value, scene|
|
||||
$PokemonSystem.frame = value
|
||||
|
||||
@@ -774,6 +774,12 @@ module Compiler
|
||||
end
|
||||
|
||||
def validate_compiled_trainer_type(hash)
|
||||
# Ensure valid Poké Ball
|
||||
if hash[:poke_ball]
|
||||
if !GameData::Item.get(hash[:poke_ball]).is_poke_ball?
|
||||
raise _INTL("Value '{1}' isn't a defined Poké Ball.", hash[:poke_ball]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def validate_all_compiled_trainer_types
|
||||
|
||||
@@ -80,6 +80,7 @@ BaseMoney = 48
|
||||
Name = Fisherman
|
||||
Gender = Male
|
||||
BaseMoney = 32
|
||||
PokeBall = LUREBALL
|
||||
#-------------------------------
|
||||
[GAMBLER]
|
||||
Name = Gambler
|
||||
@@ -91,6 +92,7 @@ SkillLevel = 32
|
||||
Name = Gentleman
|
||||
Gender = Male
|
||||
BaseMoney = 72
|
||||
PokeBall = LUXURYBALL
|
||||
#-------------------------------
|
||||
[HIKER]
|
||||
Name = Hiker
|
||||
@@ -107,6 +109,7 @@ Name = Lady
|
||||
Gender = Female
|
||||
BaseMoney = 160
|
||||
SkillLevel = 72
|
||||
PokeBall = LUXURYBALL
|
||||
#-------------------------------
|
||||
[PAINTER]
|
||||
Name = Painter
|
||||
@@ -122,6 +125,7 @@ BaseMoney = 64
|
||||
Name = Pokémon Breeder
|
||||
Gender = Female
|
||||
BaseMoney = 48
|
||||
PokeBall = FRIENDBALL
|
||||
#-------------------------------
|
||||
[PROFESSOR]
|
||||
Name = Professor
|
||||
@@ -147,6 +151,7 @@ BaseMoney = 32
|
||||
Name = Scientist
|
||||
Gender = Male
|
||||
BaseMoney = 48
|
||||
PokeBall = REPEATBALL
|
||||
#-------------------------------
|
||||
[SUPERNERD]
|
||||
Name = Super Nerd
|
||||
@@ -162,6 +167,7 @@ BaseMoney = 40
|
||||
Name = Black Belt
|
||||
Gender = Male
|
||||
BaseMoney = 32
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[CRUSHGIRL]
|
||||
Name = Crush Girl
|
||||
@@ -182,11 +188,13 @@ BaseMoney = 16
|
||||
Name = Cool Trainer
|
||||
Gender = Male
|
||||
BaseMoney = 60
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[COOLTRAINER_F]
|
||||
Name = Cool Trainer
|
||||
Gender = Female
|
||||
BaseMoney = 60
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[YOUNGSTER]
|
||||
Name = Youngster
|
||||
@@ -223,24 +231,28 @@ Name = Swimmer
|
||||
Gender = Male
|
||||
BaseMoney = 16
|
||||
SkillLevel = 32
|
||||
PokeBall = DIVEBALL
|
||||
#-------------------------------
|
||||
[SWIMMER_F]
|
||||
Name = Swimmer
|
||||
Gender = Female
|
||||
BaseMoney = 16
|
||||
SkillLevel = 32
|
||||
PokeBall = DIVEBALL
|
||||
#-------------------------------
|
||||
[SWIMMER2_M]
|
||||
Name = Swimmer
|
||||
Gender = Male
|
||||
BaseMoney = 16
|
||||
SkillLevel = 32
|
||||
PokeBall = DIVEBALL
|
||||
#-------------------------------
|
||||
[SWIMMER2_F]
|
||||
Name = Swimmer
|
||||
Gender = Female
|
||||
BaseMoney = 16
|
||||
SkillLevel = 32
|
||||
PokeBall = DIVEBALL
|
||||
#-------------------------------
|
||||
[TUBER_M]
|
||||
Name = Tuber
|
||||
@@ -271,6 +283,7 @@ Name = Cool Couple
|
||||
Gender = Unknown
|
||||
BaseMoney = 72
|
||||
SkillLevel = 48
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[CRUSHKIN]
|
||||
Name = Crush Kin
|
||||
@@ -282,6 +295,7 @@ Name = Sis and Bro
|
||||
Gender = Unknown
|
||||
BaseMoney = 16
|
||||
SkillLevel = 48
|
||||
PokeBall = DIVEBALL
|
||||
#-------------------------------
|
||||
[TWINS]
|
||||
Name = Twins
|
||||
@@ -371,6 +385,7 @@ Gender = Female
|
||||
BaseMoney = 100
|
||||
BattleBGM = Battle Elite
|
||||
VictoryBGM = Battle victory leader
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[ELITEFOUR_Bruno]
|
||||
Name = Elite Four
|
||||
@@ -378,6 +393,7 @@ Gender = Male
|
||||
BaseMoney = 100
|
||||
BattleBGM = Battle Elite
|
||||
VictoryBGM = Battle victory leader
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[ELITEFOUR_Agatha]
|
||||
Name = Elite Four
|
||||
@@ -385,6 +401,7 @@ Gender = Female
|
||||
BaseMoney = 100
|
||||
BattleBGM = Battle Elite
|
||||
VictoryBGM = Battle victory leader
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[ELITEFOUR_Lance]
|
||||
Name = Elite Four
|
||||
@@ -392,6 +409,7 @@ Gender = Male
|
||||
BaseMoney = 100
|
||||
BattleBGM = Battle Elite
|
||||
VictoryBGM = Battle victory leader
|
||||
PokeBall = ULTRABALL
|
||||
#-------------------------------
|
||||
[CHAMPION]
|
||||
Name = Champion
|
||||
@@ -399,3 +417,4 @@ Gender = Male
|
||||
BaseMoney = 100
|
||||
BattleBGM = Battle Champion
|
||||
VictoryBGM = Battle victory leader
|
||||
PokeBall = ULTRABALL
|
||||
|
||||
Reference in New Issue
Block a user