mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
More Rubocopping
This commit is contained in:
@@ -64,7 +64,7 @@ module GameData
|
||||
return ArgumentError.new("Exp amount #{level} is invalid.") if !exp || exp < 0
|
||||
max = GrowthRate.max_level
|
||||
return max if exp >= maximum_exp
|
||||
for level in 1..max
|
||||
(1..max).each do |level|
|
||||
return level - 1 if exp < minimum_exp_for_level(level)
|
||||
end
|
||||
return max
|
||||
|
||||
@@ -13,7 +13,7 @@ module GameData
|
||||
factors.push([1, try_form, ""]) if form > 0
|
||||
factors.push([0, try_species, "000"])
|
||||
# Go through each combination of parameters in turn to find an existing sprite
|
||||
for i in 0...2**factors.length
|
||||
(2**factors.length).times do |i|
|
||||
# Set try_ parameters for this combination
|
||||
factors.each_with_index do |factor, index|
|
||||
value = ((i / (2**index)).even?) ? factor[1] : factor[2]
|
||||
|
||||
@@ -28,28 +28,28 @@ module GameData
|
||||
DATA_FILENAME = "map_metadata.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [1, "s"],
|
||||
"Outdoor" => [2, "b"],
|
||||
"ShowArea" => [3, "b"],
|
||||
"Bicycle" => [4, "b"],
|
||||
"BicycleAlways" => [5, "b"],
|
||||
"HealingSpot" => [6, "vuu"],
|
||||
"Weather" => [7, "eu", :Weather],
|
||||
"MapPosition" => [8, "uuu"],
|
||||
"DiveMap" => [9, "v"],
|
||||
"DarkMap" => [10, "b"],
|
||||
"SafariMap" => [11, "b"],
|
||||
"SnapEdges" => [12, "b"],
|
||||
"Dungeon" => [13, "b"],
|
||||
"BattleBack" => [14, "s"],
|
||||
"WildBattleBGM" => [15, "s"],
|
||||
"TrainerBattleBGM" => [16, "s"],
|
||||
"WildVictoryME" => [17, "s"],
|
||||
"TrainerVictoryME" => [18, "s"],
|
||||
"WildCaptureME" => [19, "s"],
|
||||
"MapSize" => [20, "us"],
|
||||
"Environment" => [21, "e", :Environment],
|
||||
"Flags" => [22, "*s"]
|
||||
"Name" => [1, "s"],
|
||||
"Outdoor" => [2, "b"],
|
||||
"ShowArea" => [3, "b"],
|
||||
"Bicycle" => [4, "b"],
|
||||
"BicycleAlways" => [5, "b"],
|
||||
"HealingSpot" => [6, "vuu"],
|
||||
"Weather" => [7, "eu", :Weather],
|
||||
"MapPosition" => [8, "uuu"],
|
||||
"DiveMap" => [9, "v"],
|
||||
"DarkMap" => [10, "b"],
|
||||
"SafariMap" => [11, "b"],
|
||||
"SnapEdges" => [12, "b"],
|
||||
"Dungeon" => [13, "b"],
|
||||
"BattleBack" => [14, "s"],
|
||||
"WildBattleBGM" => [15, "s"],
|
||||
"TrainerBattleBGM" => [16, "s"],
|
||||
"WildVictoryME" => [17, "s"],
|
||||
"TrainerVictoryME" => [18, "s"],
|
||||
"WildCaptureME" => [19, "s"],
|
||||
"MapSize" => [20, "us"],
|
||||
"Environment" => [21, "e", :Environment],
|
||||
"Flags" => [22, "*s"]
|
||||
}
|
||||
|
||||
extend ClassMethodsIDNumbers
|
||||
@@ -57,28 +57,28 @@ module GameData
|
||||
|
||||
def self.editor_properties
|
||||
return [
|
||||
["Name", StringProperty, _INTL("The name of the map, as seen by the player. Can be different to the map's name as seen in RMXP.")],
|
||||
["Outdoor", BooleanProperty, _INTL("If true, this map is an outdoor map and will be tinted according to time of day.")],
|
||||
["ShowArea", BooleanProperty, _INTL("If true, the game will display the map's name upon entry.")],
|
||||
["Bicycle", BooleanProperty, _INTL("If true, the bicycle can be used on this map.")],
|
||||
["BicycleAlways", BooleanProperty, _INTL("If true, the bicycle will be mounted automatically on this map and cannot be dismounted.")],
|
||||
["HealingSpot", MapCoordsProperty, _INTL("Map ID of this Pokémon Center's town, and X and Y coordinates of its entrance within that town.")],
|
||||
["Weather", WeatherEffectProperty, _INTL("Weather conditions in effect for this map.")],
|
||||
["MapPosition", RegionMapCoordsProperty, _INTL("Identifies the point on the regional map for this map.")],
|
||||
["DiveMap", MapProperty, _INTL("Specifies the underwater layer of this map. Use only if this map has deep water.")],
|
||||
["DarkMap", BooleanProperty, _INTL("If true, this map is dark and a circle of light appears around the player. Flash can be used to expand the circle.")],
|
||||
["SafariMap", BooleanProperty, _INTL("If true, this map is part of the Safari Zone (both indoor and outdoor). Not to be used in the reception desk.")],
|
||||
["SnapEdges", BooleanProperty, _INTL("If true, when the player goes near this map's edge, the game doesn't center the player as usual.")],
|
||||
["Dungeon", BooleanProperty, _INTL("If true, this map has a randomly generated layout. See the wiki for more information.")],
|
||||
["BattleBack", StringProperty, _INTL("PNG files named 'XXX_bg', 'XXX_base0', 'XXX_base1', 'XXX_message' in Battlebacks folder, where XXX is this property's value.")],
|
||||
["WildBattleBGM", BGMProperty, _INTL("Default BGM for wild Pokémon battles on this map.")],
|
||||
["TrainerBattleBGM", BGMProperty, _INTL("Default BGM for trainer battles on this map.")],
|
||||
["WildVictoryME", MEProperty, _INTL("Default ME played after winning a wild Pokémon battle on this map.")],
|
||||
["TrainerVictoryME", MEProperty, _INTL("Default ME played after winning a Trainer battle on this map.")],
|
||||
["WildCaptureME", MEProperty, _INTL("Default ME played after catching a wild Pokémon on this map.")],
|
||||
["MapSize", MapSizeProperty, _INTL("The width of the map in Town Map squares, and a string indicating which squares are part of this map.")],
|
||||
["Environment", GameDataProperty.new(:Environment), _INTL("The default battle environment for battles on this map.")],
|
||||
["Flags", StringListProperty, _INTL("Words/phrases that distinguish this map from others.")]
|
||||
["Name", StringProperty, _INTL("The name of the map, as seen by the player. Can be different to the map's name as seen in RMXP.")],
|
||||
["Outdoor", BooleanProperty, _INTL("If true, this map is an outdoor map and will be tinted according to time of day.")],
|
||||
["ShowArea", BooleanProperty, _INTL("If true, the game will display the map's name upon entry.")],
|
||||
["Bicycle", BooleanProperty, _INTL("If true, the bicycle can be used on this map.")],
|
||||
["BicycleAlways", BooleanProperty, _INTL("If true, the bicycle will be mounted automatically on this map and cannot be dismounted.")],
|
||||
["HealingSpot", MapCoordsProperty, _INTL("Map ID of this Pokémon Center's town, and X and Y coordinates of its entrance within that town.")],
|
||||
["Weather", WeatherEffectProperty, _INTL("Weather conditions in effect for this map.")],
|
||||
["MapPosition", RegionMapCoordsProperty, _INTL("Identifies the point on the regional map for this map.")],
|
||||
["DiveMap", MapProperty, _INTL("Specifies the underwater layer of this map. Use only if this map has deep water.")],
|
||||
["DarkMap", BooleanProperty, _INTL("If true, this map is dark and a circle of light appears around the player. Flash can be used to expand the circle.")],
|
||||
["SafariMap", BooleanProperty, _INTL("If true, this map is part of the Safari Zone (both indoor and outdoor). Not to be used in the reception desk.")],
|
||||
["SnapEdges", BooleanProperty, _INTL("If true, when the player goes near this map's edge, the game doesn't center the player as usual.")],
|
||||
["Dungeon", BooleanProperty, _INTL("If true, this map has a randomly generated layout. See the wiki for more information.")],
|
||||
["BattleBack", StringProperty, _INTL("PNG files named 'XXX_bg', 'XXX_base0', 'XXX_base1', 'XXX_message' in Battlebacks folder, where XXX is this property's value.")],
|
||||
["WildBattleBGM", BGMProperty, _INTL("Default BGM for wild Pokémon battles on this map.")],
|
||||
["TrainerBattleBGM", BGMProperty, _INTL("Default BGM for trainer battles on this map.")],
|
||||
["WildVictoryME", MEProperty, _INTL("Default ME played after winning a wild Pokémon battle on this map.")],
|
||||
["TrainerVictoryME", MEProperty, _INTL("Default ME played after winning a Trainer battle on this map.")],
|
||||
["WildCaptureME", MEProperty, _INTL("Default ME played after catching a wild Pokémon on this map.")],
|
||||
["MapSize", MapSizeProperty, _INTL("The width of the map in Town Map squares, and a string indicating which squares are part of this map.")],
|
||||
["Environment", GameDataProperty.new(:Environment), _INTL("The default battle environment for battles on this map.")],
|
||||
["Flags", StringListProperty, _INTL("Words/phrases that distinguish this map from others.")]
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user