mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-13 07:54:59 +00:00
Coded some Gen 9 ability/item/move effects
This commit is contained in:
@@ -278,7 +278,7 @@ class Battle::Battler
|
||||
ret = (@pokemon) ? @pokemon.weight : 500
|
||||
ret += @effects[PBEffects::WeightChange]
|
||||
ret = 1 if ret < 1
|
||||
if abilityActive? && !@battle.moldBreaker
|
||||
if abilityActive? && !beingMoldBroken?
|
||||
ret = Battle::AbilityEffects.triggerWeightCalc(self.ability, self, ret)
|
||||
end
|
||||
if itemActive?
|
||||
@@ -382,7 +382,9 @@ class Battle::Battler
|
||||
:COMATOSE,
|
||||
:RKSSYSTEM
|
||||
]
|
||||
return ability_blacklist.include?(abil.id)
|
||||
return true if ability_blacklist.include?(abil.id)
|
||||
return true if hasActiveItem?(:ABILITYSHIELD)
|
||||
return false
|
||||
end
|
||||
|
||||
# Applies to gaining the ability.
|
||||
@@ -492,6 +494,11 @@ class Battle::Battler
|
||||
return hasActiveAbility?([:MOLDBREAKER, :TERAVOLT, :TURBOBLAZE])
|
||||
end
|
||||
|
||||
def beingMoldBroken?
|
||||
return false if hasActiveItem?(:ABILITYSHIELD)
|
||||
return @battle.moldBreaker
|
||||
end
|
||||
|
||||
def canChangeType?
|
||||
return ![:MULTITYPE, :RKSSYSTEM].include?(@ability_id)
|
||||
end
|
||||
@@ -502,7 +509,7 @@ class Battle::Battler
|
||||
return false if @effects[PBEffects::SmackDown]
|
||||
return false if @battle.field.effects[PBEffects::Gravity] > 0
|
||||
return true if pbHasType?(:FLYING)
|
||||
return true if hasActiveAbility?(:LEVITATE) && !@battle.moldBreaker
|
||||
return true if hasActiveAbility?(:LEVITATE) && !beingMoldBroken?
|
||||
return true if hasActiveItem?(:AIRBALLOON)
|
||||
return true if @effects[PBEffects::MagnetRise] > 0
|
||||
return true if @effects[PBEffects::Telekinesis] > 0
|
||||
@@ -571,7 +578,7 @@ class Battle::Battler
|
||||
return false
|
||||
end
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
||||
if hasActiveAbility?(:OVERCOAT) && !beingMoldBroken?
|
||||
if showMsg
|
||||
@battle.pbShowAbilitySplash(self)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
|
||||
Reference in New Issue
Block a user