Commit 4e48f5fc authored by mercury233's avatar mercury233

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

parents 4b080580 5c585506
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
36361633 36361633
36361633 36361633
36361633 36361633
36468556
37576645 37576645
37576645 37576645
37576645 37576645
...@@ -52,7 +51,6 @@ ...@@ -52,7 +51,6 @@
75249652 75249652
83555666 83555666
98444741 98444741
98444741
#extra #extra
41999284 41999284
41999284 41999284
...@@ -65,4 +63,6 @@ ...@@ -65,4 +63,6 @@
98444741 98444741
100227025 100227025
100227025 100227025
100227025 100227025
\ No newline at end of file 36468556
98444741
\ No newline at end of file
...@@ -62,6 +62,7 @@ namespace WindBot.Game.AI.Decks ...@@ -62,6 +62,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, CardId.Waboku); AddExecutor(ExecutorType.SpellSet, CardId.Waboku);
AddExecutor(ExecutorType.SpellSet, CardId.ThreateningRoar); AddExecutor(ExecutorType.SpellSet, CardId.ThreateningRoar);
AddExecutor(ExecutorType.SpellSet, CardId.BlazingMirrorForce); AddExecutor(ExecutorType.SpellSet, CardId.BlazingMirrorForce);
AddExecutor(ExecutorType.SpellSet, CardId.OjamaTrio, OjamaTrioset);
AddExecutor(ExecutorType.SpellSet, BrunSpellSet); AddExecutor(ExecutorType.SpellSet, BrunSpellSet);
//afer set //afer set
AddExecutor(ExecutorType.Activate, CardId.CardcarD); AddExecutor(ExecutorType.Activate, CardId.CardcarD);
...@@ -69,8 +70,7 @@ namespace WindBot.Game.AI.Decks ...@@ -69,8 +70,7 @@ namespace WindBot.Game.AI.Decks
//activate trap //activate trap
AddExecutor(ExecutorType.Activate, CardId.BalanceOfJudgment, BalanceOfJudgmenteff); AddExecutor(ExecutorType.Activate, CardId.BalanceOfJudgment, BalanceOfJudgmenteff);
AddExecutor(ExecutorType.Activate, CardId.AccuulatedFortune); AddExecutor(ExecutorType.Activate, CardId.AccuulatedFortune);
AddExecutor(ExecutorType.Activate, CardId.ChainStrike, ChainStrikeeff); //battle
//battle
AddExecutor(ExecutorType.Activate, CardId.ThreateningRoar, ThreateningRoareff); AddExecutor(ExecutorType.Activate, CardId.ThreateningRoar, ThreateningRoareff);
AddExecutor(ExecutorType.Activate, CardId.Waboku, Wabokueff); AddExecutor(ExecutorType.Activate, CardId.Waboku, Wabokueff);
...@@ -85,7 +85,7 @@ namespace WindBot.Game.AI.Decks ...@@ -85,7 +85,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.SecretBlast, SecretBlasteff); AddExecutor(ExecutorType.Activate, CardId.SecretBlast, SecretBlasteff);
AddExecutor(ExecutorType.Activate, CardId.SectetBarrel, SectetBarreleff); AddExecutor(ExecutorType.Activate, CardId.SectetBarrel, SectetBarreleff);
AddExecutor(ExecutorType.Activate, CardId.RecklessGreed, RecklessGreedeff); AddExecutor(ExecutorType.Activate, CardId.RecklessGreed, RecklessGreedeff);
AddExecutor(ExecutorType.Activate, CardId.ChainStrike, ChainStrikeeff);
//sp //sp
AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh); AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh);
AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff); AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
...@@ -129,15 +129,15 @@ namespace WindBot.Game.AI.Decks ...@@ -129,15 +129,15 @@ namespace WindBot.Game.AI.Decks
CardId.Waboku, CardId.Waboku,
CardId.ThreateningRoar, CardId.ThreateningRoar,
CardId.MagicCylinder, CardId.MagicCylinder,
CardId.RingOfDestruction, CardId.RingOfDestruction,
CardId.RecklessGreed, CardId.RecklessGreed,
CardId.SecretBlast, CardId.SecretBlast,
CardId.JustDesserts, CardId.JustDesserts,
CardId.OjamaTrio, CardId.OjamaTrio,
CardId.SectetBarrel, CardId.SectetBarrel,
CardId.Ceasefire, CardId.Ceasefire,
CardId.BalanceOfJudgment, CardId.BalanceOfJudgment,
CardId.AccuulatedFortune, CardId.AccuulatedFortune,
}; };
} }
public int[] AbouluteKingBackJack_List_2() public int[] AbouluteKingBackJack_List_2()
...@@ -148,7 +148,7 @@ namespace WindBot.Game.AI.Decks ...@@ -148,7 +148,7 @@ namespace WindBot.Game.AI.Decks
CardId.Mathematician, CardId.Mathematician,
CardId.DiceJar, CardId.DiceJar,
CardId.CardcarD, CardId.CardcarD,
CardId.BattleFader, CardId.BattleFader,
CardId.BlazingMirrorForce, CardId.BlazingMirrorForce,
CardId.Waboku, CardId.Waboku,
CardId.ThreateningRoar, CardId.ThreateningRoar,
...@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks ...@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks
{ {
return new[] return new[]
{ {
CardId.Waboku, CardId.Waboku,
CardId.SecretBlast, CardId.SecretBlast,
CardId.JustDesserts, CardId.JustDesserts,
...@@ -177,7 +177,7 @@ namespace WindBot.Game.AI.Decks ...@@ -177,7 +177,7 @@ namespace WindBot.Game.AI.Decks
CardId.Ceasefire, CardId.Ceasefire,
CardId.RecklessGreed, CardId.RecklessGreed,
CardId.RingOfDestruction, CardId.RingOfDestruction,
}; };
} }
...@@ -216,17 +216,25 @@ namespace WindBot.Game.AI.Decks ...@@ -216,17 +216,25 @@ namespace WindBot.Game.AI.Decks
id == CardId.RingOfDestruction id == CardId.RingOfDestruction
); );
} }
bool pot_used = false; bool no_sp = false;
bool one_turn_kill = false; bool one_turn_kill = false;
bool one_turn_kill_1 = false;
int expected_blood = 0; int expected_blood = 0;
bool prevent_used = false; bool prevent_used = false;
int preventcount = 0; int preventcount = 0;
bool battleprevent = false; bool battleprevent = false;
bool OjamaTrioused = false; bool OjamaTrioused = false;
bool HasAccuulatedFortune = false; bool OjamaTrioused_draw = false;
bool drawfirst = false;
int Waboku_count = 0;
int Roar_count = 0;
int strike_count = 0;
int greed_count = 0;
int blast_count = 0; int blast_count = 0;
int barrel_count = 0; int barrel_count = 0;
int just_count = 0; int just_count = 0;
int Ojama_count = 0;
int HasAccuulatedFortune = 0;
public override bool OnSelectHand() public override bool OnSelectHand()
{ {
return true; return true;
...@@ -234,25 +242,22 @@ namespace WindBot.Game.AI.Decks ...@@ -234,25 +242,22 @@ namespace WindBot.Game.AI.Decks
public override void OnNewTurn() public override void OnNewTurn()
{ {
pot_used = false; no_sp = false;
prevent_used = false; prevent_used = false;
battleprevent = false; battleprevent = false;
OjamaTrioused = false;
} }
public override void OnNewPhase() public override void OnNewPhase()
{ {
preventcount = 0; preventcount = 0;
battleprevent = false; battleprevent = false;
HasAccuulatedFortune = false; OjamaTrioused = false;
IList<ClientCard> trap = Bot.SpellZone; IList<ClientCard> trap = Bot.SpellZone;
IList<ClientCard> monster = Bot.MonsterZone; IList<ClientCard> monster = Bot.MonsterZone;
foreach(ClientCard card in trap)
{
if (card.Id == CardId.AccuulatedFortune) HasAccuulatedFortune = true;
}
foreach (ClientCard card in trap) foreach (ClientCard card in trap)
{ {
if (Has_prevent_list(card.Id)) if (Has_prevent_list(card.Id))
...@@ -271,36 +276,98 @@ namespace WindBot.Game.AI.Decks ...@@ -271,36 +276,98 @@ namespace WindBot.Game.AI.Decks
} }
} }
expected_blood = 0; expected_blood = 0;
one_turn_kill = false; one_turn_kill = false;
one_turn_kill_1 = false;
OjamaTrioused_draw = false;
drawfirst = false;
HasAccuulatedFortune = 0;
strike_count = 0;
greed_count = 0;
blast_count = 0; blast_count = 0;
barrel_count = 0; barrel_count = 0;
just_count = 0; just_count = 0;
Waboku_count = 0;
Roar_count = 0;
Ojama_count = 0;
IList<ClientCard> check = Bot.SpellZone; IList<ClientCard> check = Bot.SpellZone;
foreach (ClientCard card in check) foreach (ClientCard card in check)
{
if (card.Id == CardId.AccuulatedFortune)
HasAccuulatedFortune++;
}
foreach (ClientCard card in check)
{ {
if (card.Id == CardId.SecretBlast) if (card.Id == CardId.SecretBlast)
blast_count++; blast_count++;
break;
} }
foreach (ClientCard card in check) foreach (ClientCard card in check)
{ {
if (card.Id == CardId.SectetBarrel) if (card.Id == CardId.SectetBarrel)
barrel_count++; barrel_count++;
break;
} }
foreach (ClientCard card in check) foreach (ClientCard card in check)
{ {
if (card.Id == CardId.JustDesserts) if (card.Id == CardId.JustDesserts)
just_count++; just_count++;
break;
}
foreach (ClientCard card in check)
{
if (card.Id == CardId.ChainStrike)
strike_count++;
}
foreach (ClientCard card in Bot.GetSpells())
{
if (card.Id == CardId.RecklessGreed)
greed_count++;
} }
foreach (ClientCard card in check)
{
if (card.Id == CardId.Waboku)
Waboku_count++;
}
foreach (ClientCard card in check)
{
if (card.Id == CardId.ThreateningRoar)
Roar_count++;
}
if (Bot.HasInSpellZone(CardId.OjamaTrio) && Enemy.GetMonsterCount() <= 2 && Enemy.GetMonsterCount() >= 1)
{
if (HasAccuulatedFortune>0) OjamaTrioused_draw = true;
}
expected_blood = (Enemy.GetMonsterCount() * 500 * just_count + Enemy.GetFieldHandCount() * 200 * barrel_count + Enemy.GetFieldCount() * 300 * blast_count); expected_blood = (Enemy.GetMonsterCount() * 500 * just_count + Enemy.GetFieldHandCount() * 200 * barrel_count + Enemy.GetFieldCount() * 300 * blast_count);
if (Enemy.LifePoints <= expected_blood) if (Enemy.LifePoints <= expected_blood) one_turn_kill = true;
one_turn_kill = true; if (greed_count >= 2) greed_count = 1;
if (blast_count >= 2) blast_count = 1;
if (just_count >= 2) just_count = 1;
if (barrel_count >= 2) barrel_count = 1;
if (Waboku_count >= 2) Waboku_count = 1;
if (Roar_count >= 2) Roar_count = 1;
if (strike_count >= 2) strike_count = 1;
int currentchain = 0;
if (OjamaTrioused_draw)
currentchain = Duel.CurrentChain.Count + blast_count + just_count + barrel_count + Waboku_count + Waboku_count + Roar_count + greed_count + strike_count + Ojama_count;
else
currentchain = Duel.CurrentChain.Count + blast_count + just_count + barrel_count + Waboku_count + Waboku_count + greed_count + Roar_count + strike_count;
if (currentchain >= 3) drawfirst = true;
currentchain = Duel.CurrentChain.Count+ blast_count + just_count+barrel_count;
expected_blood = (Enemy.GetMonsterCount() * 500 * just_count + Enemy.GetFieldHandCount() * 200 * barrel_count + Enemy.GetFieldCount() * 300 * blast_count+(currentchain+1)*400);
if (Enemy.LifePoints <= expected_blood) one_turn_kill_1 = true;
} }
private bool must_chain() private bool must_chain()
{ {
if (AI.Utils.IsChainTarget(Card)) return true; if (AI.Utils.IsChainTarget(Card)) return true;
...@@ -325,7 +392,7 @@ namespace WindBot.Game.AI.Decks ...@@ -325,7 +392,7 @@ namespace WindBot.Game.AI.Decks
} }
private bool AbouluteKingBackJacksummon() private bool AbouluteKingBackJacksummon()
{ {
return !pot_used; return !no_sp;
} }
private bool AbouluteKingBackJackeff() private bool AbouluteKingBackJackeff()
{ {
...@@ -335,13 +402,13 @@ namespace WindBot.Game.AI.Decks ...@@ -335,13 +402,13 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(AbouluteKingBackJack_List_1()); AI.SelectCard(AbouluteKingBackJack_List_1());
AI.SelectNextCard(AbouluteKingBackJack_List_2()); AI.SelectNextCard(AbouluteKingBackJack_List_2());
} }
return true; return true;
} }
private bool PotOfDualityeff() private bool PotOfDualityeff()
{ {
pot_used = true; no_sp = true;
AI.SelectCard(prevent_list()); AI.SelectCard(prevent_list());
return true; return true;
} }
...@@ -354,25 +421,28 @@ namespace WindBot.Game.AI.Decks ...@@ -354,25 +421,28 @@ namespace WindBot.Game.AI.Decks
list.Add(monster); list.Add(monster);
} }
//if (GetTotalATK(list) / 2 >= Bot.LifePoints) return false; //if (GetTotalATK(list) / 2 >= Bot.LifePoints) return false;
if (GetTotalATK(list) < 3000) return false; if (GetTotalATK(list) < 3000) return false;
return Enemy.HasAttackingMonster() && DefaultUniqueTrap(); return Enemy.HasAttackingMonster() && DefaultUniqueTrap();
} }
private bool ThreateningRoareff() private bool ThreateningRoareff()
{ {
if (drawfirst) return true;
if (must_chain()) return true; if (must_chain()) return true;
if (prevent_used||Duel.Phase==DuelPhase.End||Duel.Phase==DuelPhase.Main2) return false; if (prevent_used || Duel.Phase != DuelPhase.BattleStart) return false;
prevent_used = true; prevent_used = true;
return DefaultUniqueTrap(); return DefaultUniqueTrap();
} }
private bool SandaionTheTimloardeff() private bool SandaionTheTimloardeff()
{ {
prevent_used = true; prevent_used = true;
return true; return true;
} }
private bool Wabokueff() private bool Wabokueff()
{ {
if (drawfirst) return true;
if (must_chain()) return true; if (must_chain()) return true;
if (drawfirst) return true;
if (prevent_used||Duel.Player == 0||Duel.Phase!=DuelPhase.BattleStart) return false; if (prevent_used||Duel.Player == 0||Duel.Phase!=DuelPhase.BattleStart) return false;
prevent_used = true; prevent_used = true;
return DefaultUniqueTrap(); return DefaultUniqueTrap();
...@@ -409,22 +479,18 @@ namespace WindBot.Game.AI.Decks ...@@ -409,22 +479,18 @@ namespace WindBot.Game.AI.Decks
} }
private bool RecklessGreedeff() private bool RecklessGreedeff()
{ {
int count = 0; if (drawfirst) return DefaultUniqueTrap();
IList<ClientCard> check = Bot.SpellZone; if (must_chain() && greed_count > 1) return true;
foreach (ClientCard card in check) if (greed_count > 1) return true;
{
if (card.Id == CardId.RecklessGreed)
count++;
break;
}
if (count > 1) return true;
if (Bot.LifePoints <= 2000) return true; if (Bot.LifePoints <= 2000) return true;
if (Bot.GetHandCount() <1 && Duel.Player==0 && Duel.Phase!=DuelPhase.Standby) return true; if (Bot.GetHandCount() <1 && Duel.Player==0 && Duel.Phase!=DuelPhase.Standby) return true;
return false; return false;
} }
private bool SectetBarreleff() private bool SectetBarreleff()
{ {
if (one_turn_kill) return true; if (drawfirst) return DefaultUniqueTrap();
if (one_turn_kill_1) return DefaultUniqueTrap();
if (one_turn_kill) return DefaultUniqueTrap();
if (must_chain()) return true; if (must_chain()) return true;
int count = Enemy.GetFieldHandCount(); int count = Enemy.GetFieldHandCount();
if (Enemy.LifePoints < count * 200) return true; if (Enemy.LifePoints < count * 200) return true;
...@@ -433,21 +499,31 @@ namespace WindBot.Game.AI.Decks ...@@ -433,21 +499,31 @@ namespace WindBot.Game.AI.Decks
} }
private bool SecretBlasteff() private bool SecretBlasteff()
{ {
if (one_turn_kill) return true; if (drawfirst) return DefaultUniqueTrap();
if (one_turn_kill_1) return DefaultUniqueTrap();
if (one_turn_kill) return DefaultUniqueTrap();
if (must_chain()) return true; if (must_chain()) return true;
int count = Enemy.GetFieldCount(); int count = Enemy.GetFieldCount();
if (Enemy.LifePoints < count * 300) return true; if (Enemy.LifePoints < count * 300) return true;
if (count >= 5) return true; if (count >= 5) return true;
return false; return false;
}
private bool OjamaTrioset()
{
if (Bot.HasInSpellZone(CardId.OjamaTrio)) return false;
return true;
} }
private bool OjamaTrioeff() private bool OjamaTrioeff()
{ {
return OjamaTrioused; return OjamaTrioused||OjamaTrioused_draw;
} }
private bool JustDessertseff() private bool JustDessertseff()
{ {
if (one_turn_kill) return true; if (drawfirst) return DefaultUniqueTrap();
if (one_turn_kill_1) return DefaultUniqueTrap();
if (one_turn_kill) return DefaultUniqueTrap();
if (must_chain()) return true; if (must_chain()) return true;
int count = Enemy.GetMonsterCount(); int count = Enemy.GetMonsterCount();
if (Enemy.LifePoints <= count * 500) return true; if (Enemy.LifePoints <= count * 500) return true;
...@@ -461,13 +537,15 @@ namespace WindBot.Game.AI.Decks ...@@ -461,13 +537,15 @@ namespace WindBot.Game.AI.Decks
} }
private bool ChainStrikeeff() private bool ChainStrikeeff()
{ {
if (drawfirst) return true;
if (must_chain()) return true; if (must_chain()) return true;
int chain = Duel.CurrentChain.Count; int chain = Duel.CurrentChain.Count;
if (strike_count >= 2 && chain >= 2) return true;
if (Enemy.LifePoints <= (chain + 1) * 400) return true; if (Enemy.LifePoints <= (chain + 1) * 400) return true;
if (Duel.CurrentChain.Count >= 3) return true; if (Duel.CurrentChain.Count >= 3) return true;
return false; return false;
} }
private bool BalanceOfJudgmenteff() private bool BalanceOfJudgmenteff()
{ {
if (must_chain()) return true; if (must_chain()) return true;
...@@ -478,7 +556,10 @@ namespace WindBot.Game.AI.Decks ...@@ -478,7 +556,10 @@ namespace WindBot.Game.AI.Decks
private bool CardOfDemiseeff() private bool CardOfDemiseeff()
{ {
if (Bot.GetHandCount() == 1 && Bot.GetSpellCountWithoutField() <= 3) if (Bot.GetHandCount() == 1 && Bot.GetSpellCountWithoutField() <= 3)
{
no_sp = true;
return true; return true;
}
return false; return false;
} }
private bool Mathematicianeff() private bool Mathematicianeff()
...@@ -489,13 +570,13 @@ namespace WindBot.Game.AI.Decks ...@@ -489,13 +570,13 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
return true; return true;
} }
private bool DiceJarfacedown() private bool DiceJarfacedown()
{ {
IList<ClientCard> check = Bot.MonsterZone; foreach (ClientCard card in Bot.GetMonsters())
foreach (ClientCard card in check)
{ {
if (card.Id == CardId.DiceJar && card.IsFacedown()) if (card.Id == CardId.DiceJar && card.IsFacedown())
return true; return true;
...@@ -511,8 +592,17 @@ namespace WindBot.Game.AI.Decks ...@@ -511,8 +592,17 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool Linkuriboheff() private bool Linkuriboheff()
{ {
return DefaultDontChainMyself(); ClientCard lastchaincard = AI.Utils.GetLastChainCard();
if (lastchaincard == null) return true;
if (lastchaincard.Id == CardId.Linkuriboh) return false;
return true;
}
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
{
if (attacker.Id == CardId.Linkuriboh && defender.IsFacedown()) return false;
return base.OnPreBattleBetween(attacker,defender);
} }
/*private bool SwordsOfRevealingLight() /*private bool SwordsOfRevealingLight()
{ {
......
...@@ -110,8 +110,17 @@ namespace WindBot.Game.AI.Decks ...@@ -110,8 +110,17 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.Lumina); AddExecutor(ExecutorType.Activate, CardId.Lumina);
//activate //activate
AddExecutor(ExecutorType.Activate, CardId.GlowUpBulb, GlowUpBulbeff); AddExecutor(ExecutorType.Activate, CardId.GlowUpBulb, GlowUpBulbeff);
AddExecutor(ExecutorType.Activate, CardId.CrystronNeedlefiber, CrystronNeedlefibereff);
AddExecutor(ExecutorType.Activate, CardId.TG_WonderMagician);
AddExecutor(ExecutorType.Activate, CardId.CoralDragon, CoralDragoneff);
AddExecutor(ExecutorType.Activate, CardId.RedWyvern, RedWyverneff);
AddExecutor(ExecutorType.Activate, CardId.CrystalWingSynchroDragon, CrystalWingSynchroDragoneff);
AddExecutor(ExecutorType.Activate, CardId.BlackRoseMoonlightDragon, BlackRoseMoonlightDragoneff);
AddExecutor(ExecutorType.Activate, CardId.Sdulldeat, Sdulldeateff);
AddExecutor(ExecutorType.Activate, CardId.Michael, Michaeleff);
AddExecutor(ExecutorType.Activate, CardId.ScarlightRedDragon, ScarlightRedDragoneff);
//Sp Summon //Sp Summon
AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefiberesp); //AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefibersp);
AddExecutor(ExecutorType.SpSummon, CardId.UltimateConductorTytanno, UltimateConductorTytannosp); AddExecutor(ExecutorType.SpSummon, CardId.UltimateConductorTytanno, UltimateConductorTytannosp);
AddExecutor(ExecutorType.Activate, CardId.UltimateConductorTytanno, UltimateConductorTytannoeff); AddExecutor(ExecutorType.Activate, CardId.UltimateConductorTytanno, UltimateConductorTytannoeff);
AddExecutor(ExecutorType.Activate, CardId.DoubleEvolutionPill, DoubleEvolutionPilleff); AddExecutor(ExecutorType.Activate, CardId.DoubleEvolutionPill, DoubleEvolutionPilleff);
...@@ -128,11 +137,9 @@ namespace WindBot.Game.AI.Decks ...@@ -128,11 +137,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.ShaddollHedgehog, ShaddollHedgehogeff); AddExecutor(ExecutorType.Activate, CardId.ShaddollHedgehog, ShaddollHedgehogeff);
AddExecutor(ExecutorType.Activate, CardId.GiantRex); AddExecutor(ExecutorType.Activate, CardId.GiantRex);
AddExecutor(ExecutorType.Activate, CardId.ElShaddollConstruct, ElShaddollConstructeff); AddExecutor(ExecutorType.Activate, CardId.ElShaddollConstruct, ElShaddollConstructeff);
AddExecutor(ExecutorType.Activate, CardId.ElShaddollGrysra); AddExecutor(ExecutorType.Activate, CardId.ElShaddollGrysra, ElShaddollGrysraeff);
AddExecutor(ExecutorType.Activate, CardId.ElShaddollShekhinaga, ElShaddollShekhinagaeff); AddExecutor(ExecutorType.Activate, CardId.ElShaddollShekhinaga, ElShaddollShekhinagaeff);
AddExecutor(ExecutorType.Activate, CardId.ElShaddollWinda); AddExecutor(ExecutorType.Activate, CardId.ElShaddollWinda);
AddExecutor(ExecutorType.Activate, CardId.CrystronNeedlefiber, CrystronNeedlefibereff);
AddExecutor(ExecutorType.Activate, CardId.TG_WonderMagician);
//spellset //spellset
AddExecutor(ExecutorType.SpellSet, CardId.MonsterReborn, spellset); AddExecutor(ExecutorType.SpellSet, CardId.MonsterReborn, spellset);
AddExecutor(ExecutorType.SpellSet, CardId.PotOfAvarice, spellset); AddExecutor(ExecutorType.SpellSet, CardId.PotOfAvarice, spellset);
...@@ -144,7 +151,7 @@ namespace WindBot.Game.AI.Decks ...@@ -144,7 +151,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, CardId.infiniteTransience, SetIsFieldEmpty); AddExecutor(ExecutorType.SpellSet, CardId.infiniteTransience, SetIsFieldEmpty);
//trap activate //trap activate
AddExecutor(ExecutorType.Activate, CardId.LostWind, DefaultBreakthroughSkill); AddExecutor(ExecutorType.Activate, CardId.LostWind, DefaultBreakthroughSkill);
AddExecutor(ExecutorType.Activate, CardId.SinisterShadowGames, SinisterShadowGames); AddExecutor(ExecutorType.Activate, CardId.SinisterShadowGames, SinisterShadowGameseff);
AddExecutor(ExecutorType.Activate, CardId.ShaddollCore, ShaddollCoreeff); AddExecutor(ExecutorType.Activate, CardId.ShaddollCore, ShaddollCoreeff);
AddExecutor(ExecutorType.Repos, MonsterRepos); AddExecutor(ExecutorType.Repos, MonsterRepos);
} }
...@@ -224,52 +231,7 @@ namespace WindBot.Game.AI.Decks ...@@ -224,52 +231,7 @@ namespace WindBot.Game.AI.Decks
CrystronNeedlefibereff_used = false; CrystronNeedlefibereff_used = false;
} }
public bool CrystronNeedlefiberesp()
{
if (CrystronNeedlefibereff_used) return false;
int[] materials = new[]
{
CardId.KeeperOfDragonicMagic,
CardId.Lumina,
CardId.FairyTailSnow,
CardId.SouleatingOviraptor,
CardId.Raiden,
CardId.GiantRex,
};
if (Bot.HasInMonstersZone(materials))
{
AI.SelectCard(materials);
AI.SelectNextCard(CardId.GlowUpBulb);
return true;
}
return false;
}
public bool CrystronNeedlefibereff()
{
if (Duel.Player == 0)
{
CrystronNeedlefibereff_used = true;
AI.SelectCard(new[] { CardId.GhostOgre, CardId.GlowUpBulb, CardId.PlaguespreaderZombie, CardId.ShaddollFalco });
return true;
}
else if (AI.Utils.IsChainTarget(Card) || AI.Utils.GetProblematicEnemySpell() != null) return true;
else if (Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && AI.Utils.IsOneEnemyBetterThanValue(1500, true))
{
if (AI.Utils.IsOneEnemyBetterThanValue(1900, true))
{
AI.SelectPosition(CardPosition.FaceUpDefence);
}
else
{
AI.SelectPosition(CardPosition.FaceUpAttack);
}
return true;
}
return false;
}
private bool UltimateConductorTytannoeff() private bool UltimateConductorTytannoeff()
{ {
...@@ -452,26 +414,15 @@ namespace WindBot.Game.AI.Decks ...@@ -452,26 +414,15 @@ namespace WindBot.Game.AI.Decks
return Enemy.GetMonsterCount() >= 1; return Enemy.GetMonsterCount() >= 1;
} }
private bool ShaddollCoreeff()
{
if (Card.Location == CardLocation.SpellZone)
{
if(Enemy.HasAttackingMonster() && Duel.Player==1 && Duel.Phase==DuelPhase.BattleStart)
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
}
return false;
}
return true;
}
private bool FairyTailSnowsummon() private bool FairyTailSnowsummon()
{ {
return Enemy.GetMonsterCount()>=2; return Enemy.GetMonsterCount()>=2;
} }
private bool FairyTailSnoweff() private bool FairyTailSnoweff()
{ {
...@@ -482,6 +433,7 @@ namespace WindBot.Game.AI.Decks ...@@ -482,6 +433,7 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool SouleatingOviraptoreff() private bool SouleatingOviraptoreff()
{ {
if (!OvertexCoatlseff_used) if (!OvertexCoatlseff_used)
...@@ -511,75 +463,13 @@ namespace WindBot.Game.AI.Decks ...@@ -511,75 +463,13 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
return false; return false;
} }
private bool ShaddollFusioneff()
{
bool deck_check = false;
List<ClientCard> monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (monster.HasType(CardType.Synchro)||monster.HasType(CardType.Fusion)||monster.HasType(CardType.Xyz))
deck_check = true;
}
if (deck_check)
{
AI.SelectCard(new[]
{
CardId.ElShaddollConstruct,
CardId.ElShaddollShekhinaga,
CardId.ElShaddollGrysra,
CardId.ElShaddollWinda
});
AI.SelectNextCard(new[]
{
CardId.ShaddollBeast,
CardId.ShaddollSquamata,
CardId.ShaddollHedgehog,
CardId.ShaddollDragon,
CardId.ShaddollFalco,
});
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
if (!Bot.IsFieldEmpty()) return false;
foreach (ClientCard monster in Bot.Hand)
{
if (monster.HasAttribute(CardAttribute.Light))
{
AI.SelectCard(CardId.ElShaddollConstruct);
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
}
List<ClientCard> material_1 = Bot.GetMonsters();
foreach (ClientCard monster in material_1)
{
if (monster.HasAttribute(CardAttribute.Light))
{
AI.SelectCard(CardId.ElShaddollConstruct);
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
}
return false;
}
private bool ShaddollCore()
{
return Bot.HasInGraveyard(CardId.ShaddollFusion);
}
private bool AllureofDarkness() private bool AllureofDarkness()
{ {
IList<ClientCard> materials = Bot.Hand; IList<ClientCard> materials = Bot.Hand;
IList<ClientCard> check = new List<ClientCard>(); // IList<ClientCard> check = new List<ClientCard>();
ClientCard mat = null; ClientCard mat = null;
foreach (ClientCard card in materials) foreach (ClientCard card in materials)
{ {
...@@ -649,20 +539,14 @@ namespace WindBot.Game.AI.Decks ...@@ -649,20 +539,14 @@ namespace WindBot.Game.AI.Decks
}); });
return true; return true;
} }
private bool SinisterShadowGames()
{
AI.SelectCard(new[]
{
CardId.ShaddollBeast,
});
// all Shaddoll
return true;
}
private bool ElShaddollConstructeff() private bool ElShaddollConstructeff()
{ {
/* if (Duel.Phase == DuelPhase.Battle)
if (Enemy.BattlingMonster.Attack < 2800)
return false;*/
if(ActivateDescription==-1) if(ActivateDescription==-1)
{ {
AI.SelectCard(CardId.ShaddollSquamata); AI.SelectCard(CardId.ShaddollSquamata);
...@@ -679,11 +563,11 @@ namespace WindBot.Game.AI.Decks ...@@ -679,11 +563,11 @@ namespace WindBot.Game.AI.Decks
{ {
AI.SelectCard(new[] AI.SelectCard(new[]
{ {
CardId.ElShaddollConstruct, CardId.ShaddollBeast,
CardId.ElShaddollShekhinaga,
CardId.ElShaddollGrysra,
CardId.ElShaddollWinda,
CardId.ShaddollSquamata, CardId.ShaddollSquamata,
CardId.ShaddollHedgehog,
CardId.ShaddollDragon,
CardId.ShaddollFalco,
} }
); );
} }
...@@ -692,6 +576,100 @@ namespace WindBot.Game.AI.Decks ...@@ -692,6 +576,100 @@ namespace WindBot.Game.AI.Decks
} }
return true; return true;
} }
private bool ElShaddollGrysraeff()
{
if (Card.Location != CardLocation.MonsterZone)
return true;
return true;
}
private bool ShaddollFusioneff()
{
bool deck_check = false;
List<ClientCard> monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (monster.HasType(CardType.Synchro) || monster.HasType(CardType.Fusion) || monster.HasType(CardType.Xyz))
deck_check = true;
}
if (deck_check)
{
AI.SelectCard(new[]
{
CardId.ElShaddollConstruct,
CardId.ElShaddollShekhinaga,
CardId.ElShaddollGrysra,
CardId.ElShaddollWinda
});
AI.SelectNextCard(new[]
{
CardId.ShaddollBeast,
CardId.ShaddollSquamata,
CardId.ShaddollHedgehog,
CardId.ShaddollDragon,
CardId.ShaddollFalco,
});
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
if (!Bot.IsFieldEmpty()) return false;
foreach (ClientCard monster in Bot.Hand)
{
if (monster.HasAttribute(CardAttribute.Light))
{
AI.SelectCard(CardId.ElShaddollConstruct);
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
}
List<ClientCard> material_1 = Bot.GetMonsters();
foreach (ClientCard monster in material_1)
{
if (monster.HasAttribute(CardAttribute.Light))
{
AI.SelectCard(CardId.ElShaddollConstruct);
AI.SelectPosition(CardPosition.FaceUpAttack);
return true;
}
}
return false;
}
private bool SinisterShadowGameseff()
{
AI.SelectCard(new[]
{
CardId.ShaddollBeast,
});
return true;
}
private bool ShaddollCoreeff()
{
if (Card.Location == CardLocation.SpellZone)
{
if (Enemy.HasAttackingMonster() && Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart)
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
}
return false;
}
return true;
}
private bool ShaddollFalcoeff() private bool ShaddollFalcoeff()
{ {
...@@ -789,16 +767,7 @@ namespace WindBot.Game.AI.Decks ...@@ -789,16 +767,7 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
private bool GoblindberghSummon()
{
foreach (ClientCard card in Bot.Hand.GetMonsters())
{
if (!card.Equals(Card) && card.Level == 4)
return true;
}
return false;
}
public bool Hand_act_eff() public bool Hand_act_eff()
{ {
...@@ -806,6 +775,16 @@ namespace WindBot.Game.AI.Decks ...@@ -806,6 +775,16 @@ namespace WindBot.Game.AI.Decks
if (Card.Id == CardId.GhostOgre && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.GhostOgre)) return false; if (Card.Id == CardId.GhostOgre && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.GhostOgre)) return false;
return (Duel.LastChainPlayer == 1); return (Duel.LastChainPlayer == 1);
} }
//other extra
private bool Michaeleff()
{
if (Card.Location == CardLocation.Grave)
return true;
if (Bot.LifePoints <= 1000) return false;
return true;
}
private bool MinervaTheExaltedEffect() private bool MinervaTheExaltedEffect()
{ {
if (Card.Location == CardLocation.MonsterZone) if (Card.Location == CardLocation.MonsterZone)
...@@ -844,14 +823,176 @@ namespace WindBot.Game.AI.Decks ...@@ -844,14 +823,176 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
} }
public bool CrystronNeedlefibersp()
{
if (Bot.HasInMonstersZone(CardId.ElShaddollConstruct) ||
Bot.HasInMonstersZone(CardId.ElShaddollGrysra) ||
Bot.HasInMonstersZone(CardId.ElShaddollShekhinaga) ||
Bot.HasInMonstersZone(CardId.ElShaddollWinda))
return false;
if (CrystronNeedlefibereff_used) return false;
if (Bot.HasInMonstersZone(CardId.CrystronNeedlefiber)) return false;
if (Bot.HasInMonstersZone(CardId.FairyTailSnow) ||
Bot.HasInMonstersZone(CardId.Lumina) ||
Bot.HasInMonstersZone(CardId.KeeperOfDragonicMagic) ||
Bot.HasInMonstersZone(CardId.SouleatingOviraptor) ||
Bot.HasInMonstersZone(CardId.Raiden)
)
{
AI.SelectCard(new[]
{
CardId.KeeperOfDragonicMagic,
CardId.Lumina,
CardId.FairyTailSnow,
CardId.SouleatingOviraptor,
CardId.Raiden,
CardId.GiantRex,
});
AI.SelectNextCard(CardId.GlowUpBulb);
}
return true;
}
public bool CrystronNeedlefibereff()
{
if (Duel.Player == 0)
{
CrystronNeedlefibereff_used = true;
AI.SelectCard(new[] { CardId.GhostOgre, CardId.GlowUpBulb, CardId.PlaguespreaderZombie, CardId.ShaddollFalco });
return true;
}
else if (AI.Utils.IsChainTarget(Card) || AI.Utils.GetProblematicEnemySpell() != null) return true;
else if (Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && AI.Utils.IsOneEnemyBetterThanValue(1500, true))
{
if (AI.Utils.IsOneEnemyBetterThanValue(1900, true))
{
AI.SelectPosition(CardPosition.FaceUpDefence);
}
else
{
AI.SelectPosition(CardPosition.FaceUpAttack);
}
return true;
}
return false;
}
private bool ScarlightRedDragoneff()
{
IList<ClientCard> targets = new List<ClientCard>();
ClientCard target1 = AI.Utils.GetBestEnemyMonster();
if (target1 != null)
{
targets.Add(target1);
AI.SelectCard(targets);
return true;
}
return false;
}
private bool CrystalWingSynchroDragoneff()
{
return Duel.LastChainPlayer != 0;
}
private bool Sdulldeateff()
{
/* if (snake_four_s)
{
snake_four_s = false;
AI.SelectCard(Useless_List());
return true;
}
//if (ActivateDescription == AI.Utils.GetStringId(CardId.snake, 2)) return true;
if (ActivateDescription == AI.Utils.GetStringId(CardId.snake, 1))
{
foreach (ClientCard hand in Bot.Hand)
{
if (hand.Id == CardId.Red || hand.Id == CardId.Pink)
{
AI.SelectCard(hand);
return true;
}
if (hand.Id == CardId.Urara || hand.Id == CardId.Ghost)
{
if (Tuner_ss())
{
AI.SelectCard(hand);
return true;
}
}
}
}*/
return false;
}
private bool BlackRoseMoonlightDragoneff()
{
IList<ClientCard> targets = new List<ClientCard>();
ClientCard target1 = AI.Utils.GetBestEnemyMonster();
if (target1 != null)
{
targets.Add(target1);
AI.SelectCard(targets);
return true;
}
return false;
}
private bool RedWyverneff()
{
IList<ClientCard> check = Enemy.MonsterZone;
ClientCard best = null;
foreach (ClientCard monster in check)
{
if (monster.Attack >= 2400) best = monster;
}
if (best != null)
{
AI.SelectCard(best);
return true;
}
return false;
}
private bool CoralDragoneff()
{
if (Card.Location != CardLocation.MonsterZone)
return true;
IList<ClientCard> targets = new List<ClientCard>();
ClientCard target1 = AI.Utils.GetBestEnemyMonster();
if (target1 != null)
targets.Add(target1);
ClientCard target2 = AI.Utils.GetBestEnemySpell();
if (target2 != null)
targets.Add(target2);
else if (AI.Utils.IsChainTarget(Card) || AI.Utils.GetProblematicEnemySpell() != null)
{
AI.SelectCard(targets);
return true;
}
else if (Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && AI.Utils.IsOneEnemyBetterThanValue(2400, true))
{
AI.SelectCard(targets);
return true;
}
return false;
}
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender) public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
{ {
if (!defender.IsMonsterHasPreventActivationEffectInBattle()) if (!defender.IsMonsterHasPreventActivationEffectInBattle())
{ {
if (attacker.Id == CardId.ElShaddollConstruct && !attacker.IsDisabled()) // TODO: && defender.IsSpecialSummoned
attacker.RealPower = 9999;
if (attacker.Id == CardId.UltimateConductorTytanno && !attacker.IsDisabled() && defender.IsDefense()) if (attacker.Id == CardId.UltimateConductorTytanno && !attacker.IsDisabled() && defender.IsDefense())
attacker.RealPower = 9999; attacker.RealPower = 9999;
} }
return base.OnPreBattleBetween(attacker, defender); return base.OnPreBattleBetween(attacker, defender);
} }
...@@ -859,6 +1000,16 @@ namespace WindBot.Game.AI.Decks ...@@ -859,6 +1000,16 @@ namespace WindBot.Game.AI.Decks
{ {
return true; return true;
} }
/*
private bool GoblindberghSummon()
{
foreach (ClientCard card in Bot.Hand.GetMonsters())
{
if (!card.Equals(Card) && card.Level == 4)
return true;
}
return 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