Commit 23ca5d1b authored by wind2009's avatar wind2009 Committed by mercury233

Update Trickstar deck

parent f0c9682e
......@@ -22,8 +22,6 @@
63845230
63845230
63845230
5133471
5133471
18144506
35261759
35261759
......@@ -34,6 +32,8 @@
35371948
35371948
35371948
10813327
10813327
21076084
83555666
40605147
......@@ -42,18 +42,18 @@
84749824
#extra
41999284
99111753
98558751
50588353
2857636
38342335
41999284
74997493
3987233
41999284
74997493
50588353
98558751
74997493
2857636
99111753
38342335
98978921
99111753
31833038
3987233
50588353
41999284
9753964
34408491
!side
......@@ -21,6 +21,7 @@ namespace WindBot.Game.AI.Decks
public const int MG = 23434538;
public const int Tuner = 67441435;
public const int Eater = 63845230;
public const int LockBird = 94145021;
public const int Feather = 18144506;
public const int Galaxy = 5133471;
......@@ -34,27 +35,30 @@ namespace WindBot.Game.AI.Decks
public const int Ring = 83555666;
public const int Strike = 40605147;
public const int Warn = 84749824;
public const int Grass = 10813327;
public const int Linkuri = 41999284;
public const int Linkspi = 98978921;
public const int SafeDra = 99111753;
public const int Crystal = 50588353;
public const int downer = 77058170;
public const int phoneix = 2857636;
public const int unicorn = 38342335;
public const int firewall = 5043010;
public const int snake = 74997493;
public const int borrel = 31833038;
public const int boomer = 5821478;
public const int TG = 98558751;
public const int Beelze = 34408491;
public const int Abyss = 9753964;
public const int Exterio = 99916754;
public const int Missus = 3987233;
}
public int getLinkMarker(int id)
{
if (id == CardId.borrel || id == CardId.snake) return 4;
else if (id == CardId.unicorn) return 3;
else if (id == CardId.Crystal || id == CardId.phoneix || id == CardId.SafeDra) return 2;
else if (id == CardId.Crystal || id == CardId.phoneix || id == CardId.SafeDra || id == CardId.Missus) return 2;
return 1;
}
......@@ -65,6 +69,8 @@ namespace WindBot.Game.AI.Decks
bool tuner_eff_used = false;
bool crystal_eff_used = false;
int red_ss_count = 0;
bool white_eff_used = false;
bool lockbird_useful = false;
public TrickstarExecutor(GameAI ai, Duel duel)
: base(ai, duel)
......@@ -73,9 +79,12 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.MG, G_act);
AddExecutor(ExecutorType.Activate, CardId.Strike, DefaultSolemnStrike);
AddExecutor(ExecutorType.Activate, CardId.Warn, DefaultSolemnWarning);
AddExecutor(ExecutorType.Activate, CardId.Grass, Grass_ss);
AddExecutor(ExecutorType.Activate, CardId.Urara, Hand_act_eff);
AddExecutor(ExecutorType.Activate, CardId.Ghost, Hand_act_eff);
AddExecutor(ExecutorType.Activate, CardId.Ring, DefaultCompulsoryEvacuationDevice);
AddExecutor(ExecutorType.Activate, CardId.Abyss, Abyss_eff);
AddExecutor(ExecutorType.Activate, CardId.Exterio, Exterio_counter);
// spell clean
AddExecutor(ExecutorType.Activate, CardId.Stage, Stage_Lock);
......@@ -84,17 +93,22 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.TG, TG_eff);
// ex_monster act
AddExecutor(ExecutorType.Activate, CardId.Beelze);
AddExecutor(ExecutorType.Activate, CardId.Missus, Missus_eff);
AddExecutor(ExecutorType.Activate, CardId.Crystal, Crystal_eff);
AddExecutor(ExecutorType.Activate, CardId.SafeDra, DefaultCompulsoryEvacuationDevice);
AddExecutor(ExecutorType.Activate, CardId.Linkuri, Linkuri_eff);
AddExecutor(ExecutorType.Activate, CardId.phoneix, Phoneix_eff);
AddExecutor(ExecutorType.Activate, CardId.unicorn, Unicorn_eff);
AddExecutor(ExecutorType.Activate, CardId.snake, Snake_eff);
AddExecutor(ExecutorType.Activate, CardId.borrel, Borrel_eff);
AddExecutor(ExecutorType.Activate, CardId.Tuner,Tuner_eff);
// ex ss
AddExecutor(ExecutorType.SpSummon, CardId.snake, Snake_ss);
AddExecutor(ExecutorType.SpSummon, CardId.Missus, Missus_ss);
AddExecutor(ExecutorType.SpSummon, CardId.borrel, Borrel_ss);
AddExecutor(ExecutorType.SpSummon, CardId.phoneix, Phoneix_ss);
AddExecutor(ExecutorType.SpSummon, CardId.unicorn, Unicorn_ss);
AddExecutor(ExecutorType.SpSummon, CardId.Crystal, Crystal_ss);
......@@ -108,29 +122,30 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.BF, BF_pos);
AddExecutor(ExecutorType.Activate, CardId.Sheep, Sheep_Act);
AddExecutor(ExecutorType.Activate, CardId.Eater);
AddExecutor(ExecutorType.Activate, CardId.LockBird, LockBird_act);
// ts
AddExecutor(ExecutorType.Activate, CardId.Stage, Stage_act);
AddExecutor(ExecutorType.Activate, CardId.Pink, Pink_eff);
AddExecutor(ExecutorType.Activate, CardId.Re, Reincarnation);
AddExecutor(ExecutorType.Activate, CardId.Red, Red_ss);
AddExecutor(ExecutorType.Activate, CardId.Yellow, Yellow_eff);
AddExecutor(ExecutorType.Activate, CardId.White, White_eff);
AddExecutor(ExecutorType.Activate, CardId.Re, Reincarnation);
AddExecutor(ExecutorType.Activate, CardId.Crown, Crown_eff);
AddExecutor(ExecutorType.Summon, CardId.Yellow, Yellow_sum);
AddExecutor(ExecutorType.Summon, CardId.Red, Red_sum);
AddExecutor(ExecutorType.Summon, CardId.Pink, Pink_sum);
// normal
AddExecutor(ExecutorType.SpSummon, CardId.Eater, Eater_ss);
AddExecutor(ExecutorType.Summon, CardId.Tuner, Tuner_ns);
AddExecutor(ExecutorType.Summon, CardId.Urara,Tuner_ns);
AddExecutor(ExecutorType.Summon, CardId.Ghost, Tuner_ns);
AddExecutor(ExecutorType.Summon, CardId.Tuner, Tuner_ns);
AddExecutor(ExecutorType.Activate, CardId.Pot, Pot_Act);
AddExecutor(ExecutorType.Repos, MonsterRepos);
AddExecutor(ExecutorType.SummonOrSet, CardId.Red);
AddExecutor(ExecutorType.SummonOrSet, CardId.Pink);
AddExecutor(ExecutorType.SpellSet, DefaultSpellSet);
}
public bool Has_down_arrow(int id)
......@@ -147,8 +162,9 @@ namespace WindBot.Game.AI.Decks
{
return new[]
{
CardId.Crown,
CardId.Tuner,
CardId.Grass,
CardId.Crown,
CardId.Pink,
CardId.Pot,
CardId.BF,
......@@ -171,6 +187,63 @@ namespace WindBot.Game.AI.Decks
};
}
public int GetTotalATK(IList<ClientCard> list)
{
int atk = 0;
foreach(ClientCard c in list)
{
if (c == null) continue;
atk += c.Attack;
}
return atk;
}
public bool Grass_ss()
{
if (Bot.ExtraDeck.Count > 0)
{
IList<ClientCard> ex = Bot.ExtraDeck;
ClientCard ex_best = null;
foreach (ClientCard ex_card in ex)
{
if (ex_best == null || ex_card.Attack > ex_best.Attack) ex_best = ex_card;
}
if (ex_best != null) {
AI.SelectCard(ex_best);
}
return true;
}
return true;
}
public bool Abyss_eff()
{
// tuner ss
if (ActivateDescription == -1)
{
AI.SelectCard(new[]
{
CardId.Ghost,
CardId.TG,
CardId.Tuner,
CardId.Urara,
CardId.BF
});
return true;
};
// counter
if (!Enemy.HasInMonstersZone(CardId.Ghost) || Enemy.GetHandCount() <= 1)
{
ClientCard tosolve = AI.Utils.GetProblematicEnemyCard();
if (tosolve != null)
{
AI.SelectCard(tosolve);
return true;
}
}
return false;
}
public bool Stage_Lock()
{
if (Card.Location != CardLocation.SpellZone) return false;
......@@ -224,14 +297,9 @@ namespace WindBot.Game.AI.Decks
public bool Feather_Act()
{
List<ClientCard> spells = Enemy.GetSpells();
foreach (ClientCard card in spells)
{
// 有常用贴纸
if (card.Id == 5851097 || card.Id == 30241314 || card.Id == 81674782 || card.Id == 58921041 || card.Id == 59305593)
if (AI.Utils.GetProblematicEnemySpell() != null)
{
List<ClientCard> grave = Bot.GetGraveyardSpells();
// 墓地有银河旋风则不发动
foreach (ClientCard self_card in grave)
{
if (self_card.Id == CardId.Galaxy)
......@@ -239,9 +307,8 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
}
// 2张以上才发动
if (spells.Count <= 1)
// activate when more than 2 cards
if (Enemy.GetSpellCount() <= 1)
return false;
return true;
}
......@@ -250,8 +317,8 @@ namespace WindBot.Game.AI.Decks
{
if (Duel.Player == 0) return false;
if (Duel.Phase == DuelPhase.End) return true;
if (LastChainPlayer == 1 && (AI.Utils.IsChainTarget(Card) || GetLastChainCard().Id == CardId.Feather)) return true;
if (Duel.Phase > DuelPhase.Main1 && Duel.Phase < DuelPhase.Main2)
if (LastChainPlayer == 1 && (AI.Utils.IsChainTarget(Card) || (GetLastChainCard().Id == CardId.Feather && !Bot.HasInSpellZone(CardId.Grass)))) return true;
if (Duel.Phase == DuelPhase.BattleStart)
{
int total_atk = 0;
List<ClientCard> enemy_monster = Enemy.GetMonsters();
......@@ -396,10 +463,21 @@ namespace WindBot.Game.AI.Decks
public bool Hand_act_eff()
{
if (Card.Id == CardId.Urara && Bot.HasInHand(CardId.LockBird) && Bot.HasInSpellZone(CardId.Re)) return false;
if (Card.Id == CardId.Ghost && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.Ghost)) return false;
return (LastChainPlayer == 1);
}
public bool Exterio_counter()
{
if (LastChainPlayer == 1)
{
AI.SelectCard(Useless_List());
return true;
}
return false;
}
public bool G_act()
{
return (Duel.Player == 1);
......@@ -481,7 +559,7 @@ namespace WindBot.Game.AI.Decks
public bool Red_ss()
{
if (red_ss_count >= 9) return false;
if (red_ss_count >= 6) return false;
if (LastChainPlayer == 0 && GetLastChainCard().Id == CardId.Red)
{
foreach (ClientCard m in Bot.GetMonsters())
......@@ -506,7 +584,7 @@ namespace WindBot.Game.AI.Decks
{
if (IsTrickstar(c.Id))
{
if (c.Attacked)
if (c.Attacked && c.Id != CardId.Red)
{
AI.SelectCard(c);
red_ss_count += 1;
......@@ -516,6 +594,7 @@ namespace WindBot.Game.AI.Decks
{
if (Bot.HasInHand(CardId.White) && c.Attack * 2 < tosolve_enemy.Attack)
{
if (tosolve_enemy.Attack > 3200) AI.SelectPosition(CardPosition.FaceUpDefence);
AI.SelectCard(c);
red_ss_count += 1;
return true;
......@@ -528,6 +607,16 @@ namespace WindBot.Game.AI.Decks
}
if (!Bot.HasInHand(CardId.White) && c.Attack < tosolve_enemy.Attack)
{
if (!c.Attacked)
{
ClientCard badatk = Enemy.GetMonsters().GetLowestAttackMonster();
ClientCard baddef = Enemy.GetMonsters().GetLowestDefenseMonster();
int enemy_power = 99999;
if (badatk != null && badatk.Attack <= enemy_power) enemy_power = badatk.Attack;
if (baddef != null && baddef.Defense <= enemy_power) enemy_power = baddef.Defense;
if (c.Attack > enemy_power) return false;
}
if (tosolve_enemy.Attack > 1600) AI.SelectPosition(CardPosition.FaceUpDefence);
AI.SelectCard(c);
red_ss_count += 1;
return true;
......@@ -538,6 +627,7 @@ namespace WindBot.Game.AI.Decks
}
} else
{
if ((ChainContainsCard(53129443) || ChainContainsCard(99330325)) && ChainContainsCard(CardId.Red)) return false;
if (Duel.Phase > DuelPhase.Main1 && Duel.Phase < DuelPhase.Main2)
{
if (!Bot.HasInHand(CardId.White) && AI.Utils.IsOneEnemyBetterThanValue(1600, true))
......@@ -560,7 +650,7 @@ namespace WindBot.Game.AI.Decks
public bool Yellow_eff()
{
if (!Bot.HasInHand(CardId.Stage) && !Bot.HasInSpellZone(CardId.Stage) && Bot.GetRemainingCount(CardId.Stage,3) > 0)
if (!Bot.HasInHand(CardId.Stage) && !Bot.HasInSpellZone(CardId.Stage) && Bot.GetRemainingCount(CardId.Stage, 3) > 0)
{
AI.SelectCard(new[]
{
......@@ -576,7 +666,7 @@ namespace WindBot.Game.AI.Decks
}
else if (Enemy.GetMonsterCount() == 0 && !AI.Utils.IsTurn1OrMain2())
{
if (Bot.HasInGraveyard(CardId.Red) && Bot.GetRemainingCount(CardId.Pink,1)>0 && !pink_ss)
if (Bot.HasInGraveyard(CardId.Red) && Bot.GetRemainingCount(CardId.Pink, 1) > 0 && !pink_ss)
{
AI.SelectCard(new[]
{
......@@ -589,7 +679,7 @@ namespace WindBot.Game.AI.Decks
CardId.Yellow
});
}
else if (Bot.HasInGraveyard(CardId.Pink) && Bot.HasInGraveyard(CardId.Red) && Bot.GetRemainingCount(CardId.Ring,1) > 0)
else if (Bot.HasInGraveyard(CardId.Pink) && Bot.HasInGraveyard(CardId.Red) && Bot.GetRemainingCount(CardId.Ring, 1) > 0)
{
AI.SelectCard(new[]
{
......@@ -602,7 +692,7 @@ namespace WindBot.Game.AI.Decks
CardId.Yellow
});
}
else if (Bot.GetRemainingCount(CardId.White,2) > 0 && Duel.LifePoints[1] <= 4000)
else if (Bot.GetRemainingCount(CardId.White, 2) > 0 && Duel.LifePoints[1] <= 4000)
{
AI.SelectCard(new[]
{
......@@ -673,6 +763,18 @@ namespace WindBot.Game.AI.Decks
});
}
return true;
} else if ((Bot.HasInHand(CardId.Red) || Bot.HasInHand(CardId.Stage)) && Bot.GetRemainingCount(CardId.Re,1) > 0 && Bot.HasInHand(CardId.LockBird)) {
AI.SelectCard(new[]
{
CardId.Re,
CardId.Red,
CardId.White,
CardId.Ring,
CardId.Pink,
CardId.Stage,
CardId.Yellow
});
return true;
} else
{
AI.SelectCard(new[]
......@@ -700,23 +802,37 @@ namespace WindBot.Game.AI.Decks
if (bestMy == null || (bestEnemyATK == null && bestEnemyDEF == null))
return false;
if (bestEnemyATK != null && bestMy.Attack <= bestEnemyATK.Attack && bestMy.Attack * 2 >= bestEnemyATK.Attack)
{
white_eff_used = true;
return true;
}
if (bestEnemyDEF != null && bestMy.Attack <= bestEnemyDEF.Defense && bestMy.Attack * 2 >= bestEnemyDEF.Defense)
{
white_eff_used = true;
return true;
}
return false;
} else
{
if (Enemy.GetMonsterCount() == 0 && !AI.Utils.IsTurn1OrMain2()) return true;
if (Enemy.GetMonsterCount() == 0 && !AI.Utils.IsTurn1OrMain2()) {
white_eff_used = true;
return true;
}
else if (Enemy.GetMonsterCount() != 0)
{
ClientCard tosolve = AI.Utils.GetBestEnemyMonster(true);
ClientCard self_card = Bot.GetMonsters().GetHighestAttackMonster();
if (tosolve == null || self_card == null || (tosolve != null && self_card != null && !IsTrickstar(self_card.Id)))
{
return (Enemy.GetMonsters().GetLowestAttackMonster() == null ||
if (Enemy.GetMonsters().GetLowestAttackMonster() == null ||
Enemy.GetMonsters().GetLowestDefenseMonster() == null ||
Enemy.GetMonsters().GetLowestAttackMonster().Attack < 2000 ||
Enemy.GetMonsters().GetLowestDefenseMonster().Defense < 2000);
Enemy.GetMonsters().GetLowestDefenseMonster().Defense < 2000)
{
white_eff_used = true;
return true;
}
else return false;
}
if (tosolve != null && self_card != null && IsTrickstar(self_card.Id))
{
......@@ -732,12 +848,53 @@ namespace WindBot.Game.AI.Decks
}
}
public bool LockBird_act()
{
if (Duel.Player == 0) return false;
lockbird_useful = true;
if (Bot.HasInSpellZone(CardId.Re)) return ChainContainsCard(CardId.Re);
return true;
}
public bool Reincarnation()
{
if (Card.Location == CardLocation.Grave) return Ts_reborn();
if (Bot.HasInHand(CardId.LockBird))
{
if (lockbird_useful || AI.Utils.IsChainTarget(Card) || (Duel.Player == 1 && ChainContainsCard(CardId.Feather))) {
lockbird_useful = false;
return true;
}
return false;
}
return true;
}
public bool Crown_eff()
{
if (Card.Location == CardLocation.Hand) return Ts_reborn();
if (Bot.HasInHand(CardId.Pink))
{
AI.SelectCard(CardId.Pink);
return true;
}
if (Enemy.GetMonsterCount() == 0)
{
foreach(ClientCard hand in Bot.Hand)
{
if (hand.IsMonster() && IsTrickstar(hand.Id))
{
if (hand.Attack >= Duel.LifePoints[1]) return true;
if (hand.Id != CardId.Yellow)
{
if (AI.Utils.GetOneEnemyBetterThanValue(hand.Attack, false) == null) return true;
}
}
}
}
return false;
}
public bool Ts_reborn()
{
bool can_summon = (Duel.Player == 0 && NormalSummoned);
......@@ -824,7 +981,11 @@ namespace WindBot.Game.AI.Decks
{
if (hand.Id == Card.Id) count += 1;
}
if (count >= 2) return true;
if (count < 2) return false;
foreach(ClientCard m in Bot.GetMonsters())
{
if (m.Id != CardId.Eater && getLinkMarker(m.Id) <= 2) return true;
}
return false;
}
......@@ -925,7 +1086,16 @@ namespace WindBot.Game.AI.Decks
ClientCard m = AI.Utils.GetProblematicEnemyMonster();
if (m == null)
{
return (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 1100 && Duel.Phase < DuelPhase.Battle);
if (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 1100 && Duel.Phase < DuelPhase.Battle)
{
IList<ClientCard> list = new List<ClientCard>();
foreach(ClientCard monster in Bot.GetMonsters())
{
if (getLinkMarker(monster.Id) <= 2) list.Add(monster);
if (list.Count >= 2) break;
}
return (list.Count >= 2 && GetTotalATK(list) <= 1100);
}
}
ClientCard ex_1 = Bot.MonsterZone[5];
ClientCard ex_2 = Bot.MonsterZone[6];
......@@ -953,7 +1123,17 @@ namespace WindBot.Game.AI.Decks
ClientCard m = AI.Utils.GetProblematicEnemySpell();
if (m == null)
{
return (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 1900 && Duel.Phase == DuelPhase.Main1);
if (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 1900 && Duel.Phase == DuelPhase.Main1)
{
IList<ClientCard> m_list = new List<ClientCard>();
foreach(ClientCard monster in Bot.GetMonsters())
{
if (getLinkMarker(monster.Id) == 1) m_list.Add(monster);
if (m_list.Count == 2) break;
}
return (m_list.Count == 2 && GetTotalATK(m_list) <= 1900);
}
return false;
}
if (Bot.Hand.Count == 0) return false;
IList<ClientCard> targets = new List<ClientCard>();
......@@ -977,7 +1157,7 @@ namespace WindBot.Game.AI.Decks
{
targets.Add(ex_zone);
}
AI.SelectCard(targets);
AI.SelectMaterials(targets);
return true;
}
......@@ -989,13 +1169,31 @@ namespace WindBot.Game.AI.Decks
public bool Unicorn_ss() {
ClientCard m = AI.Utils.GetProblematicEnemyCard();
int link_count = 0;
if (m == null)
{
return (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 2200 && Duel.Phase == DuelPhase.Main1);
if (Enemy.GetMonsterCount() == 0 && Duel.LifePoints[1] <= 2200 && Duel.Phase == DuelPhase.Main1)
{
IList<ClientCard> m_list = new List<ClientCard>();
foreach(ClientCard monster in Bot.GetMonsters())
{
if (getLinkMarker(monster.Id) == 2)
{
link_count += 2;
m_list.Add(monster);
} else if (getLinkMarker(monster.Id) == 1)
{
link_count += 1;
m_list.Add(monster);
}
if (link_count >= 3) break;
}
return (link_count >= 3 && GetTotalATK(m_list) <= 2200);
}
return false;
}
if (Bot.Hand.Count == 0) return false;
IList<ClientCard> targets = new List<ClientCard>();
int link_count = 0;
foreach (ClientCard s_m in Bot.GetMonsters())
{
if (s_m.Id != CardId.Eater && getLinkMarker(s_m.Id) <= 2)
......@@ -1009,7 +1207,7 @@ namespace WindBot.Game.AI.Decks
}
}
if (link_count < 3) return false;
AI.SelectCard(targets);
AI.SelectMaterials(targets);
return true;
}
......@@ -1025,20 +1223,29 @@ namespace WindBot.Game.AI.Decks
public bool Snake_ss()
{
IList<ClientCard> targets = new List<ClientCard>();
foreach (ClientCard m in Bot.GetMonsters())
// exzone fo first
foreach (ClientCard e_m in Bot.GetMonstersInExtraZone())
{
if (e_m.Attack < 1900 && !targets.ContainsCardWithId(e_m.Id))
{
targets.Add(e_m);
}
}
foreach (ClientCard m in Bot.GetMonstersInMainZone())
{
if (m.Attack < 1900 && !targets.ContainsCardWithId(m.Id))
{
targets.Add(m);
}
}
if (targets.Count >= 4)
{
AI.SelectCard(targets);
if (Duel.LifePoints[1] <= GetTotalATK(targets) && Enemy.GetMonsterCount() == 0) return false;
AI.SelectMaterials(targets);
AI.SelectYesNo(true);
snake_four_s = true;
return true;
}
}
return false;
}
......@@ -1073,10 +1280,100 @@ namespace WindBot.Game.AI.Decks
return false;
}
public bool Missus_ss()
{
IList<ClientCard> material_list = new List<ClientCard>();
foreach(ClientCard monster in Bot.GetMonsters())
{
if (monster.HasAttribute(CardAttribute.Earth) && getLinkMarker(monster.Id) == 1) material_list.Add(monster);
}
if (material_list.Count < 2) return false;
if (Enemy.GetMonsterCount() == 0)
{
AI.SelectMaterials(material_list);
return true;
} else if (AI.Utils.GetProblematicEnemyMonster(2000) != null && Bot.HasInExtra(CardId.borrel) && !Bot.HasInMonstersZone(CardId.Missus))
{
AI.SelectMaterials(material_list);
return true;
}
return false;
}
public bool Missus_eff()
{
AI.SelectCard(new[]
{
CardId.MG,
CardId.Missus,
CardId.snake
});
return true;
}
public bool Borrel_ss()
{
bool already_link2 = false;
IList<ClientCard> material_list = new List<ClientCard>();
if (AI.Utils.GetProblematicEnemyMonster(2000) != null || (Enemy.GetMonsterCount() == 0 && Duel.Phase == DuelPhase.Main1 && Duel.LifePoints[1] <= 3000))
{
foreach(ClientCard e_m in Bot.GetMonstersInExtraZone())
{
if (getLinkMarker(e_m.Id) < 3)
{
if (getLinkMarker(e_m.Id) == 2) already_link2 = true;
material_list.Add(e_m);
}
}
foreach(ClientCard m in Bot.GetMonstersInMainZone())
{
if (getLinkMarker(m.Id) < 3)
{
if (getLinkMarker(m.Id) == 2 && !already_link2)
{
already_link2 = true;
material_list.Add(m);
} else if (m.Id != CardId.Sheep + 1 && (m.Id != CardId.Eater))
{
material_list.Add(m);
}
if ((already_link2 && material_list.Count == 3) || (!already_link2 && material_list.Count == 4)) break;
}
}
if ((already_link2 && material_list.Count == 3) || (!already_link2 && material_list.Count == 4))
{
if (Enemy.GetMonsterCount() == 0 && Duel.Phase == DuelPhase.Main1 && Duel.LifePoints[1] <= 3000)
{
if (GetTotalATK(material_list) >= 3000) return false;
}
AI.SelectMaterials(material_list);
return true;
}
}
return false;
}
public bool Borrel_eff()
{
if (ActivateDescription == -1) return true;
ClientCard BestEnemy = AI.Utils.GetBestEnemyMonster(true);
ClientCard WorstBot = Bot.GetMonsters().GetLowestAttackMonster();
if (BestEnemy == null || BestEnemy.HasPosition(CardPosition.FaceDown)) return false;
if (WorstBot == null || WorstBot.HasPosition(CardPosition.FaceDown)) return false;
if (BestEnemy.Attack >= WorstBot.RealPower)
{
AI.SelectCard(BestEnemy);
return true;
}
return false;
}
public bool MonsterRepos()
{
if (Card.Id == CardId.Eater) return false;
if (Card.Id == CardId.Sheep + 1) return false;
if (Card.Id == CardId.Eater && Card.IsAttack()) return false;
if (Card.IsFaceup() && Card.IsDefense() && Card.Attack == 0)
return false;
bool enemyBetter = AI.Utils.IsAllEnemyBetter(true);
if (Card.IsAttack() && enemyBetter)
......@@ -1100,13 +1397,15 @@ namespace WindBot.Game.AI.Decks
snake_four_s = false;
crystal_eff_used = false;
red_ss_count = 0;
white_eff_used = false;
lockbird_useful = false;
}
public override bool OnPreBattleBetween(ClientCard attacker, ClientCard defender)
{
if (!defender.IsMonsterHasPreventActivationEffectInBattle())
{
if (attacker.Attribute == (int)CardAttribute.Light && Bot.HasInHand(CardId.White))
if (IsTrickstar(attacker.Id) && Bot.HasInHand(CardId.White) && !white_eff_used)
attacker.RealPower = attacker.RealPower * 2;
else if (attacker.Id == CardId.Eater)
attacker.RealPower = 99999;
......
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