From dd780756576d7d36f4af5340c3d5baed6cdb8f83 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Tue, 15 Feb 2022 19:16:55 +0000 Subject: [PATCH] Minor tweaks to compiling item data --- Data/Scripts/010_Data/002_PBS data/006_Item.rb | 8 +++----- Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Data/Scripts/010_Data/002_PBS data/006_Item.rb b/Data/Scripts/010_Data/002_PBS data/006_Item.rb index 1af717dc1..529144fe8 100644 --- a/Data/Scripts/010_Data/002_PBS data/006_Item.rb +++ b/Data/Scripts/010_Data/002_PBS data/006_Item.rb @@ -24,11 +24,9 @@ module GameData "SellPrice" => [:sell_price, "u"], "Description" => [:description, "q"], "FieldUse" => [:field_use, "e", { "OnPokemon" => 1, "Direct" => 2, "TM" => 3, - "HM" => 4, "OnPokemonReusable" => 1, "TR" => 6 }], + "HM" => 4, "TR" => 5 }], "BattleUse" => [:battle_use, "e", { "OnPokemon" => 1, "OnMove" => 2, "OnBattler" => 3, - "OnFoe" => 4, "Direct" => 5, "OnPokemonReusable" => 1, - "OnMoveReusable" => 2, "OnBattlerReusable" => 3, - "OnFoeReusable" => 4, "DirectReusable" => 5 }], + "OnFoe" => 4, "Direct" => 5 }], "Consumable" => [:consumable, "b"], "Flags" => [:flags, "*s"], "Move" => [:move, "e", :Move] @@ -119,7 +117,7 @@ module GameData def is_TM?; return @field_use == 3; end def is_HM?; return @field_use == 4; end - def is_TR?; return @field_use == 6; end + def is_TR?; return @field_use == 5; end def is_machine?; return is_TM? || is_HM? || is_TR?; end def is_mail?; return has_flag?("Mail") || has_flag?("IconMail"); end def is_icon_mail?; return has_flag?("IconMail"); end diff --git a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb index 8cb867cd8..98773dabc 100644 --- a/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb +++ b/Data/Scripts/021_Compiler/002_Compiler_CompilePBS.rb @@ -478,6 +478,7 @@ module Compiler end consumable = !([3, 4, 5].include?(line[7]) || line[8] >= 6) line[7] = 1 if line[7] == 5 + line[7] = 5 if line[7] == 6 line[8] -= 5 if line[8] > 5 flags = [] flags.push(line[9]) if !nil_or_empty?(line[9])