More warning fixes
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
@@ -52,6 +50,6 @@ public class BideEffect : Script
|
||||
return;
|
||||
}
|
||||
var opposingSideIndex = (byte)(_owner.BattleData?.SideIndex == 0 ? 1 : 0);
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, "bide", opposingSideIndex, position);
|
||||
choice = _choice = TurnChoiceHelper.CreateMoveChoice(_owner, "bide", opposingSideIndex, position);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Libraries;
|
||||
using PkmnLib.Static.Utils;
|
||||
@@ -9,14 +8,12 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
[Script(ScriptCategory.Pokemon, "foresight")]
|
||||
public class ForesightEffect : Script
|
||||
{
|
||||
private readonly IReadOnlyTypeLibrary _typeLibrary;
|
||||
private readonly TypeIdentifier _normalType;
|
||||
private readonly TypeIdentifier _fightingType;
|
||||
private readonly TypeIdentifier _ghostType;
|
||||
|
||||
public ForesightEffect(IReadOnlyTypeLibrary typeLibrary)
|
||||
{
|
||||
_typeLibrary = typeLibrary;
|
||||
typeLibrary.TryGetTypeIdentifier("normal", out _normalType);
|
||||
typeLibrary.TryGetTypeIdentifier("fighting", out _fightingType);
|
||||
typeLibrary.TryGetTypeIdentifier("ghost", out _ghostType);
|
||||
|
||||
@@ -15,7 +15,7 @@ public class Infatuated : Script
|
||||
/// <inheritdoc />
|
||||
public override void PreventMove(IExecutingMove move, ref bool prevent)
|
||||
{
|
||||
if (move.User.BattleData?.Battle?.Random.GetBool() == true)
|
||||
if (move.User.BattleData?.Battle.Random.GetBool() == true)
|
||||
prevent = true;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public abstract class OutrageLikeEffect : Script
|
||||
/// <inheritdoc />
|
||||
public override void ForceTurnSelection(byte sideIndex, byte position, ref ITurnChoice? choice)
|
||||
{
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, "_move", _targetSide, _targetPosition);
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, _move, _targetSide, _targetPosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "perish_song")]
|
||||
|
||||
Reference in New Issue
Block a user