Use PokeBattle_Battler#isSpecies? instead of isConst?

This commit is contained in:
jonisavo
2020-09-06 08:41:27 +03:00
parent 7fb1281eab
commit afd7b090b9
13 changed files with 53 additions and 55 deletions

View File

@@ -108,7 +108,7 @@ class PokeBattle_Battler
end end
# These effects are passed on if Baton Pass is used, but they need to be # These effects are passed on if Baton Pass is used, but they need to be
# cancelled in certain circumstances anyway # 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? @effects[PBEffects::GastroAcid] = false if nonNegatableAbility?
else else
# These effects are passed on if Baton Pass is used # These effects are passed on if Baton Pass is used

View File

@@ -149,7 +149,7 @@ class PokeBattle_Battler
def pbCheckFormOnStatusChange def pbCheckFormOnStatusChange
return if fainted? || @effects[PBEffects::Transform] return if fainted? || @effects[PBEffects::Transform]
# Shaymin - reverts if frozen # Shaymin - reverts if frozen
if isConst?(@species,PBSpecies,:SHAYMIN) && frozen? if isSpecies?(:SHAYMIN) && frozen?
pbChangeForm(0,_INTL("{1} transformed!",pbThis)) pbChangeForm(0,_INTL("{1} transformed!",pbThis))
end end
end end
@@ -157,7 +157,7 @@ class PokeBattle_Battler
def pbCheckFormOnMovesetChange def pbCheckFormOnMovesetChange
return if fainted? || @effects[PBEffects::Transform] return if fainted? || @effects[PBEffects::Transform]
# Keldeo - knowing Secret Sword # Keldeo - knowing Secret Sword
if isConst?(@species,PBSpecies,:KELDEO) if isSpecies?(:KELDEO)
newForm = 0 newForm = 0
newForm = 1 if pbHasMove?(:SECRETSWORD) newForm = 1 if pbHasMove?(:SECRETSWORD)
pbChangeForm(newForm,_INTL("{1} transformed!",pbThis)) pbChangeForm(newForm,_INTL("{1} transformed!",pbThis))
@@ -167,7 +167,7 @@ class PokeBattle_Battler
def pbCheckFormOnWeatherChange def pbCheckFormOnWeatherChange
return if fainted? || @effects[PBEffects::Transform] return if fainted? || @effects[PBEffects::Transform]
# Castform - Forecast # Castform - Forecast
if isConst?(@species,PBSpecies,:CASTFORM) if isSpecies?(:CASTFORM)
if hasActiveAbility?(:FORECAST) if hasActiveAbility?(:FORECAST)
newForm = 0 newForm = 0
case @battle.pbWeather case @battle.pbWeather
@@ -185,7 +185,7 @@ class PokeBattle_Battler
end end
end end
# Cherrim - Flower Gift # Cherrim - Flower Gift
if isConst?(@species,PBSpecies,:CHERRIM) if isSpecies?(:CHERRIM)
if hasActiveAbility?(:FLOWERGIFT) if hasActiveAbility?(:FLOWERGIFT)
newForm = 0 newForm = 0
case @battle.pbWeather case @battle.pbWeather
@@ -210,7 +210,7 @@ class PokeBattle_Battler
# Form changes upon entering battle and when the weather changes # Form changes upon entering battle and when the weather changes
pbCheckFormOnWeatherChange if !endOfRound pbCheckFormOnWeatherChange if !endOfRound
# Darmanitan - Zen Mode # Darmanitan - Zen Mode
if isConst?(@species,PBSpecies,:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE) if isSpecies?(:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE)
if @hp<=@totalhp/2 if @hp<=@totalhp/2
if @form!=1 if @form!=1
@battle.pbShowAbilitySplash(self,true) @battle.pbShowAbilitySplash(self,true)
@@ -224,7 +224,7 @@ class PokeBattle_Battler
end end
end end
# Minior - Shields Down # 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 if @hp>@totalhp/2 # Turn into Meteor form
newForm = (@form>=7) ? @form-7 : @form newForm = (@form>=7) ? @form-7 : @form
if @form!=newForm if @form!=newForm
@@ -241,7 +241,7 @@ class PokeBattle_Battler
end end
end end
# Wishiwashi - Schooling # 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 @level>=20 && @hp>@totalhp/4
if @form!=1 if @form!=1
@battle.pbShowAbilitySplash(self,true) @battle.pbShowAbilitySplash(self,true)
@@ -255,7 +255,7 @@ class PokeBattle_Battler
end end
end end
# Zygarde - Power Construct # Zygarde - Power Construct
if isConst?(@species,PBSpecies,:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) && if isSpecies?(:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) &&
endOfRound endOfRound
if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme
newForm = @form+2 newForm = @form+2

View File

@@ -216,7 +216,7 @@ class PokeBattle_Battler
end end
end end
# Stance Change # Stance Change
if isConst?(@species,PBSpecies,:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE) if isSpecies?(:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE)
if move.damagingMove? if move.damagingMove?
pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis)) pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis))
elsif isConst?(move.id,PBMoves,:KINGSSHIELD) elsif isConst?(move.id,PBMoves,:KINGSSHIELD)

View File

@@ -96,7 +96,7 @@ class PokeBattle_Battler
end end
# Greninja - Battle Bond # Greninja - Battle Bond
if !user.fainted? && !user.effects[PBEffects::Transform] && if !user.fainted? && !user.effects[PBEffects::Transform] &&
isConst?(user.species,PBSpecies,:GRENINJA) && user.isSpecies?(:GRENINJA) &&
isConst?(user.ability,PBAbilities,:BATTLEBOND) isConst?(user.ability,PBAbilities,:BATTLEBOND)
if !@battle.pbAllFainted?(user.idxOpposingSide) && if !@battle.pbAllFainted?(user.idxOpposingSide) &&
!@battle.battleBond[user.index&1][user.pokemonIndex] !@battle.battleBond[user.index&1][user.pokemonIndex]

View File

@@ -33,7 +33,7 @@ end
class PokeBattle_Move_003 < PokeBattle_SleepMove class PokeBattle_Move_003 < PokeBattle_SleepMove
def pbMoveFailed?(user,targets) def pbMoveFailed?(user,targets)
if NEWEST_BATTLE_MECHANICS && isConst?(@id,PBMoves,:DARKVOID) 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) !isConst?(user.effects[PBEffects::TransformSpecies],PBSpecies,:DARKRAI)
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis)) @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
return true return true
@@ -46,7 +46,7 @@ class PokeBattle_Move_003 < PokeBattle_SleepMove
return if numHits==0 return if numHits==0
return if user.fainted? || user.effects[PBEffects::Transform] return if user.fainted? || user.effects[PBEffects::Transform]
return if !isConst?(@id,PBMoves,:RELICSONG) 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 return if user.hasActiveAbility?(:SHEERFORCE) && @addlEffect>0
newForm = (oldForm+1)%2 newForm = (oldForm+1)%2
user.pbChangeForm(newForm,_INTL("{1} transformed!",user.pbThis)) user.pbChangeForm(newForm,_INTL("{1} transformed!",user.pbThis))

View File

@@ -1969,7 +1969,7 @@ class PokeBattle_Move_0C0 < PokeBattle_Move
def pbNumHits(user,targets) def pbNumHits(user,targets)
if isConst?(@id,PBMoves,:WATERSHURIKEN) && if isConst?(@id,PBMoves,:WATERSHURIKEN) &&
isConst?(user.species,PBSpecies,:GRENINJA) && user.form==1 user.isSpecies?(:GRENINJA) && user.form==1
return 3 return 3
end end
hitChances = [2,2,3,3,4,5] hitChances = [2,2,3,3,4,5]
@@ -1980,7 +1980,7 @@ class PokeBattle_Move_0C0 < PokeBattle_Move
def pbBaseDamage(baseDmg,user,target) def pbBaseDamage(baseDmg,user,target)
if isConst?(@id,PBMoves,:WATERSHURIKEN) && if isConst?(@id,PBMoves,:WATERSHURIKEN) &&
isConst?(user.species,PBSpecies,:GRENINJA) && user.form==1 user.isSpecies?(:GRENINJA) && user.form==1
return 20 return 20
end end
return super return super

View File

@@ -730,11 +730,11 @@ class PokeBattle_Move_11A < PokeBattle_Move
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
if isConst?(target.species,PBSpecies,:DIGLETT) || if target.isSpecies?(:DIGLETT) ||
isConst?(target.species,PBSpecies,:DUGTRIO) || target.isSpecies?(:DUGTRIO) ||
isConst?(target.species,PBSpecies,:SANDYGAST) || target.isSpecies?(:SANDYGAST) ||
isConst?(target.species,PBSpecies,:PALOSSAND) || target.isSpecies?(:PALOSSAND) ||
(isConst?(target.species,PBSpecies,:GENGAR) && target.mega?) (target.isSpecies?(:GENGAR) && target.mega?)
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
@@ -1202,7 +1202,7 @@ class PokeBattle_Move_13B < PokeBattle_StatDownMove
end end
def pbMoveFailed?(user,targets) 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))) @battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis(true)))
return true return true
elsif user.form!=1 elsif user.form!=1

View File

@@ -170,17 +170,17 @@ module PokeBattle_BattleCommon
rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesRareness) rareness = pbGetSpeciesData(pkmn.species,pkmn.form,SpeciesRareness)
end end
# Modify rareness depending on the Poké Ball's effect # Modify rareness depending on the Poké Ball's effect
ultraBeast = (isConst?(battler.species,PBSpecies,:NIHILEGO) || ultraBeast = (battler.isSpecies?(:NIHILEGO) ||
isConst?(battler.species,PBSpecies,:BUZZWOLE) || battler.isSpecies?(:BUZZWOLE) ||
isConst?(battler.species,PBSpecies,:PHEROMOSA) || battler.isSpecies?(:PHEROMOSA) ||
isConst?(battler.species,PBSpecies,:XURKITREE) || battler.isSpecies?(:XURKITREE) ||
isConst?(battler.species,PBSpecies,:CELESTEELA) || battler.isSpecies?(:CELESTEELA) ||
isConst?(battler.species,PBSpecies,:KARTANA) || battler.isSpecies?(:KARTANA) ||
isConst?(battler.species,PBSpecies,:GUZZLORD) || battler.isSpecies?(:GUZZLORD) ||
isConst?(battler.species,PBSpecies,:POIPOLE) || battler.isSpecies?(:POIPOLE) ||
isConst?(battler.species,PBSpecies,:NAGANADEL) || battler.isSpecies?(:NAGANADEL) ||
isConst?(battler.species,PBSpecies,:STAKATAKA) || battler.isSpecies?(:STAKATAKA) ||
isConst?(battler.species,PBSpecies,:BLACEPHALON)) battler.isSpecies?(:BLACEPHALON))
if !ultraBeast || isConst?(ball,PBItems,:BEASTBALL) if !ultraBeast || isConst?(ball,PBItems,:BEASTBALL)
rareness = BallHandlers.modifyCatchRate(ball,rareness,self,battler,ultraBeast) rareness = BallHandlers.modifyCatchRate(ball,rareness,self,battler,ultraBeast)
else else

View File

@@ -157,7 +157,7 @@ class PokeBattle_Battle
side = battler.idxOwnSide side = battler.idxOwnSide
owner = pbGetOwnerIndexFromBattlerIndex(idxBattler) owner = pbGetOwnerIndexFromBattlerIndex(idxBattler)
@megaEvolution[side][owner] = -2 @megaEvolution[side][owner] = -2
if isConst?(battler.species,PBSpecies,:GENGAR) && battler.mega? if battler.isSpecies?(:GENGAR) && battler.mega?
battler.effects[PBEffects::Telekinesis] = 0 battler.effects[PBEffects::Telekinesis] = 0
end end
pbCalculatePriority(false,[idxBattler]) if NEWEST_BATTLE_MECHANICS pbCalculatePriority(false,[idxBattler]) if NEWEST_BATTLE_MECHANICS
@@ -172,9 +172,9 @@ class PokeBattle_Battle
battler = @battlers[idxBattler] battler = @battlers[idxBattler]
return if !battler || !battler.pokemon return if !battler || !battler.pokemon
return if !battler.hasPrimal? || battler.primal? return if !battler.hasPrimal? || battler.primal?
if isConst?(battler.pokemon.species,PBSpecies,:KYOGRE) if battler.isSpecies?(:KYOGRE)
pbCommonAnimation("PrimalKyogre",battler) pbCommonAnimation("PrimalKyogre",battler)
elsif isConst?(battler.pokemon.species,PBSpecies,:GROUDON) elsif battler.isSpecies?(:GROUDON)
pbCommonAnimation("PrimalGroudon",battler) pbCommonAnimation("PrimalGroudon",battler)
end end
battler.pokemon.makePrimal battler.pokemon.makePrimal
@@ -182,9 +182,9 @@ class PokeBattle_Battle
battler.pbUpdate(true) battler.pbUpdate(true)
@scene.pbChangePokemon(battler,battler.pokemon) @scene.pbChangePokemon(battler,battler.pokemon)
@scene.pbRefreshOne(idxBattler) @scene.pbRefreshOne(idxBattler)
if isConst?(battler.pokemon.species,PBSpecies,:KYOGRE) if battler.isSpecies?(:KYOGRE)
pbCommonAnimation("PrimalKyogre2",battler) pbCommonAnimation("PrimalKyogre2",battler)
elsif isConst?(battler.pokemon.species,PBSpecies,:GROUDON) elsif battler.isSpecies?(:GROUDON)
pbCommonAnimation("PrimalGroudon2",battler) pbCommonAnimation("PrimalGroudon2",battler)
end end
pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis)) pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis))

View File

@@ -2627,7 +2627,7 @@ class PokeBattle_AI
score += avg/2 score += avg/2
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "13B" when "13B"
if !isConst?(user.species,PBSpecies,:HOOPA) || user.form!=1 if !user.isSpecies?(:HOOPA) || user.form!=1
score -= 100 score -= 100
else else
score += 20 if target.stages[PBStats::DEFENSE]>0 score += 20 if target.stages[PBStats::DEFENSE]>0

View File

@@ -234,9 +234,9 @@ class PokemonDataBox < SpriteWrapper
imagePos.push(["Graphics/Pictures/Battle/icon_mega",@spriteBaseX+8,34]) imagePos.push(["Graphics/Pictures/Battle/icon_mega",@spriteBaseX+8,34])
elsif @battler.primal? elsif @battler.primal?
primalX = (@battler.opposes?) ? 208 : -28 # Foe's/player's 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]) 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]) imagePos.push(["Graphics/Pictures/Battle/icon_primal_Groudon",@spriteBaseX+primalX,4])
end end
end end

View File

@@ -119,7 +119,7 @@ BattleHandlers::AbilityOnHPDroppedBelowHalf.copy(:EMERGENCYEXIT,:WIMPOUT)
BattleHandlers::StatusCheckAbilityNonIgnorable.add(:COMATOSE, BattleHandlers::StatusCheckAbilityNonIgnorable.add(:COMATOSE,
proc { |ability,battler,status| 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 next true if status.nil? || status==PBStatuses::SLEEP
} }
) )
@@ -181,13 +181,13 @@ BattleHandlers::StatusImmunityAbility.copy(:WATERVEIL,:WATERBUBBLE)
BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:COMATOSE, BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:COMATOSE,
proc { |ability,battler,status| proc { |ability,battler,status|
next true if isConst?(battler.species,PBSpecies,:KOMALA) next true if battler.isSpecies?(:KOMALA)
} }
) )
BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:SHIELDSDOWN, BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:SHIELDSDOWN,
proc { |ability,battler,status| proc { |ability,battler,status|
next true if isConst?(battler.species,PBSpecies,:MINIOR) && battler.form<7 next true if battler.isSpecies?(:MINIOR) && battler.form<7
} }
) )

View File

@@ -20,7 +20,7 @@ BattleHandlers::SpeedCalcItem.copy(:MACHOBRACE,:POWERANKLET,:POWERBAND,
BattleHandlers::SpeedCalcItem.add(:QUICKPOWDER, BattleHandlers::SpeedCalcItem.add(:QUICKPOWDER,
proc { |item,battler,mult| proc { |item,battler,mult|
next mult*2 if isConst?(battler.species,PBSpecies,:DITTO) && next mult*2 if battler.isSpecies?(:DITTO) &&
!battler.effects[PBEffects::Transform] !battler.effects[PBEffects::Transform]
} }
) )
@@ -442,7 +442,7 @@ BattleHandlers::AccuracyCalcTargetItem.copy(:BRIGHTPOWDER,:LAXINCENSE)
BattleHandlers::DamageCalcUserItem.add(:ADAMANTORB, BattleHandlers::DamageCalcUserItem.add(:ADAMANTORB,
proc { |item,user,target,move,mults,baseDmg,type| 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)) (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:STEEL))
mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round
end end
@@ -499,7 +499,7 @@ BattleHandlers::DamageCalcUserItem.add(:DARKGEM,
BattleHandlers::DamageCalcUserItem.add(:DEEPSEATOOTH, BattleHandlers::DamageCalcUserItem.add(:DEEPSEATOOTH,
proc { |item,user,target,move,mults,baseDmg,type| 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 mults[ATK_MULT] *= 2
end end
} }
@@ -571,7 +571,7 @@ BattleHandlers::DamageCalcUserItem.add(:GRASSGEM,
BattleHandlers::DamageCalcUserItem.add(:GRISEOUSORB, BattleHandlers::DamageCalcUserItem.add(:GRISEOUSORB,
proc { |item,user,target,move,mults,baseDmg,type| 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)) (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:GHOST))
mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round
end end
@@ -608,7 +608,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIFEORB,
BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL, BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL,
proc { |item,user,target,move,mults,baseDmg,type| proc { |item,user,target,move,mults,baseDmg,type|
if isConst?(user.species,PBSpecies,:PIKACHU) if user.isSpecies?(:PIKACHU)
mults[ATK_MULT] *= 2 mults[ATK_MULT] *= 2
end end
} }
@@ -616,7 +616,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL,
BattleHandlers::DamageCalcUserItem.add(:LUSTROUSORB, BattleHandlers::DamageCalcUserItem.add(:LUSTROUSORB,
proc { |item,user,target,move,mults,baseDmg,type| 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)) (isConst?(type,PBTypes,:DRAGON) || isConst?(type,PBTypes,:WATER))
mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round mults[BASE_DMG_MULT] = (mults[BASE_DMG_MULT]*1.2).round
end end
@@ -746,8 +746,7 @@ BattleHandlers::DamageCalcUserItem.copy(:SOFTSAND,:EARTHPLATE)
BattleHandlers::DamageCalcUserItem.add(:SOULDEW, BattleHandlers::DamageCalcUserItem.add(:SOULDEW,
proc { |item,user,target,move,mults,baseDmg,type| proc { |item,user,target,move,mults,baseDmg,type|
next if !isConst?(user.species,PBSpecies,:LATIAS) && next if !user.isSpecies?(:LATIAS) && !user.isSpecies?(:LATIOS)
!isConst?(user.species,PBSpecies,:LATIOS)
if NEWEST_BATTLE_MECHANICS if NEWEST_BATTLE_MECHANICS
if isConst?(type,PBTypes,:PSYCHIC) || isConst?(type,PBTypes,:DRAGON) if isConst?(type,PBTypes,:PSYCHIC) || isConst?(type,PBTypes,:DRAGON)
mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]*1.2).round mults[FINAL_DMG_MULT] = (mults[FINAL_DMG_MULT]*1.2).round
@@ -776,8 +775,7 @@ BattleHandlers::DamageCalcUserItem.add(:STEELGEM,
BattleHandlers::DamageCalcUserItem.add(:THICKCLUB, BattleHandlers::DamageCalcUserItem.add(:THICKCLUB,
proc { |item,user,target,move,mults,baseDmg,type| proc { |item,user,target,move,mults,baseDmg,type|
if (isConst?(user.species,PBSpecies,:CUBONE) || if (user.isSpecies?(:CUBONE) || user.isSpecies?(:MAROWAK)) && move.physicalMove?
isConst?(user.species,PBSpecies,:MAROWAK)) && move.physicalMove?
mults[ATK_MULT] *= 2 mults[ATK_MULT] *= 2
end end
} }
@@ -969,7 +967,7 @@ BattleHandlers::DamageCalcTargetItem.add(:YACHEBERRY,
BattleHandlers::CriticalCalcUserItem.add(:LUCKYPUNCH, BattleHandlers::CriticalCalcUserItem.add(:LUCKYPUNCH,
proc { |item,user,target,c| 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, BattleHandlers::CriticalCalcUserItem.add(:STICK,
proc { |item,user,target,c| proc { |item,user,target,c|
next c+2 if isConst?(user.species,PBSpecies,:FARFETCHD) next c+2 if user.isSpecies?(:FARFETCHD)
} }
) )