Fixed some warning messages relating to compiling moves.txt

This commit is contained in:
Maruno17
2022-05-29 18:53:24 +01:00
parent 6a046ff755
commit 8310114252

View File

@@ -303,9 +303,11 @@ module Compiler
if move_hash if move_hash
# Sanitise data # Sanitise data
if (move_hash[:category] || 2) == 2 && (move_hash[:base_damage] || 0) != 0 if (move_hash[:category] || 2) == 2 && (move_hash[:base_damage] || 0) != 0
raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.\r\n{2}", line[2], FileLineData.linereport) raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.\r\n{2}",
move_hash[:name], FileLineData.linereport)
elsif (move_hash[:category] || 2) != 2 && (move_hash[:base_damage] || 0) == 0 elsif (move_hash[:category] || 2) != 2 && (move_hash[:base_damage] || 0) == 0
print _INTL("Warning: Move {1} was defined as Physical or Special but had a base damage of 0. Changing it to a Status move.\r\n{2}", line[2], FileLineData.linereport) print _INTL("Warning: Move {1} was defined as Physical or Special but had a base damage of 0. Changing it to a Status move.\r\n{2}",
move_hash[:name], FileLineData.linereport)
move_hash[:category] = 2 move_hash[:category] = 2
end end
GameData::Move.register(move_hash) GameData::Move.register(move_hash)
@@ -341,9 +343,11 @@ module Compiler
if move_hash if move_hash
# Sanitise data # Sanitise data
if (move_hash[:category] || 2) == 2 && (move_hash[:base_damage] || 0) != 0 if (move_hash[:category] || 2) == 2 && (move_hash[:base_damage] || 0) != 0
raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.\r\n{2}", line[2], FileLineData.linereport) raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.\r\n{2}",
move_hash[:name], FileLineData.linereport)
elsif (move_hash[:category] || 2) != 2 && (move_hash[:base_damage] || 0) == 0 elsif (move_hash[:category] || 2) != 2 && (move_hash[:base_damage] || 0) == 0
print _INTL("Warning: Move {1} was defined as Physical or Special but had a base damage of 0. Changing it to a Status move.\r\n{2}", line[2], FileLineData.linereport) print _INTL("Warning: Move {1} was defined as Physical or Special but had a base damage of 0. Changing it to a Status move.\r\n{2}",
move_hash[:name], FileLineData.linereport)
move_hash[:category] = 2 move_hash[:category] = 2
end end
GameData::Move.register(move_hash) GameData::Move.register(move_hash)