namespace PkmnLib.Plugin.Gen7.Scripts.Moves;

[Script(ScriptCategory.Move, "psychic_terrain")]
public class PsychicTerrain : Script, IScriptOnSecondaryEffect
{
    /// <inheritdoc />
    public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
    {
        var battleData = move.User.BattleData;
        battleData?.Battle.SetTerrain(ScriptUtils.ResolveName<Terrain.PsychicTerrain>());
    }
}