Even more abilities
All checks were successful
Build / Build (push) Successful in 51s

This commit is contained in:
2025-06-14 13:21:23 +02:00
parent 4b07f36176
commit 5961bb746e
31 changed files with 787 additions and 157 deletions

View File

@@ -0,0 +1,26 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Sand Force is an ability that boosts the power of Rock, Ground, and Steel-type moves in a sandstorm.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Sand_Force_(Ability)">Bulbapedia - Sand Force</see>
/// </summary>
[Script(ScriptCategory.Ability, "sand_force")]
public class SandForce : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
if (move.Battle.WeatherName == ScriptUtils.ResolveName<Weather.Sandstorm>())
{
var type = move.GetHitData(target, hit).Type;
if (type != null &&
(type.Value.Name == "rock" || type.Value.Name == "ground" || type.Value.Name == "steel"))
{
basePower = basePower.MultiplyOrMax(1.3f);
}
}
}
// TODO: Prevent sandstorm damage.
}