Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Amplify - Powers up sound-based moves.
- AbilityEffects::DamageCalcFromUser.copy(:PUNKROCK, :AMPLIFY)
- #Benevolence - The Pokémon and its allies restore a little HP each turn.
- Battle::AbilityEffects::EndOfRoundHealing.add(:BENEVOLENCE,
- proc { |ability, battler, battle|
- team = battler.allAllies
- team.push(battler)
- team.each do |b|
- heal = true if b.canHeal? && (b.near?(battler) || b == battler)
- end
- if heal == true
- battle.pbShowAbilitySplash(battler)
- team.each do |b|
- next if !b.canHeal? || !b.near?(battler)
- b.pbRecoverHP(b.totalhp / 16)
- end
- battle.pbDisplay(_INTL("{1}'s {2} restored its team's HP!", battler.pbThis, battler.abilityName))
- battle.pbHideAbilitySplash(battler)
- end
- }
- )
- #Bombardier - Powers up ball and bomb moves.
- Battle::AbilityEffects::DamageCalcFromUser.add(:BOMBARDIER,
- proc { |ability, user, target, move, mults, baseDmg, type|
- mults[:attack_multiplier] *= 1.3 if move.bombMove?
- }
- )
- #Cast Off - Restores the Pokémon's lost stats at the end of the turn.
- Battle::AbilityEffects::EndOfRoundEffect.add(:CASTOFF,
- proc { |ability, battler, battle|
- if battler.hasLoweredStatStages?
- GameData::Stat.each_battle { |s| battler.stages[s.id] = 0 if battler.stages[s.id] < 0 }
- end
- battle.pbDisplay(_INTL("{1}'s {2} restored its lowered stats!", battler.pbThis, battler.abilityName))
- }
- )
- # Cursed Fangs - Bites from this Pokémon spread this ability.
- Battle::AbilityEffects::OnDealingHit.add(:CURSEDFANGS,
- proc { |ability, user, target, move, battle|
- next if !move.bitingMove?
- next if target.fainted?
- next if target.unstoppableAbility? || target.ability == ability
- oldAbil = nil
- battle.pbShowAbilitySplash(target) if target.opposes?(user)
- if target.affectedByContactEffect?(Battle::Scene::USE_ABILITY_SPLASH)
- oldAbil = target.ability
- battle.pbShowAbilitySplash(target, true, false) if target.opposes?(user)
- target.ability = ability
- battle.pbReplaceAbilitySplash(target) if target.opposes?(user)
- if Battle::Scene::USE_ABILITY_SPLASH
- battle.pbDisplay(_INTL("{1}'s Ability became {2}!", target.pbThis, target.abilityName))
- else
- battle.pbDisplay(_INTL("{1}'s Ability became {2} because of {3}!",
- target.pbThis, target.abilityName, user.pbThis(true)))
- end
- battle.pbHideAbilitySplash(target) if target.opposes?(user)
- end
- battle.pbHideAbilitySplash(user) if target.opposes?(user)
- target.pbOnLosingAbility(oldAbil)
- target.pbTriggerAbilityOnGainingIt
- }
- )
- #Diabolate - Normal-type moves become Dark-type moves.
- Battle::AbilityEffects::ModifyMoveBaseType.add(:DIABOLATE,
- proc { |ability, user, move, type|
- next if type != :NORMAL || !GameData::Type.exists?(:DARK)
- move.powerBoost = true
- next :DARK
- }
- )
- Battle::AbilityEffects::DamageCalcFromUser.copy(:AERILATE, :DIABOLATE)
- #Draft Rider - Boosts the Speed stat when it’s hit by a Flying-type move.
- Battle::AbilityEffects::OnBeingHit.add(:DRAFTRIDER,
- proc { |ability, user, target, move, battle|
- next if ![:FLYING].include?(move.calcType)
- target.pbRaiseStatStageByAbility(:SPEED, 1, target)
- }
- )
- #Eclipse Veil - Boosts the Pokémon's evasion when it enters a battle.
- #On the turn this Pokémon enters battle, including the very first turn of battle, this Pokémon has 1.5× its evasion. Its evasion returns to normal at the end of that turn.
- #The evasion bonus does not count as a stat modifier.
- Battle::AbilityEffects::AccuracyCalcFromTarget.add(:ECLIPSEVEIL,
- proc { |ability, mods, user, target, move, type|
- mods[:evasion_multiplier] *= 1.5 if target.turnCount < 1
- }
- )
- #Fighting Spirit - Powers up Fighting-type moves when the Pokémon is in trouble.
- Battle::AbilityEffects::DamageCalcFromUser.add(:FIGHTINGSPIRIT,
- proc { |ability, user, target, move, mults, baseDmg, type|
- if user.hp <= user.totalhp / 3 && type == :FIGHTING
- mults[:attack_multiplier] *= 1.5
- end
- }
- )
- #Frozen Armor - Boosts the Defense stat when hit by an Ice-type move.
- Battle::AbilityEffects::MoveImmunity.add(:FROZENARMOR,
- proc { |ability, user, target, move, type, battle, show_message|
- next target.pbMoveImmunityStatRaisingAbility(user, move, type,
- :ICE, :DEFENSE, 2, show_message)
- }
- )
- #Gas Guzzler - Doubles the Pokémon’s Speed stat in Miasma Terrain.
- Battle::AbilityEffects::SpeedCalc.add(:GASGUZZLER,
- proc { |ability, battler, mult|
- next mult * 2 if battler.battle.field.terrain == :Miasma
- }
- )
- #Grass Cloak - Boosts evasion in Grassy Terrain.
- Battle::AbilityEffects::AccuracyCalcFromTarget.add(:GRASSCLOAK,
- proc { |ability, mods, user, target, move, type|
- mods[:evasion_multiplier] *= 1.25 if user.battle.field.terrain == :Grassy
- }
- )
- #Heat Wall - Evaporates Water-type moves aimed at this Pokémon's team.
- Battle::AbilityEffects::MoveImmunity.add(:HEATWALL,
- proc { |ability, user, target, move, type, battle, show_message|
- next false if type != :WATER
- if show_message
- battle.pbShowAbilitySplash(target)
- if Battle::Scene::USE_ABILITY_SPLASH
- battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
- else
- battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
- target.pbThis, target.abilityName, move.name))
- end
- battle.pbHideAbilitySplash(target)
- end
- next true
- }
- )
- Battle::AbilityEffects::DamageCalcFromTargetAlly.add(:HEATWALL,
- proc { |ability, user, target, move, mults, baseDmg, type|
- mults[:defense_multiplier] *= 1.5 if type == :WATER
- }
- )
- # Indomitable - Restores the Pokémon's lost stats at the end of the turn.
- AbilityEffects::EndOfRoundEffect.copy(:CASTOFF, :INDOMITABLE)
- # Last-Ditch - Powers up Dark-type moves when the Pokémon is in trouble.
- Battle::AbilityEffects::DamageCalcFromUser.add(:LASTDITCH,
- proc { |ability, user, target, move, mults, baseDmg, type|
- if user.hp <= user.totalhp / 3 && type == :DARK
- mults[:attack_multiplier] *= 1.5
- end
- }
- )
- #Lucky Shot - Boosts the Attack and Special Attack stats, but lowers accuracy.
- Battle::AbilityEffects::AccuracyCalcFromUser.add(:LUCKYSHOT,
- proc { |ability, mods, user, target, move, type|
- mods[:accuracy_multiplier] *= 0.8
- }
- )
- Battle::AbilityEffects::DamageCalcFromUser.add(:LUCKYSHOT,
- proc { |ability, user, target, move, mults, baseDmg, type|
- mults[:attack_multiplier] *= 1.3
- }
- )
- #Miasma Surge - Turns the ground into Miasma Terrain when the Pokémon enters a battle.
- Battle::AbilityEffects::OnSwitchIn.add(:MIASMASURGE,
- proc { |ability, battler, battle, switch_in|
- next if battle.field.terrain == :Miasma
- battle.pbShowAbilitySplash(battler)
- battle.pbStartTerrain(battler, :Miasma)
- # NOTE: The ability splash is hidden again in def pbStartTerrain.
- }
- )
- #Need to get the calculation still
- #Nine Curses - Special Attacks do more damage the more the Pokémon has been harmed.
- Battle::AbilityEffects::DamageCalcFromUser.add(:NINECURSES,
- proc { |ability, user, target, move, mults, baseDmg, type|
- if move.specialMove?
- mults[:attack_multiplier] *= 1.5
- end
- }
- )
- #Play Dead - Gives full immunity to all Normal- and Fighting-type moves.
- Battle::AbilityEffects::MoveImmunity.add(:PLAYDEAD,
- proc { |ability, user, target, move, type, battle, show_message|
- next false if ![:NORMAL,:FIGHTING].include?(type) || user.hasActiveAbility?(:SCRAPPY)
- if show_message
- battle.pbShowAbilitySplash(target)
- if Battle::Scene::USE_ABILITY_SPLASH
- battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true)))
- else
- battle.pbDisplay(_INTL("{1}'s {2} made {3} ineffective!",
- target.pbThis, target.abilityName, move.name))
- end
- battle.pbHideAbilitySplash(target)
- end
- next true
- }
- )
- #Ravenous - Greedily steals the target’s energy with a bite.
- Battle::AbilityEffects::OnEndOfUsingMove.add(:RAVENOUS,
- proc { |ability, user, targets, move, battle|
- next if !user.canHeal?
- next if !move.bitingMove?
- targets.each { |b|
- hpGain = (b.damageState.hpLost / 4.0).round
- user.pbRecoverHPFromDrain(hpGain, b)
- }
- }
- )
- #Reverberate - The Pokémon makes harmful sound waves echo back at attackers.
- Battle::AbilityEffects::OnBeingHit.add(:REVERBERATE,
- proc { |ability, user, target, move, battle|
- next if !move.soundMove?
- battle.pbShowAbilitySplash(target)
- if user.takesSoundDamage?(Battle::Scene::USE_ABILITY_SPLASH) &&
- user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
- battle.scene.pbDamageAnimation(user)
- user.pbReduceHP(user.totalhp / 4, false)
- if Battle::Scene::USE_ABILITY_SPLASH
- battle.pbDisplay(_INTL("{1} was hurt by the reverberation!", user.pbThis))
- else
- battle.pbDisplay(_INTL("{1} is hurt by {2}'s {3}!", user.pbThis,
- target.pbThis(true), target.abilityName))
- end
- end
- battle.pbHideAbilitySplash(target)
- }
- )
- #Solar Boost - Boosts the Pokémon’s Speed stat in sunshine.
- AbilityEffects::DamageCalcFromUser.copy(:CHLOROPHYLL, :SOLARBOOST)
- #Spirit Call - Draws in all Ghost-type moves to boost its Sp. Atk stat.
- Battle::AbilityEffects::MoveImmunity.add(:SPIRITCALL,
- proc { |ability, user, target, move, type, battle, show_message|
- next target.pbMoveImmunityStatRaisingAbility(user, move, type,
- :GHOST, :SPECIAL_ATTACK, 1, show_message)
- }
- )
- Battle::AbilityEffects::AccuracyCalcFromTarget.add(:SPIRITCALL,
- proc { |ability, mods, user, target, move, type|
- mods[:base_accuracy] = 0 if type == :GHOST
- }
- )
- # Steam Cloud - Boosts the Pokémon's evasion when it enters a battle.
- Battle::AbilityEffects::AccuracyCalcFromTarget.copy(:ECLIPSEVEIL, :STEAMCLOUD)
- #Streamlined - Boosts resistance to Flying- and Water-type moves.
- Battle::AbilityEffects::DamageCalcFromTarget.add(:STREAMLINED,
- proc { |ability, user, target, move, mults, baseDmg, type|
- mults[:base_damage_multiplier] /= 2 if [:WATER, :FLYING].include?(type)
- }
- )
- #Third Eye - Powers up Psychic-type moves when the Pokémon is in trouble.
- Battle::AbilityEffects::DamageCalcFromUser.add(:THIRDEYE,
- proc { |ability, user, target, move, mults, baseDmg, type|
- if user.hp <= user.totalhp / 3 && type == :PSYCHIC
- mults[:attack_multiplier] *= 1.5
- end
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement