Implements several more moves
This commit is contained in:
30
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/ChargeEffect.cs
Normal file
30
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/ChargeEffect.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "charge_effect")]
|
||||
public class ChargeEffect : Script
|
||||
{
|
||||
private bool _turnOfUse = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
|
||||
{
|
||||
var library = target.BattleData?.Battle.Library;
|
||||
if (library == null)
|
||||
return;
|
||||
if (!library.StaticLibrary.Types.TryGetTypeIdentifier("electric", out var electricType))
|
||||
return;
|
||||
if (move.UseMove.MoveType == electricType)
|
||||
modifier *= 2;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
if (_turnOfUse)
|
||||
{
|
||||
_turnOfUse = false;
|
||||
return;
|
||||
}
|
||||
RemoveSelf();
|
||||
}
|
||||
}
|
||||
7
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/Confusion.cs
Normal file
7
Plugins/PkmnLib.Plugin.Gen7/Scripts/Pokemon/Confusion.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "confusion")]
|
||||
public class Confusion : Script
|
||||
{
|
||||
// TODO: Implement confusion
|
||||
}
|
||||
Reference in New Issue
Block a user