From 9ecbee910d3ee167fad8e41cbbac8066299c3e9a Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 28 May 2022 23:07:55 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20error=20when=20calculating=20type=20eff?= =?UTF-8?q?ectiveness=20against=20a=20Pok=C3=A9mon=20with=20no=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/010_Data/002_PBS data/003_Type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/Scripts/010_Data/002_PBS data/003_Type.rb b/Data/Scripts/010_Data/002_PBS data/003_Type.rb index 0e5a2b457..7ee4bd041 100644 --- a/Data/Scripts/010_Data/002_PBS data/003_Type.rb +++ b/Data/Scripts/010_Data/002_PBS data/003_Type.rb @@ -126,7 +126,7 @@ module Effectiveness end def calculate(attack_type, defend_type1, defend_type2 = nil, defend_type3 = nil) - mod1 = calculate_one(attack_type, defend_type1) + mod1 = (defend_type1) ? calculate_one(attack_type, defend_type1) : NORMAL_EFFECTIVE_ONE mod2 = NORMAL_EFFECTIVE_ONE mod3 = NORMAL_EFFECTIVE_ONE if defend_type2 && defend_type1 != defend_type2