More abilities, refactor custom triggers to be typed.
All checks were successful
Build / Build (push) Successful in 48s
All checks were successful
Build / Build (push) Successful in 48s
This commit is contained in:
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/MarvelScale.cs
Normal file
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/MarvelScale.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Marvel Scale is an ability that increases the Pokémon's Defense by 50% when it has a status condition.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Marvel_Scale_(Ability)">Bulbapedia - Marvel Scale</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "marvel_scale")]
|
||||
public class MarvelScale : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeIncomingMoveDefensiveStatValue(IExecutingMove move, IPokemon target, byte hit,
|
||||
uint offensiveStat, StatisticSet<uint> statisticSet, Statistic stat, ref uint value)
|
||||
{
|
||||
if (!target.StatusScript.IsEmpty && stat == Statistic.Defense)
|
||||
{
|
||||
value = value.MultiplyOrMax(1.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user