mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Added compiler schema letter "m" which makes the value a symbol, refactored many PBS file compilers, removed support for old PBS formats/properties
This commit is contained in:
@@ -19,21 +19,19 @@ module GameData
|
||||
DATA_FILENAME = "moves.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"Type" => [:type, "e", :Type],
|
||||
"Category" => [:category, "e", ["Physical", "Special", "Status"]],
|
||||
"Power" => [:base_damage, "u"],
|
||||
"Accuracy" => [:accuracy, "u"],
|
||||
"TotalPP" => [:total_pp, "u"],
|
||||
"Target" => [:target, "e", :Target],
|
||||
"Priority" => [:priority, "i"],
|
||||
"FunctionCode" => [:function_code, "s"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"EffectChance" => [:effect_chance, "u"],
|
||||
"Description" => [:description, "q"],
|
||||
# All properties below here are old names for some properties above.
|
||||
# They will be removed in v21.
|
||||
"BaseDamage" => [:base_damage, "u"]
|
||||
"SectionName" => [:id, "m"],
|
||||
"Name" => [:real_name, "s"],
|
||||
"Type" => [:type, "e", :Type],
|
||||
"Category" => [:category, "e", ["Physical", "Special", "Status"]],
|
||||
"Power" => [:base_damage, "u"],
|
||||
"Accuracy" => [:accuracy, "u"],
|
||||
"TotalPP" => [:total_pp, "u"],
|
||||
"Target" => [:target, "e", :Target],
|
||||
"Priority" => [:priority, "i"],
|
||||
"FunctionCode" => [:function_code, "s"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"EffectChance" => [:effect_chance, "u"],
|
||||
"Description" => [:real_description, "q"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
@@ -42,19 +40,19 @@ module GameData
|
||||
def initialize(hash)
|
||||
convert_move_data(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@type = hash[:type] || :NONE
|
||||
@category = hash[:category] || 2
|
||||
@base_damage = hash[:base_damage] || 0
|
||||
@accuracy = hash[:accuracy] || 100
|
||||
@total_pp = hash[:total_pp] || 5
|
||||
@target = hash[:target] || :None
|
||||
@priority = hash[:priority] || 0
|
||||
@function_code = hash[:function_code] || "None"
|
||||
@flags = hash[:flags] || []
|
||||
@real_name = hash[:real_name] || "Unnamed"
|
||||
@type = hash[:type] || :NONE
|
||||
@category = hash[:category] || 2
|
||||
@base_damage = hash[:base_damage] || 0
|
||||
@accuracy = hash[:accuracy] || 100
|
||||
@total_pp = hash[:total_pp] || 5
|
||||
@target = hash[:target] || :None
|
||||
@priority = hash[:priority] || 0
|
||||
@function_code = hash[:function_code] || "None"
|
||||
@flags = hash[:flags] || []
|
||||
@flags = [@flags] if !@flags.is_a?(Array)
|
||||
@effect_chance = hash[:effect_chance] || 0
|
||||
@real_description = hash[:description] || "???"
|
||||
@effect_chance = hash[:effect_chance] || 0
|
||||
@real_description = hash[:real_description] || "???"
|
||||
end
|
||||
|
||||
# @return [String] the translated name of this move
|
||||
|
||||
Reference in New Issue
Block a user