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:
Maruno17
2024-03-11 23:31:48 +00:00
parent 47be44a54c
commit 1ff5b12acd
10 changed files with 46 additions and 7 deletions

View File

@@ -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]

View File

@@ -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