Even more abilities
This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Heatproof.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Heatproof.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Heatproof is an ability that halves the damage taken from Fire-type moves and burn.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Heatproof_(Ability)">Bulbapedia - Heatproof</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "heatproof")]
|
||||
public class Heatproof : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
||||
{
|
||||
if (move.GetHitData(target, hit).Type?.Name == "fire")
|
||||
{
|
||||
basePower = (ushort)(basePower / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user