More moves implemented
This commit is contained in:
31
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/EchoedVoice.cs
Normal file
31
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/EchoedVoice.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "echoed_voice")]
|
||||
public class EchoedVoice : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
|
||||
{
|
||||
var battleData = move.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
var side = battleData.Battle.Sides[battleData.SideIndex];
|
||||
var echoedVoiceData = side.VolatileScripts.Get<EchoedVoiceData>();
|
||||
if (echoedVoiceData == null)
|
||||
return;
|
||||
|
||||
modifier *= 2;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var battleData = move.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
var side = battleData.Battle.Sides[battleData.SideIndex];
|
||||
side.VolatileScripts.Add(new EchoedVoiceData());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user