Adds a lot more move effects
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.Models.Choices;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
@@ -54,16 +51,7 @@ public class BideEffect : Script
|
||||
choice = _choice;
|
||||
return;
|
||||
}
|
||||
|
||||
var bideMove = _owner.Moves.FirstOrDefault(x => x?.MoveData.Name == "bide");
|
||||
if (bideMove == null)
|
||||
{
|
||||
if (!_owner.Library.StaticLibrary.Moves.TryGet("bide", out var moveData))
|
||||
throw new Exception("Move 'bide' not found in move library.");
|
||||
|
||||
bideMove = new LearnedMoveImpl(moveData, MoveLearnMethod.Unknown);
|
||||
}
|
||||
|
||||
choice = _choice = new MoveChoice(_owner, bideMove, sideIndex, position);
|
||||
var opposingSideIndex = (byte)(_owner.BattleData?.SideIndex == 0 ? 1 : 0);
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, "bide", opposingSideIndex, position);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user