using PkmnLib.Plugin.Gen7.Scripts.Pokemon; namespace PkmnLib.Plugin.Gen7.Scripts.Abilities; /// /// Flash Fire is an ability that makes the Pokémon immune to Fire-type moves. /// When hit by a Fire-type move, the ability activates and increases the power of the Pokémon's Fire-type moves by 50%. /// This ability is commonly associated with Ninetales and Arcanine. /// /// Bulbapedia - Flash Fire /// [Script(ScriptCategory.Ability, "flash_fire")] public class FlashFire : Script, IScriptChangeIncomingEffectiveness { /// public void ChangeIncomingEffectiveness(IExecutingMove executingMove, IPokemon target, byte hitIndex, ref float effectiveness) { if (executingMove.GetHitData(target, hitIndex).Type?.Name != "fire") return; effectiveness = 0f; if (target.Volatile.Contains()) return; target.Volatile.Add(new FlashFireEffect()); executingMove.Battle.EventHook.Invoke(new AbilityTriggerEvent(target)); } }