mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Allow pay day mewtwo, disallow dizzy punch
#1772 transfer pk1->pk2->pk7 for mewtwo knowing dizzy punch, just so we can keep Pay Day
This commit is contained in:
parent
98dead5664
commit
802105d22d
10 changed files with 44 additions and 15 deletions
|
@ -215,7 +215,7 @@ namespace PKHeX.Core
|
|||
if (!(Info.EncounterMatch is EncounterStatic s) || !EncounterGenerator.IsVCStaticTransferEncounterValid(pkm, s))
|
||||
{ AddLine(Severity.Invalid, V80, CheckIdentifier.Encounter); return; }
|
||||
|
||||
foreach (var z in VerifyVCEncounter(pkm, EncounterOriginalGB, s))
|
||||
foreach (var z in VerifyVCEncounter(pkm, EncounterOriginalGB, s, Info.Moves))
|
||||
AddLine(z);
|
||||
}
|
||||
private void UpdateInfo()
|
||||
|
|
|
@ -809,7 +809,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
}
|
||||
}
|
||||
private static IEnumerable<CheckResult> VerifyVCEncounter(PKM pkm, IEncounterable encounter, ILocation transfer)
|
||||
private static IEnumerable<CheckResult> VerifyVCEncounter(PKM pkm, IEncounterable encounter, ILocation transfer, IList<CheckMoveResult> Moves)
|
||||
{
|
||||
// Check existing EncounterMatch
|
||||
if (encounter == null || transfer == null)
|
||||
|
@ -828,8 +828,29 @@ namespace PKHeX.Core
|
|||
if (pkm.Egg_Location != transfer.EggLocation)
|
||||
yield return new CheckResult(Severity.Invalid, V59, CheckIdentifier.Encounter);
|
||||
|
||||
if (encounter.Species == 150 && pkm.Moves.Contains(6)) // pay day
|
||||
yield return new CheckResult(Severity.Invalid, V82, CheckIdentifier.Encounter);
|
||||
// Flag Moves that cannot be transferred
|
||||
if (encounter.Species == 150 && pkm.VC1)
|
||||
{
|
||||
// can't have pay day if transferred from VC1
|
||||
int index = Array.IndexOf(pkm.Moves, 6); // pay day
|
||||
if (index >= 0)
|
||||
{
|
||||
var chk = Moves[index];
|
||||
if (chk.Generation == 1) // not obtained from a future gen
|
||||
Moves[index] = new CheckMoveResult(chk.Source, chk.Generation, Severity.Invalid, V82, CheckIdentifier.Move);
|
||||
}
|
||||
}
|
||||
else if (encounter is EncounterStatic s && s.Version == GameVersion.C && s.EggLocation == 256) // Dizzy Punch Gifts
|
||||
{
|
||||
// can't have Dizzy Punch at all
|
||||
int index = Array.IndexOf(pkm.Moves, 146); // Dizzy Punch
|
||||
if (index >= 0)
|
||||
{
|
||||
var chk = Moves[index];
|
||||
if (chk.Generation == 2) // not obtained from a future gen
|
||||
Moves[index] = new CheckMoveResult(chk.Source, chk.Generation, Severity.Invalid, V82, CheckIdentifier.Move);
|
||||
}
|
||||
}
|
||||
|
||||
bool checkShiny = pkm.VC2 || pkm.TradebackStatus == TradebackType.WasTradeback && pkm.VC1;
|
||||
if (!checkShiny)
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace PKHeX.Core
|
|||
public static string V78 {get; set;} = "Unable to match to a Mystery Gift in the database."; // Invalid
|
||||
public static string V80 {get; set;} = "Unable to match an encounter from origin game."; // Invalid
|
||||
public static string V81 {get; set;} = "Invalid Transfer Met Location."; // Invalid
|
||||
public static string V82 {get; set;} = "Mewtwo cannot be transferred while knowing Pay Day."; // Invalid
|
||||
public static string V82 {get; set;} = "Incompatible transfer move."; // Invalid
|
||||
|
||||
public static string V88 {get; set;} = "Current level is not below met level.";
|
||||
public static string V83 {get; set;} = "Met Level does not match Mystery Gift level.";
|
||||
|
|
|
@ -452,12 +452,8 @@ namespace PKHeX.Core
|
|||
{
|
||||
var moves = pk7.Moves;
|
||||
var index = Array.IndexOf(moves, 6);
|
||||
if (index != -1)
|
||||
{
|
||||
moves[index] = 0;
|
||||
pk7.Moves = moves;
|
||||
pk7.FixMoves();
|
||||
}
|
||||
if (index != -1) // convert from GSC to preserve moves since Pay Day cannot transfer 1->7 (but can 2->7)
|
||||
return ConvertToPK2().ConvertToPK7();
|
||||
}
|
||||
|
||||
pk7.RefreshChecksum();
|
||||
|
|
|
@ -475,6 +475,18 @@ namespace PKHeX.Core
|
|||
|
||||
pk7.TradeMemory(Bank: true); // oh no, memories on gen7 pkm
|
||||
|
||||
// Dizzy Punch cannot be transferred
|
||||
{
|
||||
var moves = pk7.Moves;
|
||||
var index = Array.IndexOf(moves, 146); // Dizzy Punch
|
||||
if (index != -1)
|
||||
{
|
||||
moves[index] = 0;
|
||||
pk7.Moves = moves;
|
||||
pk7.FixMoves();
|
||||
}
|
||||
}
|
||||
|
||||
pk7.RefreshChecksum();
|
||||
return pk7;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ V79 = Can't obtain Special encounter in Virtual Console games.
|
|||
V78 = Unable to match to a Mystery Gift in the database.
|
||||
V80 = Unable to match an encounter from origin game.
|
||||
V81 = Invalid Transfer Met Location.
|
||||
V82 = Mewtwo cannot be transferred while knowing Pay Day.
|
||||
V82 = Incompatible transfer move.
|
||||
V88 = Current level is not below met level.
|
||||
V83 = Met Level does not match Mystery Gift level.
|
||||
V84 = Current Level below Mystery Gift level.
|
||||
|
|
Binary file not shown.
|
@ -147,7 +147,7 @@ V79 = Pas de rencontre spéciale dans les jeux de Console Virtuelle.
|
|||
V78 = Impossible de trouver une correspondance dans les Cadeaux Mystères.
|
||||
V80 = Impossible de trouver une correspondance de rencontre dans le jeu d'origine.
|
||||
V81 = Pokémon transféré, endroit de rencontre invalide.
|
||||
V82 = Mewtwo ne peut pas être transféré en connaissant Représailles.
|
||||
V82 = Attaque de transfert incompatible.
|
||||
V88 = Le niveau actuel est au-dessus du niveau de rencontre.
|
||||
V83 = Niveau de rencontre inégal au niveau défini par Cadeau Mystère.
|
||||
V84 = Niveau actuel au-dessous du niveau défini par Cadeau Mystère.
|
||||
|
|
|
@ -147,7 +147,7 @@ V79 = 버추얼 콘솔 게임에서 얻을 수 없는 특수 인카운터입니
|
|||
V78 = 이상한소포 데이터베이스에 존재하지 않습니다.
|
||||
V80 = 만난 게임의 인카운터와 일치하지 않습니다.
|
||||
V81 = 옮겨진 만난 장소가 잘못되었습니다.
|
||||
V82 = 뮤츠는 고양이돈받기를 배운 채로 옮길 수 없습니다.
|
||||
V82 = 호환되지 않는 전송 공격.
|
||||
V88 = 현재 레벨이 만난 레벨보다 낮지 않습니다.
|
||||
V83 = 만난 레벨이 이상한소포 레벨과 일치하지 않습니다.
|
||||
V84 = 현재 레벨이 이상한소포 레벨보다 낮습니다.
|
||||
|
|
|
@ -147,7 +147,7 @@ V79 = 不能在VC中特殊遇见该种宝可梦。
|
|||
V78 = 不能与数据库中神秘礼物匹配。
|
||||
V80 = 不能在来源版本中找到对应相遇方式。
|
||||
V81 = 传送相遇地点不合法。
|
||||
V82 = 超梦不能在习得聚宝功的状态下传送。
|
||||
V82 = 不兼容的传输攻击。
|
||||
V88 = 当前等级不低于相遇等级。
|
||||
V83 = 相遇等级与神秘礼物等级不一致。
|
||||
V84 = 相遇等级低于神秘礼物等级。
|
||||
|
|
Loading…
Reference in a new issue