More tweaks from the Rubocop overlord

This commit is contained in:
Maruno17
2021-12-19 17:28:59 +00:00
parent 33781493f4
commit 65b1a8d6c3
161 changed files with 2839 additions and 2967 deletions

View File

@@ -473,10 +473,10 @@ module TrainerBattleProperty
def self.set(settingname, oldsetting)
return nil if !oldsetting
properties = [
[_INTL("Trainer Type"), TrainerTypeProperty, _INTL("Name of the trainer type for this Trainer.")],
[_INTL("Trainer Name"), StringProperty, _INTL("Name of the Trainer.")],
[_INTL("Version"), LimitProperty.new(9999), _INTL("Number used to distinguish Trainers with the same name and trainer type.")],
[_INTL("Lose Text"), StringProperty, _INTL("Message shown in battle when the Trainer is defeated.")]
[_INTL("Trainer Type"), TrainerTypeProperty, _INTL("Name of the trainer type for this Trainer.")],
[_INTL("Trainer Name"), StringProperty, _INTL("Name of the Trainer.")],
[_INTL("Version"), LimitProperty.new(9999), _INTL("Number used to distinguish Trainers with the same name and trainer type.")],
[_INTL("Lose Text"), StringProperty, _INTL("Message shown in battle when the Trainer is defeated.")]
]
Settings::MAX_PARTY_SIZE.times do |i|
properties.push([_INTL("Pokémon {1}", i + 1), TrainerPokemonProperty, _INTL("A Pokémon owned by the Trainer.")])
@@ -566,11 +566,10 @@ def pbTrainerBattleEditor
end
else # New trainer
tr_type = nil
ret = pbMessage(_INTL("First, define the new trainer's type."), [
_INTL("Use existing type"),
_INTL("Create new type"),
_INTL("Cancel")
], 3)
ret = pbMessage(_INTL("First, define the new trainer's type."),
[_INTL("Use existing type"),
_INTL("Create new type"),
_INTL("Cancel")], 3)
case ret
when 0
tr_type = pbListScreen(_INTL("TRAINER TYPE"), TrainerTypeLister.new(0, false))
@@ -596,10 +595,12 @@ def pbTrainerBattleEditor
:pokemon => []
}
t[3].each do |pkmn|
trainer_hash[:pokemon].push({
:species => pkmn[0],
:level => pkmn[1]
})
trainer_hash[:pokemon].push(
{
:species => pkmn[0],
:level => pkmn[1]
}
)
end
# Add trainer's data to records
trainer_hash[:id] = [trainer_hash[:trainer_type], trainer_hash[:name], trainer_hash[:version]]
@@ -640,41 +641,39 @@ module TrainerPokemonProperty
Pokemon::MAX_MOVES.times do |i|
oldsetting.push((initsetting[:moves]) ? initsetting[:moves][i] : nil)
end
oldsetting.concat([
initsetting[:ability],
initsetting[:ability_index],
initsetting[:item],
initsetting[:nature],
initsetting[:iv],
initsetting[:ev],
initsetting[:happiness],
initsetting[:poke_ball]
])
oldsetting.concat([initsetting[:ability],
initsetting[:ability_index],
initsetting[:item],
initsetting[:nature],
initsetting[:iv],
initsetting[:ev],
initsetting[:happiness],
initsetting[:poke_ball]])
max_level = GameData::GrowthRate.max_level
pkmn_properties = [
[_INTL("Species"), SpeciesProperty, _INTL("Species of the Pokémon.")],
[_INTL("Level"), NonzeroLimitProperty.new(max_level), _INTL("Level of the Pokémon (1-{1}).", max_level)],
[_INTL("Name"), StringProperty, _INTL("Name of the Pokémon.")],
[_INTL("Form"), LimitProperty2.new(999), _INTL("Form of the Pokémon.")],
[_INTL("Gender"), GenderProperty, _INTL("Gender of the Pokémon.")],
[_INTL("Shiny"), BooleanProperty2, _INTL("If set to true, the Pokémon is a different-colored Pokémon.")],
[_INTL("SuperShiny"), BooleanProperty2, _INTL("Whether the Pokémon is super shiny (shiny with a special shininess animation).")],
[_INTL("Shadow"), BooleanProperty2, _INTL("If set to true, the Pokémon is a Shadow Pokémon.")]
[_INTL("Species"), SpeciesProperty, _INTL("Species of the Pokémon.")],
[_INTL("Level"), NonzeroLimitProperty.new(max_level), _INTL("Level of the Pokémon (1-{1}).", max_level)],
[_INTL("Name"), StringProperty, _INTL("Name of the Pokémon.")],
[_INTL("Form"), LimitProperty2.new(999), _INTL("Form of the Pokémon.")],
[_INTL("Gender"), GenderProperty, _INTL("Gender of the Pokémon.")],
[_INTL("Shiny"), BooleanProperty2, _INTL("If set to true, the Pokémon is a different-colored Pokémon.")],
[_INTL("SuperShiny"), BooleanProperty2, _INTL("Whether the Pokémon is super shiny (shiny with a special shininess animation).")],
[_INTL("Shadow"), BooleanProperty2, _INTL("If set to true, the Pokémon is a Shadow Pokémon.")]
]
Pokemon::MAX_MOVES.times do |i|
pkmn_properties.push([_INTL("Move {1}", i + 1),
MovePropertyForSpecies.new(oldsetting), _INTL("A move known by the Pokémon. Leave all moves blank (use Z key to delete) for a wild moveset.")])
end
pkmn_properties.concat([
[_INTL("Ability"), AbilityProperty, _INTL("Ability of the Pokémon. Overrides the ability index.")],
pkmn_properties.concat(
[[_INTL("Ability"), AbilityProperty, _INTL("Ability of the Pokémon. Overrides the ability index.")],
[_INTL("Ability index"), LimitProperty2.new(99), _INTL("Ability index. 0=first ability, 1=second ability, 2+=hidden ability.")],
[_INTL("Held item"), ItemProperty, _INTL("Item held by the Pokémon.")],
[_INTL("Nature"), GameDataProperty.new(:Nature), _INTL("Nature of the Pokémon.")],
[_INTL("IVs"), IVsProperty.new(Pokemon::IV_STAT_LIMIT), _INTL("Individual values for each of the Pokémon's stats.")],
[_INTL("EVs"), EVsProperty.new(Pokemon::EV_STAT_LIMIT), _INTL("Effort values for each of the Pokémon's stats.")],
[_INTL("Happiness"), LimitProperty2.new(255), _INTL("Happiness of the Pokémon (0-255).")],
[_INTL("Poké Ball"), BallProperty.new(oldsetting), _INTL("The kind of Poké Ball the Pokémon is kept in.")]
])
[_INTL("Poké Ball"), BallProperty.new(oldsetting), _INTL("The kind of Poké Ball the Pokémon is kept in.")]]
)
pbPropertyList(settingname, oldsetting, pkmn_properties, false)
return nil if !oldsetting[0] # Species is nil
ret = {
@@ -871,18 +870,18 @@ def pbItemEditor
battle_use_array = [_INTL("Can't use in battle")]
GameData::Item::SCHEMA["BattleUse"][2].each { |key, value| battle_use_array[value] = key if !battle_use_array[value] }
item_properties = [
[_INTL("ID"), ReadOnlyProperty, _INTL("ID of this item (used as a symbol like :XXX).")],
[_INTL("Name"), ItemNameProperty, _INTL("Name of this item as displayed by the game.")],
[_INTL("NamePlural"), ItemNameProperty, _INTL("Plural name of this item as displayed by the game.")],
[_INTL("Pocket"), PocketProperty, _INTL("Pocket in the Bag where this item is stored.")],
[_INTL("Price"), LimitProperty.new(999999), _INTL("Purchase price of this item.")],
[_INTL("SellPrice"), LimitProperty.new(999999), _INTL("Sell price of this item. If blank, is half the purchase price.")],
[_INTL("Description"), StringProperty, _INTL("Description of this item")],
[_INTL("FieldUse"), EnumProperty.new(field_use_array), _INTL("How this item can be used outside of battle.")],
[_INTL("BattleUse"), EnumProperty.new(battle_use_array), _INTL("How this item can be used within a battle.")],
[_INTL("Consumable"), BooleanProperty, _INTL("Whether this item is consumed after use.")],
[_INTL("Flags"), StringListProperty, _INTL("Words/phrases that can be used to group certain kinds of items.")],
[_INTL("Move"), MoveProperty, _INTL("Move taught by this HM, TM or TR.")]
[_INTL("ID"), ReadOnlyProperty, _INTL("ID of this item (used as a symbol like :XXX).")],
[_INTL("Name"), ItemNameProperty, _INTL("Name of this item as displayed by the game.")],
[_INTL("NamePlural"), ItemNameProperty, _INTL("Plural name of this item as displayed by the game.")],
[_INTL("Pocket"), PocketProperty, _INTL("Pocket in the Bag where this item is stored.")],
[_INTL("Price"), LimitProperty.new(999999), _INTL("Purchase price of this item.")],
[_INTL("SellPrice"), LimitProperty.new(999999), _INTL("Sell price of this item. If blank, is half the purchase price.")],
[_INTL("Description"), StringProperty, _INTL("Description of this item")],
[_INTL("FieldUse"), EnumProperty.new(field_use_array), _INTL("How this item can be used outside of battle.")],
[_INTL("BattleUse"), EnumProperty.new(battle_use_array), _INTL("How this item can be used within a battle.")],
[_INTL("Consumable"), BooleanProperty, _INTL("Whether this item is consumed after use.")],
[_INTL("Flags"), StringListProperty, _INTL("Words/phrases that can be used to group certain kinds of items.")],
[_INTL("Move"), MoveProperty, _INTL("Move taught by this HM, TM or TR.")]
]
pbListScreenBlock(_INTL("Items"), ItemLister.new(0, true)) { |button, item|
if item
@@ -1003,45 +1002,45 @@ end
#===============================================================================
def pbPokemonEditor
species_properties = [
[_INTL("ID"), ReadOnlyProperty, _INTL("The ID of the Pokémon.")],
[_INTL("Name"), LimitStringProperty.new(Pokemon::MAX_NAME_SIZE), _INTL("Name of the Pokémon.")],
[_INTL("FormName"), StringProperty, _INTL("Name of this form of the Pokémon.")],
[_INTL("Category"), StringProperty, _INTL("Kind of Pokémon species.")],
[_INTL("Pokédex"), StringProperty, _INTL("Description of the Pokémon as displayed in the Pokédex.")],
[_INTL("Type 1"), TypeProperty, _INTL("Pokémon's type. If same as Type 2, this Pokémon has a single type.")],
[_INTL("Type 2"), TypeProperty, _INTL("Pokémon's type. If same as Type 1, this Pokémon has a single type.")],
[_INTL("BaseStats"), BaseStatsProperty, _INTL("Base stats of the Pokémon.")],
[_INTL("EVs"), EffortValuesProperty, _INTL("Effort Value points earned when this species is defeated.")],
[_INTL("BaseExp"), LimitProperty.new(9999), _INTL("Base experience earned when this species is defeated.")],
[_INTL("GrowthRate"), GameDataProperty.new(:GrowthRate), _INTL("Pokémon's growth rate.")],
[_INTL("GenderRatio"), GameDataProperty.new(:GenderRatio), _INTL("Proportion of males to females for this species.")],
[_INTL("CatchRate"), LimitProperty.new(255), _INTL("Catch rate of this species (0-255).")],
[_INTL("Happiness"), LimitProperty.new(255), _INTL("Base happiness of this species (0-255).")],
[_INTL("Moves"), LevelUpMovesProperty, _INTL("Moves which the Pokémon learns while levelling up.")],
[_INTL("TutorMoves"), EggMovesProperty.new, _INTL("Moves which the Pokémon can be taught by TM/HM/Move Tutor.")],
[_INTL("EggMoves"), EggMovesProperty.new, _INTL("Moves which the Pokémon can learn via breeding.")],
[_INTL("Ability 1"), AbilityProperty, _INTL("One ability which the Pokémon can have.")],
[_INTL("Ability 2"), AbilityProperty, _INTL("Another ability which the Pokémon can have.")],
[_INTL("HiddenAbility 1"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 2"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 3"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 4"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("WildItemCommon"), GameDataPoolProperty.new(:Item), _INTL("Item(s) commonly held by wild Pokémon of this species.")],
[_INTL("WildItemUncommon"), GameDataPoolProperty.new(:Item), _INTL("Item(s) uncommonly held by wild Pokémon of this species.")],
[_INTL("WildItemRare"), GameDataPoolProperty.new(:Item), _INTL("Item(s) rarely held by wild Pokémon of this species.")],
[_INTL("EggGroup 1"), GameDataProperty.new(:EggGroup), _INTL("Compatibility group (egg group) for breeding purposes.")],
[_INTL("EggGroup 2"), GameDataProperty.new(:EggGroup), _INTL("Compatibility group (egg group) for breeding purposes.")],
[_INTL("HatchSteps"), LimitProperty.new(99999), _INTL("Number of steps until an egg of this species hatches.")],
[_INTL("Incense"), ItemProperty, _INTL("Item needed to be held by a parent to produce an egg of this species.")],
[_INTL("Offspring"), GameDataPoolProperty.new(:Species), _INTL("All possible species that an egg can be when breeding for an egg of this species (if blank, the egg can only be this species).")],
[_INTL("Evolutions"), EvolutionsProperty.new, _INTL("Evolution paths of this species.")],
[_INTL("Height"), NonzeroLimitProperty.new(999), _INTL("Height of the Pokémon in 0.1 metres (e.g. 42 = 4.2m).")],
[_INTL("Weight"), NonzeroLimitProperty.new(9999), _INTL("Weight of the Pokémon in 0.1 kilograms (e.g. 42 = 4.2kg).")],
[_INTL("Color"), GameDataProperty.new(:BodyColor), _INTL("Pokémon's body color.")],
[_INTL("Shape"), GameDataProperty.new(:BodyShape), _INTL("Body shape of this species.")],
[_INTL("Habitat"), GameDataProperty.new(:Habitat), _INTL("The habitat of this species.")],
[_INTL("Generation"), LimitProperty.new(99999), _INTL("The number of the generation the Pokémon debuted in.")],
[_INTL("Flags"), StringListProperty, _INTL("Words/phrases that distinguish this species from others.")]
[_INTL("ID"), ReadOnlyProperty, _INTL("The ID of the Pokémon.")],
[_INTL("Name"), LimitStringProperty.new(Pokemon::MAX_NAME_SIZE), _INTL("Name of the Pokémon.")],
[_INTL("FormName"), StringProperty, _INTL("Name of this form of the Pokémon.")],
[_INTL("Category"), StringProperty, _INTL("Kind of Pokémon species.")],
[_INTL("Pokédex"), StringProperty, _INTL("Description of the Pokémon as displayed in the Pokédex.")],
[_INTL("Type 1"), TypeProperty, _INTL("Pokémon's type. If same as Type 2, this Pokémon has a single type.")],
[_INTL("Type 2"), TypeProperty, _INTL("Pokémon's type. If same as Type 1, this Pokémon has a single type.")],
[_INTL("BaseStats"), BaseStatsProperty, _INTL("Base stats of the Pokémon.")],
[_INTL("EVs"), EffortValuesProperty, _INTL("Effort Value points earned when this species is defeated.")],
[_INTL("BaseExp"), LimitProperty.new(9999), _INTL("Base experience earned when this species is defeated.")],
[_INTL("GrowthRate"), GameDataProperty.new(:GrowthRate), _INTL("Pokémon's growth rate.")],
[_INTL("GenderRatio"), GameDataProperty.new(:GenderRatio), _INTL("Proportion of males to females for this species.")],
[_INTL("CatchRate"), LimitProperty.new(255), _INTL("Catch rate of this species (0-255).")],
[_INTL("Happiness"), LimitProperty.new(255), _INTL("Base happiness of this species (0-255).")],
[_INTL("Moves"), LevelUpMovesProperty, _INTL("Moves which the Pokémon learns while levelling up.")],
[_INTL("TutorMoves"), EggMovesProperty.new, _INTL("Moves which the Pokémon can be taught by TM/HM/Move Tutor.")],
[_INTL("EggMoves"), EggMovesProperty.new, _INTL("Moves which the Pokémon can learn via breeding.")],
[_INTL("Ability 1"), AbilityProperty, _INTL("One ability which the Pokémon can have.")],
[_INTL("Ability 2"), AbilityProperty, _INTL("Another ability which the Pokémon can have.")],
[_INTL("HiddenAbility 1"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 2"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 3"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("HiddenAbility 4"), AbilityProperty, _INTL("A secret ability which the Pokémon can have.")],
[_INTL("WildItemCommon"), GameDataPoolProperty.new(:Item), _INTL("Item(s) commonly held by wild Pokémon of this species.")],
[_INTL("WildItemUncommon"), GameDataPoolProperty.new(:Item), _INTL("Item(s) uncommonly held by wild Pokémon of this species.")],
[_INTL("WildItemRare"), GameDataPoolProperty.new(:Item), _INTL("Item(s) rarely held by wild Pokémon of this species.")],
[_INTL("EggGroup 1"), GameDataProperty.new(:EggGroup), _INTL("Compatibility group (egg group) for breeding purposes.")],
[_INTL("EggGroup 2"), GameDataProperty.new(:EggGroup), _INTL("Compatibility group (egg group) for breeding purposes.")],
[_INTL("HatchSteps"), LimitProperty.new(99999), _INTL("Number of steps until an egg of this species hatches.")],
[_INTL("Incense"), ItemProperty, _INTL("Item needed to be held by a parent to produce an egg of this species.")],
[_INTL("Offspring"), GameDataPoolProperty.new(:Species), _INTL("All possible species that an egg can be when breeding for an egg of this species (if blank, the egg can only be this species).")],
[_INTL("Evolutions"), EvolutionsProperty.new, _INTL("Evolution paths of this species.")],
[_INTL("Height"), NonzeroLimitProperty.new(999), _INTL("Height of the Pokémon in 0.1 metres (e.g. 42 = 4.2m).")],
[_INTL("Weight"), NonzeroLimitProperty.new(9999), _INTL("Weight of the Pokémon in 0.1 kilograms (e.g. 42 = 4.2kg).")],
[_INTL("Color"), GameDataProperty.new(:BodyColor), _INTL("Pokémon's body color.")],
[_INTL("Shape"), GameDataProperty.new(:BodyShape), _INTL("Body shape of this species.")],
[_INTL("Habitat"), GameDataProperty.new(:Habitat), _INTL("The habitat of this species.")],
[_INTL("Generation"), LimitProperty.new(99999), _INTL("The number of the generation the Pokémon debuted in.")],
[_INTL("Flags"), StringListProperty, _INTL("Words/phrases that distinguish this species from others.")]
]
pbListScreenBlock(_INTL("Pokémon species"), SpeciesLister.new(0, false)) { |button, species|
if species
@@ -1116,39 +1115,39 @@ def pbPokemonEditor
hidden_abilities = [data[19], data[20], data[21], data[22]].uniq.compact # Hidden abilities
# Construct species hash
species_hash = {
:id => spec.id,
:name => data[1],
:form_name => data[2],
:category => data[3],
:pokedex_entry => data[4],
:types => types, # 5, 6
:base_stats => data[7],
:evs => data[8],
:base_exp => data[9],
:growth_rate => data[10],
:gender_ratio => data[11],
:catch_rate => data[12],
:happiness => data[13],
:moves => data[14],
:tutor_moves => data[15],
:egg_moves => data[16],
:abilities => abilities, # 17, 18
:hidden_abilities => hidden_abilities, # 19, 20, 21, 22
:wild_item_common => data[23],
:wild_item_uncommon => data[24],
:wild_item_rare => data[25],
:egg_groups => egg_groups, # 26, 27
:hatch_steps => data[28],
:incense => data[29],
:offspring => data[30],
:evolutions => data[31],
:height => data[32],
:weight => data[33],
:color => data[34],
:shape => data[35],
:habitat => data[36],
:generation => data[37],
:flags => data[38]
:id => spec.id,
:name => data[1],
:form_name => data[2],
:category => data[3],
:pokedex_entry => data[4],
:types => types, # 5, 6
:base_stats => data[7],
:evs => data[8],
:base_exp => data[9],
:growth_rate => data[10],
:gender_ratio => data[11],
:catch_rate => data[12],
:happiness => data[13],
:moves => data[14],
:tutor_moves => data[15],
:egg_moves => data[16],
:abilities => abilities, # 17, 18
:hidden_abilities => hidden_abilities, # 19, 20, 21, 22
:wild_item_common => data[23],
:wild_item_uncommon => data[24],
:wild_item_rare => data[25],
:egg_groups => egg_groups, # 26, 27
:hatch_steps => data[28],
:incense => data[29],
:offspring => data[30],
:evolutions => data[31],
:height => data[32],
:weight => data[33],
:color => data[34],
:shape => data[35],
:habitat => data[36],
:generation => data[37],
:flags => data[38]
}
# Add species' data to records
GameData::Species.register(species_hash)

View File

@@ -53,7 +53,7 @@ class PokemonTilesetScene
@x = 0
@y = 0
@top_y = 0
@height = (@tileset.terrain_tags.xsize - TILESET_START_ID) / TILES_PER_ROW + 1
@height = ((@tileset.terrain_tags.xsize - TILESET_START_ID) / TILES_PER_ROW) + 1
draw_tiles
draw_overlay
end
@@ -71,7 +71,7 @@ class PokemonTilesetScene
@sprites["tileset"].bitmap.clear
for yy in 0...@visible_height
autotile_row = (@top_y == 0 && yy == 0) # Autotiles
id_y_offset = (autotile_row) ? 0 : TILESET_START_ID + (@top_y + yy - 1) * TILES_PER_ROW
id_y_offset = (autotile_row) ? 0 : TILESET_START_ID + ((@top_y + yy - 1) * TILES_PER_ROW)
for xx in 0...TILES_PER_ROW
id_x_offset = (autotile_row) ? xx * TILES_PER_AUTOTILE : xx
@tilehelper.bltTile(@sprites["tileset"].bitmap, xx * TILE_SIZE, yy * TILE_SIZE,
@@ -88,7 +88,7 @@ class PokemonTilesetScene
for xx in 0...TILES_PER_ROW
tile_id = tile_ID_from_coordinates(xx, @top_y + yy)
terr = @tileset.terrain_tags[tile_id]
textpos.push(["#{terr}", xx * TILE_SIZE + TILE_SIZE / 2, yy * TILE_SIZE - 6, 2, TEXT_COLOR, TEXT_SHADOW_COLOR])
textpos.push(["#{terr}", (xx * TILE_SIZE) + (TILE_SIZE / 2), (yy * TILE_SIZE) - 6, 2, TEXT_COLOR, TEXT_SHADOW_COLOR])
end
end
pbDrawTextPositions(@sprites["overlay"].bitmap, textpos)
@@ -105,16 +105,16 @@ class PokemonTilesetScene
def draw_tile_details
overlay = @sprites["overlay"].bitmap
tile_x = Graphics.width * 3 / 4 - TILE_SIZE
tile_y = Graphics.height / 2 - TILE_SIZE
tile_x = (Graphics.width * 3 / 4) - TILE_SIZE
tile_y = (Graphics.height / 2) - TILE_SIZE
tile_id = tile_ID_from_coordinates(@x, @y) || 0
# Draw tile (at 200% size)
@tilehelper.bltSmallTile(overlay, tile_x, tile_y, TILE_SIZE * 2, TILE_SIZE * 2, tile_id)
# Draw box around tile image
overlay.fill_rect(tile_x - 1, tile_y - 1, TILE_SIZE * 2 + 2, 1, Color.new(255, 255, 255))
overlay.fill_rect(tile_x - 1, tile_y - 1, 1, TILE_SIZE * 2 + 2, Color.new(255, 255, 255))
overlay.fill_rect(tile_x - 1, tile_y + TILE_SIZE * 2, TILE_SIZE * 2 + 2, 1, Color.new(255, 255, 255))
overlay.fill_rect(tile_x + TILE_SIZE * 2, tile_y - 1, 1, TILE_SIZE * 2 + 2, Color.new(255, 255, 255))
overlay.fill_rect(tile_x - 1, tile_y - 1, (TILE_SIZE * 2) + 2, 1, Color.new(255, 255, 255))
overlay.fill_rect(tile_x - 1, tile_y - 1, 1, (TILE_SIZE * 2) + 2, Color.new(255, 255, 255))
overlay.fill_rect(tile_x - 1, tile_y + (TILE_SIZE * 2), (TILE_SIZE * 2) + 2, 1, Color.new(255, 255, 255))
overlay.fill_rect(tile_x + (TILE_SIZE * 2), tile_y - 1, 1, (TILE_SIZE * 2) + 2, Color.new(255, 255, 255))
# Write terrain tag info about selected tile
terrain_tag = @tileset.terrain_tags[tile_id] || 0
if GameData::TerrainTag.exists?(terrain_tag)
@@ -123,8 +123,8 @@ class PokemonTilesetScene
terrain_tag_name = terrain_tag.to_s
end
textpos = [
[_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + TILE_SIZE * 2 + 10, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)],
[terrain_tag_name, tile_x + TILE_SIZE, tile_y + TILE_SIZE * 2 + 42, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)]
[_INTL("Terrain Tag:"), tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 10, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)],
[terrain_tag_name, tile_x + TILE_SIZE, tile_y + (TILE_SIZE * 2) + 42, 2, Color.new(248, 248, 248), Color.new(40, 40, 40)]
]
# Draw all text
pbDrawTextPositions(overlay, textpos)
@@ -132,7 +132,7 @@ class PokemonTilesetScene
def tile_ID_from_coordinates(x, y)
return x * TILES_PER_AUTOTILE if y == 0 # Autotile
return TILESET_START_ID + (y - 1) * TILES_PER_ROW + x
return TILESET_START_ID + ((y - 1) * TILES_PER_ROW) + x
end
def set_terrain_tag_for_tile_ID(i, value)
@@ -183,10 +183,10 @@ class PokemonTilesetScene
update_cursor_position(0, @visible_height)
elsif Input.trigger?(Input::ACTION)
commands = [
_INTL("Go to bottom"),
_INTL("Go to top"),
_INTL("Change tileset"),
_INTL("Cancel")
_INTL("Go to bottom"),
_INTL("Go to top"),
_INTL("Change tileset"),
_INTL("Cancel")
]
case pbShowCommands(nil, commands, -1)
when 0

View File

@@ -110,9 +110,9 @@ class RegionMapSprite
bitmap = AnimatedBitmap.new("Graphics/Pictures/#{@map[1]}").deanimate
retbitmap = BitmapWrapper.new(bitmap.width / 2, bitmap.height / 2)
retbitmap.stretch_blt(
Rect.new(0, 0, bitmap.width / 2, bitmap.height / 2),
bitmap,
Rect.new(0, 0, bitmap.width, bitmap.height)
Rect.new(0, 0, bitmap.width / 2, bitmap.height / 2),
bitmap,
Rect.new(0, 0, bitmap.width, bitmap.height)
)
bitmap.dispose
return retbitmap
@@ -172,8 +172,8 @@ class MapScreenScene
if conn[0] == id
b = sprites.any? { |i| i == conn[3] }
if !b
x = (conn[1] - conn[4]) * 4 + dispx
y = (conn[2] - conn[5]) * 4 + dispy
x = ((conn[1] - conn[4]) * 4) + dispx
y = ((conn[2] - conn[5]) * 4) + dispy
setMapSpritePos(conn[3], x, y)
sprites.push(conn[3])
putNeighbors(conn[3], sprites)
@@ -181,8 +181,8 @@ class MapScreenScene
elsif conn[3] == id
b = sprites.any? { |i| i == conn[0] }
if !b
x = (conn[4] - conn[1]) * 4 + dispx
y = (conn[5] - conn[2]) * 4 + dispy
x = ((conn[4] - conn[1]) * 4) + dispx
y = ((conn[5] - conn[2]) * 4) + dispy
setMapSpritePos(conn[0], x, y)
sprites.push(conn[3])
putNeighbors(conn[0], sprites)
@@ -375,16 +375,9 @@ class MapScreenScene
def getMapRect(mapid)
sprite = getMapSprite(mapid)
if sprite
return [
sprite.x,
sprite.y,
sprite.x + sprite.bitmap.width,
sprite.y + sprite.bitmap.height
]
else
return nil
end
return nil if !sprite
return [sprite.x, sprite.y,
sprite.x + sprite.bitmap.width, sprite.y + sprite.bitmap.height]
end
def onDoubleClick(map_id)
@@ -455,12 +448,10 @@ class MapScreenScene
end
@sprites["title"].text = _INTL("D: Help")
end
elsif mapid >= 0
@sprites["title"].text = _ISPRINTF("D: Help [{1:03d}: {2:s}]", mapid, @mapinfos[mapid].name)
else
if mapid >= 0
@sprites["title"].text = _ISPRINTF("D: Help [{1:03d}: {2:s}]", mapid, @mapinfos[mapid].name)
else
@sprites["title"].text = _INTL("D: Help")
end
@sprites["title"].text = _INTL("D: Help")
end
end

View File

@@ -306,13 +306,13 @@ class SpritePositioner
def pbMenu
refresh
cw = Window_CommandPokemon.new([
_INTL("Set Ally Position"),
cw = Window_CommandPokemon.new(
[_INTL("Set Ally Position"),
_INTL("Set Enemy Position"),
_INTL("Set Shadow Size"),
_INTL("Set Shadow Position"),
_INTL("Auto-Position Sprites")
])
_INTL("Auto-Position Sprites")]
)
cw.x = Graphics.width - cw.width
cw.y = Graphics.height - cw.height
cw.viewport = @viewport
@@ -340,7 +340,7 @@ class SpritePositioner
pbFadeInAndShow(@sprites) { update }
@starting = false
end
cw = Window_CommandPokemonEx.newEmpty(0, 0, 260, 32 + 24 * 6, @viewport)
cw = Window_CommandPokemonEx.newEmpty(0, 0, 260, 32 + (24 * 6), @viewport)
cw.rowHeight = 24
pbSetSmallFont(cw.contents)
cw.x = Graphics.width - cw.width

View File

@@ -222,7 +222,7 @@ class AnimationWindow < SpriteWrapper
@contents.clear
@contents.fill_rect(0, 0, @contents.width, @contents.height, Color.new(180, 180, 180))
@contents.blt(0, 0, @arrows.bitmap, Rect.new(0, 0, arrowwidth, 96))
@contents.blt(arrowwidth + NUMFRAMES * 96, 0, @arrows.bitmap,
@contents.blt(arrowwidth + (NUMFRAMES * 96), 0, @arrows.bitmap,
Rect.new(arrowwidth, 0, arrowwidth, 96))
havebitmap = (self.animbitmap && !self.animbitmap.disposed?)
if havebitmap
@@ -238,9 +238,9 @@ class AnimationWindow < SpriteWrapper
end
end
for i in 0...NUMFRAMES
drawrect(@contents, arrowwidth + i * 96, 0, 96, 96, Color.new(100, 100, 100))
drawrect(@contents, arrowwidth + (i * 96), 0, 96, 96, Color.new(100, 100, 100))
if @start + i == @selected && havebitmap
drawborder(@contents, arrowwidth + i * 96, 0, 96, 96, Color.new(255, 0, 0))
drawborder(@contents, arrowwidth + (i * 96), 0, 96, 96, Color.new(255, 0, 0))
end
end
end
@@ -258,7 +258,7 @@ class AnimationWindow < SpriteWrapper
arrowwidth = @arrows.bitmap.width / 2
maxindex = (self.animbitmap.height / 192) * 5
left = Rect.new(0, 0, arrowwidth, 96)
right = Rect.new(arrowwidth + NUMFRAMES * 96, 0, arrowwidth, 96)
right = Rect.new(arrowwidth + (NUMFRAMES * 96), 0, arrowwidth, 96)
left.x += self.x
left.y += self.y
right.x += self.x
@@ -266,7 +266,7 @@ class AnimationWindow < SpriteWrapper
swatchrects = []
repeattime = Input.time?(Input::MOUSELEFT) / 1000
for i in 0...NUMFRAMES
swatchrects.push(Rect.new(arrowwidth + i * 96 + self.x, self.y, 96, 96))
swatchrects.push(Rect.new(arrowwidth + (i * 96) + self.x, self.y, 96, 96))
end
for i in 0...NUMFRAMES
if swatchrects[i].contains(mousepos[0], mousepos[1])
@@ -410,7 +410,7 @@ class SpriteFrame < InvalidatableSprite
@contents.fill_rect(63, 0, 1, 64, color)
# Determine frame number graphic to use from @iconbitmap
yoffset = (@previous) ? (NUM_ROWS + 1) * 16 : 0 # 1 is for padlock icon
bmrect = Rect.new((@id % 10) * 16, yoffset + (@id / 10) * 16, 16, 16)
bmrect = Rect.new((@id % 10) * 16, yoffset + ((@id / 10) * 16), 16, 16)
@contents.blt(0, 0, @iconbitmap.bitmap, bmrect)
# Draw padlock if frame is locked
if @locked && !@previous
@@ -986,8 +986,8 @@ class BitmapDisplayWindow < SpriteWindow_Base
return if !bmap
ww = bmap.width
wh = bmap.height
sx = self.contents.width * 1.0 / ww
sy = self.contents.height * 1.0 / wh
sx = self.contents.width / ww.to_f
sy = self.contents.height / wh.to_f
if sx > sy
ww = sy * ww
wh = self.contents.height

View File

@@ -829,12 +829,8 @@ class ControlWindow < SpriteWindow_Base
mousepos = Mouse.getMousePos
return false if !mousepos
return false if i < 0 || i >= @controls.length
rc = Rect.new(
@controls[i].parentX,
@controls[i].parentY,
@controls[i].width,
@controls[i].height
)
rc = Rect.new(@controls[i].parentX, @controls[i].parentY,
@controls[i].width, @controls[i].height)
return rc.contains(mousepos[0], mousepos[1])
end

View File

@@ -117,7 +117,7 @@ class PointPath
len = @points.length
dx = @points[len - 2][0] - @points[len - 1][0]
dy = @points[len - 2][1] - @points[len - 1][1]
dist = Math.sqrt(dx * dx + dy * dy)
dist = Math.sqrt((dx * dx) + (dy * dy))
@distances.push(dist)
@totaldist += dist
end
@@ -171,8 +171,8 @@ class PointPath
distT = 1.0 - ((curdist - distForT) / dist)
dx = @points[i + 1][0] - @points[i][0]
dy = @points[i + 1][1] - @points[i][1]
ret = [@points[i][0] + dx * distT,
@points[i][1] + dy * distT]
ret = [@points[i][0] + (dx * distT),
@points[i][1] + (dy * distT)]
break
end
end
@@ -188,9 +188,9 @@ def catmullRom(p1, p2, p3, p4, t)
# p1=prevPoint, p2=startPoint, p3=endPoint, p4=nextPoint, t is from 0 through 1
t2 = t * t
t3 = t2 * t
return 0.5 * (2 * p2 + t * (p3 - p1) +
t2 * (2 * p1 - 5 * p2 + 4 * p3 - p4) +
t3 * (p4 - 3 * p3 + 3 * p2 - p1))
return 0.5 * ((2 * p2) + (t * (p3 - p1)) +
(t2 * ((2 * p1) - (5 * p2) + (4 * p3) - p4)) +
(t3 * (p4 - (3 * p3) + (3 * p2) - p1)))
end
def getCatmullRomPoint(src, t)
@@ -275,10 +275,10 @@ def pbDefinePath(canvas)
points.push(point)
end
curve = [
ControlPointSprite.new(true, canvas.viewport),
ControlPointSprite.new(false, canvas.viewport),
ControlPointSprite.new(false, canvas.viewport),
ControlPointSprite.new(true, canvas.viewport)
ControlPointSprite.new(true, canvas.viewport),
ControlPointSprite.new(false, canvas.viewport),
ControlPointSprite.new(false, canvas.viewport),
ControlPointSprite.new(true, canvas.viewport)
]
showline = false
sliderwin2.visible = false
@@ -321,10 +321,10 @@ def pbDefinePath(canvas)
if !showline
curve[1].visible = true
curve[2].visible = true
curve[1].x = curve[0].x + 0.3333 * (curve[3].x - curve[0].x)
curve[1].y = curve[0].y + 0.3333 * (curve[3].y - curve[0].y)
curve[2].x = curve[0].x + 0.6666 * (curve[3].x - curve[0].x)
curve[2].y = curve[0].y + 0.6666 * (curve[3].y - curve[0].y)
curve[1].x = curve[0].x + (0.3333 * (curve[3].x - curve[0].x))
curve[1].y = curve[0].y + (0.3333 * (curve[3].y - curve[0].y))
curve[2].x = curve[0].x + (0.6666 * (curve[3].x - curve[0].x))
curve[2].y = curve[0].y + (0.6666 * (curve[3].y - curve[0].y))
end
showline = true
end

View File

@@ -154,11 +154,10 @@ def pbAnimList(animations, canvas, animwin)
next
end
if Input.trigger?(Input::USE) && animations.length > 0
cmd2 = pbShowCommands(helpwindow, [
_INTL("Load Animation"),
_INTL("Rename"),
_INTL("Delete")
], -1)
cmd2 = pbShowCommands(helpwindow,
[_INTL("Load Animation"),
_INTL("Rename"),
_INTL("Delete")], -1)
case cmd2
when 0 # Load Animation
canvas.loadAnimation(animations[cmdwin.index])
@@ -223,12 +222,8 @@ def pbSetTone(cel, previewsprite)
okbutton = sliderwin2.addButton(_INTL("OK"))
cancelbutton = sliderwin2.addButton(_INTL("Cancel"))
loop do
previewsprite.tone.set(
sliderwin2.value(0),
sliderwin2.value(1),
sliderwin2.value(2),
sliderwin2.value(3)
)
previewsprite.tone.set(sliderwin2.value(0), sliderwin2.value(1),
sliderwin2.value(2), sliderwin2.value(3))
Graphics.update
Input.update
sliderwin2.update
@@ -257,12 +252,8 @@ def pbSetFlash(cel, previewsprite)
okbutton = sliderwin2.addButton(_INTL("OK"))
cancelbutton = sliderwin2.addButton(_INTL("Cancel"))
loop do
previewsprite.tone.set(
sliderwin2.value(0),
sliderwin2.value(1),
sliderwin2.value(2),
sliderwin2.value(3)
)
previewsprite.tone.set(sliderwin2.value(0), sliderwin2.value(1),
sliderwin2.value(2), sliderwin2.value(3))
Graphics.update
Input.update
sliderwin2.update
@@ -1030,11 +1021,11 @@ def animationEditorMain(animation)
next
elsif Input.trigger?(Input::MOUSERIGHT) && sliderwin.hittest?(0) # Right mouse button
commands = [
_INTL("Copy Frame"),
_INTL("Paste Frame"),
_INTL("Clear Frame"),
_INTL("Insert Frame"),
_INTL("Delete Frame")
_INTL("Copy Frame"),
_INTL("Paste Frame"),
_INTL("Clear Frame"),
_INTL("Insert Frame"),
_INTL("Delete Frame")
]
hit = pbTrackPopupMenu(commands)
case hit
@@ -1067,13 +1058,13 @@ def animationEditorMain(animation)
mousepos = Mouse.getMousePos
mousepos = [0, 0] if !mousepos
commands = [
_INTL("Properties..."),
_INTL("Cut"),
_INTL("Copy"),
_INTL("Paste"),
_INTL("Delete"),
_INTL("Renumber..."),
_INTL("Extrapolate Path...")
_INTL("Properties..."),
_INTL("Cut"),
_INTL("Copy"),
_INTL("Paste"),
_INTL("Delete"),
_INTL("Renumber..."),
_INTL("Extrapolate Path...")
]
hit = pbTrackPopupMenu(commands)
case hit

View File

@@ -667,8 +667,8 @@ module MapSizeProperty
def self.set(settingname, oldsetting)
oldsetting = [0, ""] if !oldsetting
properties = [
[_INTL("Width"), NonzeroLimitProperty.new(30), _INTL("The width of this map in Region Map squares.")],
[_INTL("Valid Squares"), StringProperty, _INTL("A series of 1s and 0s marking which squares are part of this map (1=part, 0=not part).")]
[_INTL("Width"), NonzeroLimitProperty.new(30), _INTL("The width of this map in Region Map squares.")],
[_INTL("Valid Squares"), StringProperty, _INTL("A series of 1s and 0s marking which squares are part of this map (1=part, 0=not part).")]
]
pbPropertyList(settingname, oldsetting, properties, false)
return oldsetting
@@ -792,9 +792,7 @@ module RegionMapCoordsProperty
ret = []
for i in 0...mapdata.length
next if !mapdata[i]
ret.push(
[i, pbGetMessage(MessageTypes::RegionNames, i)]
)
ret.push([i, pbGetMessage(MessageTypes::RegionNames, i)])
end
return ret
end

View File

@@ -813,12 +813,10 @@ DebugMenuCommands.register("dexlists", {
dexindex = dexescmd - 1
if dexindex < 0 # Toggle Pokédex ownership
$player.has_pokedex = !$player.has_pokedex
else # Toggle Regional Dex accessibility
if $player.pokedex.unlocked?(dexindex)
$player.pokedex.lock(dexindex)
else
$player.pokedex.unlock(dexindex)
end
elsif $player.pokedex.unlocked?(dexindex) # Toggle Regional Dex accessibility
$player.pokedex.lock(dexindex)
else
$player.pokedex.unlock(dexindex)
end
end
}
@@ -888,7 +886,7 @@ DebugMenuCommands.register("randomid", {
"name" => _INTL("Randomize Player ID"),
"description" => _INTL("Generate a random new ID for the player."),
"effect" => proc {
$player.id = rand(2**16) | rand(2**16) << 16
$player.id = rand(2**16) | (rand(2**16) << 16)
pbMessage(_INTL("The player's ID was changed to {1} (full ID: {2}).", $player.public_ID, $player.id))
}
})

View File

@@ -127,7 +127,8 @@ def pbDebugSetVariable(id, diff)
end
def pbDebugVariableScreen(id)
if $game_variables[id].is_a?(Numeric)
case $game_variables[id]
when Numeric
value = $game_variables[id]
params = ChooseNumberParams.new
params.setDefaultValue(value)
@@ -137,7 +138,7 @@ def pbDebugVariableScreen(id)
$game_variables[id] = [value, 99999999].min
$game_variables[id] = [$game_variables[id], -99999999].max
$game_map.need_refresh = true
elsif $game_variables[id].is_a?(String)
when String
value = pbMessageFreeText(_INTL("Set variable {1}.", id),
$game_variables[id], false, 250, Graphics.width)
$game_variables[id] = value
@@ -184,9 +185,10 @@ def pbDebugVariables(mode)
when ""
$game_variables[current_id] = 0
else
if $game_variables[current_id].is_a?(Numeric)
case $game_variables[current_id]
when Numeric
$game_variables[current_id] = 0
elsif $game_variables[current_id].is_a?(String)
when String
$game_variables[current_id] = ""
end
end
@@ -739,7 +741,7 @@ def pbCheckTileValidity(tile_id, map, tilesets, passages)
return false if !tile_id
if tile_id > 0 && tile_id < 384
# Check for defined autotile
autotile_id = tile_id / 48 - 1
autotile_id = (tile_id / 48) - 1
autotile_name = tilesets[map.tileset_id].autotile_names[autotile_id]
return true if autotile_name && autotile_name != ""
else

View File

@@ -358,7 +358,7 @@ PokemonDebugMenuCommands.register("hiddenvalues", {
end
end
when 2 # Randomise pID
pkmn.personalID = rand(2**16) | rand(2**16) << 16
pkmn.personalID = rand(2**16) | (rand(2**16) << 16)
pkmn.calc_stats
screen.pbRefreshSingle(pkmnid)
end
@@ -1034,7 +1034,7 @@ PokemonDebugMenuCommands.register("ownership", {
val = pbMessageChooseNumber(
_INTL("Set the new ID (max. 65535)."), params
) { screen.pbUpdate }
pkmn.owner.id = val | val << 16
pkmn.owner.id = val | (val << 16)
end
end
next false
@@ -1173,11 +1173,12 @@ PokemonDebugMenuCommands.register("duplicate", {
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
if screen.pbConfirm(_INTL("Are you sure you want to copy this Pokémon?"))
clonedpkmn = pkmn.clone
if screen.is_a?(PokemonPartyScreen)
case screen
when PokemonPartyScreen
pbStorePokemon(clonedpkmn)
screen.pbHardRefresh
screen.pbDisplay(_INTL("The Pokémon was duplicated."))
elsif screen.is_a?(PokemonStorageScreen)
when PokemonStorageScreen
if screen.storage.pbMoveCaughtToParty(clonedpkmn)
if pkmnid[0] != -1
screen.pbDisplay(_INTL("The duplicated Pokémon was moved to your party."))
@@ -1205,10 +1206,11 @@ PokemonDebugMenuCommands.register("delete", {
"name" => _INTL("Delete"),
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
if screen.pbConfirm(_INTL("Are you sure you want to delete this Pokémon?"))
if screen.is_a?(PokemonPartyScreen)
case screen
when PokemonPartyScreen
screen.party.delete_at(pkmnid)
screen.pbHardRefresh
elsif screen.is_a?(PokemonStorageScreen)
when PokemonStorageScreen
screen.scene.pbRelease(pkmnid, heldpoke)
(heldpoke) ? screen.heldpkmn = nil : screen.storage.pbDelete(pkmnid[0], pkmnid[1])
screen.scene.pbRefresh

View File

@@ -411,12 +411,10 @@ BattlerDebugMenuCommands.register("settypes", {
end
battler.types.compact!
end
elsif cmd < max_main_types
battler.types[cmd] = new_type
else
if cmd < max_main_types
battler.types[cmd] = new_type
else
battler.effects[PBEffects::Type3] = new_type
end
battler.effects[PBEffects::Type3] = new_type
end
end
end

View File

@@ -124,44 +124,44 @@ module Battle::DebugVariables
}
SIDE_EFFECTS = {
PBEffects::AuroraVeil => { name: "Aurora Veil duration", default: 0 },
PBEffects::CraftyShield => { name: "Crafty Shield applies this round", default: false },
PBEffects::EchoedVoiceCounter => { name: "Echoed Voice rounds used (max. 5)", default: 0, max: 5 },
PBEffects::EchoedVoiceUsed => { name: "Echoed Voice used this round", default: false },
PBEffects::LastRoundFainted => { name: "Round when side's battler last fainted", default: -2 }, # Treated as -1, isn't a battler index
PBEffects::LightScreen => { name: "Light Screen duration", default: 0 },
PBEffects::LuckyChant => { name: "Lucky Chant duration", default: 0 },
PBEffects::MatBlock => { name: "Mat Block applies this round", default: false },
PBEffects::Mist => { name: "Mist duration", default: 0 },
PBEffects::QuickGuard => { name: "Quick Guard applies this round", default: false },
PBEffects::Rainbow => { name: "Rainbow duration", default: 0 },
PBEffects::Reflect => { name: "Reflect duration", default: 0 },
PBEffects::Round => { name: "Round was used this round", default: false },
PBEffects::Safeguard => { name: "Safeguard duration", default: 0 },
PBEffects::SeaOfFire => { name: "Sea Of Fire duration", default: 0 },
PBEffects::Spikes => { name: "Spikes layers (0-3)", default: 0, max: 3 },
PBEffects::StealthRock => { name: "Stealth Rock exists", default: false },
PBEffects::StickyWeb => { name: "Sticky Web exists", default: false },
PBEffects::Swamp => { name: "Swamp duration", default: 0 },
PBEffects::Tailwind => { name: "Tailwind duration", default: 0 },
PBEffects::ToxicSpikes => { name: "Toxic Spikes layers (0-2)", default: 0, max: 2 },
PBEffects::WideGuard => { name: "Wide Guard applies this round", default: false }
PBEffects::AuroraVeil => { name: "Aurora Veil duration", default: 0 },
PBEffects::CraftyShield => { name: "Crafty Shield applies this round", default: false },
PBEffects::EchoedVoiceCounter => { name: "Echoed Voice rounds used (max. 5)", default: 0, max: 5 },
PBEffects::EchoedVoiceUsed => { name: "Echoed Voice used this round", default: false },
PBEffects::LastRoundFainted => { name: "Round when side's battler last fainted", default: -2 }, # Treated as -1, isn't a battler index
PBEffects::LightScreen => { name: "Light Screen duration", default: 0 },
PBEffects::LuckyChant => { name: "Lucky Chant duration", default: 0 },
PBEffects::MatBlock => { name: "Mat Block applies this round", default: false },
PBEffects::Mist => { name: "Mist duration", default: 0 },
PBEffects::QuickGuard => { name: "Quick Guard applies this round", default: false },
PBEffects::Rainbow => { name: "Rainbow duration", default: 0 },
PBEffects::Reflect => { name: "Reflect duration", default: 0 },
PBEffects::Round => { name: "Round was used this round", default: false },
PBEffects::Safeguard => { name: "Safeguard duration", default: 0 },
PBEffects::SeaOfFire => { name: "Sea Of Fire duration", default: 0 },
PBEffects::Spikes => { name: "Spikes layers (0-3)", default: 0, max: 3 },
PBEffects::StealthRock => { name: "Stealth Rock exists", default: false },
PBEffects::StickyWeb => { name: "Sticky Web exists", default: false },
PBEffects::Swamp => { name: "Swamp duration", default: 0 },
PBEffects::Tailwind => { name: "Tailwind duration", default: 0 },
PBEffects::ToxicSpikes => { name: "Toxic Spikes layers (0-2)", default: 0, max: 2 },
PBEffects::WideGuard => { name: "Wide Guard applies this round", default: false }
}
FIELD_EFFECTS = {
PBEffects::AmuletCoin => { name: "Amulet Coin doubling prize money", default: false },
PBEffects::FairyLock => { name: "Fairy Lock trapping duration", default: 0 },
PBEffects::FusionBolt => { name: "Fusion Bolt was used", default: false },
PBEffects::FusionFlare => { name: "Fusion Flare was used", default: false },
PBEffects::Gravity => { name: "Gravity duration", default: 0 },
PBEffects::HappyHour => { name: "Happy Hour doubling prize money", default: false },
PBEffects::IonDeluge => { name: "Ion Deluge making moves Electric", default: false },
PBEffects::MagicRoom => { name: "Magic Room duration", default: 0 },
PBEffects::MudSportField => { name: "Mud Sport duration (Gen 6+)", default: 0 },
PBEffects::PayDay => { name: "Pay Day additional prize money", default: 0, max: Settings::MAX_MONEY },
PBEffects::TrickRoom => { name: "Trick Room duration", default: 0 },
PBEffects::WaterSportField => { name: "Water Sport duration (Gen 6+)", default: 0 },
PBEffects::WonderRoom => { name: "Wonder Room duration", default: 0 }
PBEffects::AmuletCoin => { name: "Amulet Coin doubling prize money", default: false },
PBEffects::FairyLock => { name: "Fairy Lock trapping duration", default: 0 },
PBEffects::FusionBolt => { name: "Fusion Bolt was used", default: false },
PBEffects::FusionFlare => { name: "Fusion Flare was used", default: false },
PBEffects::Gravity => { name: "Gravity duration", default: 0 },
PBEffects::HappyHour => { name: "Happy Hour doubling prize money", default: false },
PBEffects::IonDeluge => { name: "Ion Deluge making moves Electric", default: false },
PBEffects::MagicRoom => { name: "Magic Room duration", default: 0 },
PBEffects::MudSportField => { name: "Mud Sport duration (Gen 6+)", default: 0 },
PBEffects::PayDay => { name: "Pay Day additional prize money", default: 0, max: Settings::MAX_MONEY },
PBEffects::TrickRoom => { name: "Trick Room duration", default: 0 },
PBEffects::WaterSportField => { name: "Water Sport duration (Gen 6+)", default: 0 },
PBEffects::WonderRoom => { name: "Wonder Room duration", default: 0 }
}
end

View File

@@ -123,7 +123,7 @@ class GraphicsLister
@sprite = IconSprite.new(0, 0)
@sprite.bitmap = nil
@sprite.x = Graphics.width * 3 / 4
@sprite.y = (Graphics.height - 64) / 2 + 64
@sprite.y = ((Graphics.height - 64) / 2) + 64
@sprite.z = 2
@folder = folder
@selection = selection
@@ -308,7 +308,7 @@ class MapLister
@sprite = SpriteWrapper.new
@sprite.bitmap = nil
@sprite.x = Graphics.width * 3 / 4
@sprite.y = (Graphics.height - 64) / 2 + 64
@sprite.y = ((Graphics.height - 64) / 2) + 64
@sprite.z = -2
@commands = []
@maps = pbMapTree
@@ -477,7 +477,7 @@ end
#===============================================================================
class TrainerTypeLister
def initialize(selection = 0, includeNew = false)
@sprite = IconSprite.new(Graphics.width * 3 / 4, (Graphics.height - 64) / 2 + 64)
@sprite = IconSprite.new(Graphics.width * 3 / 4, ((Graphics.height - 64) / 2) + 64)
@sprite.z = 2
@selection = selection
@commands = []