More abilities
This commit is contained in:
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Rivalry.cs
Normal file
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Rivalry.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PkmnLib.Static.Species;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Rivalry is an ability that increases damage to Pokémon of the same gender and decreases it to the opposite gender.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Rivalry_(Ability)">Bulbapedia - Rivalry</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "rivalry")]
|
||||
public class Rivalry : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
||||
{
|
||||
if (move.User.Gender == Gender.Genderless || target.Gender == Gender.Genderless)
|
||||
return;
|
||||
if (move.User.Gender == target.Gender)
|
||||
basePower = basePower.MultiplyOrMax(1.25f);
|
||||
else
|
||||
basePower = (ushort)(basePower * 0.75f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user