Commit 345b2be1 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/IceYGO/windbot

parents c3828c90 11169f23
...@@ -80,7 +80,8 @@ namespace WindBot.Game.AI.Decks ...@@ -80,7 +80,8 @@ namespace WindBot.Game.AI.Decks
public SuperheavySamuraiExecutor(GameAI ai, Duel duel) public SuperheavySamuraiExecutor(GameAI ai, Duel duel)
: base(ai, duel) : base(ai, duel)
{ {
AddExecutor(ExecutorType.Activate, CardId.PSYFramelordOmega); AddExecutor(ExecutorType.Repos, MonsterRepos);
AddExecutor(ExecutorType.Activate, CardId.PSYFramelordOmega,PSYFunction);
AddExecutor(ExecutorType.Activate, CardId.IP,IPFunction); AddExecutor(ExecutorType.Activate, CardId.IP,IPFunction);
AddExecutor(ExecutorType.Activate, CardId.Sarutobi,SarutobiFunction); AddExecutor(ExecutorType.Activate, CardId.Sarutobi,SarutobiFunction);
AddExecutor(ExecutorType.Activate, CardId.Unicorn,UnicornFunction); AddExecutor(ExecutorType.Activate, CardId.Unicorn,UnicornFunction);
...@@ -101,9 +102,8 @@ namespace WindBot.Game.AI.Decks ...@@ -101,9 +102,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, CardId.Scales); AddExecutor(ExecutorType.SpSummon, CardId.Scales);
AddExecutor(ExecutorType.Activate, CardId.Scales,ScalesFunction); AddExecutor(ExecutorType.Activate, CardId.Scales,ScalesFunction);
//Synchron //Synchron
AddExecutor(ExecutorType.SpSummon, CardId.ASStardustDragon,ASStardustDragonSynchronFunction2); AddExecutor(ExecutorType.SpSummon, CardId.PSYFramelordOmega,PSYFramelordOmegaSynchronFunction);
AddExecutor(ExecutorType.SpSummon, CardId.Fleur,FleurSynchronFunction2);
//Pendulum //Pendulum
AddExecutor(ExecutorType.Activate, CardId.Wakaushi,WakaushiFunction); AddExecutor(ExecutorType.Activate, CardId.Wakaushi,WakaushiFunction);
...@@ -183,7 +183,6 @@ namespace WindBot.Game.AI.Decks ...@@ -183,7 +183,6 @@ namespace WindBot.Game.AI.Decks
//Synchron //Synchron
AddExecutor(ExecutorType.SpSummon, CardId.Masurawo,MasurawoSynchronFunction); AddExecutor(ExecutorType.SpSummon, CardId.Masurawo,MasurawoSynchronFunction);
AddExecutor(ExecutorType.SpSummon, CardId.Sarutobi,DeSynchronFunction); AddExecutor(ExecutorType.SpSummon, CardId.Sarutobi,DeSynchronFunction);
AddExecutor(ExecutorType.SpSummon, CardId.PSYFramelordOmega);
//equip Soulhorns //equip Soulhorns
AddExecutor(ExecutorType.Activate, CardId.Soulhorns,SoulhornsEquipFunction); AddExecutor(ExecutorType.Activate, CardId.Soulhorns,SoulhornsEquipFunction);
...@@ -213,12 +212,29 @@ namespace WindBot.Game.AI.Decks ...@@ -213,12 +212,29 @@ namespace WindBot.Game.AI.Decks
activate_Genius = false; activate_Genius = false;
activate_Sarutobi = false; activate_Sarutobi = false;
to_deck = false; to_deck = false;
base.OnNewTurn();
} }
public override bool OnSelectHand() public override bool OnSelectHand()
{ {
return true; return true;
} }
private bool MonsterRepos()
{
if (Card.IsFacedown())
return true;
if (Card.IsFaceup() && Card.IsAttack() && (Card.Id == CardId.Masurawo || Card.Id == CardId.Sarutobi))
return true;
return false;
}
public override CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions)
{
YGOSharp.OCGWrapper.NamedCard cardData = YGOSharp.OCGWrapper.NamedCard.Get(cardId);
if (cardData != null)
{
if (cardId == CardId.Masurawo || cardId == CardId.Sarutobi)
return CardPosition.FaceUpDefence;
}
return 0;
}
public override int OnSelectPlace(int cardId, int player, CardLocation location, int available) public override int OnSelectPlace(int cardId, int player, CardLocation location, int available)
{ {
if (player == 0 && location == CardLocation.MonsterZone) if (player == 0 && location == CardLocation.MonsterZone)
...@@ -597,14 +613,6 @@ namespace WindBot.Game.AI.Decks ...@@ -597,14 +613,6 @@ namespace WindBot.Game.AI.Decks
AI.SelectMaterials(materials_lists[0]); AI.SelectMaterials(materials_lists[0]);
return true; return true;
} }
private bool FleurSynchronFunction2()
{
var materials_lists = Util.GetSynchroMaterials(Bot.MonsterZone,10,1,1,false,false,null,
card => { return !FinalCards(card.Id); });
if (materials_lists.Count <= 0) return false;
AI.SelectMaterials(materials_lists[0]);
return true;
}
private bool DeSynchronFunction() private bool DeSynchronFunction()
{ {
AI.SelectPosition(CardPosition.FaceUpDefence); AI.SelectPosition(CardPosition.FaceUpDefence);
...@@ -630,17 +638,26 @@ namespace WindBot.Game.AI.Decks ...@@ -630,17 +638,26 @@ namespace WindBot.Game.AI.Decks
{ {
return (Bot.HasInExtra(CardId.Fleur) || Bot.HasInExtra(CardId.Masurawo)); return (Bot.HasInExtra(CardId.Fleur) || Bot.HasInExtra(CardId.Masurawo));
} }
return false; else if (Bot.HasInMonstersZone(CardId.Motorbike))
}
private bool ASStardustDragonSynchronFunction2()
{
if (!activate_Scales || !activate_PSY) return false;
if (Bot.HasInGraveyard(CardId.Motorbike) || Bot.HasInGraveyard(CardId.PsyFramegearGamma))
{ {
return (Bot.HasInExtra(CardId.Fleur) || Bot.HasInExtra(CardId.Masurawo)); AI.SelectMaterials(CardId.Motorbike);
return true;
}
else if (Bot.HasInMonstersZone(CardId.PsyFramegearGamma))
{
AI.SelectMaterials(CardId.PsyFramegearGamma);
return true;
} }
return false; return false;
} }
private bool PSYFramelordOmegaSynchronFunction()
{
if (Bot.HasInMonstersZone(CardId.Motorbike))
AI.SelectMaterials(CardId.Motorbike);
else if (Bot.HasInMonstersZone(CardId.PsyFramegearGamma))
AI.SelectMaterials(CardId.PsyFramegearGamma);
return activate_PSY || activate_Scales;
}
private bool SavageDragonFunction() private bool SavageDragonFunction()
{ {
if (Duel.LastChainPlayer == 1) if (Duel.LastChainPlayer == 1)
...@@ -1156,6 +1173,11 @@ namespace WindBot.Game.AI.Decks ...@@ -1156,6 +1173,11 @@ namespace WindBot.Game.AI.Decks
AI.SelectMaterials(materials); AI.SelectMaterials(materials);
return true; return true;
} }
private bool PSYFunction()
{
activate_PSY = true;
return true;
}
private bool IPFunction() private bool IPFunction()
{ {
if (Duel.LastChainPlayer == 0) return false; if (Duel.LastChainPlayer == 0) return false;
...@@ -1193,4 +1215,4 @@ namespace WindBot.Game.AI.Decks ...@@ -1193,4 +1215,4 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
} }
} }
\ No newline at end of file
...@@ -181,6 +181,7 @@ namespace WindBot.Game.AI ...@@ -181,6 +181,7 @@ namespace WindBot.Game.AI
public const int DuelDragonToken = 60025884; public const int DuelDragonToken = 60025884;
public const int SeleneQueenOfTheMasterMagicians = 45819647; public const int SeleneQueenOfTheMasterMagicians = 45819647;
public const int TheWingedDragonofRaSphereMode = 10000080; public const int TheWingedDragonofRaSphereMode = 10000080;
public const int SelettriceVaalmonica = 23093373;
public const int RockOfTheVanquisher = 28168628; public const int RockOfTheVanquisher = 28168628;
public const int SpiralDischarge = 29477860; public const int SpiralDischarge = 29477860;
...@@ -302,7 +303,8 @@ namespace WindBot.Game.AI ...@@ -302,7 +303,8 @@ namespace WindBot.Game.AI
{_CardId.DuelLinkDragonTheDuelDragon, (defender, list) => list.Any(monster => monster.IsCode(_CardId.DuelDragonToken))}, {_CardId.DuelLinkDragonTheDuelDragon, (defender, list) => list.Any(monster => monster.IsCode(_CardId.DuelDragonToken))},
{_CardId.SeleneQueenOfTheMasterMagicians, (defender, list) => list.Any(monster => monster.HasSetcode(_Setcode.Endymion))}, {_CardId.SeleneQueenOfTheMasterMagicians, (defender, list) => list.Any(monster => monster.HasSetcode(_Setcode.Endymion))},
{_CardId.TheWingedDragonofRaSphereMode, (defender, list) => true} {_CardId.TheWingedDragonofRaSphereMode, (defender, list) => true},
{_CardId.SelettriceVaalmonica, (defender, list) => list.Any(monster => !monster.IsCode(_CardId.SelettriceVaalmonica))}
}; };
/// <summary> /// <summary>
......
...@@ -212,6 +212,17 @@ ...@@ -212,6 +212,17 @@
StellarNemesisTPHON_DoomsdayStar = 93039339, StellarNemesisTPHON_DoomsdayStar = 93039339,
SPLittleKnight = 29301450, SPLittleKnight = 29301450,
AngelRing = 40678060, AngelRing = 40678060,
SkullGuardianTheSilenforcingProtector = 10774240 SkullGuardianProtectorOfTheVoicelessVoice = 10774240,
FloweringEtoileTheMelodiousMagnificat = 83793721,
EnlightenmentDragon = 46186135,
GoldPrideEradicator = 45464587,
VarudrasTheFinalBringerOfTheEndTimes = 70636044,
RagnaraikaStagSovereign = 42307760,
DrytronMeteonisAlphaDraconids = 56863746,
TheUnstoppableExodiaIncarnate = 83257450,
LightAndDarknessDragonLord = 19652159,
FiendsmithDiesIrae = 82135803,
MementomictlanTecuhtlicaCombinedConqueror = 14529511,
MadolcheQueenTiaraalaFraise = 49689480
} }
} }
...@@ -86,6 +86,8 @@ ...@@ -86,6 +86,8 @@
FusionReproduction = 43331750, FusionReproduction = 43331750,
ChimeraFusion = 63136489, ChimeraFusion = 63136489,
HarmonicSynchroFusion = 7473735, HarmonicSynchroFusion = 7473735,
SouloftheSupremeCelestialKing = 76840111 SouloftheSupremeCelestialKing = 76840111,
MelodiousConcerto = 31458630,
MementotlanFusion = 66518509
} }
} }
...@@ -114,6 +114,15 @@ ...@@ -114,6 +114,15 @@
DarkGuardian = 26746975, DarkGuardian = 26746975,
EnvoyOfTheWaxState = 87462901, EnvoyOfTheWaxState = 87462901,
Fluffyfluff = 85401123, Fluffyfluff = 85401123,
YubelDasEwigLiebeWachter = 47172959 YubelDasEwigLiebeWachter = 47172959,
TenpaiDragonFadra = 65326118,
GolgoilTheSteelSeismicSmasher = 59369430,
TalonsOfShurilane = 74150658,
NightmareApprentice = 58143852,
MillenniumoonMaiden = 37552929,
MillenniumFiendReflection = 63947968,
HereticalPhoboscobos = 76078185,
TopHatHareTheSilhouetteMagician = 1528054,
Silhouhatte = 24440742
} }
} }
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
SamuraiDestroyer = 40509732, SamuraiDestroyer = 40509732,
ArmadesKeeperOfBoundaries = 88033975, ArmadesKeeperOfBoundaries = 88033975,
NumberS39UtopiaTheLightning = 56832966, NumberS39UtopiaTheLightning = 56832966,
DualAvatarEmpoweredKonGyo = 33026283, DualAvatarEmpoweredKonGyo = 33026283
GGolemRockHammer = 98875863,
WishDragon = 64583600,
ChaosWitch = 30327674,
FissioningMotherSpider = 34034150
} }
} }
...@@ -63,6 +63,10 @@ ...@@ -63,6 +63,10 @@
ThreeEyedGhost = 31464658, ThreeEyedGhost = 31464658,
UrsarcticPolarStar = 62714453, UrsarcticPolarStar = 62714453,
BattlinBoxerPromoter = 83315222, BattlinBoxerPromoter = 83315222,
TGRocketSalamander = 77392987 TGRocketSalamander = 77392987,
GGolemRockHammer = 98875863,
WishDragon = 64583600,
ChaosWitch = 30327674,
FissioningMotherSpider = 34034150
} }
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
BorreloadDragon = 31833038, BorreloadDragon = 31833038,
BorrelendDragon = 98630720, BorrelendDragon = 98630720,
DrytronMeteonisDraconids = 69815951, DrytronMeteonisDraconids = 69815951,
MyutantBeast = 34695290 MyutantBeast = 34695290,
VeidosTheDragonOfEndlessDarkness = 8540986
} }
} }
...@@ -82,8 +82,7 @@ namespace WindBot.Game ...@@ -82,8 +82,7 @@ namespace WindBot.Game
if (Data != null) if (Data != null)
{ {
Name = Data.Name; Name = Data.Name;
if (Data.Alias != 0) Alias = Data.Alias;
Alias = Data.Alias;
} else { } else {
Name = null; Name = null;
Alias = 0; Alias = 0;
...@@ -387,4 +386,4 @@ namespace WindBot.Game ...@@ -387,4 +386,4 @@ namespace WindBot.Game
return ReferenceEquals(this, card); return ReferenceEquals(this, card);
} }
} }
} }
\ No newline at end of file
...@@ -1090,7 +1090,7 @@ namespace WindBot.Game ...@@ -1090,7 +1090,7 @@ namespace WindBot.Game
else else
card = _duel.GetCard(player, loc, seq); card = _duel.GetCard(player, loc, seq);
if (card == null) continue; if (card == null) continue;
if (card.Id == 0) if (card.Id == 0 || card.Location == CardLocation.Deck)
card.SetId(id); card.SetId(id);
cards.Add(card); cards.Add(card);
} }
...@@ -1102,6 +1102,14 @@ namespace WindBot.Game ...@@ -1102,6 +1102,14 @@ namespace WindBot.Game
CardLocation loc = (CardLocation)packet.ReadByte(); CardLocation loc = (CardLocation)packet.ReadByte();
int seq = packet.ReadByte(); int seq = packet.ReadByte();
packet.ReadByte(); // pos packet.ReadByte(); // pos
ClientCard card;
if (((int)loc & (int)CardLocation.Overlay) != 0)
card = new ClientCard(id, CardLocation.Overlay, -1);
else
card = _duel.GetCard(player, loc, seq);
if (card == null) continue;
if (card.Id == 0 || card.Location == CardLocation.Deck)
card.SetId(id);
} }
if (count2 == 0) cancelable = false; if (count2 == 0) cancelable = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment