From afd7b090b91e5f828aacd12501b9aca72e364847 Mon Sep 17 00:00:00 2001 From: jonisavo Date: Sun, 6 Sep 2020 08:41:27 +0300 Subject: [PATCH] Use PokeBattle_Battler#isSpecies? instead of isConst? --- .../001_Battler/002_Battler_Initialize.rb | 2 +- .../001_Battler/003_Battler_ChangeSelf.rb | 16 +++++++------- .../001_Battler/007_Battler_UseMove.rb | 2 +- .../010_Battler_UseMove_TriggerEffects.rb | 2 +- .../002_Move/005_Move_Effects_000-07F.rb | 4 ++-- .../002_Move/006_Move_Effects_080-0FF.rb | 4 ++-- .../002_Move/007_Move_Effects_100-17F.rb | 12 +++++----- .../003_Battle/001_PokeBattle_BattleCommon.rb | 22 +++++++++---------- .../003_Battle/009_Battle_Action_Other.rb | 10 ++++----- .../004_AI/005_AI_Move_EffectScores.rb | 2 +- .../004_PokeBattle_SceneElements.rb | 4 ++-- .../007_BattleHandlers_Abilities.rb | 6 ++--- .../012_Battle/008_BattleHandlers_Items.rb | 22 +++++++++---------- 13 files changed, 53 insertions(+), 55 deletions(-) diff --git a/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb b/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb index 90d270608..8d95feaae 100644 --- a/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb +++ b/Data/Scripts/012_Battle/001_Battler/002_Battler_Initialize.rb @@ -108,7 +108,7 @@ class PokeBattle_Battler end # These effects are passed on if Baton Pass is used, but they need to be # cancelled in certain circumstances anyway - @effects[PBEffects::Telekinesis] = 0 if isConst?(@species,PBSpecies,:GENGAR) && mega? + @effects[PBEffects::Telekinesis] = 0 if isSpecies?(:GENGAR) && mega? @effects[PBEffects::GastroAcid] = false if nonNegatableAbility? else # These effects are passed on if Baton Pass is used diff --git a/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb b/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb index 82c1ddfb9..9c30e12d8 100644 --- a/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb +++ b/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb @@ -149,7 +149,7 @@ class PokeBattle_Battler def pbCheckFormOnStatusChange return if fainted? || @effects[PBEffects::Transform] # Shaymin - reverts if frozen - if isConst?(@species,PBSpecies,:SHAYMIN) && frozen? + if isSpecies?(:SHAYMIN) && frozen? pbChangeForm(0,_INTL("{1} transformed!",pbThis)) end end @@ -157,7 +157,7 @@ class PokeBattle_Battler def pbCheckFormOnMovesetChange return if fainted? || @effects[PBEffects::Transform] # Keldeo - knowing Secret Sword - if isConst?(@species,PBSpecies,:KELDEO) + if isSpecies?(:KELDEO) newForm = 0 newForm = 1 if pbHasMove?(:SECRETSWORD) pbChangeForm(newForm,_INTL("{1} transformed!",pbThis)) @@ -167,7 +167,7 @@ class PokeBattle_Battler def pbCheckFormOnWeatherChange return if fainted? || @effects[PBEffects::Transform] # Castform - Forecast - if isConst?(@species,PBSpecies,:CASTFORM) + if isSpecies?(:CASTFORM) if hasActiveAbility?(:FORECAST) newForm = 0 case @battle.pbWeather @@ -185,7 +185,7 @@ class PokeBattle_Battler end end # Cherrim - Flower Gift - if isConst?(@species,PBSpecies,:CHERRIM) + if isSpecies?(:CHERRIM) if hasActiveAbility?(:FLOWERGIFT) newForm = 0 case @battle.pbWeather @@ -210,7 +210,7 @@ class PokeBattle_Battler # Form changes upon entering battle and when the weather changes pbCheckFormOnWeatherChange if !endOfRound # Darmanitan - Zen Mode - if isConst?(@species,PBSpecies,:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE) + if isSpecies?(:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE) if @hp<=@totalhp/2 if @form!=1 @battle.pbShowAbilitySplash(self,true) @@ -224,7 +224,7 @@ class PokeBattle_Battler end end # Minior - Shields Down - if isConst?(@species,PBSpecies,:MINIOR) && isConst?(@ability,PBAbilities,:SHIELDSDOWN) + if isSpecies?(:MINIOR) && isConst?(@ability,PBAbilities,:SHIELDSDOWN) if @hp>@totalhp/2 # Turn into Meteor form newForm = (@form>=7) ? @form-7 : @form if @form!=newForm @@ -241,7 +241,7 @@ class PokeBattle_Battler end end # Wishiwashi - Schooling - if isConst?(@species,PBSpecies,:WISHIWASHI) && isConst?(@ability,PBAbilities,:SCHOOLING) + if isSpecies?(:WISHIWASHI) && isConst?(@ability,PBAbilities,:SCHOOLING) if @level>=20 && @hp>@totalhp/4 if @form!=1 @battle.pbShowAbilitySplash(self,true) @@ -255,7 +255,7 @@ class PokeBattle_Battler end end # Zygarde - Power Construct - if isConst?(@species,PBSpecies,:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) && + if isSpecies?(:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) && endOfRound if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme newForm = @form+2 diff --git a/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb b/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb index 1f35d2a07..206a363ad 100644 --- a/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/012_Battle/001_Battler/007_Battler_UseMove.rb @@ -216,7 +216,7 @@ class PokeBattle_Battler end end # Stance Change - if isConst?(@species,PBSpecies,:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE) + if isSpecies?(:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE) if move.damagingMove? pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis)) elsif isConst?(move.id,PBMoves,:KINGSSHIELD) diff --git a/Data/Scripts/012_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb b/Data/Scripts/012_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb index bce445b48..d9c211ba0 100644 --- a/Data/Scripts/012_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb +++ b/Data/Scripts/012_Battle/001_Battler/010_Battler_UseMove_TriggerEffects.rb @@ -96,7 +96,7 @@ class PokeBattle_Battler end # Greninja - Battle Bond if !user.fainted? && !user.effects[PBEffects::Transform] && - isConst?(user.species,PBSpecies,:GRENINJA) && + user.isSpecies?(:GRENINJA) && isConst?(user.ability,PBAbilities,:BATTLEBOND) if !@battle.pbAllFainted?(user.idxOpposingSide) && !@battle.battleBond[user.index&1][user.pokemonIndex] diff --git a/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb b/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb index 2771e3c39..29948b1f0 100644 --- a/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb +++ b/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb @@ -33,7 +33,7 @@ end class PokeBattle_Move_003 < PokeBattle_SleepMove def pbMoveFailed?(user,targets) if NEWEST_BATTLE_MECHANICS && isConst?(@id,PBMoves,:DARKVOID) - if !isConst?(user.species,PBSpecies,:DARKRAI) && + if !user.isSpecies?(:DARKRAI) && !isConst?(user.effects[PBEffects::TransformSpecies],PBSpecies,:DARKRAI) @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis)) return true @@ -46,7 +46,7 @@ class PokeBattle_Move_003 < PokeBattle_SleepMove return if numHits==0 return if user.fainted? || user.effects[PBEffects::Transform] return if !isConst?(@id,PBMoves,:RELICSONG) - return if !isConst?(user.species,PBSpecies,:MELOETTA) + return if !user.isSpecies?(:MELOETTA) return if user.hasActiveAbility?(:SHEERFORCE) && @addlEffect>0 newForm = (oldForm+1)%2 user.pbChangeForm(newForm,_INTL("{1} transformed!",user.pbThis)) diff --git a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb index f603f62f4..648b70498 100644 --- a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb +++ b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb @@ -1969,7 +1969,7 @@ class PokeBattle_Move_0C0 < PokeBattle_Move def pbNumHits(user,targets) if isConst?(@id,PBMoves,:WATERSHURIKEN) && - isConst?(user.species,PBSpecies,:GRENINJA) && user.form==1 + user.isSpecies?(:GRENINJA) && user.form==1 return 3 end hitChances = [2,2,3,3,4,5] @@ -1980,7 +1980,7 @@ class PokeBattle_Move_0C0 < PokeBattle_Move def pbBaseDamage(baseDmg,user,target) if isConst?(@id,PBMoves,:WATERSHURIKEN) && - isConst?(user.species,PBSpecies,:GRENINJA) && user.form==1 + user.isSpecies?(:GRENINJA) && user.form==1 return 20 end return super diff --git a/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb b/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb index 0515f27d9..31d0db3c3 100644 --- a/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb +++ b/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb @@ -730,11 +730,11 @@ class PokeBattle_Move_11A < PokeBattle_Move @battle.pbDisplay(_INTL("But it failed!")) return true end - if isConst?(target.species,PBSpecies,:DIGLETT) || - isConst?(target.species,PBSpecies,:DUGTRIO) || - isConst?(target.species,PBSpecies,:SANDYGAST) || - isConst?(target.species,PBSpecies,:PALOSSAND) || - (isConst?(target.species,PBSpecies,:GENGAR) && target.mega?) + if target.isSpecies?(:DIGLETT) || + target.isSpecies?(:DUGTRIO) || + target.isSpecies?(:SANDYGAST) || + target.isSpecies?(:PALOSSAND) || + (target.isSpecies?(:GENGAR) && target.mega?) @battle.pbDisplay(_INTL("But it failed!")) return true end @@ -1202,7 +1202,7 @@ class PokeBattle_Move_13B < PokeBattle_StatDownMove end def pbMoveFailed?(user,targets) - if !isConst?(user.species,PBSpecies,:HOOPA) + if !user.isSpecies?(:HOOPA) @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis(true))) return true elsif user.form!=1 diff --git a/Data/Scripts/012_Battle/003_Battle/001_PokeBattle_BattleCommon.rb b/Data/Scripts/012_Battle/003_Battle/001_PokeBattle_BattleCommon.rb index bd9b59227..7abda421a 100644 --- a/Data/Scripts/012_Battle/003_Battle/001_PokeBattle_BattleCommon.rb +++ b/Data/Scripts/012_Battle/003_Battle/001_PokeBattle_BattleCommon.rb @@ -170,17 +170,17 @@ module PokeBattle_BattleCommon rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesRareness) end # Modify rareness depending on the Poké Ball's effect - ultraBeast = (isConst?(battler.species,PBSpecies,:NIHILEGO) || - isConst?(battler.species,PBSpecies,:BUZZWOLE) || - isConst?(battler.species,PBSpecies,:PHEROMOSA) || - isConst?(battler.species,PBSpecies,:XURKITREE) || - isConst?(battler.species,PBSpecies,:CELESTEELA) || - isConst?(battler.species,PBSpecies,:KARTANA) || - isConst?(battler.species,PBSpecies,:GUZZLORD) || - isConst?(battler.species,PBSpecies,:POIPOLE) || - isConst?(battler.species,PBSpecies,:NAGANADEL) || - isConst?(battler.species,PBSpecies,:STAKATAKA) || - isConst?(battler.species,PBSpecies,:BLACEPHALON)) + ultraBeast = (battler.isSpecies?(:NIHILEGO) || + battler.isSpecies?(:BUZZWOLE) || + battler.isSpecies?(:PHEROMOSA) || + battler.isSpecies?(:XURKITREE) || + battler.isSpecies?(:CELESTEELA) || + battler.isSpecies?(:KARTANA) || + battler.isSpecies?(:GUZZLORD) || + battler.isSpecies?(:POIPOLE) || + battler.isSpecies?(:NAGANADEL) || + battler.isSpecies?(:STAKATAKA) || + battler.isSpecies?(:BLACEPHALON)) if !ultraBeast || isConst?(ball,PBItems,:BEASTBALL) rareness = BallHandlers.modifyCatchRate(ball,rareness,self,battler,ultraBeast) else diff --git a/Data/Scripts/012_Battle/003_Battle/009_Battle_Action_Other.rb b/Data/Scripts/012_Battle/003_Battle/009_Battle_Action_Other.rb index 3486dad05..58e8f5f77 100644 --- a/Data/Scripts/012_Battle/003_Battle/009_Battle_Action_Other.rb +++ b/Data/Scripts/012_Battle/003_Battle/009_Battle_Action_Other.rb @@ -157,7 +157,7 @@ class PokeBattle_Battle side = battler.idxOwnSide owner = pbGetOwnerIndexFromBattlerIndex(idxBattler) @megaEvolution[side][owner] = -2 - if isConst?(battler.species,PBSpecies,:GENGAR) && battler.mega? + if battler.isSpecies?(:GENGAR) && battler.mega? battler.effects[PBEffects::Telekinesis] = 0 end pbCalculatePriority(false,[idxBattler]) if NEWEST_BATTLE_MECHANICS @@ -172,9 +172,9 @@ class PokeBattle_Battle battler = @battlers[idxBattler] return if !battler || !battler.pokemon return if !battler.hasPrimal? || battler.primal? - if isConst?(battler.pokemon.species,PBSpecies,:KYOGRE) + if battler.isSpecies?(:KYOGRE) pbCommonAnimation("PrimalKyogre",battler) - elsif isConst?(battler.pokemon.species,PBSpecies,:GROUDON) + elsif battler.isSpecies?(:GROUDON) pbCommonAnimation("PrimalGroudon",battler) end battler.pokemon.makePrimal @@ -182,9 +182,9 @@ class PokeBattle_Battle battler.pbUpdate(true) @scene.pbChangePokemon(battler,battler.pokemon) @scene.pbRefreshOne(idxBattler) - if isConst?(battler.pokemon.species,PBSpecies,:KYOGRE) + if battler.isSpecies?(:KYOGRE) pbCommonAnimation("PrimalKyogre2",battler) - elsif isConst?(battler.pokemon.species,PBSpecies,:GROUDON) + elsif battler.isSpecies?(:GROUDON) pbCommonAnimation("PrimalGroudon2",battler) end pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis)) diff --git a/Data/Scripts/012_Battle/004_AI/005_AI_Move_EffectScores.rb b/Data/Scripts/012_Battle/004_AI/005_AI_Move_EffectScores.rb index e02d995d8..648cd65be 100644 --- a/Data/Scripts/012_Battle/004_AI/005_AI_Move_EffectScores.rb +++ b/Data/Scripts/012_Battle/004_AI/005_AI_Move_EffectScores.rb @@ -2627,7 +2627,7 @@ class PokeBattle_AI score += avg/2 #--------------------------------------------------------------------------- when "13B" - if !isConst?(user.species,PBSpecies,:HOOPA) || user.form!=1 + if !user.isSpecies?(:HOOPA) || user.form!=1 score -= 100 else score += 20 if target.stages[PBStats::DEFENSE]>0 diff --git a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb index 527bfd4e0..04e0bf2ca 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb @@ -234,9 +234,9 @@ class PokemonDataBox < SpriteWrapper imagePos.push(["Graphics/Pictures/Battle/icon_mega",@spriteBaseX+8,34]) elsif @battler.primal? primalX = (@battler.opposes?) ? 208 : -28 # Foe's/player's - if isConst?(@battler.pokemon.species,PBSpecies,:KYOGRE) + if @battler.isSpecies?(:KYOGRE) imagePos.push(["Graphics/Pictures/Battle/icon_primal_Kyogre",@spriteBaseX+primalX,4]) - elsif isConst?(@battler.pokemon.species,PBSpecies,:GROUDON) + elsif @battler.isSpecies?(:GROUDON) imagePos.push(["Graphics/Pictures/Battle/icon_primal_Groudon",@spriteBaseX+primalX,4]) end end diff --git a/Data/Scripts/012_Battle/007_BattleHandlers_Abilities.rb b/Data/Scripts/012_Battle/007_BattleHandlers_Abilities.rb index 53504a98e..0b447167b 100644 --- a/Data/Scripts/012_Battle/007_BattleHandlers_Abilities.rb +++ b/Data/Scripts/012_Battle/007_BattleHandlers_Abilities.rb @@ -119,7 +119,7 @@ BattleHandlers::AbilityOnHPDroppedBelowHalf.copy(:EMERGENCYEXIT,:WIMPOUT) BattleHandlers::StatusCheckAbilityNonIgnorable.add(:COMATOSE, proc { |ability,battler,status| - next false if !isConst?(battler.species,PBSpecies,:KOMALA) + next false if !battler.isSpecies?(:KOMALA) next true if status.nil? || status==PBStatuses::SLEEP } ) @@ -181,13 +181,13 @@ BattleHandlers::StatusImmunityAbility.copy(:WATERVEIL,:WATERBUBBLE) BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:COMATOSE, proc { |ability,battler,status| - next true if isConst?(battler.species,PBSpecies,:KOMALA) + next true if battler.isSpecies?(:KOMALA) } ) BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:SHIELDSDOWN, proc { |ability,battler,status| - next true if isConst?(battler.species,PBSpecies,:MINIOR) && battler.form<7 + next true if battler.isSpecies?(:MINIOR) && battler.form<7 } ) diff --git a/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb b/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb index 338bfab5b..29e679297 100644 --- a/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb +++ b/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb @@ -20,7 +20,7 @@ BattleHandlers::SpeedCalcItem.copy(:MACHOBRACE,:POWERANKLET,:POWERBAND, BattleHandlers::SpeedCalcItem.add(:QUICKPOWDER, proc { |item,battler,mult| - next mult*2 if isConst?(battler.species,PBSpecies,:DITTO) && + next mult*2 if battler.isSpecies?(:DITTO) && !battler.effects[PBEffects::Transform] } ) @@ -442,7 +442,7 @@ BattleHandlers::AccuracyCalcTargetItem.copy(:BRIGHTPOWDER,:LAXINCENSE) BattleHandlers::DamageCalcUserItem.add(:ADAMANTORB, proc { |item,user,target,move,mults,baseDmg,type| - if isConst?(user.species,PBSpecies,:DIALGA) && + if user.isSpecies?(:DIALGA) && (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:STEEL)) mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round end @@ -499,7 +499,7 @@ BattleHandlers::DamageCalcUserItem.add(:DARKGEM, BattleHandlers::DamageCalcUserItem.add(:DEEPSEATOOTH, proc { |item,user,target,move,mults,baseDmg,type| - if isConst?(user.species,PBSpecies,:CLAMPERL) && move.specialMove? + if user.isSpecies?(:CLAMPERL) && move.specialMove? mults[ATK_MULT] *= 2 end } @@ -571,7 +571,7 @@ BattleHandlers::DamageCalcUserItem.add(:GRASSGEM, BattleHandlers::DamageCalcUserItem.add(:GRISEOUSORB, proc { |item,user,target,move,mults,baseDmg,type| - if isConst?(user.species,PBSpecies,:GIRATINA) && + if user.isSpecies?(:GIRATINA) && (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:GHOST)) mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round end @@ -608,7 +608,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIFEORB, BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL, proc { |item,user,target,move,mults,baseDmg,type| - if isConst?(user.species,PBSpecies,:PIKACHU) + if user.isSpecies?(:PIKACHU) mults[ATK_MULT] *= 2 end } @@ -616,7 +616,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL, BattleHandlers::DamageCalcUserItem.add(:LUSTROUSORB, proc { |item,user,target,move,mults,baseDmg,type| - if isConst?(user.species,PBSpecies,:PALKIA) && + if user.isSpecies?(:PALKIA) && (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:WATER)) mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round end @@ -746,8 +746,7 @@ BattleHandlers::DamageCalcUserItem.copy(:SOFTSAND,:EARTHPLATE) BattleHandlers::DamageCalcUserItem.add(:SOULDEW, proc { |item,user,target,move,mults,baseDmg,type| - next if !isConst?(user.species,PBSpecies,:LATIAS) && - !isConst?(user.species,PBSpecies,:LATIOS) + next if !user.isSpecies?(:LATIAS) && !user.isSpecies?(:LATIOS) if NEWEST_BATTLE_MECHANICS if isConst?(type,PBTypes,:PSYCHIC) || isConst?(type,PBTypes,:DRAGON) mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]*1.2).round @@ -776,8 +775,7 @@ BattleHandlers::DamageCalcUserItem.add(:STEELGEM, BattleHandlers::DamageCalcUserItem.add(:THICKCLUB, proc { |item,user,target,move,mults,baseDmg,type| - if (isConst?(user.species,PBSpecies,:CUBONE) || - isConst?(user.species,PBSpecies,:MAROWAK)) && move.physicalMove? + if (user.isSpecies?(:CUBONE) || user.isSpecies?(:MAROWAK)) && move.physicalMove? mults[ATK_MULT] *= 2 end } @@ -969,7 +967,7 @@ BattleHandlers::DamageCalcTargetItem.add(:YACHEBERRY, BattleHandlers::CriticalCalcUserItem.add(:LUCKYPUNCH, proc { |item,user,target,c| - next c+2 if isConst?(user.species,PBSpecies,:CHANSEY) + next c+2 if user.isSpecies?(:CHANSEY) } ) @@ -983,7 +981,7 @@ BattleHandlers::CriticalCalcUserItem.copy(:RAZORCLAW,:SCOPELENS) BattleHandlers::CriticalCalcUserItem.add(:STICK, proc { |item,user,target,c| - next c+2 if isConst?(user.species,PBSpecies,:FARFETCHD) + next c+2 if user.isSpecies?(:FARFETCHD) } )