Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Game/AI/CardExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using WindBot.Game.AI.Enums;
using YGOSharp.OCGWrapper.Enums;

Expand Down Expand Up @@ -38,23 +39,26 @@ public static bool IsMonsterHasPreventActivationEffectInBattle(this ClientCard c
/// </summary>
public static bool IsShouldNotBeTarget(this ClientCard card)
{
return !card.IsDisabled() && !card.HasType(CardType.Normal) && Enum.IsDefined(typeof(ShouldNotBeTarget), card.Id);
return !card.IsDisabled() && !card.HasType(CardType.Normal)
&& (Enum.IsDefined(typeof(ShouldNotBeTarget), card.Id) || card.Overlays.Any(code => code == 91025875));
}

/// <summary>
/// Is this card shouldn't be tried to be selected as target of monster?
/// </summary>
public static bool IsShouldNotBeMonsterTarget(this ClientCard card)
{
return !card.IsDisabled() && Enum.IsDefined(typeof(ShouldNotBeMonsterTarget), card.Id);
return !card.IsDisabled() && Enum.IsDefined(typeof(ShouldNotBeMonsterTarget), card.Id)
|| card.EquipCards.Any(c => c.IsCode(89812483) && !c.IsDisabled());
}

/// <summary>
/// Is this card shouldn't be tried to be selected as target of spell & trap?
/// </summary>
public static bool IsShouldNotBeSpellTrapTarget(this ClientCard card)
{
return !card.IsDisabled() && Enum.IsDefined(typeof(ShouldNotBeSpellTrapTarget), card.Id);
return !card.IsDisabled() && Enum.IsDefined(typeof(ShouldNotBeSpellTrapTarget), card.Id)
|| card.EquipCards.Any(c => c.IsCode(89812483) && !c.IsDisabled());
}

/// <summary>
Expand Down
11 changes: 9 additions & 2 deletions Game/AI/DefaultExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ protected class _CardId
public const int HeroicChampionClaivesolish = 97453744;
public const int GhostrickAlucard = 75367227;
public const int DinowrestlerKingTWrextle = 77967790;
public const int NumberF0UtopicFutureZexal = 41522092;

public const int PerformapalMissDirector = 92932860;
public const int AncientWarriorsMasterfulSunMou = 40140448;
Expand All @@ -198,6 +199,8 @@ protected class _CardId
public const int SeleneQueenOfTheMasterMagicians = 45819647;
public const int TheWingedDragonofRaSphereMode = 10000080;
public const int SelettriceVaalmonica = 23093373;
public const int PerformageTrapezeWitch = 33206889;
public const int PoseidraTheStormingAtlantean = 99193444;

public const int RockOfTheVanquisher = 28168628;
public const int SpiralDischarge = 29477860;
Expand Down Expand Up @@ -226,6 +229,7 @@ protected class _Setcode
public const int Ghostrick = 0x8d;
public const int OddEyes = 0x99;
public const int Performapal = 0x9f;
public const int Performage = 0xc6;
public const int BlueEyes = 0xdd;
public const int FurHire = 0x114;
public const int Altergeist = 0x103;
Expand Down Expand Up @@ -292,7 +296,8 @@ protected DefaultExecutor(GameAI ai, Duel duel)
{_CardId.HeroicChampionClaivesolish, defender => true},
{_CardId.GhostrickAlucard, defender => defender.HasSetcode(_Setcode.Ghostrick) || defender.IsFacedown()},
{_CardId.MekkKnightCrusadiaAstram, defender => true},
{_CardId.DinowrestlerKingTWrextle, defender => true}
{_CardId.DinowrestlerKingTWrextle, defender => true},
{_CardId.NumberF0UtopicFutureZexal, defender => true}
};

/// <summary>
Expand Down Expand Up @@ -321,7 +326,9 @@ protected DefaultExecutor(GameAI ai, Duel duel)
{_CardId.SeleneQueenOfTheMasterMagicians, (defender, list) => list.Any(monster => monster.HasSetcode(_Setcode.Endymion))},

{_CardId.TheWingedDragonofRaSphereMode, (defender, list) => true},
{_CardId.SelettriceVaalmonica, (defender, list) => list.Any(monster => !monster.IsCode(_CardId.SelettriceVaalmonica))}
{_CardId.SelettriceVaalmonica, (defender, list) => list.Any(monster => !monster.IsCode(_CardId.SelettriceVaalmonica))},
{_CardId.PerformageTrapezeWitch, (defender, list) => list.Any(monster => !monster.IsCode(_CardId.PerformageTrapezeWitch) && monster.HasSetcode(_Setcode.Performage))},
{_CardId.PoseidraTheStormingAtlantean, (defender, list) => list.Any(monster => !monster.IsCode(_CardId.PoseidraTheStormingAtlantean))}
};

/// <summary>
Expand Down
5 changes: 4 additions & 1 deletion Game/AI/Enums/DangerousMonster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public enum DangerousMonster
DaigustoSphreeze = 29552709,
OhimetheManifestedMikanko = 81260679,
ArahimetheManifestedMikanko = 75771170,
YubelDasEwigLiebeWachter = 47172959
YubelDasEwigLiebeWachter = 47172959,
UzuhimeTheManifestedMikanko = 57566760,
MaidenInLove = 8445808,
ArchfiendMatador = 7622360
}
}
51 changes: 50 additions & 1 deletion Game/AI/Enums/Floodgate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,55 @@ public enum Floodgate
LightAndDarknessDragonLord = 19652159,
FiendsmithDiesIrae = 82135803,
MementomictlanTecuhtlicaCombinedConqueror = 14529511,
MadolcheQueenTiaraalaFraise = 49689480
MadolcheQueenTiaraalaFraise = 49689480,
XYZHyperDragonCannon = 75748977,
ClearViciousKnight = 70095046,
Red_EyesBlackFullmetalDragon = 80870883,
MetalzoaX = 27268998,
AzaminaIliaSilvia = 46396218,
HeosvarogTheMechanicalDawn = 8963089,
LegendaryLordSixSamurai_ShiEn = 34235530,
NumberC32SharkDrakeLeVeiss = 7628844,
RyzealDetonator = 34909328,
MalissQHeartsCrypter = 21848500,
Blue_EyesUltimateSpiritDragon = 89604813,
TheiaThePrimalBeing = 85687952,
ArcanaForceEX_TheChaosRuler = 12686296,
SaintAzamina = 85065943,
CrystalClearWingOverSynchroDragon = 84343351,
JurracAstero = 52553102,
NekrozOfMetaltron = 13408726,
ZoroaTheMagistusVerethragna = 37260677,
DiabellstarVengeance = 23151193,
RegenesisWarrior = 96540807,
RegenesisSage = 22938501,
RegenesisDragon = 59323650,
Snake_EyesVengeanceDragon = 79415624,
LegendaryLordSixSamurai_Kizan = 42209438,
JuraishinTheCursedThunderGod = 78693036,
EclipseDragonRulerOfCatastrophes = 30350202,
AlliedCodeTalkerIgnister = 39138610,
EternalSunshine = 28903523,
RegenesisBirth = 27781371,
Ryu_GeEnd = 90664684,
SoulOfGaiaTheFierceKnight = 73129314,
K9_XWerewolf = 90303227,
ArtmageFinmel = 34541940,
LeoWizardTheDarkFiend = 55423549,
LunalightLigerDancer = 54701958,
ArtmageDiactorus = 27184601,
PsychicBlasterMk_II = 88139289,
NumberF0UtopicFutureZexal = 41522092,
VallonTheSuperPsySkyblaster = 40673853,
MasterPeaceTheTrueDracoverlord = 12800564,
MegalithNotrahPlura = 44293356,
AxonKickerOracle = 33171768,
DoomZXIIEnd_Drastrius = 95626382,
DDDSkyKingZeusRagnarok = 30998403,
DarkContractWithTheDifferentDimension = 54936778,
KillerTuneRedSeal = 15665977,
RBGa10Driller = 6043161,
RBGa10Cutter = 33438265,
RBLambdaBlade = 17188206
}
}
21 changes: 20 additions & 1 deletion Game/AI/Enums/FusionSpell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ public enum FusionSpell
HarmonicSynchroFusion = 7473735,
SouloftheSupremeCelestialKing = 76840111,
MelodiousConcerto = 31458630,
MementotlanFusion = 66518509
MementotlanFusion = 66518509,
TheHallowedAzamina = 94845588,
AzaminaDebtors = 20934683,
AzaminaDetermination = 42201897,
HeavyPolymerization = 58570206,
DoubleFusion = 10218411,
DarkContact = 77124096,
GemKnightMasterDiamondDispersion = 25342956,
GemKnightDispersion = 24220368,
DracotailFaimena = 1498449,
DracotailMululu = 7375867,
KetuDracotail = 6153210,
RahuDracotail = 32548318,
ArtmagePowerPatron = 23829452,
ArtmageMasterworkSuccession = 37517035,
TeleportFusion = 36494597,
PrimiteFusion = 99161253,
TheGazeOfTimaeus = 22283204,
MutinyInTheSky = 71593652,
HuntingHorn = 55421040
}
}
21 changes: 19 additions & 2 deletions Game/AI/Enums/InvincibleMonster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public enum InvincibleBotMonster
Number2NinjaShadowMosquito = 32453837,
OhimetheManifestedMikanko = 81260679,
NightmareMagician = 40221691,
ArahimetheManifestedMikanko = 75771170
ArahimetheManifestedMikanko = 75771170,
UzuhimeTheManifestedMikanko = 57566760,
ArchfiendMatador = 7622360
}
/// <summary>
/// Cards that are invincible to battle.
Expand Down Expand Up @@ -123,6 +125,21 @@ public enum InvincibleEnemyMonster
MillenniumFiendReflection = 63947968,
HereticalPhoboscobos = 76078185,
TopHatHareTheSilhouetteMagician = 1528054,
Silhouhatte = 24440742
Silhouhatte = 24440742,
TheDukeofDemise = 45445571,
EvilHERONeosLord = 13708888,
GladiatorBeastDareios = 72246674,
Number69HeraldryCrest_DarkMatterDemolition = 77571454,
FirstOfTheDragonlords = 53466722,
UzuhimeTheManifestedMikanko = 57566760,
HecahandsIbel = 95365081,
HecahandsYadel = 32759190,
HecahandsGoddus = 68144894,
HecahandsGygas = 95132593,
HecahandsBreus = 21637502,
HecahandsJawza = 67021206,
HecahandsXeno = 94410955,
MaidenInLove = 8445808,
ArchfiendMatador = 7622360
}
}
7 changes: 6 additions & 1 deletion Game/AI/Enums/OneForXyz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public enum OneForXyz
GalaxyEyesCipherDragon = 18963306,
Number107 = 88177324,
CyberDragonNova = 58069384,
Number39 = 84013237
Number39 = 84013237,
Argostars_GloriousAdra = 91438674,
Argostars_LightningTydeu = 65889305,
Argostars_SwiftCapane = 91284003,
Argostars_SlayerEteo = 38379052,
Argostars_FierceParthe = 21050476
}
}
3 changes: 2 additions & 1 deletion Game/AI/Enums/PreventActivationEffectInBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public enum PreventActivationEffectInBattle
SamuraiDestroyer = 40509732,
ArmadesKeeperOfBoundaries = 88033975,
NumberS39UtopiaTheLightning = 56832966,
DualAvatarEmpoweredKonGyo = 33026283
DualAvatarEmpoweredKonGyo = 33026283,
GoukiTheTyrantOgre = 7782069
}
}
8 changes: 7 additions & 1 deletion Game/AI/Enums/ShouldBeDisabledBeforeItUseEffectMonster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public enum ShouldBeDisabledBeforeItUseEffectMonster
GGolemRockHammer = 98875863,
WishDragon = 64583600,
ChaosWitch = 30327674,
FissioningMotherSpider = 34034150
FissioningMotherSpider = 34034150,
AncientGearStatue = 32762201,
SplittingPlanarian = 44175358,
TestBear = 62076252,
RescueHedgehog = 99742859,
SuperQuantalFairyZetan = 66646087,
LightWaterDragon = 82616239
}
}
3 changes: 2 additions & 1 deletion Game/AI/Enums/ShouldNotBeMonsterTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum ShouldNotBeMonsterTarget
BorrelendDragon = 98630720,
DrytronMeteonisDraconids = 69815951,
MyutantBeast = 34695290,
VeidosTheDragonOfEndlessDarkness = 8540986
VeidosTheDragonOfEndlessDarkness = 8540986,
FirstOfTheDragonlords = 53466722
}
}
5 changes: 4 additions & 1 deletion Game/AI/Enums/ShouldNotBeTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public enum ShouldNotBeTarget
RedEyesBDragon = 74677422, // sometimes the name of DragunofRedEyes will be changed to RedEyesBDragon
TheArrivalCyberseIgnister = 11738489,
MajespecterPorcupineYamaarashi = 51073802,
RaidraptorRisingRebellionFalcon = 71222868
RaidraptorRisingRebellionFalcon = 71222868,
Number97Draglubion = 28400508,
SaintAzamina = 85065943,
LunalightLigerDancer = 54701958
}
}