Bug fixes, add type name to TypeIdentifier
This commit is contained in:
@@ -29,7 +29,7 @@ public class DamageCalculatorTests
|
||||
// with an effective Attack stat of 123
|
||||
attacker.Setup(x => x.BoostedStats).Returns(new StatisticSet<uint>(1, 123, 1, 1, 1, 1));
|
||||
// We use 10 as the Ice type
|
||||
attacker.Setup(x => x.Types).Returns([new TypeIdentifier(10)]);
|
||||
attacker.Setup(x => x.Types).Returns([new TypeIdentifier(10, "ice")]);
|
||||
|
||||
var defender = new Mock<IPokemon>();
|
||||
// a Garchomp with an effective Defense stat of 163
|
||||
@@ -49,7 +49,7 @@ public class DamageCalculatorTests
|
||||
var hit = new Mock<IHitData>();
|
||||
// Ice Fang (an Ice-type physical move with a power of 65)
|
||||
hit.Setup(x => x.BasePower).Returns(65);
|
||||
hit.Setup(x => x.Type).Returns(new TypeIdentifier(10));
|
||||
hit.Setup(x => x.Type).Returns(new TypeIdentifier(10, "ice"));
|
||||
// has a double weakness to the move's Ice type
|
||||
hit.Setup(x => x.Effectiveness).Returns(4.0f);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace PkmnLib.Plugin.Gen7.Libraries;
|
||||
|
||||
public class Gen7MiscLibrary : IMiscLibrary
|
||||
{
|
||||
private readonly IMoveData _struggleData = new MoveDataImpl("struggle", new TypeIdentifier(0),
|
||||
private readonly IMoveData _struggleData = new MoveDataImpl("struggle", new TypeIdentifier(0, "none"),
|
||||
MoveCategory.Physical, 50, 255, 255, MoveTarget.Any, 0,
|
||||
new SecondaryEffectImpl(-1, "struggle", new Dictionary<StringKey, object?>()), []);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "future_sight")]
|
||||
[Script(ScriptCategory.Battle, "future_sight")]
|
||||
public class FutureSightEffect : Script
|
||||
{
|
||||
private int _turnsLeft = 3;
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Battle;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using PkmnLib.Static;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "geomancy")]
|
||||
public class Geomancy : BaseChargeMove<RequireChargeEffect>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Hail : Script
|
||||
{
|
||||
if (!battle.Library.StaticLibrary.Types.TryGetTypeIdentifier("ice", out var iceType))
|
||||
{
|
||||
iceType = new TypeIdentifier(255);
|
||||
iceType = new TypeIdentifier(255, "non_existent");
|
||||
}
|
||||
foreach (var side in battle.Sides)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user