More moves
This commit is contained in:
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Outrage.cs
Normal file
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Outrage.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "outrage")]
|
||||
public class Outrage : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
if (move.User.Volatile.Contains<OutrageEffect>())
|
||||
return;
|
||||
|
||||
var battleData = move.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
|
||||
var turns = battleData.Battle.Random.GetBool() ? 2 : 3;
|
||||
move.User.Volatile.Add(new OutrageEffect(move.User, turns, move.MoveChoice.TargetSide,
|
||||
move.MoveChoice.TargetPosition));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user