More Gen 9 move effects

This commit is contained in:
Maruno17
2024-06-24 21:51:49 +01:00
parent 8e9417c3b7
commit ff2d8e5f55
21 changed files with 673 additions and 55 deletions

View File

@@ -66,7 +66,7 @@ class Battle::Battler
def form=(value)
@form = value
@pokemon.form = value if @pokemon
@pokemon.form = value if @pokemon && !@effects[PBEffects::Transform]
end
def ability
@@ -308,15 +308,17 @@ class Battle::Battler
# same type more than once, and should not include any invalid types.
def pbTypes(withExtraType = false)
ret = @types.uniq
# Burn Up erases the Fire-type.
# Burn Up erases the Fire-type
ret.delete(:FIRE) if @effects[PBEffects::BurnUp]
# Roost erases the Flying-type. If there are no types left, adds the Normal-
# type.
# Double Shock erases the Electric-type
ret.delete(:ELECTRIC) if @effects[PBEffects::DoubleShock]
# Roost erases the Flying-type (if there are no types left, adds the Normal-
# type)
if @effects[PBEffects::Roost]
ret.delete(:FLYING)
ret.push(:NORMAL) if ret.length == 0
end
# Add the third type specially.
# Add the third type specially
if withExtraType && @effects[PBEffects::ExtraType] && !ret.include?(@effects[PBEffects::ExtraType])
ret.push(@effects[PBEffects::ExtraType])
end