More moves, allow for typeless moves
This commit is contained in:
@@ -6,7 +6,7 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
public class MultiAttack : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeMoveType(IExecutingMove move, IPokemon target, byte hit, ref TypeIdentifier moveType)
|
||||
public override void ChangeMoveType(IExecutingMove move, IPokemon target, byte hit, ref TypeIdentifier? moveType)
|
||||
{
|
||||
var item = move.User.HeldItem?.Name.ToString();
|
||||
var typeLibrary = move.User.Library.StaticLibrary.Types;
|
||||
@@ -15,6 +15,7 @@ public class MultiAttack : Script
|
||||
return;
|
||||
|
||||
var memoryType = item[..^7];
|
||||
typeLibrary.TryGetTypeIdentifier(memoryType, out moveType);
|
||||
if (typeLibrary.TryGetTypeIdentifier(memoryType, out var t))
|
||||
moveType = t;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user