Replace all raw string comparisons with StringKey, source generator that creates cache keys for all names for Gen7 plugin
All checks were successful
Build / Build (push) Successful in 2m21s
All checks were successful
Build / Build (push) Successful in 2m21s
This commit is contained in:
@@ -14,14 +14,14 @@ public class IngrainEffect : Script, IScriptFailIncomingMove, IScriptOnEndTurn,
|
||||
/// <inheritdoc />
|
||||
public void PreventSelfSwitch(ISwitchChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.User.Types.All(x => x.Name != "ghost"))
|
||||
if (choice.User.Types.All(x => x.Name != TypeNames.Ghost))
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void PreventSelfRunAway(IFleeChoice choice, ref bool prevent)
|
||||
{
|
||||
if (choice.User.Types.All(x => x.Name != "ghost"))
|
||||
if (choice.User.Types.All(x => x.Name != TypeNames.Ghost))
|
||||
prevent = true;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class IngrainEffect : Script, IScriptFailIncomingMove, IScriptOnEndTurn,
|
||||
/// <inheritdoc />
|
||||
public void FailIncomingMove(IExecutingMove move, IPokemon target, ref bool fail)
|
||||
{
|
||||
if (move.UseMove.Name == "roar" || move.UseMove.Name == "whirlwind")
|
||||
if (move.UseMove.Name == MoveNames.Roar || move.UseMove.Name == MoveNames.Whirlwind)
|
||||
{
|
||||
fail = true;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class IngrainEffect : Script, IScriptFailIncomingMove, IScriptOnEndTurn,
|
||||
public void ChangeTypesForIncomingMove(IExecutingMove executingMove, IPokemon target, byte hitIndex,
|
||||
IList<TypeIdentifier> types)
|
||||
{
|
||||
if (executingMove.UseMove.MoveType.Name == "ground")
|
||||
if (executingMove.UseMove.MoveType.Name == TypeNames.Ground)
|
||||
{
|
||||
var typeLibrary = target.Library.StaticLibrary.Types;
|
||||
// Remove all types that are immune to ground moves
|
||||
|
||||
Reference in New Issue
Block a user