Added class GameData::Target

This commit is contained in:
Maruno17
2021-02-24 21:05:04 +00:00
parent 823e7eb8ec
commit 87285a2a1f
20 changed files with 301 additions and 184 deletions

View File

@@ -251,7 +251,7 @@ module Compiler
pbCompilerEachPreppedLine("PBS/moves.txt") { |line, line_no|
line = pbGetCsvRecord(line, line_no, [0, "vnssueeuuuyiss",
nil, nil, nil, nil, nil, :Type, ["Physical", "Special", "Status"],
nil, nil, nil, PBTargets, nil, nil, nil
nil, nil, nil, :Target, nil, nil, nil
])
move_number = line[0]
move_symbol = line[1].to_sym
@@ -279,7 +279,7 @@ module Compiler
:accuracy => line[7],
:total_pp => line[8],
:effect_chance => line[9],
:target => line[10],
:target => GameData::Target.get(line[10]).id,
:priority => line[11],
:flags => line[12],
:description => line[13]
@@ -477,7 +477,7 @@ module Compiler
:height => contents["Height"],
:weight => contents["Weight"],
:color => contents["Color"],
:shape => contents["Shape"],
:shape => GameData::BodyShape.get(contents["Shape"]).id,
:habitat => contents["Habitat"],
:generation => contents["Generation"],
:back_sprite_x => contents["BattlerPlayerX"],
@@ -668,7 +668,7 @@ module Compiler
:height => contents["Height"] || base_data.height,
:weight => contents["Weight"] || base_data.weight,
:color => contents["Color"] || base_data.color,
:shape => contents["Shape"] || base_data.shape,
:shape => (contents["Shape"]) ? GameData::BodyShape.get(contents["Shape"]).id : base_data.shape,
:habitat => contents["Habitat"] || base_data.habitat,
:generation => contents["Generation"] || base_data.generation,
:mega_stone => contents["MegaStone"],

View File

@@ -193,7 +193,7 @@ module Compiler
m.accuracy,
m.total_pp,
m.effect_chance,
(getConstantName(PBTargets, m.target) rescue sprintf("%d", m.target)),
m.target,
m.priority,
csvQuote(m.flags),
csvQuoteAlways(m.real_description)
@@ -301,7 +301,7 @@ module Compiler
f.write(sprintf("Height = %.1f\r\n", species.height / 10.0))
f.write(sprintf("Weight = %.1f\r\n", species.weight / 10.0))
f.write(sprintf("Color = %s\r\n", species.color))
f.write(sprintf("Shape = %s\r\n", GameData::BodyShape.get(species.shape).id))
f.write(sprintf("Shape = %s\r\n", species.shape))
f.write(sprintf("Habitat = %s\r\n", species.habitat)) if species.habitat != :None
f.write(sprintf("Kind = %s\r\n", species.real_category))
f.write(sprintf("Pokedex = %s\r\n", species.real_pokedex_entry))
@@ -397,9 +397,7 @@ module Compiler
f.write(sprintf("Height = %.1f\r\n", species.height / 10.0)) if species.height != base_species.height
f.write(sprintf("Weight = %.1f\r\n", species.weight / 10.0)) if species.weight != base_species.weight
f.write(sprintf("Color = %s\r\n", species.color)) if species.color != base_species.color
if GameData::BodyShape.get(species.shape).id != GameData::BodyShape.get(base_species.shape).id
f.write(sprintf("Shape = %s\r\n", GameData::BodyShape.get(species.shape).id))
end
f.write(sprintf("Shape = %s\r\n", species.shape)) if species.shape != base_species.shape
if species.habitat != :None && species.habitat != base_species.habitat
f.write(sprintf("Habitat = %s\r\n", species.habitat))
end