This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "helping_hand")]
|
||||
public class HelpingHandEffect : Script, IScriptChangeBasePower, IScriptOnEndTurn
|
||||
public class HelpingHandEffect : Script, IScriptChangeBasePower, IScriptOnEndTurn, IScriptStack
|
||||
{
|
||||
private int _stacks = 1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower) =>
|
||||
basePower = basePower.MultiplyOrMax(1.5f);
|
||||
basePower = basePower.MultiplyOrMax((float)Math.Pow(1.5f, _stacks));
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OnEndTurn(IScriptSource owner, IBattle battle) => RemoveSelf();
|
||||
|
||||
public void Stack()
|
||||
{
|
||||
_stacks++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user