diff --git a/PKHeX.Core/Editing/Bulk/BatchEditing.cs b/PKHeX.Core/Editing/Bulk/BatchEditing.cs index 742d79026..6b85d1ee4 100644 --- a/PKHeX.Core/Editing/Bulk/BatchEditing.cs +++ b/PKHeX.Core/Editing/Bulk/BatchEditing.cs @@ -65,6 +65,7 @@ public static class BatchEditing internal const string CONST_SHINY = "$shiny"; internal const string CONST_SUGGEST = "$suggest"; private const string CONST_BYTES = "$[]"; + private const string CONST_POINTER = "*"; internal const string PROP_LEGAL = "Legal"; internal const string PROP_TYPENAME = "ObjectType"; @@ -360,7 +361,14 @@ private static ModifyResult SetPKMProperty(StringInstruction cmd, BatchInfo info if (!pi.CanWrite) return ModifyResult.Error; - object val = cmd.Random ? cmd.RandomValue : cmd.PropertyValue; + object val; + if (cmd.Random) + val = cmd.RandomValue; + else if (cmd.PropertyValue.StartsWith(CONST_POINTER) && props.TryGetValue(cmd.PropertyValue[1..], out var opi)) + val = opi.GetValue(pk); + else + val = cmd.PropertyValue; + ReflectUtil.SetValue(pi, pk, val); return ModifyResult.Modified; }