mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Refactored ability/item/ball battle handlers, added "UltraBeast" species flag for Beast Ball
This commit is contained in:
@@ -171,8 +171,3 @@ end
|
|||||||
def nil_or_empty?(string)
|
def nil_or_empty?(string)
|
||||||
return string.nil? || !string.is_a?(String) || string.size == 0
|
return string.nil? || !string.is_a?(String) || string.size == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
|
||||||
# This is only here to make the battle classes easier to define later.
|
|
||||||
#===============================================================================
|
|
||||||
class Battle; end
|
|
||||||
|
|||||||
@@ -87,8 +87,6 @@ class Battle
|
|||||||
attr_accessor :moldBreaker # True if Mold Breaker applies
|
attr_accessor :moldBreaker # True if Mold Breaker applies
|
||||||
attr_reader :struggle # The Struggle move
|
attr_reader :struggle # The Struggle move
|
||||||
|
|
||||||
include Battle::Common
|
|
||||||
|
|
||||||
def pbRandom(x); return rand(x); end
|
def pbRandom(x); return rand(x); end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -703,7 +701,7 @@ class Battle
|
|||||||
@field.weather = newWeather
|
@field.weather = newWeather
|
||||||
duration = (fixedDuration) ? 5 : -1
|
duration = (fixedDuration) ? 5 : -1
|
||||||
if duration>0 && user && user.itemActive?
|
if duration>0 && user && user.itemActive?
|
||||||
duration = BattleHandlers.triggerWeatherExtenderItem(user.item,
|
duration = Battle::ItemEffects.triggerWeatherExtender(user.item,
|
||||||
@field.weather,duration,user,self)
|
@field.weather,duration,user,self)
|
||||||
end
|
end
|
||||||
@field.weatherDuration = duration
|
@field.weatherDuration = duration
|
||||||
@@ -781,7 +779,7 @@ class Battle
|
|||||||
@field.terrain = newTerrain
|
@field.terrain = newTerrain
|
||||||
duration = (fixedDuration) ? 5 : -1
|
duration = (fixedDuration) ? 5 : -1
|
||||||
if duration>0 && user && user.itemActive?
|
if duration>0 && user && user.itemActive?
|
||||||
duration = BattleHandlers.triggerTerrainExtenderItem(user.item,
|
duration = Battle::ItemEffects.triggerTerrainExtender(user.item,
|
||||||
newTerrain,duration,user,self)
|
newTerrain,duration,user,self)
|
||||||
end
|
end
|
||||||
@field.terrainDuration = duration
|
@field.terrainDuration = duration
|
||||||
@@ -478,7 +478,7 @@ class Battle
|
|||||||
@battlers.each do |b|
|
@battlers.each do |b|
|
||||||
next if !b
|
next if !b
|
||||||
pbCancelChoice(b.index) # Restore unused items to Bag
|
pbCancelChoice(b.index) # Restore unused items to Bag
|
||||||
BattleHandlers.triggerAbilityOnSwitchOut(b.ability,b,true) if b.abilityActive?
|
Battle::AbilityEffects.triggerOnSwitchOut(b.ability, b, true) if b.abilityActive?
|
||||||
end
|
end
|
||||||
pbParty(0).each_with_index do |pkmn,i|
|
pbParty(0).each_with_index do |pkmn,i|
|
||||||
next if !pkmn
|
next if !pkmn
|
||||||
@@ -63,8 +63,8 @@ class Battle
|
|||||||
evTotal = 0
|
evTotal = 0
|
||||||
GameData::Stat.each_main { |s| evTotal += pkmn.ev[s.id] }
|
GameData::Stat.each_main { |s| evTotal += pkmn.ev[s.id] }
|
||||||
# Modify EV yield based on pkmn's held item
|
# Modify EV yield based on pkmn's held item
|
||||||
if !BattleHandlers.triggerEVGainModifierItem(pkmn.item,pkmn,evYield)
|
if !Battle::ItemEffects.triggerEVGainModifier(pkmn.item, pkmn, evYield)
|
||||||
BattleHandlers.triggerEVGainModifierItem(@initialItems[0][idxParty],pkmn,evYield)
|
Battle::ItemEffects.triggerEVGainModifier(@initialItems[0][idxParty], pkmn, evYield)
|
||||||
end
|
end
|
||||||
# Double EV gain because of Pokérus
|
# Double EV gain because of Pokérus
|
||||||
if pkmn.pokerusStage>=1 # Infected or cured
|
if pkmn.pokerusStage>=1 # Infected or cured
|
||||||
@@ -147,9 +147,9 @@ class Battle
|
|||||||
# Exp. Charm increases Exp gained
|
# Exp. Charm increases Exp gained
|
||||||
exp = exp * 3 / 2 if $bag.has?(:EXPCHARM)
|
exp = exp * 3 / 2 if $bag.has?(:EXPCHARM)
|
||||||
# Modify Exp gain based on pkmn's held item
|
# Modify Exp gain based on pkmn's held item
|
||||||
i = BattleHandlers.triggerExpGainModifierItem(pkmn.item,pkmn,exp)
|
i = Battle::ItemEffects.triggerExpGainModifier(pkmn.item, pkmn, exp)
|
||||||
if i<0
|
if i<0
|
||||||
i = BattleHandlers.triggerExpGainModifierItem(@initialItems[0][idxParty],pkmn,exp)
|
i = Battle::ItemEffects.triggerExpGainModifier(@initialItems[0][idxParty], pkmn, exp)
|
||||||
end
|
end
|
||||||
exp = i if i>=0
|
exp = i if i>=0
|
||||||
# Boost Exp gained with high affection
|
# Boost Exp gained with high affection
|
||||||
@@ -155,7 +155,7 @@ class Battle
|
|||||||
move = @choices[b.index][2]
|
move = @choices[b.index][2]
|
||||||
pri = move.pbPriority(b)
|
pri = move.pbPriority(b)
|
||||||
if b.abilityActive?
|
if b.abilityActive?
|
||||||
pri = BattleHandlers.triggerPriorityChangeAbility(b.ability,b,move,pri)
|
pri = Battle::AbilityEffects.triggerPriorityChange(b.ability, b, move, pri)
|
||||||
end
|
end
|
||||||
bArray[3] = pri
|
bArray[3] = pri
|
||||||
@choices[b.index][4] = pri
|
@choices[b.index][4] = pri
|
||||||
@@ -167,8 +167,7 @@ class Battle
|
|||||||
subPri = 0
|
subPri = 0
|
||||||
# Abilities (Stall)
|
# Abilities (Stall)
|
||||||
if b.abilityActive?
|
if b.abilityActive?
|
||||||
newSubPri = BattleHandlers.triggerPriorityBracketChangeAbility(b.ability,
|
newSubPri = Battle::AbilityEffects.triggerPriorityBracketChange(b.ability, b, subPri, self)
|
||||||
b,subPri,self)
|
|
||||||
if subPri!=newSubPri
|
if subPri!=newSubPri
|
||||||
subPri = newSubPri
|
subPri = newSubPri
|
||||||
b.effects[PBEffects::PriorityAbility] = true
|
b.effects[PBEffects::PriorityAbility] = true
|
||||||
@@ -177,8 +176,7 @@ class Battle
|
|||||||
end
|
end
|
||||||
# Items (Quick Claw, Custap Berry, Lagging Tail, Full Incense)
|
# Items (Quick Claw, Custap Berry, Lagging Tail, Full Incense)
|
||||||
if b.itemActive?
|
if b.itemActive?
|
||||||
newSubPri = BattleHandlers.triggerPriorityBracketChangeItem(b.item,
|
newSubPri = Battle::ItemEffects.triggerPriorityBracketChange(b.item, b, subPri, self)
|
||||||
b,subPri,self)
|
|
||||||
if subPri!=newSubPri
|
if subPri!=newSubPri
|
||||||
subPri = newSubPri
|
subPri = newSubPri
|
||||||
b.effects[PBEffects::PriorityAbility] = false
|
b.effects[PBEffects::PriorityAbility] = false
|
||||||
@@ -56,12 +56,12 @@ class Battle
|
|||||||
return true if battler.fainted?
|
return true if battler.fainted?
|
||||||
# Ability/item effects that allow switching no matter what
|
# Ability/item effects that allow switching no matter what
|
||||||
if battler.abilityActive?
|
if battler.abilityActive?
|
||||||
if BattleHandlers.triggerCertainSwitchingUserAbility(battler.ability,battler,self)
|
if Battle::AbilityEffects.triggerCertainSwitching(battler.ability, battler, self)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if battler.itemActive?
|
if battler.itemActive?
|
||||||
if BattleHandlers.triggerCertainSwitchingUserItem(battler.item,battler,self)
|
if Battle::ItemEffects.triggerCertainSwitching(battler.item, battler, self)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -75,7 +75,7 @@ class Battle
|
|||||||
# Trapping abilities/items
|
# Trapping abilities/items
|
||||||
allOtherSideBattlers(idxBattler).each do |b|
|
allOtherSideBattlers(idxBattler).each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
if BattleHandlers.triggerTrappingTargetAbility(b.ability,battler,b,self)
|
if Battle::AbilityEffects.triggerTrappingByTarget(b.ability, battler, b, self)
|
||||||
partyScene.pbDisplay(_INTL("{1}'s {2} prevents switching!",
|
partyScene.pbDisplay(_INTL("{1}'s {2} prevents switching!",
|
||||||
b.pbThis,b.abilityName)) if partyScene
|
b.pbThis,b.abilityName)) if partyScene
|
||||||
return false
|
return false
|
||||||
@@ -83,7 +83,7 @@ class Battle
|
|||||||
end
|
end
|
||||||
allOtherSideBattlers(idxBattler).each do |b|
|
allOtherSideBattlers(idxBattler).each do |b|
|
||||||
next if !b.itemActive?
|
next if !b.itemActive?
|
||||||
if BattleHandlers.triggerTrappingTargetItem(b.item,battler,b,self)
|
if Battle::ItemEffects.triggerTrappingByTarget(b.item,battler,b,self)
|
||||||
partyScene.pbDisplay(_INTL("{1}'s {2} prevents switching!",
|
partyScene.pbDisplay(_INTL("{1}'s {2} prevents switching!",
|
||||||
b.pbThis,b.itemName)) if partyScene
|
b.pbThis,b.itemName)) if partyScene
|
||||||
return false
|
return false
|
||||||
@@ -353,12 +353,12 @@ class Battle
|
|||||||
b.pbContinualAbilityChecks(true)
|
b.pbContinualAbilityChecks(true)
|
||||||
# Abilities that trigger upon switching in
|
# Abilities that trigger upon switching in
|
||||||
if (!b.fainted? && b.unstoppableAbility?) || b.abilityActive?
|
if (!b.fainted? && b.unstoppableAbility?) || b.abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(b.ability, b, self)
|
Battle::AbilityEffects.triggerOnSwitchIn(b.ability, b, self)
|
||||||
end
|
end
|
||||||
pbEndPrimordialWeather # Checking this again just in case
|
pbEndPrimordialWeather # Checking this again just in case
|
||||||
# Items that trigger upon switching in (Air Balloon message)
|
# Items that trigger upon switching in (Air Balloon message)
|
||||||
if b.itemActive?
|
if b.itemActive?
|
||||||
BattleHandlers.triggerItemOnSwitchIn(b.item, b, self)
|
Battle::ItemEffects.triggerOnSwitchIn(b.item, b, self)
|
||||||
end
|
end
|
||||||
# Berry check, status-curing ability check
|
# Berry check, status-curing ability check
|
||||||
b.pbHeldItemTriggerCheck
|
b.pbHeldItemTriggerCheck
|
||||||
@@ -8,15 +8,15 @@ class Battle
|
|||||||
return false if !@canRun && !battler.opposes?
|
return false if !@canRun && !battler.opposes?
|
||||||
return true if battler.pbHasType?(:GHOST) && Settings::MORE_TYPE_EFFECTS
|
return true if battler.pbHasType?(:GHOST) && Settings::MORE_TYPE_EFFECTS
|
||||||
return true if battler.abilityActive? &&
|
return true if battler.abilityActive? &&
|
||||||
BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler)
|
Battle::AbilityEffects.triggerCertainEscapeFromBattle(battler.ability, battler)
|
||||||
return true if battler.itemActive? &&
|
return true if battler.itemActive? &&
|
||||||
BattleHandlers.triggerRunFromBattleItem(battler.item,battler)
|
Battle::ItemEffects.triggerCertainEscapeFromBattle(battler.item, battler)
|
||||||
return false if battler.trappedInBattle?
|
return false if battler.trappedInBattle?
|
||||||
allOtherSideBattlers(idxBattler).each do |b|
|
allOtherSideBattlers(idxBattler).each do |b|
|
||||||
return false if b.abilityActive? &&
|
return false if b.abilityActive? &&
|
||||||
BattleHandlers.triggerTrappingTargetAbility(b.ability,battler,b,self)
|
Battle::AbilityEffects.triggerTrappingByTarget(b.ability, battler, b, self)
|
||||||
return false if b.itemActive? &&
|
return false if b.itemActive? &&
|
||||||
BattleHandlers.triggerTrappingTargetItem(b.item,battler,b,self)
|
Battle::ItemEffects.triggerTrappingByTarget(b.item, battler, b, self)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -76,7 +76,7 @@ class Battle
|
|||||||
end
|
end
|
||||||
# Abilities that guarantee escape
|
# Abilities that guarantee escape
|
||||||
if battler.abilityActive?
|
if battler.abilityActive?
|
||||||
if BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler)
|
if Battle::AbilityEffects.triggerCertainEscapeFromBattle(battler.ability, battler)
|
||||||
pbShowAbilitySplash(battler,true)
|
pbShowAbilitySplash(battler,true)
|
||||||
pbHideAbilitySplash(battler)
|
pbHideAbilitySplash(battler)
|
||||||
pbSEPlay("Battle flee")
|
pbSEPlay("Battle flee")
|
||||||
@@ -87,10 +87,9 @@ class Battle
|
|||||||
end
|
end
|
||||||
# Held items that guarantee escape
|
# Held items that guarantee escape
|
||||||
if battler.itemActive?
|
if battler.itemActive?
|
||||||
if BattleHandlers.triggerRunFromBattleItem(battler.item,battler)
|
if Battle::ItemEffects.triggerCertainEscapeFromBattle(battler.item, battler)
|
||||||
pbSEPlay("Battle flee")
|
pbSEPlay("Battle flee")
|
||||||
pbDisplayPaused(_INTL("{1} fled using its {2}!",
|
pbDisplayPaused(_INTL("{1} fled using its {2}!", battler.pbThis,battler.itemName))
|
||||||
battler.pbThis,battler.itemName))
|
|
||||||
@decision = 3
|
@decision = 3
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
@@ -103,14 +102,14 @@ class Battle
|
|||||||
# Trapping abilities/items
|
# Trapping abilities/items
|
||||||
allOtherSideBattlers(idxBattler).each do |b|
|
allOtherSideBattlers(idxBattler).each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
if BattleHandlers.triggerTrappingTargetAbility(b.ability,battler,b,self)
|
if Battle::AbilityEffects.triggerTrappingByTarget(b.ability, battler, b, self)
|
||||||
pbDisplayPaused(_INTL("{1} prevents escape with {2}!",b.pbThis,b.abilityName))
|
pbDisplayPaused(_INTL("{1} prevents escape with {2}!",b.pbThis,b.abilityName))
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
allOtherSideBattlers(idxBattler).each do |b|
|
allOtherSideBattlers(idxBattler).each do |b|
|
||||||
next if !b.itemActive?
|
next if !b.itemActive?
|
||||||
if BattleHandlers.triggerTrappingTargetItem(b.item,battler,b,self)
|
if Battle::ItemEffects.triggerTrappingByTarget(b.item, battler, b, self)
|
||||||
pbDisplayPaused(_INTL("{1} prevents escape with {2}!",b.pbThis,b.itemName))
|
pbDisplayPaused(_INTL("{1} prevents escape with {2}!",b.pbThis,b.itemName))
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
@@ -132,7 +132,7 @@ class Battle
|
|||||||
old_ability = battler.ability_id
|
old_ability = battler.ability_id
|
||||||
# Break Illusion
|
# Break Illusion
|
||||||
if battler.hasActiveAbility?(:ILLUSION)
|
if battler.hasActiveAbility?(:ILLUSION)
|
||||||
BattleHandlers.triggerTargetAbilityOnHit(battler.ability,nil,battler,nil,self)
|
Battle::AbilityEffects.triggerOnBeingHit(battler.ability, nil, battler, nil, self)
|
||||||
end
|
end
|
||||||
# Mega Evolve
|
# Mega Evolve
|
||||||
case battler.pokemon.megaMessage
|
case battler.pokemon.megaMessage
|
||||||
@@ -6,9 +6,9 @@ class Battle
|
|||||||
def pbAttackPhasePriorityChangeMessages
|
def pbAttackPhasePriorityChangeMessages
|
||||||
pbPriority.each do |b|
|
pbPriority.each do |b|
|
||||||
if b.effects[PBEffects::PriorityAbility] && b.abilityActive?
|
if b.effects[PBEffects::PriorityAbility] && b.abilityActive?
|
||||||
BattleHandlers.triggerPriorityBracketUseAbility(b.ability,b,self)
|
Battle::AbilityEffects.triggerPriorityBracketUse(b.ability, b, self)
|
||||||
elsif b.effects[PBEffects::PriorityItem] && b.itemActive?
|
elsif b.effects[PBEffects::PriorityItem] && b.itemActive?
|
||||||
BattleHandlers.triggerPriorityBracketUseItem(b.item,b,self)
|
Battle::ItemEffects.triggerPriorityBracketUse(b.item, b, self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -70,7 +70,7 @@ class Battle
|
|||||||
priority.each do |b|
|
priority.each do |b|
|
||||||
# Weather-related abilities
|
# Weather-related abilities
|
||||||
if b.abilityActive?
|
if b.abilityActive?
|
||||||
BattleHandlers.triggerEORWeatherAbility(b.ability, b.effectiveWeather, b, self)
|
Battle::AbilityEffects.triggerEndOfRoundWeather(b.ability, b.effectiveWeather, b, self)
|
||||||
b.pbFaint if b.fainted?
|
b.pbFaint if b.fainted?
|
||||||
end
|
end
|
||||||
# Weather damage
|
# Weather damage
|
||||||
@@ -279,9 +279,9 @@ class Battle
|
|||||||
pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
|
pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
|
||||||
end
|
end
|
||||||
# Healer, Hydration, Shed Skin
|
# Healer, Hydration, Shed Skin
|
||||||
BattleHandlers.triggerEORHealingAbility(b.ability,b,self) if b.abilityActive?
|
Battle::AbilityEffects.triggerEndOfRoundHealing(b.ability, b, self) if b.abilityActive?
|
||||||
# Black Sludge, Leftovers
|
# Black Sludge, Leftovers
|
||||||
BattleHandlers.triggerEORHealingItem(b.item,b,self) if b.itemActive?
|
Battle::ItemEffects.triggerEndOfRoundHealing(b.item, b, self) if b.itemActive?
|
||||||
end
|
end
|
||||||
# Self-curing of status due to affection
|
# Self-curing of status due to affection
|
||||||
if Settings::AFFECTION_EFFECTS && @internalBattle
|
if Settings::AFFECTION_EFFECTS && @internalBattle
|
||||||
@@ -597,11 +597,11 @@ class Battle
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Bad Dreams, Moody, Speed Boost
|
# Bad Dreams, Moody, Speed Boost
|
||||||
BattleHandlers.triggerEOREffectAbility(b.ability,b,self) if b.abilityActive?
|
Battle::AbilityEffects.triggerEndOfRoundEffect(b.ability, b, self) if b.abilityActive?
|
||||||
# Flame Orb, Sticky Barb, Toxic Orb
|
# Flame Orb, Sticky Barb, Toxic Orb
|
||||||
BattleHandlers.triggerEOREffectItem(b.item,b,self) if b.itemActive?
|
Battle::ItemEffects.triggerEndOfRoundEffect(b.item, b, self) if b.itemActive?
|
||||||
# Harvest, Pickup, Ball Fetch
|
# Harvest, Pickup, Ball Fetch
|
||||||
BattleHandlers.triggerEORGainItemAbility(b.ability,b,self) if b.abilityActive?
|
Battle::AbilityEffects.triggerEndOfRoundGainItem(b.ability, b, self) if b.abilityActive?
|
||||||
end
|
end
|
||||||
pbGainExp
|
pbGainExp
|
||||||
return if @decision>0
|
return if @decision>0
|
||||||
@@ -248,11 +248,11 @@ class Battle::Battler
|
|||||||
speedMult = 1.0
|
speedMult = 1.0
|
||||||
# Ability effects that alter calculated Speed
|
# Ability effects that alter calculated Speed
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
speedMult = BattleHandlers.triggerSpeedCalcAbility(self.ability,self,speedMult)
|
speedMult = Battle::AbilityEffects.triggerSpeedCalc(self.ability, self, speedMult)
|
||||||
end
|
end
|
||||||
# Item effects that alter calculated Speed
|
# Item effects that alter calculated Speed
|
||||||
if itemActive?
|
if itemActive?
|
||||||
speedMult = BattleHandlers.triggerSpeedCalcItem(self.item,self,speedMult)
|
speedMult = Battle::ItemEffects.triggerSpeedCalc(self.item, self, speedMult)
|
||||||
end
|
end
|
||||||
# Other effects
|
# Other effects
|
||||||
speedMult *= 2 if pbOwnSide.effects[PBEffects::Tailwind]>0
|
speedMult *= 2 if pbOwnSide.effects[PBEffects::Tailwind]>0
|
||||||
@@ -275,10 +275,10 @@ class Battle::Battler
|
|||||||
ret += @effects[PBEffects::WeightChange]
|
ret += @effects[PBEffects::WeightChange]
|
||||||
ret = 1 if ret<1
|
ret = 1 if ret<1
|
||||||
if abilityActive? && !@battle.moldBreaker
|
if abilityActive? && !@battle.moldBreaker
|
||||||
ret = BattleHandlers.triggerWeightCalcAbility(self.ability,self,ret)
|
ret = Battle::AbilityEffects.triggerWeightCalc(self.ability, self, ret)
|
||||||
end
|
end
|
||||||
if itemActive?
|
if itemActive?
|
||||||
ret = BattleHandlers.triggerWeightCalcItem(self.item,self,ret)
|
ret = Battle::ItemEffects.triggerWeightCalc(self.item, self, ret)
|
||||||
end
|
end
|
||||||
return [ret,1].max
|
return [ret,1].max
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ class Battle::Battler
|
|||||||
# "counts as having that status", which includes Comatose which can't be
|
# "counts as having that status", which includes Comatose which can't be
|
||||||
# cured.
|
# cured.
|
||||||
def pbHasStatus?(checkStatus)
|
def pbHasStatus?(checkStatus)
|
||||||
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(self.ability,self,checkStatus)
|
if Battle::AbilityEffects.triggerStatusCheckNonIgnorable(self.ability, self, checkStatus)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return @status==checkStatus
|
return @status==checkStatus
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbHasAnyStatus?
|
def pbHasAnyStatus?
|
||||||
if BattleHandlers.triggerStatusCheckAbilityNonIgnorable(self.ability,self,nil)
|
if Battle::AbilityEffects.triggerStatusCheckNonIgnorable(self.ability, self, nil)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return @status != :NONE
|
return @status != :NONE
|
||||||
@@ -102,15 +102,15 @@ class Battle::Battler
|
|||||||
# Ability immunity
|
# Ability immunity
|
||||||
immuneByAbility = false
|
immuneByAbility = false
|
||||||
immAlly = nil
|
immAlly = nil
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,newStatus)
|
if Battle::AbilityEffects.triggerStatusImmunityNonIgnorable(self.ability, self, newStatus)
|
||||||
immuneByAbility = true
|
immuneByAbility = true
|
||||||
elsif selfInflicted || !@battle.moldBreaker
|
elsif selfInflicted || !@battle.moldBreaker
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability,self,newStatus)
|
if abilityActive? && Battle::AbilityEffects.triggerStatusImmunity(self.ability, self, newStatus)
|
||||||
immuneByAbility = true
|
immuneByAbility = true
|
||||||
else
|
else
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
next if !BattleHandlers.triggerStatusImmunityAllyAbility(b.ability,self,newStatus)
|
next if !Battle::AbilityEffects.triggerStatusImmunityFromAlly(b.ability, self, newStatus)
|
||||||
immuneByAbility = true
|
immuneByAbility = true
|
||||||
immAlly = b
|
immAlly = b
|
||||||
break
|
break
|
||||||
@@ -192,15 +192,15 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
return false if hasImmuneType
|
return false if hasImmuneType
|
||||||
# Ability immunity
|
# Ability immunity
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability,self,newStatus)
|
if Battle::AbilityEffects.triggerStatusImmunityNonIgnorable(self.ability, self, newStatus)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability,self,newStatus)
|
if abilityActive? && Battle::AbilityEffects.triggerStatusImmunity(self.ability, self, newStatus)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
next if !BattleHandlers.triggerStatusImmunityAllyAbility(b.ability,self,newStatus)
|
next if !Battle::AbilityEffects.triggerStatusImmunityFromAlly(b.ability, self, newStatus)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
# Safeguard immunity
|
# Safeguard immunity
|
||||||
@@ -252,7 +252,7 @@ class Battle::Battler
|
|||||||
pbCheckFormOnStatusChange
|
pbCheckFormOnStatusChange
|
||||||
# Synchronize
|
# Synchronize
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatusInflicted(self.ability,self,user,newStatus)
|
Battle::AbilityEffects.triggerOnStatusInflicted(self.ability, self, user, newStatus)
|
||||||
end
|
end
|
||||||
# Status cures
|
# Status cures
|
||||||
pbItemStatusCureCheck
|
pbItemStatusCureCheck
|
||||||
@@ -287,18 +287,18 @@ class Battle::Battler
|
|||||||
if !hasActiveAbility?(:SOUNDPROOF)
|
if !hasActiveAbility?(:SOUNDPROOF)
|
||||||
return false if @battle.allBattlers.any? { |b| b.effects[PBEffects::Uproar] > 0 }
|
return false if @battle.allBattlers.any? { |b| b.effects[PBEffects::Uproar] > 0 }
|
||||||
end
|
end
|
||||||
if BattleHandlers.triggerStatusImmunityAbilityNonIgnorable(self.ability, self, :SLEEP)
|
if Battle::AbilityEffects.triggerStatusImmunityNonIgnorable(self.ability, self, :SLEEP)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
# NOTE: Bulbapedia claims that Flower Veil shouldn't prevent sleep due to
|
# NOTE: Bulbapedia claims that Flower Veil shouldn't prevent sleep due to
|
||||||
# drowsiness, but I disagree because that makes no sense. Also, the
|
# drowsiness, but I disagree because that makes no sense. Also, the
|
||||||
# comparable Sweet Veil does prevent sleep due to drowsiness.
|
# comparable Sweet Veil does prevent sleep due to drowsiness.
|
||||||
if abilityActive? && BattleHandlers.triggerStatusImmunityAbility(self.ability, self, :SLEEP)
|
if abilityActive? && Battle::AbilityEffects.triggerStatusImmunity(self.ability, self, :SLEEP)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
next if !BattleHandlers.triggerStatusImmunityAllyAbility(b.ability, self, :SLEEP)
|
next if !Battle::AbilityEffects.triggerStatusImmunityFromAlly(b.ability, self, :SLEEP)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
# NOTE: Bulbapedia claims that Safeguard shouldn't prevent sleep due to
|
# NOTE: Bulbapedia claims that Safeguard shouldn't prevent sleep due to
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class Battle::Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat gain
|
# Trigger abilities upon stat gain
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatGain(self.ability,self,stat,user)
|
Battle::AbilityEffects.triggerOnStatGain(self.ability, self, stat, user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -88,7 +88,7 @@ class Battle::Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat gain
|
# Trigger abilities upon stat gain
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatGain(self.ability,self,stat,user)
|
Battle::AbilityEffects.triggerOnStatGain(self.ability, self, stat, user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -138,15 +138,15 @@ class Battle::Battler
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
return false if BattleHandlers.triggerStatLossImmunityAbility(
|
return false if Battle::AbilityEffects.triggerStatLossImmunity(
|
||||||
self.ability,self,stat,@battle,showFailMsg) if !@battle.moldBreaker
|
self.ability,self,stat,@battle,showFailMsg) if !@battle.moldBreaker
|
||||||
return false if BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(
|
return false if Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(
|
||||||
self.ability,self,stat,@battle,showFailMsg)
|
self.ability,self,stat,@battle,showFailMsg)
|
||||||
end
|
end
|
||||||
if !@battle.moldBreaker
|
if !@battle.moldBreaker
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
return false if BattleHandlers.triggerStatLossImmunityAllyAbility(
|
return false if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(
|
||||||
b.ability,b,self,stat,@battle,showFailMsg)
|
b.ability,b,self,stat,@battle,showFailMsg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -218,7 +218,7 @@ class Battle::Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat loss
|
# Trigger abilities upon stat loss
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatLoss(self.ability,self,stat,user)
|
Battle::AbilityEffects.triggerOnStatLoss(self.ability, self, stat, user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -264,7 +264,7 @@ class Battle::Battler
|
|||||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||||
# Trigger abilities upon stat loss
|
# Trigger abilities upon stat loss
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnStatLoss(self.ability,self,stat,user)
|
Battle::AbilityEffects.triggerOnStatLoss(self.ability, self, stat, user)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -320,8 +320,8 @@ class Battle::Battler
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
if BattleHandlers.triggerStatLossImmunityAbility(self.ability,self,:ATTACK,@battle,false) ||
|
if Battle::AbilityEffects.triggerStatLossImmunity(self.ability, self, :ATTACK, @battle, false) ||
|
||||||
BattleHandlers.triggerStatLossImmunityAbilityNonIgnorable(self.ability,self,:ATTACK,@battle,false)
|
Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(self.ability, self, :ATTACK, @battle, false)
|
||||||
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
|
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
|
||||||
pbThis,abilityName,user.pbThis(true),user.abilityName))
|
pbThis,abilityName,user.pbThis(true),user.abilityName))
|
||||||
return false
|
return false
|
||||||
@@ -329,7 +329,7 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
if BattleHandlers.triggerStatLossImmunityAllyAbility(b.ability,b,self,:ATTACK,@battle,false)
|
if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(b.ability, b, self, :ATTACK, @battle, false)
|
||||||
@battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by {4}'s {5}!",
|
@battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by {4}'s {5}!",
|
||||||
pbThis,user.pbThis(true),user.abilityName,b.pbThis(true),b.abilityName))
|
pbThis,user.pbThis(true),user.abilityName,b.pbThis(true),b.abilityName))
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class Battle::Battler
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbAbilitiesOnSwitchOut
|
def pbAbilitiesOnSwitchOut
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchOut(self.ability,self,false)
|
Battle::AbilityEffects.triggerOnSwitchOut(self.ability, self, false)
|
||||||
end
|
end
|
||||||
# Reset form
|
# Reset form
|
||||||
@battle.peer.pbOnLeavingBattle(@battle,@pokemon,@battle.usedInBattle[idxOwnSide][@index/2])
|
@battle.peer.pbOnLeavingBattle(@battle,@pokemon,@battle.usedInBattle[idxOwnSide][@index/2])
|
||||||
@@ -22,11 +22,11 @@ class Battle::Battler
|
|||||||
# Self fainted; check all other battlers to see if their abilities trigger
|
# Self fainted; check all other battlers to see if their abilities trigger
|
||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
next if !b || !b.abilityActive?
|
next if !b || !b.abilityActive?
|
||||||
BattleHandlers.triggerAbilityChangeOnBattlerFainting(b.ability,b,self,@battle)
|
Battle::AbilityEffects.triggerChangeOnBattlerFainting(b.ability, b, self, @battle)
|
||||||
end
|
end
|
||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
next if !b || !b.abilityActive?
|
next if !b || !b.abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnBattlerFainting(b.ability,b,self,@battle)
|
Battle::AbilityEffects.triggerOnBattlerFainting(b.ability, b, self, @battle)
|
||||||
end
|
end
|
||||||
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
||||||
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true)
|
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true)
|
||||||
@@ -36,18 +36,18 @@ class Battle::Battler
|
|||||||
def pbAbilitiesOnDamageTaken(move_user = nil)
|
def pbAbilitiesOnDamageTaken(move_user = nil)
|
||||||
return false if !@droppedBelowHalfHP
|
return false if !@droppedBelowHalfHP
|
||||||
return false if !abilityActive?
|
return false if !abilityActive?
|
||||||
return BattleHandlers.triggerAbilityOnHPDroppedBelowHalf(self.ability, self, move_user, @battle)
|
return Battle::AbilityEffects.triggerOnHPDroppedBelowHalf(self.ability, self, move_user, @battle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbAbilityOnTerrainChange(ability_changed = false)
|
def pbAbilityOnTerrainChange(ability_changed = false)
|
||||||
return if !abilityActive?
|
return if !abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnTerrainChange(self.ability, self, @battle, ability_changed)
|
Battle::AbilityEffects.triggerOnTerrainChange(self.ability, self, @battle, ability_changed)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Used for Rattled's Gen 8 effect. Called when Intimidate is triggered.
|
# Used for Rattled's Gen 8 effect. Called when Intimidate is triggered.
|
||||||
def pbAbilitiesOnIntimidated
|
def pbAbilitiesOnIntimidated
|
||||||
return if !abilityActive?
|
return if !abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnIntimidated(self.ability, self, @battle)
|
Battle::AbilityEffects.triggerOnIntimidated(self.ability, self, @battle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbAbilitiesOnNeutralizingGasEnding
|
def pbAbilitiesOnNeutralizingGasEnding
|
||||||
@@ -57,7 +57,7 @@ class Battle::Battler
|
|||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
next if b.fainted?
|
next if b.fainted?
|
||||||
next if !b.unstoppableAbility? && !b.abilityActive?
|
next if !b.unstoppableAbility? && !b.abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(b.ability, b, @battle)
|
Battle::AbilityEffects.triggerOnSwitchIn(b.ability, b, @battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class Battle::Battler
|
|||||||
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,choice.pbThis(true),choice.abilityName))
|
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,choice.pbThis(true),choice.abilityName))
|
||||||
@battle.pbHideAbilitySplash(self)
|
@battle.pbHideAbilitySplash(self)
|
||||||
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
|
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(self.ability,self,@battle)
|
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -96,7 +96,7 @@ class Battle::Battler
|
|||||||
# Cures status conditions, confusion and infatuation.
|
# Cures status conditions, confusion and infatuation.
|
||||||
def pbAbilityStatusCureCheck
|
def pbAbilityStatusCureCheck
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerStatusCureAbility(self.ability,self)
|
Battle::AbilityEffects.triggerStatusCure(self.ability, self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ class Battle::Battler
|
|||||||
pbContinualAbilityChecks(true) # Don't trigger Traced ability as it's triggered below
|
pbContinualAbilityChecks(true) # Don't trigger Traced ability as it's triggered below
|
||||||
# Abilities that trigger upon switching in
|
# Abilities that trigger upon switching in
|
||||||
if (!fainted? && unstoppableAbility?) || abilityActive?
|
if (!fainted? && unstoppableAbility?) || abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnSwitchIn(self.ability, self, @battle)
|
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
|
||||||
end
|
end
|
||||||
# Status-curing ability check
|
# Status-curing ability check
|
||||||
pbAbilityStatusCureCheck
|
pbAbilityStatusCureCheck
|
||||||
@@ -300,7 +300,7 @@ class Battle::Battler
|
|||||||
# when forcibly consumed by Pluck/Fling.
|
# when forcibly consumed by Pluck/Fling.
|
||||||
if item_to_use
|
if item_to_use
|
||||||
itm = item_to_use || self.item
|
itm = item_to_use || self.item
|
||||||
if BattleHandlers.triggerTargetItemOnHitPositiveBerry(itm, self, @battle, true)
|
if Battle::ItemEffects.triggerOnBeingHitPositiveBerry(itm, self, @battle, true)
|
||||||
pbHeldItemTriggered(itm, false, fling)
|
pbHeldItemTriggered(itm, false, fling)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -311,7 +311,7 @@ class Battle::Battler
|
|||||||
def pbItemHPHealCheck(item_to_use = nil, fling = false)
|
def pbItemHPHealCheck(item_to_use = nil, fling = false)
|
||||||
return if !item_to_use && !itemActive?
|
return if !item_to_use && !itemActive?
|
||||||
itm = item_to_use || self.item
|
itm = item_to_use || self.item
|
||||||
if BattleHandlers.triggerHPHealItem(itm, self, @battle, !item_to_use.nil?)
|
if Battle::ItemEffects.triggerHPHeal(itm, self, @battle, !item_to_use.nil?)
|
||||||
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
||||||
elsif !item_to_use
|
elsif !item_to_use
|
||||||
pbItemTerrainStatBoostCheck
|
pbItemTerrainStatBoostCheck
|
||||||
@@ -326,7 +326,7 @@ class Battle::Battler
|
|||||||
return if fainted?
|
return if fainted?
|
||||||
return if !item_to_use && !itemActive?
|
return if !item_to_use && !itemActive?
|
||||||
itm = item_to_use || self.item
|
itm = item_to_use || self.item
|
||||||
if BattleHandlers.triggerStatusCureItem(itm, self, @battle, !item_to_use.nil?)
|
if Battle::ItemEffects.triggerStatusCure(itm, self, @battle, !item_to_use.nil?)
|
||||||
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -338,9 +338,9 @@ class Battle::Battler
|
|||||||
return if fainted?
|
return if fainted?
|
||||||
return if !item_to_use && !itemActive?
|
return if !item_to_use && !itemActive?
|
||||||
itm = item_to_use || self.item
|
itm = item_to_use || self.item
|
||||||
if BattleHandlers.triggerEndOfMoveItem(itm, self, @battle, !item_to_use.nil?)
|
if Battle::ItemEffects.triggerOnEndOfUsingMove(itm, self, @battle, !item_to_use.nil?)
|
||||||
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
||||||
elsif BattleHandlers.triggerEndOfMoveStatRestoreItem(itm, self, @battle, !item_to_use.nil?)
|
elsif Battle::ItemEffects.triggerOnEndOfUsingMoveStatRestore(itm, self, @battle, !item_to_use.nil?)
|
||||||
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -354,7 +354,7 @@ class Battle::Battler
|
|||||||
return if fainted?
|
return if fainted?
|
||||||
return if !item_to_use && !itemActive?
|
return if !item_to_use && !itemActive?
|
||||||
itm = item_to_use || self.item
|
itm = item_to_use || self.item
|
||||||
if BattleHandlers.triggerEndOfMoveStatRestoreItem(itm, self, @battle, !item_to_use.nil?)
|
if Battle::ItemEffects.triggerOnEndOfUsingMoveStatRestore(itm, self, @battle, !item_to_use.nil?)
|
||||||
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
pbHeldItemTriggered(itm, item_to_use.nil?, fling)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -362,7 +362,7 @@ class Battle::Battler
|
|||||||
# Called when the battle terrain changes and when a Pokémon loses HP.
|
# Called when the battle terrain changes and when a Pokémon loses HP.
|
||||||
def pbItemTerrainStatBoostCheck
|
def pbItemTerrainStatBoostCheck
|
||||||
return if !itemActive?
|
return if !itemActive?
|
||||||
if BattleHandlers.triggerTerrainStatBoostItem(self.item, self, @battle)
|
if Battle::ItemEffects.triggerTerrainStatBoost(self.item, self, @battle)
|
||||||
pbHeldItemTriggered(self.item)
|
pbHeldItemTriggered(self.item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -371,7 +371,7 @@ class Battle::Battler
|
|||||||
# Intimidate has no effect on the Pokémon).
|
# Intimidate has no effect on the Pokémon).
|
||||||
def pbItemOnIntimidatedCheck
|
def pbItemOnIntimidatedCheck
|
||||||
return if !itemActive?
|
return if !itemActive?
|
||||||
if BattleHandlers.triggerItemOnIntimidated(self.item, self, @battle)
|
if Battle::ItemEffects.triggerOnIntimidated(self.item, self, @battle)
|
||||||
pbHeldItemTriggered(self.item)
|
pbHeldItemTriggered(self.item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -380,7 +380,7 @@ class Battle::Battler
|
|||||||
def pbItemOnStatDropped(move_user = nil)
|
def pbItemOnStatDropped(move_user = nil)
|
||||||
return false if !@statsDropped
|
return false if !@statsDropped
|
||||||
return false if !itemActive?
|
return false if !itemActive?
|
||||||
return BattleHandlers.triggerItemOnStatDropped(self.item, self, move_user, @battle)
|
return Battle::ItemEffects.triggerOnStatLoss(self.item, self, move_user, @battle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbItemsOnUnnerveEnding
|
def pbItemsOnUnnerveEnding
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ class Battle::Battler
|
|||||||
# Dazzling/Queenly Majesty make the move fail here
|
# Dazzling/Queenly Majesty make the move fail here
|
||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
next if !b || !b.abilityActive?
|
next if !b || !b.abilityActive?
|
||||||
if BattleHandlers.triggerMoveBlockingAbility(b.ability,b,user,targets,move,@battle)
|
if Battle::AbilityEffects.triggerMoveBlocking(b.ability, b, user, targets, move, @battle)
|
||||||
@battle.pbDisplayBrief(_INTL("{1} used {2}!",user.pbThis,move.name))
|
@battle.pbDisplayBrief(_INTL("{1} used {2}!",user.pbThis,move.name))
|
||||||
@battle.pbShowAbilitySplash(b)
|
@battle.pbShowAbilitySplash(b)
|
||||||
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,move.name))
|
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,move.name))
|
||||||
@@ -603,7 +603,7 @@ class Battle::Battler
|
|||||||
next if !b.damageState.missed || b.damageState.magicCoat
|
next if !b.damageState.missed || b.damageState.magicCoat
|
||||||
pbMissMessage(move,user,b)
|
pbMissMessage(move,user,b)
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
BattleHandlers.triggerUserItemOnMissing(user.item, user, b, move, hitNum, @battle)
|
Battle::ItemEffects.triggerOnMissingTarget(user.item, user, b, move, hitNum, @battle)
|
||||||
end
|
end
|
||||||
break if move.pbRepeatHit? # Dragon Darts only shows one failure message
|
break if move.pbRepeatHit? # Dragon Darts only shows one failure message
|
||||||
end
|
end
|
||||||
@@ -649,7 +649,7 @@ class Battle::Battler
|
|||||||
next if !b.damageState.missed
|
next if !b.damageState.missed
|
||||||
pbMissMessage(move, user, b)
|
pbMissMessage(move, user, b)
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
BattleHandlers.triggerUserItemOnMissing(user.item, user, b, move, hitNum, @battle)
|
Battle::ItemEffects.triggerOnMissingTarget(user.item, user, b, move, hitNum, @battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class Battle::Battler
|
|||||||
if @effects[PBEffects::Flinch]
|
if @effects[PBEffects::Flinch]
|
||||||
@battle.pbDisplay(_INTL("{1} flinched and couldn't move!",pbThis))
|
@battle.pbDisplay(_INTL("{1} flinched and couldn't move!",pbThis))
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
BattleHandlers.triggerAbilityOnFlinch(self.ability,self,@battle)
|
Battle::AbilityEffects.triggerOnFlinch(self.ability, self, @battle)
|
||||||
end
|
end
|
||||||
@lastMoveFailed = true
|
@lastMoveFailed = true
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class Battle::Battler
|
|||||||
# Target's ability
|
# Target's ability
|
||||||
if target.abilityActive?(true)
|
if target.abilityActive?(true)
|
||||||
oldHP = user.hp
|
oldHP = user.hp
|
||||||
BattleHandlers.triggerTargetAbilityOnHit(target.ability,user,target,move,@battle)
|
Battle::AbilityEffects.triggerOnBeingHit(target.ability, user, target, move, @battle)
|
||||||
user.pbItemHPHealCheck if user.hp<oldHP
|
user.pbItemHPHealCheck if user.hp<oldHP
|
||||||
end
|
end
|
||||||
# Cramorant - Gulp Missile
|
# Cramorant - Gulp Missile
|
||||||
@@ -32,13 +32,13 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
# User's ability
|
# User's ability
|
||||||
if user.abilityActive?(true)
|
if user.abilityActive?(true)
|
||||||
BattleHandlers.triggerUserAbilityOnHit(user.ability,user,target,move,@battle)
|
Battle::AbilityEffects.triggerOnDealingHit(user.ability, user, target, move, @battle)
|
||||||
user.pbItemHPHealCheck
|
user.pbItemHPHealCheck
|
||||||
end
|
end
|
||||||
# Target's item
|
# Target's item
|
||||||
if target.itemActive?(true)
|
if target.itemActive?(true)
|
||||||
oldHP = user.hp
|
oldHP = user.hp
|
||||||
BattleHandlers.triggerTargetItemOnHit(target.item,user,target,move,@battle)
|
Battle::ItemEffects.triggerOnBeingHit(target.item, user, target, move, @battle)
|
||||||
user.pbItemHPHealCheck if user.hp<oldHP
|
user.pbItemHPHealCheck if user.hp<oldHP
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -111,7 +111,7 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
# User's ability
|
# User's ability
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
BattleHandlers.triggerUserAbilityEndOfMove(user.ability,user,targets,move,@battle)
|
Battle::AbilityEffects.triggerOnEndOfUsingMove(user.ability, user, targets, move, @battle)
|
||||||
end
|
end
|
||||||
# Greninja - Battle Bond
|
# Greninja - Battle Bond
|
||||||
if !user.fainted? && !user.effects[PBEffects::Transform] &&
|
if !user.fainted? && !user.effects[PBEffects::Transform] &&
|
||||||
@@ -182,7 +182,7 @@ class Battle::Battler
|
|||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
if targets.any? { |targetB| targetB.index==b.index }
|
if targets.any? { |targetB| targetB.index==b.index }
|
||||||
if !b.damageState.unaffected && b.damageState.calcDamage > 0 && b.itemActive?
|
if !b.damageState.unaffected && b.damageState.calcDamage > 0 && b.itemActive?
|
||||||
BattleHandlers.triggerTargetItemAfterMoveUse(b.item, b, user, move, switched_battlers, @battle)
|
Battle::ItemEffects.triggerAfterMoveUseFromTarget(b.item, b, user, move, switched_battlers, @battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Target's Eject Pack
|
# Target's Eject Pack
|
||||||
@@ -194,13 +194,13 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
# User's held item (Life Orb, Shell Bell, Throat Spray, Eject Pack)
|
# User's held item (Life Orb, Shell Bell, Throat Spray, Eject Pack)
|
||||||
if !switched_battlers.include?(user.index) && user.itemActive? # Only if user hasn't switched out
|
if !switched_battlers.include?(user.index) && user.itemActive? # Only if user hasn't switched out
|
||||||
BattleHandlers.triggerUserItemAfterMoveUse(user.item,user,targets,move,numHits,@battle)
|
Battle::ItemEffects.triggerAfterMoveUseFromUser(user.item, user, targets, move, numHits, @battle)
|
||||||
end
|
end
|
||||||
# Target's ability (Berserk, Color Change, Emergency Exit, Pickpocket, Wimp Out)
|
# Target's ability (Berserk, Color Change, Emergency Exit, Pickpocket, Wimp Out)
|
||||||
@battle.pbPriority(true).each do |b|
|
@battle.pbPriority(true).each do |b|
|
||||||
if targets.any? { |targetB| targetB.index==b.index }
|
if targets.any? { |targetB| targetB.index==b.index }
|
||||||
if !b.damageState.unaffected && !switched_battlers.include?(b.index) && b.abilityActive?
|
if !b.damageState.unaffected && !switched_battlers.include?(b.index) && b.abilityActive?
|
||||||
BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability, b, user, move, switched_battlers, @battle)
|
Battle::AbilityEffects.triggerAfterMoveUseFromTarget(b.ability, b, user, move, switched_battlers, @battle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Target's Emergency Exit, Wimp Out (including for Pokémon hurt by Flame Burst)
|
# Target's Emergency Exit, Wimp Out (including for Pokémon hurt by Flame Burst)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class Battle::Move
|
|||||||
return false if @battle.moldBreaker
|
return false if @battle.moldBreaker
|
||||||
ret = false
|
ret = false
|
||||||
if target.abilityActive?
|
if target.abilityActive?
|
||||||
ret = BattleHandlers.triggerMoveImmunityTargetAbility(target.ability,
|
ret = Battle::AbilityEffects.triggerMoveImmunity(target.ability,
|
||||||
user, target, self, @calcType, @battle, show_message)
|
user, target, self, @calcType, @battle, show_message)
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Battle::Move
|
|||||||
def pbBaseType(user)
|
def pbBaseType(user)
|
||||||
ret = @type
|
ret = @type
|
||||||
if ret && user.abilityActive?
|
if ret && user.abilityActive?
|
||||||
ret = BattleHandlers.triggerMoveBaseTypeModifierAbility(user.ability,user,self,ret)
|
ret = Battle::AbilityEffects.triggerModifyMoveBaseType(user.ability, user, self, ret)
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
@@ -130,25 +130,25 @@ class Battle::Move
|
|||||||
def pbCalcAccuracyModifiers(user,target,modifiers)
|
def pbCalcAccuracyModifiers(user,target,modifiers)
|
||||||
# Ability effects that alter accuracy calculation
|
# Ability effects that alter accuracy calculation
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserAbility(user.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromUser(user.ability,
|
||||||
modifiers,user,target,self,@calcType)
|
modifiers,user,target,self,@calcType)
|
||||||
end
|
end
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(b.ability,
|
||||||
modifiers,user,target,self,@calcType)
|
modifiers,user,target,self,@calcType)
|
||||||
end
|
end
|
||||||
if target.abilityActive? && !@battle.moldBreaker
|
if target.abilityActive? && !@battle.moldBreaker
|
||||||
BattleHandlers.triggerAccuracyCalcTargetAbility(target.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(target.ability,
|
||||||
modifiers,user,target,self,@calcType)
|
modifiers,user,target,self,@calcType)
|
||||||
end
|
end
|
||||||
# Item effects that alter accuracy calculation
|
# Item effects that alter accuracy calculation
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserItem(user.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromUser(user.item,
|
||||||
modifiers,user,target,self,@calcType)
|
modifiers,user,target,self,@calcType)
|
||||||
end
|
end
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
BattleHandlers.triggerAccuracyCalcTargetItem(target.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromTarget(target.item,
|
||||||
modifiers,user,target,self,@calcType)
|
modifiers,user,target,self,@calcType)
|
||||||
end
|
end
|
||||||
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to
|
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to
|
||||||
@@ -181,17 +181,17 @@ class Battle::Move
|
|||||||
c = 0
|
c = 0
|
||||||
# Ability effects that alter critical hit rate
|
# Ability effects that alter critical hit rate
|
||||||
if c>=0 && user.abilityActive?
|
if c>=0 && user.abilityActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcUserAbility(user.ability,user,target,c)
|
c = Battle::AbilityEffects.triggerCriticalCalcFromUser(user.ability, user, target, c)
|
||||||
end
|
end
|
||||||
if c>=0 && target.abilityActive? && !@battle.moldBreaker
|
if c>=0 && target.abilityActive? && !@battle.moldBreaker
|
||||||
c = BattleHandlers.triggerCriticalCalcTargetAbility(target.ability,user,target,c)
|
c = Battle::AbilityEffects.triggerCriticalCalcFromTarget(target.ability, user, target, c)
|
||||||
end
|
end
|
||||||
# Item effects that alter critical hit rate
|
# Item effects that alter critical hit rate
|
||||||
if c>=0 && user.itemActive?
|
if c>=0 && user.itemActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcUserItem(user.item,user,target,c)
|
c = Battle::ItemEffects.triggerCriticalCalcFromUser(user.item, user, target, c)
|
||||||
end
|
end
|
||||||
if c>=0 && target.itemActive?
|
if c>=0 && target.itemActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcTargetItem(target.item,user,target,c)
|
c = Battle::ItemEffects.triggerCriticalCalcFromTarget(target.item, user, target, c)
|
||||||
end
|
end
|
||||||
return false if c<0
|
return false if c<0
|
||||||
# Move-specific "always/never a critical hit" effects
|
# Move-specific "always/never a critical hit" effects
|
||||||
@@ -294,7 +294,7 @@ class Battle::Move
|
|||||||
end
|
end
|
||||||
# Ability effects that alter damage
|
# Ability effects that alter damage
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcUserAbility(user.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromUser(user.ability,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
if !@battle.moldBreaker
|
if !@battle.moldBreaker
|
||||||
@@ -303,28 +303,28 @@ class Battle::Move
|
|||||||
# how it works.
|
# how it works.
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcUserAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromAlly(b.ability,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
if target.abilityActive?
|
if target.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcTargetAbility(target.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTarget(target.ability,
|
||||||
user,target,self,multipliers,baseDmg,type) if !@battle.moldBreaker
|
user,target,self,multipliers,baseDmg,type) if !@battle.moldBreaker
|
||||||
BattleHandlers.triggerDamageCalcTargetAbilityNonIgnorable(target.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTargetNonIgnorable(target.ability,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
target.allAllies.each do |b|
|
target.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcTargetAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(b.ability,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter damage
|
# Item effects that alter damage
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
BattleHandlers.triggerDamageCalcUserItem(user.item,
|
Battle::ItemEffects.triggerDamageCalcFromUser(user.item,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
BattleHandlers.triggerDamageCalcTargetItem(target.item,
|
Battle::ItemEffects.triggerDamageCalcFromTarget(target.item,
|
||||||
user,target,self,multipliers,baseDmg,type)
|
user,target,self,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
# Parental Bond's second attack
|
# Parental Bond's second attack
|
||||||
|
|||||||
@@ -338,14 +338,14 @@ class Battle::AI
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
if canCheck
|
if canCheck
|
||||||
BattleHandlers.triggerDamageCalcUserAbility(user.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromUser(user.ability,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.mediumSkill && !moldBreaker
|
if skill>=PBTrainerAI.mediumSkill && !moldBreaker
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcUserAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromAlly(b.ability,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -360,14 +360,14 @@ class Battle::AI
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
if canCheck
|
if canCheck
|
||||||
BattleHandlers.triggerDamageCalcTargetAbility(target.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTarget(target.ability,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.bestSkill && !moldBreaker
|
if skill>=PBTrainerAI.bestSkill && !moldBreaker
|
||||||
target.allAllies.each do |b|
|
target.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerDamageCalcTargetAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(b.ability,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -379,7 +379,7 @@ class Battle::AI
|
|||||||
# round.
|
# round.
|
||||||
itemBlacklist = [:EXPERTBELT,:LIFEORB]
|
itemBlacklist = [:EXPERTBELT,:LIFEORB]
|
||||||
if !itemBlacklist.include?(user.item_id)
|
if !itemBlacklist.include?(user.item_id)
|
||||||
BattleHandlers.triggerDamageCalcUserItem(user.item,
|
Battle::ItemEffects.triggerDamageCalcFromUser(user.item,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -387,7 +387,7 @@ class Battle::AI
|
|||||||
# NOTE: Type-weakening berries aren't suitable for checking at the start
|
# NOTE: Type-weakening berries aren't suitable for checking at the start
|
||||||
# of the round.
|
# of the round.
|
||||||
if target.item && !target.item.is_berry?
|
if target.item && !target.item.is_berry?
|
||||||
BattleHandlers.triggerDamageCalcTargetItem(target.item,
|
Battle::ItemEffects.triggerDamageCalcFromTarget(target.item,
|
||||||
user,target,move,multipliers,baseDmg,type)
|
user,target,move,multipliers,baseDmg,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -560,20 +560,20 @@ class Battle::AI
|
|||||||
c = 0
|
c = 0
|
||||||
# Ability effects that alter critical hit rate
|
# Ability effects that alter critical hit rate
|
||||||
if c>=0 && user.abilityActive?
|
if c>=0 && user.abilityActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcUserAbility(user.ability,user,target,c)
|
c = Battle::AbilityEffects.triggerCriticalCalcFromUser(user.ability, user, target, c)
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.bestSkill
|
if skill>=PBTrainerAI.bestSkill
|
||||||
if c>=0 && !moldBreaker && target.abilityActive?
|
if c>=0 && !moldBreaker && target.abilityActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcTargetAbility(target.ability,user,target,c)
|
c = Battle::AbilityEffects.triggerCriticalCalcFromTarget(target.ability, user, target, c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter critical hit rate
|
# Item effects that alter critical hit rate
|
||||||
if c>=0 && user.itemActive?
|
if c>=0 && user.itemActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcUserItem(user.item,user,target,c)
|
c = Battle::ItemEffects.triggerCriticalCalcFromUser(user.item, user, target, c)
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.bestSkill
|
if skill>=PBTrainerAI.bestSkill
|
||||||
if c>=0 && target.itemActive?
|
if c>=0 && target.itemActive?
|
||||||
c = BattleHandlers.triggerCriticalCalcTargetItem(target.item,user,target,c)
|
c = Battle::ItemEffects.triggerCriticalCalcFromTarget(target.item, user, target, c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Other efffects
|
# Other efffects
|
||||||
@@ -638,31 +638,31 @@ class Battle::AI
|
|||||||
# Ability effects that alter accuracy calculation
|
# Ability effects that alter accuracy calculation
|
||||||
if skill>=PBTrainerAI.mediumSkill
|
if skill>=PBTrainerAI.mediumSkill
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserAbility(user.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromUser(user.ability,
|
||||||
modifiers,user,target,move,type)
|
modifiers,user,target,move,type)
|
||||||
end
|
end
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserAllyAbility(b.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(b.ability,
|
||||||
modifiers,user,target,move,type)
|
modifiers,user,target,move,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.bestSkill
|
if skill>=PBTrainerAI.bestSkill
|
||||||
if target.abilityActive? && !moldBreaker
|
if target.abilityActive? && !moldBreaker
|
||||||
BattleHandlers.triggerAccuracyCalcTargetAbility(target.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(target.ability,
|
||||||
modifiers,user,target,move,type)
|
modifiers,user,target,move,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter accuracy calculation
|
# Item effects that alter accuracy calculation
|
||||||
if skill>=PBTrainerAI.mediumSkill
|
if skill>=PBTrainerAI.mediumSkill
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
BattleHandlers.triggerAccuracyCalcUserItem(user.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromUser(user.item,
|
||||||
modifiers,user,target,move,type)
|
modifiers,user,target,move,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill>=PBTrainerAI.bestSkill
|
if skill>=PBTrainerAI.bestSkill
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
BattleHandlers.triggerAccuracyCalcTargetItem(target.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromTarget(target.item,
|
||||||
modifiers,user,target,move,type)
|
modifiers,user,target,move,type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module Battle::Common
|
module Battle::CatchAndStoreMixin
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Store caught Pokémon
|
# Store caught Pokémon
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -107,16 +107,16 @@ module Battle::Common
|
|||||||
case numShakes
|
case numShakes
|
||||||
when 0
|
when 0
|
||||||
pbDisplay(_INTL("Oh no! The Pokémon broke free!"))
|
pbDisplay(_INTL("Oh no! The Pokémon broke free!"))
|
||||||
BallHandlers.onFailCatch(ball,self,battler)
|
Battle::PokeBallEffects.onFailCatch(ball, self, battler)
|
||||||
when 1
|
when 1
|
||||||
pbDisplay(_INTL("Aww! It appeared to be caught!"))
|
pbDisplay(_INTL("Aww! It appeared to be caught!"))
|
||||||
BallHandlers.onFailCatch(ball,self,battler)
|
Battle::PokeBallEffects.onFailCatch(ball, self, battler)
|
||||||
when 2
|
when 2
|
||||||
pbDisplay(_INTL("Aargh! Almost had it!"))
|
pbDisplay(_INTL("Aargh! Almost had it!"))
|
||||||
BallHandlers.onFailCatch(ball,self,battler)
|
Battle::PokeBallEffects.onFailCatch(ball, self, battler)
|
||||||
when 3
|
when 3
|
||||||
pbDisplay(_INTL("Gah! It was so close, too!"))
|
pbDisplay(_INTL("Gah! It was so close, too!"))
|
||||||
BallHandlers.onFailCatch(ball,self,battler)
|
Battle::PokeBallEffects.onFailCatch(ball, self, battler)
|
||||||
when 4
|
when 4
|
||||||
pbDisplayBrief(_INTL("Gotcha! {1} was caught!",pkmn.name))
|
pbDisplayBrief(_INTL("Gotcha! {1} was caught!",pkmn.name))
|
||||||
@scene.pbThrowSuccess # Play capture success jingle
|
@scene.pbThrowSuccess # Play capture success jingle
|
||||||
@@ -135,7 +135,7 @@ module Battle::Common
|
|||||||
if GameData::Item.get(ball).is_snag_ball?
|
if GameData::Item.get(ball).is_snag_ball?
|
||||||
pkmn.owner = Pokemon::Owner.new_from_trainer(pbPlayer)
|
pkmn.owner = Pokemon::Owner.new_from_trainer(pbPlayer)
|
||||||
end
|
end
|
||||||
BallHandlers.onCatch(ball,self,pkmn)
|
Battle::PokeBallEffects.onCatch(ball, self, pkmn)
|
||||||
pkmn.poke_ball = ball
|
pkmn.poke_ball = ball
|
||||||
pkmn.makeUnmega if pkmn.mega?
|
pkmn.makeUnmega if pkmn.mega?
|
||||||
pkmn.makeUnprimal
|
pkmn.makeUnprimal
|
||||||
@@ -163,11 +163,8 @@ module Battle::Common
|
|||||||
# Get a catch rate if one wasn't provided
|
# Get a catch rate if one wasn't provided
|
||||||
catch_rate = pkmn.species_data.catch_rate if !catch_rate
|
catch_rate = pkmn.species_data.catch_rate if !catch_rate
|
||||||
# Modify catch_rate depending on the Poké Ball's effect
|
# Modify catch_rate depending on the Poké Ball's effect
|
||||||
ultraBeast = [:NIHILEGO, :BUZZWOLE, :PHEROMOSA, :XURKITREE, :CELESTEELA,
|
if !pkmn.species_data.has_flag?("UltraBeast") || ball == :BEASTBALL
|
||||||
:KARTANA, :GUZZLORD, :POIPOLE, :NAGANADEL, :STAKATAKA,
|
catch_rate = Battle::PokeBallEffects.modifyCatchRate(ball, catch_rate, self, battler)
|
||||||
:BLACEPHALON].include?(pkmn.species)
|
|
||||||
if !ultraBeast || ball == :BEASTBALL
|
|
||||||
catch_rate = BallHandlers.modifyCatchRate(ball,catch_rate,self,battler,ultraBeast)
|
|
||||||
else
|
else
|
||||||
catch_rate /= 10
|
catch_rate /= 10
|
||||||
end
|
end
|
||||||
@@ -184,7 +181,7 @@ module Battle::Common
|
|||||||
x = x.floor
|
x = x.floor
|
||||||
x = 1 if x<1
|
x = 1 if x<1
|
||||||
# Definite capture, no need to perform randomness checks
|
# Definite capture, no need to perform randomness checks
|
||||||
return 4 if x>=255 || BallHandlers.isUnconditional?(ball,self,battler)
|
return 4 if x>=255 || Battle::PokeBallEffects.isUnconditional?(ball, self, battler)
|
||||||
# Second half of the shakes calculation
|
# Second half of the shakes calculation
|
||||||
y = ( 65536 / ((255.0/x)**0.1875) ).floor
|
y = ( 65536 / ((255.0/x)**0.1875) ).floor
|
||||||
# Critical capture check
|
# Critical capture check
|
||||||
@@ -220,3 +217,10 @@ module Battle::Common
|
|||||||
return numShakes
|
return numShakes
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
#
|
||||||
|
#===============================================================================
|
||||||
|
class Battle
|
||||||
|
include Battle::CatchAndStoreMixin
|
||||||
|
end
|
||||||
@@ -1,498 +0,0 @@
|
|||||||
module BattleHandlers
|
|
||||||
# Battler's speed calculation
|
|
||||||
SpeedCalcAbility = AbilityHandlerHash.new
|
|
||||||
SpeedCalcItem = ItemHandlerHash.new
|
|
||||||
# Battler's weight calculation
|
|
||||||
WeightCalcAbility = AbilityHandlerHash.new
|
|
||||||
WeightCalcItem = ItemHandlerHash.new # Float Stone
|
|
||||||
# Battler's HP/stat changed
|
|
||||||
HPHealItem = ItemHandlerHash.new
|
|
||||||
AbilityOnHPDroppedBelowHalf = AbilityHandlerHash.new
|
|
||||||
ItemOnStatDropped = ItemHandlerHash.new
|
|
||||||
# Battler's status problem
|
|
||||||
StatusCheckAbilityNonIgnorable = AbilityHandlerHash.new # Comatose
|
|
||||||
StatusImmunityAbility = AbilityHandlerHash.new
|
|
||||||
StatusImmunityAbilityNonIgnorable = AbilityHandlerHash.new
|
|
||||||
StatusImmunityAllyAbility = AbilityHandlerHash.new
|
|
||||||
AbilityOnStatusInflicted = AbilityHandlerHash.new # Synchronize
|
|
||||||
StatusCureItem = ItemHandlerHash.new
|
|
||||||
StatusCureAbility = AbilityHandlerHash.new
|
|
||||||
# Battler's stat stages
|
|
||||||
StatLossImmunityAbility = AbilityHandlerHash.new
|
|
||||||
StatLossImmunityAbilityNonIgnorable = AbilityHandlerHash.new # Full Metal Body
|
|
||||||
StatLossImmunityAllyAbility = AbilityHandlerHash.new # Flower Veil
|
|
||||||
AbilityOnStatGain = AbilityHandlerHash.new # None!
|
|
||||||
AbilityOnStatLoss = AbilityHandlerHash.new
|
|
||||||
# Priority and turn order
|
|
||||||
PriorityChangeAbility = AbilityHandlerHash.new
|
|
||||||
PriorityBracketChangeAbility = AbilityHandlerHash.new # Stall
|
|
||||||
PriorityBracketChangeItem = ItemHandlerHash.new
|
|
||||||
PriorityBracketUseAbility = AbilityHandlerHash.new # None!
|
|
||||||
PriorityBracketUseItem = ItemHandlerHash.new
|
|
||||||
# Move usage failures
|
|
||||||
AbilityOnFlinch = AbilityHandlerHash.new # Steadfast
|
|
||||||
MoveBlockingAbility = AbilityHandlerHash.new
|
|
||||||
MoveImmunityTargetAbility = AbilityHandlerHash.new
|
|
||||||
UserItemOnMissing = ItemHandlerHash.new # Blunder Policy
|
|
||||||
# Move usage
|
|
||||||
MoveBaseTypeModifierAbility = AbilityHandlerHash.new
|
|
||||||
# Accuracy calculation
|
|
||||||
AccuracyCalcUserAbility = AbilityHandlerHash.new
|
|
||||||
AccuracyCalcUserAllyAbility = AbilityHandlerHash.new # Victory Star
|
|
||||||
AccuracyCalcTargetAbility = AbilityHandlerHash.new
|
|
||||||
AccuracyCalcUserItem = ItemHandlerHash.new
|
|
||||||
AccuracyCalcTargetItem = ItemHandlerHash.new
|
|
||||||
# Damage calculation
|
|
||||||
DamageCalcUserAbility = AbilityHandlerHash.new
|
|
||||||
DamageCalcUserAllyAbility = AbilityHandlerHash.new
|
|
||||||
DamageCalcTargetAbility = AbilityHandlerHash.new
|
|
||||||
DamageCalcTargetAbilityNonIgnorable = AbilityHandlerHash.new
|
|
||||||
DamageCalcTargetAllyAbility = AbilityHandlerHash.new
|
|
||||||
DamageCalcUserItem = ItemHandlerHash.new
|
|
||||||
DamageCalcTargetItem = ItemHandlerHash.new
|
|
||||||
# Critical hit calculation
|
|
||||||
CriticalCalcUserAbility = AbilityHandlerHash.new
|
|
||||||
CriticalCalcTargetAbility = AbilityHandlerHash.new
|
|
||||||
CriticalCalcUserItem = ItemHandlerHash.new
|
|
||||||
CriticalCalcTargetItem = ItemHandlerHash.new # None!
|
|
||||||
# Upon a move hitting a target
|
|
||||||
TargetAbilityOnHit = AbilityHandlerHash.new
|
|
||||||
UserAbilityOnHit = AbilityHandlerHash.new # Poison Touch
|
|
||||||
TargetItemOnHit = ItemHandlerHash.new
|
|
||||||
TargetItemOnHitPositiveBerry = ItemHandlerHash.new
|
|
||||||
# Abilities/items that trigger at the end of using a move
|
|
||||||
UserAbilityEndOfMove = AbilityHandlerHash.new
|
|
||||||
TargetItemAfterMoveUse = ItemHandlerHash.new
|
|
||||||
UserItemAfterMoveUse = ItemHandlerHash.new
|
|
||||||
TargetAbilityAfterMoveUse = AbilityHandlerHash.new
|
|
||||||
EndOfMoveItem = ItemHandlerHash.new # Leppa Berry
|
|
||||||
EndOfMoveStatRestoreItem = ItemHandlerHash.new # White Herb
|
|
||||||
# Experience and EV gain
|
|
||||||
ExpGainModifierItem = ItemHandlerHash.new # Lucky Egg
|
|
||||||
EVGainModifierItem = ItemHandlerHash.new
|
|
||||||
# Weather and terrin
|
|
||||||
WeatherExtenderItem = ItemHandlerHash.new
|
|
||||||
TerrainExtenderItem = ItemHandlerHash.new # Terrain Extender
|
|
||||||
TerrainStatBoostItem = ItemHandlerHash.new
|
|
||||||
# End Of Round
|
|
||||||
EORWeatherAbility = AbilityHandlerHash.new
|
|
||||||
EORHealingAbility = AbilityHandlerHash.new
|
|
||||||
EORHealingItem = ItemHandlerHash.new
|
|
||||||
EOREffectAbility = AbilityHandlerHash.new
|
|
||||||
EOREffectItem = ItemHandlerHash.new
|
|
||||||
EORGainItemAbility = AbilityHandlerHash.new
|
|
||||||
# Switching and fainting
|
|
||||||
CertainSwitchingUserAbility = AbilityHandlerHash.new # None!
|
|
||||||
CertainSwitchingUserItem = ItemHandlerHash.new # Shed Shell
|
|
||||||
TrappingTargetAbility = AbilityHandlerHash.new
|
|
||||||
TrappingTargetItem = ItemHandlerHash.new # None!
|
|
||||||
AbilityOnSwitchIn = AbilityHandlerHash.new
|
|
||||||
ItemOnSwitchIn = ItemHandlerHash.new # Air Balloon
|
|
||||||
ItemOnIntimidated = ItemHandlerHash.new # Adrenaline Orb
|
|
||||||
AbilityOnSwitchOut = AbilityHandlerHash.new
|
|
||||||
AbilityChangeOnBattlerFainting = AbilityHandlerHash.new
|
|
||||||
AbilityOnBattlerFainting = AbilityHandlerHash.new # Soul-Heart
|
|
||||||
AbilityOnTerrainChange = AbilityHandlerHash.new # Mimicry
|
|
||||||
AbilityOnIntimidated = AbilityHandlerHash.new # Rattled (Gen 8)
|
|
||||||
# Running from battle
|
|
||||||
RunFromBattleAbility = AbilityHandlerHash.new # Run Away
|
|
||||||
RunFromBattleItem = ItemHandlerHash.new # Smoke Ball
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerSpeedCalcAbility(ability,battler,mult)
|
|
||||||
ret = SpeedCalcAbility.trigger(ability,battler,mult)
|
|
||||||
return (ret!=nil) ? ret : mult
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerSpeedCalcItem(item,battler,mult)
|
|
||||||
ret = SpeedCalcItem.trigger(item,battler,mult)
|
|
||||||
return (ret!=nil) ? ret : mult
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerWeightCalcAbility(ability,battler,w)
|
|
||||||
ret = WeightCalcAbility.trigger(ability,battler,w)
|
|
||||||
return (ret!=nil) ? ret : w
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerWeightCalcItem(item,battler,w)
|
|
||||||
ret = WeightCalcItem.trigger(item,battler,w)
|
|
||||||
return (ret!=nil) ? ret : w
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerHPHealItem(item,battler,battle,forced)
|
|
||||||
ret = HPHealItem.trigger(item,battler,battle,forced)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnHPDroppedBelowHalf(ability, user, move_user, battle)
|
|
||||||
ret = AbilityOnHPDroppedBelowHalf.trigger(ability, user, move_user, battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerItemOnStatDropped(item, user, move_user, battle)
|
|
||||||
ret = ItemOnStatDropped.trigger(item, user, move_user, battle)
|
|
||||||
return (ret != nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerStatusCheckAbilityNonIgnorable(ability,battler,status)
|
|
||||||
ret = StatusCheckAbilityNonIgnorable.trigger(ability,battler,status)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatusImmunityAbility(ability,battler,status)
|
|
||||||
ret = StatusImmunityAbility.trigger(ability,battler,status)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatusImmunityAbilityNonIgnorable(ability,battler,status)
|
|
||||||
ret = StatusImmunityAbilityNonIgnorable.trigger(ability,battler,status)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatusImmunityAllyAbility(ability,battler,status)
|
|
||||||
ret = StatusImmunityAllyAbility.trigger(ability,battler,status)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnStatusInflicted(ability,battler,user,status)
|
|
||||||
AbilityOnStatusInflicted.trigger(ability,battler,user,status)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatusCureItem(item,battler,battle,forced)
|
|
||||||
ret = StatusCureItem.trigger(item,battler,battle,forced)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatusCureAbility(ability,battler)
|
|
||||||
ret = StatusCureAbility.trigger(ability,battler)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerStatLossImmunityAbility(ability,battler,stat,battle,showMessages)
|
|
||||||
ret = StatLossImmunityAbility.trigger(ability,battler,stat,battle,showMessages)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatLossImmunityAbilityNonIgnorable(ability,battler,stat,battle,showMessages)
|
|
||||||
ret = StatLossImmunityAbilityNonIgnorable.trigger(ability,battler,stat,battle,showMessages)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerStatLossImmunityAllyAbility(ability,bearer,battler,stat,battle,showMessages)
|
|
||||||
ret = StatLossImmunityAllyAbility.trigger(ability,bearer,battler,stat,battle,showMessages)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnStatGain(ability,battler,stat,user)
|
|
||||||
AbilityOnStatGain.trigger(ability,battler,stat,user)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnStatLoss(ability,battler,stat,user)
|
|
||||||
AbilityOnStatLoss.trigger(ability,battler,stat,user)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerPriorityChangeAbility(ability,battler,move,pri)
|
|
||||||
ret = PriorityChangeAbility.trigger(ability,battler,move,pri)
|
|
||||||
return (ret!=nil) ? ret : pri
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerPriorityBracketChangeAbility(ability,battler,subPri,battle)
|
|
||||||
ret = PriorityBracketChangeAbility.trigger(ability,battler,subPri,battle)
|
|
||||||
return (ret!=nil) ? ret : subPri
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerPriorityBracketChangeItem(item,battler,subPri,battle)
|
|
||||||
ret = PriorityBracketChangeItem.trigger(item,battler,subPri,battle)
|
|
||||||
return (ret!=nil) ? ret : subPri
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerPriorityBracketUseAbility(ability,battler,battle)
|
|
||||||
PriorityBracketUseAbility.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerPriorityBracketUseItem(item,battler,battle)
|
|
||||||
PriorityBracketUseItem.trigger(item,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerAbilityOnFlinch(ability,battler,battle)
|
|
||||||
AbilityOnFlinch.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerMoveBlockingAbility(ability,bearer,user,targets,move,battle)
|
|
||||||
ret = MoveBlockingAbility.trigger(ability,bearer,user,targets,move,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerMoveImmunityTargetAbility(ability, user, target, move, type, battle, show_message)
|
|
||||||
ret = MoveImmunityTargetAbility.trigger(ability, user, target, move, type, battle, show_message)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerUserItemOnMissing(item, user, target, move, hit_num, battle)
|
|
||||||
UserItemOnMissing.trigger(item, user, target, move, hit_num, battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerMoveBaseTypeModifierAbility(ability,user,move,type)
|
|
||||||
ret = MoveBaseTypeModifierAbility.trigger(ability,user,move,type)
|
|
||||||
return (ret!=nil) ? ret : type
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerAccuracyCalcUserAbility(ability,mods,user,target,move,type)
|
|
||||||
AccuracyCalcUserAbility.trigger(ability,mods,user,target,move,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAccuracyCalcUserAllyAbility(ability,mods,user,target,move,type)
|
|
||||||
AccuracyCalcUserAllyAbility.trigger(ability,mods,user,target,move,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAccuracyCalcTargetAbility(ability,mods,user,target,move,type)
|
|
||||||
AccuracyCalcTargetAbility.trigger(ability,mods,user,target,move,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAccuracyCalcUserItem(item,mods,user,target,move,type)
|
|
||||||
AccuracyCalcUserItem.trigger(item,mods,user,target,move,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAccuracyCalcTargetItem(item,mods,user,target,move,type)
|
|
||||||
AccuracyCalcTargetItem.trigger(item,mods,user,target,move,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerDamageCalcUserAbility(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcUserAbility.trigger(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcUserAllyAbility(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcUserAllyAbility.trigger(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcTargetAbility(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcTargetAbility.trigger(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcTargetAbilityNonIgnorable(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcTargetAbilityNonIgnorable.trigger(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcTargetAllyAbility(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcTargetAllyAbility.trigger(ability,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcUserItem(item,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcUserItem.trigger(item,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerDamageCalcTargetItem(item,user,target,move,mults,baseDmg,type)
|
|
||||||
DamageCalcTargetItem.trigger(item,user,target,move,mults,baseDmg,type)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerCriticalCalcUserAbility(ability,user,target,c)
|
|
||||||
ret = CriticalCalcUserAbility.trigger(ability,user,target,c)
|
|
||||||
return (ret!=nil) ? ret : c
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerCriticalCalcTargetAbility(ability,user,target,c)
|
|
||||||
ret = CriticalCalcTargetAbility.trigger(ability,user,target,c)
|
|
||||||
return (ret!=nil) ? ret : c
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerCriticalCalcUserItem(item,user,target,c)
|
|
||||||
ret = CriticalCalcUserItem.trigger(item,user,target,c)
|
|
||||||
return (ret!=nil) ? ret : c
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerCriticalCalcTargetItem(item,user,target,c)
|
|
||||||
ret = CriticalCalcTargetItem.trigger(item,user,target,c)
|
|
||||||
return (ret!=nil) ? ret : c
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerTargetAbilityOnHit(ability,user,target,move,battle)
|
|
||||||
TargetAbilityOnHit.trigger(ability,user,target,move,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerUserAbilityOnHit(ability,user,target,move,battle)
|
|
||||||
UserAbilityOnHit.trigger(ability,user,target,move,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTargetItemOnHit(item,user,target,move,battle)
|
|
||||||
TargetItemOnHit.trigger(item,user,target,move,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTargetItemOnHitPositiveBerry(item,battler,battle,forced)
|
|
||||||
ret = TargetItemOnHitPositiveBerry.trigger(item,battler,battle,forced)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerUserAbilityEndOfMove(ability,user,targets,move,battle)
|
|
||||||
UserAbilityEndOfMove.trigger(ability,user,targets,move,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTargetItemAfterMoveUse(item, battler, user, move, switched_battlers, battle)
|
|
||||||
TargetItemAfterMoveUse.trigger(item, battler, user, move, switched_battlers, battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerUserItemAfterMoveUse(item,user,targets,move,numHits,battle)
|
|
||||||
UserItemAfterMoveUse.trigger(item,user,targets,move,numHits,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTargetAbilityAfterMoveUse(ability, target, user, move, switched_battlers, battle)
|
|
||||||
TargetAbilityAfterMoveUse.trigger(ability, target, user, move, switched_battlers, battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEndOfMoveItem(item,battler,battle,forced)
|
|
||||||
ret = EndOfMoveItem.trigger(item,battler,battle,forced)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEndOfMoveStatRestoreItem(item,battler,battle,forced)
|
|
||||||
ret = EndOfMoveStatRestoreItem.trigger(item,battler,battle,forced)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerExpGainModifierItem(item,battler,exp)
|
|
||||||
ret = ExpGainModifierItem.trigger(item,battler,exp)
|
|
||||||
return (ret!=nil) ? ret : -1
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEVGainModifierItem(item,battler,evarray)
|
|
||||||
return false if !EVGainModifierItem[item]
|
|
||||||
EVGainModifierItem.trigger(item,battler,evarray)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerWeatherExtenderItem(item,weather,duration,battler,battle)
|
|
||||||
ret = WeatherExtenderItem.trigger(item,weather,duration,battler,battle)
|
|
||||||
return (ret!=nil) ? ret : duration
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTerrainExtenderItem(item,terrain,duration,battler,battle)
|
|
||||||
ret = TerrainExtenderItem.trigger(item,terrain,duration,battler,battle)
|
|
||||||
return (ret!=nil) ? ret : duration
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTerrainStatBoostItem(item,battler,battle)
|
|
||||||
ret = TerrainStatBoostItem.trigger(item,battler,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerEORWeatherAbility(ability,weather,battler,battle)
|
|
||||||
EORWeatherAbility.trigger(ability,weather,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEORHealingAbility(ability,battler,battle)
|
|
||||||
EORHealingAbility.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEORHealingItem(item,battler,battle)
|
|
||||||
EORHealingItem.trigger(item,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEOREffectAbility(ability,battler,battle)
|
|
||||||
EOREffectAbility.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEOREffectItem(item,battler,battle)
|
|
||||||
EOREffectItem.trigger(item,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerEORGainItemAbility(ability,battler,battle)
|
|
||||||
EORGainItemAbility.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerCertainSwitchingUserAbility(ability,switcher,battle)
|
|
||||||
ret = CertainSwitchingUserAbility.trigger(ability,switcher,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerCertainSwitchingUserItem(item,switcher,battle)
|
|
||||||
ret = CertainSwitchingUserItem.trigger(item,switcher,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTrappingTargetAbility(ability,switcher,bearer,battle)
|
|
||||||
ret = TrappingTargetAbility.trigger(ability,switcher,bearer,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerTrappingTargetItem(item,switcher,bearer,battle)
|
|
||||||
ret = TrappingTargetItem.trigger(item,switcher,bearer,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnSwitchIn(ability,battler,battle)
|
|
||||||
AbilityOnSwitchIn.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerItemOnSwitchIn(item,battler,battle)
|
|
||||||
ItemOnSwitchIn.trigger(item,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerItemOnIntimidated(item,battler,battle)
|
|
||||||
ret = ItemOnIntimidated.trigger(item,battler,battle)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnSwitchOut(ability,battler,endOfBattle)
|
|
||||||
AbilityOnSwitchOut.trigger(ability,battler,endOfBattle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityChangeOnBattlerFainting(ability,battler,fainted,battle)
|
|
||||||
AbilityChangeOnBattlerFainting.trigger(ability,battler,fainted,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnBattlerFainting(ability,battler,fainted,battle)
|
|
||||||
AbilityOnBattlerFainting.trigger(ability,battler,fainted,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnTerrainChange(ability, battler, battle, ability_changed)
|
|
||||||
AbilityOnTerrainChange.trigger(ability, battler, battle, ability_changed)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerAbilityOnIntimidated(ability,battler,battle)
|
|
||||||
AbilityOnIntimidated.trigger(ability,battler,battle)
|
|
||||||
end
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
def self.triggerRunFromBattleAbility(ability,battler)
|
|
||||||
ret = RunFromBattleAbility.trigger(ability,battler)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.triggerRunFromBattleItem(item,battler)
|
|
||||||
ret = RunFromBattleItem.trigger(item,battler)
|
|
||||||
return (ret!=nil) ? ret : false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
module BallHandlers
|
module Battle::PokeBallEffects
|
||||||
IsUnconditional = ItemHandlerHash.new
|
IsUnconditional = ItemHandlerHash.new
|
||||||
ModifyCatchRate = ItemHandlerHash.new
|
ModifyCatchRate = ItemHandlerHash.new
|
||||||
OnCatch = ItemHandlerHash.new
|
OnCatch = ItemHandlerHash.new
|
||||||
@@ -12,8 +12,8 @@ module BallHandlers
|
|||||||
return (ret != nil) ? ret : false
|
return (ret != nil) ? ret : false
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.modifyCatchRate(ball,catchRate,battle,battler,ultraBeast)
|
def self.modifyCatchRate(ball, catchRate, battle, battler)
|
||||||
ret = ModifyCatchRate.trigger(ball,catchRate,battle,battler,ultraBeast)
|
ret = ModifyCatchRate.trigger(ball, catchRate, battle, battler)
|
||||||
return (ret != nil) ? ret : catchRate
|
return (ret != nil) ? ret : catchRate
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -27,12 +27,10 @@ module BallHandlers
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# IsUnconditional
|
# IsUnconditional
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
BallHandlers::IsUnconditional.add(:MASTERBALL,proc { |ball,battle,battler|
|
Battle::PokeBallEffects::IsUnconditional.add(:MASTERBALL, proc { |ball, battle, battler|
|
||||||
next true
|
next true
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -42,67 +40,67 @@ BallHandlers::IsUnconditional.add(:MASTERBALL,proc { |ball,battle,battler|
|
|||||||
# Ball is a Beast Ball). In this case, all Balls' catch rates are set
|
# Ball is a Beast Ball). In this case, all Balls' catch rates are set
|
||||||
# elsewhere to 0.1x.
|
# elsewhere to 0.1x.
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
BallHandlers::ModifyCatchRate.add(:GREATBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:GREATBALL, proc { |ball, catchRate, battle, battler|
|
||||||
next catchRate * 1.5
|
next catchRate * 1.5
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:ULTRABALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:ULTRABALL, proc { |ball, catchRate, battle, battler|
|
||||||
next catchRate * 2
|
next catchRate * 2
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:SAFARIBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:SAFARIBALL, proc { |ball, catchRate, battle, battler|
|
||||||
next catchRate * 1.5
|
next catchRate * 1.5
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:NETBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:NETBALL, proc { |ball, catchRate, battle, battler|
|
||||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||||
catchRate *= multiplier if battler.pbHasType?(:BUG) || battler.pbHasType?(:WATER)
|
catchRate *= multiplier if battler.pbHasType?(:BUG) || battler.pbHasType?(:WATER)
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:DIVEBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:DIVEBALL, proc { |ball, catchRate, battle, battler|
|
||||||
catchRate *= 3.5 if battle.environment == :Underwater
|
catchRate *= 3.5 if battle.environment == :Underwater
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:NESTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:NESTBALL, proc { |ball, catchRate, battle, battler|
|
||||||
if battler.level <= 30
|
if battler.level <= 30
|
||||||
catchRate *= [(41 - battler.level) / 10.0, 1].max
|
catchRate *= [(41 - battler.level) / 10.0, 1].max
|
||||||
end
|
end
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:REPEATBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:REPEATBALL, proc { |ball, catchRate, battle, battler|
|
||||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||||
catchRate *= multiplier if battle.pbPlayer.owned?(battler.species)
|
catchRate *= multiplier if battle.pbPlayer.owned?(battler.species)
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:TIMERBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:TIMERBALL, proc { |ball, catchRate, battle, battler|
|
||||||
multiplier = [1 + (0.3 * battle.turnCount), 4].min
|
multiplier = [1 + (0.3 * battle.turnCount), 4].min
|
||||||
catchRate *= multiplier
|
catchRate *= multiplier
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:DUSKBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:DUSKBALL, proc { |ball, catchRate, battle, battler|
|
||||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3 : 3.5
|
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3 : 3.5
|
||||||
catchRate *= multiplier if battle.time==2
|
catchRate *= multiplier if battle.time == 2 # Night or in cave
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:QUICKBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:QUICKBALL, proc { |ball, catchRate, battle, battler|
|
||||||
catchRate *= 5 if battle.turnCount == 0
|
catchRate *= 5 if battle.turnCount == 0
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:FASTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:FASTBALL, proc { |ball, catchRate, battle, battler|
|
||||||
baseStats = battler.pokemon.baseStats
|
baseStats = battler.pokemon.baseStats
|
||||||
baseSpeed = baseStats[:SPEED]
|
baseSpeed = baseStats[:SPEED]
|
||||||
catchRate *= 4 if baseSpeed >= 100
|
catchRate *= 4 if baseSpeed >= 100
|
||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:LEVELBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:LEVELBALL, proc { |ball, catchRate, battle, battler|
|
||||||
maxlevel = 0
|
maxlevel = 0
|
||||||
battle.allSameSideBattlers.each { |b| maxlevel = b.level if b.level > maxlevel }
|
battle.allSameSideBattlers.each { |b| maxlevel = b.level if b.level > maxlevel }
|
||||||
if maxlevel >= battler.level * 4
|
if maxlevel >= battler.level * 4
|
||||||
@@ -115,13 +113,13 @@ BallHandlers::ModifyCatchRate.add(:LEVELBALL,proc { |ball,catchRate,battle,battl
|
|||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:LUREBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:LUREBALL, proc { |ball, catchRate, battle, battler|
|
||||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 5 : 3
|
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 5 : 3
|
||||||
catchRate *= multiplier if GameData::EncounterType.get($game_temp.encounter_type).type == :fishing
|
catchRate *= multiplier if GameData::EncounterType.get($game_temp.encounter_type).type == :fishing
|
||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:HEAVYBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:HEAVYBALL, proc { |ball, catchRate, battle, battler|
|
||||||
next 0 if catchRate == 0
|
next 0 if catchRate == 0
|
||||||
weight = battler.pokemon.species_data.base_stats[:SPEED]
|
weight = battler.pokemon.species_data.base_stats[:SPEED]
|
||||||
if Settings::NEW_POKE_BALL_CATCH_RATES
|
if Settings::NEW_POKE_BALL_CATCH_RATES
|
||||||
@@ -147,7 +145,7 @@ BallHandlers::ModifyCatchRate.add(:HEAVYBALL,proc { |ball,catchRate,battle,battl
|
|||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:LOVEBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:LOVEBALL, proc { |ball, catchRate, battle, battler|
|
||||||
battle.allSameSideBattlers.each do |b|
|
battle.allSameSideBattlers.each do |b|
|
||||||
next if b.species != battler.species
|
next if b.species != battler.species
|
||||||
next if b.gender == battler.gender || b.gender == 2 || battler.gender == 2
|
next if b.gender == battler.gender || b.gender == 2 || battler.gender == 2
|
||||||
@@ -157,7 +155,7 @@ BallHandlers::ModifyCatchRate.add(:LOVEBALL,proc { |ball,catchRate,battle,battle
|
|||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:MOONBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:MOONBALL, proc { |ball, catchRate, battle, battler|
|
||||||
# NOTE: Moon Ball cares about whether any species in the target's evolutionary
|
# NOTE: Moon Ball cares about whether any species in the target's evolutionary
|
||||||
# family can evolve with the Moon Stone, not whether the target itself
|
# family can evolve with the Moon Stone, not whether the target itself
|
||||||
# can immediately evolve with the Moon Stone.
|
# can immediately evolve with the Moon Stone.
|
||||||
@@ -168,17 +166,17 @@ BallHandlers::ModifyCatchRate.add(:MOONBALL,proc { |ball,catchRate,battle,battle
|
|||||||
next [catchRate, 255].min
|
next [catchRate, 255].min
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:SPORTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:SPORTBALL, proc { |ball, catchRate, battle, battler|
|
||||||
next catchRate * 1.5
|
next catchRate * 1.5
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:DREAMBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:DREAMBALL, proc { |ball, catchRate, battle, battler|
|
||||||
catchRate *= 4 if battler.asleep?
|
catchRate *= 4 if battler.asleep?
|
||||||
next catchRate
|
next catchRate
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::ModifyCatchRate.add(:BEASTBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
Battle::PokeBallEffects::ModifyCatchRate.add(:BEASTBALL, proc { |ball, catchRate, battle, battler|
|
||||||
if ultraBeast
|
if battler.pokemon.species_data.has_flag?("UltraBeast")
|
||||||
catchRate *= 5
|
catchRate *= 5
|
||||||
else
|
else
|
||||||
catchRate /= 10
|
catchRate /= 10
|
||||||
@@ -189,10 +187,10 @@ BallHandlers::ModifyCatchRate.add(:BEASTBALL,proc { |ball,catchRate,battle,battl
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
# OnCatch
|
# OnCatch
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
BallHandlers::OnCatch.add(:HEALBALL,proc { |ball,battle,pkmn|
|
Battle::PokeBallEffects::OnCatch.add(:HEALBALL, proc { |ball, battle, pkmn|
|
||||||
pkmn.heal
|
pkmn.heal
|
||||||
})
|
})
|
||||||
|
|
||||||
BallHandlers::OnCatch.add(:FRIENDBALL,proc { |ball,battle,pkmn|
|
Battle::PokeBallEffects::OnCatch.add(:FRIENDBALL, proc { |ball, battle, pkmn|
|
||||||
pkmn.happiness = 200
|
pkmn.happiness = 200
|
||||||
})
|
})
|
||||||
@@ -304,7 +304,7 @@ class SafariBattle
|
|||||||
attr_accessor :rules
|
attr_accessor :rules
|
||||||
attr_accessor :ballCount
|
attr_accessor :ballCount
|
||||||
|
|
||||||
include Battle::Common
|
include Battle::CatchAndStoreMixin
|
||||||
|
|
||||||
def pbRandom(x); return rand(x); end
|
def pbRandom(x); return rand(x); end
|
||||||
|
|
||||||
|
|||||||
@@ -20784,6 +20784,7 @@ Shape = Multiped
|
|||||||
Category = Parasite
|
Category = Parasite
|
||||||
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BUZZWOLE]
|
[BUZZWOLE]
|
||||||
Name = Buzzwole
|
Name = Buzzwole
|
||||||
@@ -20808,6 +20809,7 @@ Shape = Multiped
|
|||||||
Category = Swollen
|
Category = Swollen
|
||||||
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[PHEROMOSA]
|
[PHEROMOSA]
|
||||||
Name = Pheromosa
|
Name = Pheromosa
|
||||||
@@ -20832,6 +20834,7 @@ Shape = Bipedal
|
|||||||
Category = Lissome
|
Category = Lissome
|
||||||
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[XURKITREE]
|
[XURKITREE]
|
||||||
Name = Xurkitree
|
Name = Xurkitree
|
||||||
@@ -20855,6 +20858,7 @@ Shape = BipedalTail
|
|||||||
Category = Glowing
|
Category = Glowing
|
||||||
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[CELESTEELA]
|
[CELESTEELA]
|
||||||
Name = Celesteela
|
Name = Celesteela
|
||||||
@@ -20879,6 +20883,7 @@ Shape = Bipedal
|
|||||||
Category = Launch
|
Category = Launch
|
||||||
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[KARTANA]
|
[KARTANA]
|
||||||
Name = Kartana
|
Name = Kartana
|
||||||
@@ -20903,6 +20908,7 @@ Shape = Bipedal
|
|||||||
Category = Drawn Sword
|
Category = Drawn Sword
|
||||||
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[GUZZLORD]
|
[GUZZLORD]
|
||||||
Name = Guzzlord
|
Name = Guzzlord
|
||||||
@@ -20927,6 +20933,7 @@ Shape = BipedalTail
|
|||||||
Category = Junkivore
|
Category = Junkivore
|
||||||
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NECROZMA]
|
[NECROZMA]
|
||||||
Name = Necrozma
|
Name = Necrozma
|
||||||
@@ -21021,6 +21028,7 @@ Shape = BipedalTail
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NAGANADEL]
|
[NAGANADEL]
|
||||||
@@ -21046,6 +21054,7 @@ Shape = Winged
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[STAKATAKA]
|
[STAKATAKA]
|
||||||
Name = Stakataka
|
Name = Stakataka
|
||||||
@@ -21070,6 +21079,7 @@ Shape = Quadruped
|
|||||||
Category = Rampart
|
Category = Rampart
|
||||||
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BLACEPHALON]
|
[BLACEPHALON]
|
||||||
Name = Blacephalon
|
Name = Blacephalon
|
||||||
@@ -21094,6 +21104,7 @@ Shape = Bipedal
|
|||||||
Category = Fireworks
|
Category = Fireworks
|
||||||
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[ZERAORA]
|
[ZERAORA]
|
||||||
Name = Zeraora
|
Name = Zeraora
|
||||||
|
|||||||
@@ -20787,6 +20787,7 @@ Shape = Multiped
|
|||||||
Category = Parasite
|
Category = Parasite
|
||||||
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BUZZWOLE]
|
[BUZZWOLE]
|
||||||
Name = Buzzwole
|
Name = Buzzwole
|
||||||
@@ -20811,6 +20812,7 @@ Shape = Multiped
|
|||||||
Category = Swollen
|
Category = Swollen
|
||||||
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[PHEROMOSA]
|
[PHEROMOSA]
|
||||||
Name = Pheromosa
|
Name = Pheromosa
|
||||||
@@ -20835,6 +20837,7 @@ Shape = Bipedal
|
|||||||
Category = Lissome
|
Category = Lissome
|
||||||
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[XURKITREE]
|
[XURKITREE]
|
||||||
Name = Xurkitree
|
Name = Xurkitree
|
||||||
@@ -20858,6 +20861,7 @@ Shape = BipedalTail
|
|||||||
Category = Glowing
|
Category = Glowing
|
||||||
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[CELESTEELA]
|
[CELESTEELA]
|
||||||
Name = Celesteela
|
Name = Celesteela
|
||||||
@@ -20882,6 +20886,7 @@ Shape = Bipedal
|
|||||||
Category = Launch
|
Category = Launch
|
||||||
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[KARTANA]
|
[KARTANA]
|
||||||
Name = Kartana
|
Name = Kartana
|
||||||
@@ -20906,6 +20911,7 @@ Shape = Bipedal
|
|||||||
Category = Drawn Sword
|
Category = Drawn Sword
|
||||||
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[GUZZLORD]
|
[GUZZLORD]
|
||||||
Name = Guzzlord
|
Name = Guzzlord
|
||||||
@@ -20930,6 +20936,7 @@ Shape = BipedalTail
|
|||||||
Category = Junkivore
|
Category = Junkivore
|
||||||
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NECROZMA]
|
[NECROZMA]
|
||||||
Name = Necrozma
|
Name = Necrozma
|
||||||
@@ -21024,6 +21031,7 @@ Shape = BipedalTail
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NAGANADEL]
|
[NAGANADEL]
|
||||||
@@ -21049,6 +21057,7 @@ Shape = Winged
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[STAKATAKA]
|
[STAKATAKA]
|
||||||
Name = Stakataka
|
Name = Stakataka
|
||||||
@@ -21073,6 +21082,7 @@ Shape = Quadruped
|
|||||||
Category = Rampart
|
Category = Rampart
|
||||||
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BLACEPHALON]
|
[BLACEPHALON]
|
||||||
Name = Blacephalon
|
Name = Blacephalon
|
||||||
@@ -21097,6 +21107,7 @@ Shape = Bipedal
|
|||||||
Category = Fireworks
|
Category = Fireworks
|
||||||
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[ZERAORA]
|
[ZERAORA]
|
||||||
Name = Zeraora
|
Name = Zeraora
|
||||||
|
|||||||
@@ -20787,6 +20787,7 @@ Shape = Multiped
|
|||||||
Category = Parasite
|
Category = Parasite
|
||||||
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
Pokedex = One of several mysterious Ultra Beasts. People on the street report observing those infested by it suddenly becoming violent.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BUZZWOLE]
|
[BUZZWOLE]
|
||||||
Name = Buzzwole
|
Name = Buzzwole
|
||||||
@@ -20811,6 +20812,7 @@ Shape = Multiped
|
|||||||
Category = Swollen
|
Category = Swollen
|
||||||
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
Pokedex = This Ultra Beast appeared from another world. It shows off its body, but whether that display is a boast or a threat remains unclear.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[PHEROMOSA]
|
[PHEROMOSA]
|
||||||
Name = Pheromosa
|
Name = Pheromosa
|
||||||
@@ -20835,6 +20837,7 @@ Shape = Bipedal
|
|||||||
Category = Lissome
|
Category = Lissome
|
||||||
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
Pokedex = One of the Ultra Beasts. It refuses to touch anything, perhaps because it senses some uncleanness in this world.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[XURKITREE]
|
[XURKITREE]
|
||||||
Name = Xurkitree
|
Name = Xurkitree
|
||||||
@@ -20858,6 +20861,7 @@ Shape = BipedalTail
|
|||||||
Category = Glowing
|
Category = Glowing
|
||||||
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
Pokedex = One of the mysterious life-forms known as Ultra Beasts. Astonishing electric shocks emanate from its entire body, according to witnesses.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[CELESTEELA]
|
[CELESTEELA]
|
||||||
Name = Celesteela
|
Name = Celesteela
|
||||||
@@ -20882,6 +20886,7 @@ Shape = Bipedal
|
|||||||
Category = Launch
|
Category = Launch
|
||||||
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
Pokedex = One kind of Ultra Beast. Witnesses have seen it burn down a forest by expelling gas from its two arms.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[KARTANA]
|
[KARTANA]
|
||||||
Name = Kartana
|
Name = Kartana
|
||||||
@@ -20906,6 +20911,7 @@ Shape = Bipedal
|
|||||||
Category = Drawn Sword
|
Category = Drawn Sword
|
||||||
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
Pokedex = One of the Ultra Beast life-forms, it was observed cutting down a gigantic steel tower with one stroke of its blade.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[GUZZLORD]
|
[GUZZLORD]
|
||||||
Name = Guzzlord
|
Name = Guzzlord
|
||||||
@@ -20930,6 +20936,7 @@ Shape = BipedalTail
|
|||||||
Category = Junkivore
|
Category = Junkivore
|
||||||
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
Pokedex = A dangerous Ultra Beast, it appears to be eating constantly, but for some reason its droppings have never been found.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NECROZMA]
|
[NECROZMA]
|
||||||
Name = Necrozma
|
Name = Necrozma
|
||||||
@@ -21024,6 +21031,7 @@ Shape = BipedalTail
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
Pokedex = An Ultra Beast that lives in a different world, it cackles wildly as it sprays its opponents with poison from the needles on its head.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
Evolutions = NAGANADEL,HasMove,DRAGONPULSE
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[NAGANADEL]
|
[NAGANADEL]
|
||||||
@@ -21049,6 +21057,7 @@ Shape = Winged
|
|||||||
Category = Poison Pin
|
Category = Poison Pin
|
||||||
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
Pokedex = One kind of Ultra Beast, it fires a glowing, venomous liquid from its needles. This liquid is also immensely adhesive.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[STAKATAKA]
|
[STAKATAKA]
|
||||||
Name = Stakataka
|
Name = Stakataka
|
||||||
@@ -21073,6 +21082,7 @@ Shape = Quadruped
|
|||||||
Category = Rampart
|
Category = Rampart
|
||||||
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
Pokedex = When stone walls started moving and attacking, the brute's true identity was this mysterious life-form, which brings to mind an Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[BLACEPHALON]
|
[BLACEPHALON]
|
||||||
Name = Blacephalon
|
Name = Blacephalon
|
||||||
@@ -21097,6 +21107,7 @@ Shape = Bipedal
|
|||||||
Category = Fireworks
|
Category = Fireworks
|
||||||
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
Pokedex = It slithers toward people. Then, without warning, it triggers the explosion of its own head. It's apparently one kind of Ultra Beast.
|
||||||
Generation = 7
|
Generation = 7
|
||||||
|
Flags = UltraBeast
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
[ZERAORA]
|
[ZERAORA]
|
||||||
Name = Zeraora
|
Name = Zeraora
|
||||||
|
|||||||
Reference in New Issue
Block a user