Add batch editor smart ability instruction

$0 or $1 or $2 for ability 1/2/4 (just think of it with 012345...).
Will set the hidden ability for every mon (AbilityNumber=4 and
Ability=PInfo.Abils[2])

#749 as promised
This commit is contained in:
Kurt
2017-01-25 23:03:57 -08:00
parent c18d23073b
commit 37b3e58979

View File

@@ -392,6 +392,8 @@ private static ModifyResult ProcessPKM(PKM PKM, IEnumerable<StringInstruction> F
PKM.EggMetDate = DateTime.ParseExact(cmd.PropertyValue, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None);
else if (cmd.PropertyName == nameof(PKM.EncryptionConstant) && cmd.PropertyValue == CONST_RAND)
ReflectUtil.SetValue(PKM, cmd.PropertyName, Util.rnd32().ToString());
else if ((cmd.PropertyName == nameof(PKM.Ability) || cmd.PropertyName == nameof(PKM.AbilityNumber)) && cmd.PropertyValue.StartsWith("$"))
PKM.RefreshAbility(Convert.ToInt16(cmd.PropertyValue[1]) - 0x30);
else if(cmd.PropertyName == nameof(PKM.PID) && cmd.PropertyValue == CONST_RAND)
PKM.setPIDGender(PKM.Gender);
else if (cmd.PropertyName == nameof(PKM.EncryptionConstant) && cmd.PropertyValue == nameof(PKM.PID))