Commit 4e48f5fc authored by mercury233's avatar mercury233

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

parents 4b080580 5c585506
......@@ -37,7 +37,6 @@
36361633
36361633
36361633
36468556
37576645
37576645
37576645
......@@ -52,7 +51,6 @@
75249652
83555666
98444741
98444741
#extra
41999284
41999284
......@@ -66,3 +64,5 @@
100227025
100227025
100227025
36468556
98444741
\ No newline at end of file
......@@ -62,6 +62,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, CardId.Waboku);
AddExecutor(ExecutorType.SpellSet, CardId.ThreateningRoar);
AddExecutor(ExecutorType.SpellSet, CardId.BlazingMirrorForce);
AddExecutor(ExecutorType.SpellSet, CardId.OjamaTrio, OjamaTrioset);
AddExecutor(ExecutorType.SpellSet, BrunSpellSet);
//afer set
AddExecutor(ExecutorType.Activate, CardId.CardcarD);
......@@ -69,7 +70,6 @@ namespace WindBot.Game.AI.Decks
//activate trap
AddExecutor(ExecutorType.Activate, CardId.BalanceOfJudgment, BalanceOfJudgmenteff);
AddExecutor(ExecutorType.Activate, CardId.AccuulatedFortune);
AddExecutor(ExecutorType.Activate, CardId.ChainStrike, ChainStrikeeff);
//battle
AddExecutor(ExecutorType.Activate, CardId.ThreateningRoar, ThreateningRoareff);
......@@ -85,7 +85,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.SecretBlast, SecretBlasteff);
AddExecutor(ExecutorType.Activate, CardId.SectetBarrel, SectetBarreleff);
AddExecutor(ExecutorType.Activate, CardId.RecklessGreed, RecklessGreedeff);
AddExecutor(ExecutorType.Activate, CardId.ChainStrike, ChainStrikeeff);
//sp
AddExecutor(ExecutorType.SpSummon, CardId.Linkuriboh);
AddExecutor(ExecutorType.Activate, CardId.Linkuriboh, Linkuriboheff);
......@@ -216,17 +216,25 @@ namespace WindBot.Game.AI.Decks
id == CardId.RingOfDestruction
);
}
bool pot_used = false;
bool no_sp = false;
bool one_turn_kill = false;
bool one_turn_kill_1 = false;
int expected_blood = 0;
bool prevent_used = false;
int preventcount = 0;
bool battleprevent = 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 barrel_count = 0;
int just_count = 0;
int Ojama_count = 0;
int HasAccuulatedFortune = 0;
public override bool OnSelectHand()
{
return true;
......@@ -236,23 +244,20 @@ namespace WindBot.Game.AI.Decks
{
pot_used = false;
no_sp = false;
prevent_used = false;
battleprevent = false;
OjamaTrioused = false;
}
public override void OnNewPhase()
{
preventcount = 0;
battleprevent = false;
HasAccuulatedFortune = false;
OjamaTrioused = false;
IList<ClientCard> trap = Bot.SpellZone;
IList<ClientCard> monster = Bot.MonsterZone;
foreach(ClientCard card in trap)
{
if (card.Id == CardId.AccuulatedFortune) HasAccuulatedFortune = true;
}
foreach (ClientCard card in trap)
{
if (Has_prevent_list(card.Id))
......@@ -271,33 +276,95 @@ namespace WindBot.Game.AI.Decks
}
}
expected_blood = 0;
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;
barrel_count = 0;
just_count = 0;
Waboku_count = 0;
Roar_count = 0;
Ojama_count = 0;
IList<ClientCard> check = Bot.SpellZone;
foreach (ClientCard card in check)
{
if (card.Id == CardId.AccuulatedFortune)
HasAccuulatedFortune++;
}
foreach (ClientCard card in check)
{
if (card.Id == CardId.SecretBlast)
blast_count++;
break;
}
foreach (ClientCard card in check)
{
if (card.Id == CardId.SectetBarrel)
barrel_count++;
break;
}
foreach (ClientCard card in check)
{
if (card.Id == CardId.JustDesserts)
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);
if (Enemy.LifePoints <= expected_blood)
one_turn_kill = true;
if (Enemy.LifePoints <= expected_blood) 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;
}
......@@ -325,7 +392,7 @@ namespace WindBot.Game.AI.Decks
}
private bool AbouluteKingBackJacksummon()
{
return !pot_used;
return !no_sp;
}
private bool AbouluteKingBackJackeff()
{
......@@ -341,7 +408,7 @@ namespace WindBot.Game.AI.Decks
}
private bool PotOfDualityeff()
{
pot_used = true;
no_sp = true;
AI.SelectCard(prevent_list());
return true;
}
......@@ -359,20 +426,23 @@ namespace WindBot.Game.AI.Decks
}
private bool ThreateningRoareff()
{
if (drawfirst) 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;
return DefaultUniqueTrap();
}
private bool SandaionTheTimloardeff()
{
prevent_used = true;
return true;
}
private bool Wabokueff()
{
if (drawfirst) return true;
if (must_chain()) return true;
if (drawfirst) return true;
if (prevent_used||Duel.Player == 0||Duel.Phase!=DuelPhase.BattleStart) return false;
prevent_used = true;
return DefaultUniqueTrap();
......@@ -409,22 +479,18 @@ namespace WindBot.Game.AI.Decks
}
private bool RecklessGreedeff()
{
int count = 0;
IList<ClientCard> check = Bot.SpellZone;
foreach (ClientCard card in check)
{
if (card.Id == CardId.RecklessGreed)
count++;
break;
}
if (count > 1) return true;
if (drawfirst) return DefaultUniqueTrap();
if (must_chain() && greed_count > 1) return true;
if (greed_count > 1) return true;
if (Bot.LifePoints <= 2000) return true;
if (Bot.GetHandCount() <1 && Duel.Player==0 && Duel.Phase!=DuelPhase.Standby) return true;
return false;
}
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;
int count = Enemy.GetFieldHandCount();
if (Enemy.LifePoints < count * 200) return true;
......@@ -433,7 +499,9 @@ namespace WindBot.Game.AI.Decks
}
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;
int count = Enemy.GetFieldCount();
if (Enemy.LifePoints < count * 300) return true;
......@@ -441,13 +509,21 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool OjamaTrioset()
{
if (Bot.HasInSpellZone(CardId.OjamaTrio)) return false;
return true;
}
private bool OjamaTrioeff()
{
return OjamaTrioused;
return OjamaTrioused||OjamaTrioused_draw;
}
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;
int count = Enemy.GetMonsterCount();
if (Enemy.LifePoints <= count * 500) return true;
......@@ -461,8 +537,10 @@ namespace WindBot.Game.AI.Decks
}
private bool ChainStrikeeff()
{
if (drawfirst) return true;
if (must_chain()) return true;
int chain = Duel.CurrentChain.Count;
if (strike_count >= 2 && chain >= 2) return true;
if (Enemy.LifePoints <= (chain + 1) * 400) return true;
if (Duel.CurrentChain.Count >= 3) return true;
return false;
......@@ -478,7 +556,10 @@ namespace WindBot.Game.AI.Decks
private bool CardOfDemiseeff()
{
if (Bot.GetHandCount() == 1 && Bot.GetSpellCountWithoutField() <= 3)
{
no_sp = true;
return true;
}
return false;
}
private bool Mathematicianeff()
......@@ -494,8 +575,8 @@ namespace WindBot.Game.AI.Decks
private bool DiceJarfacedown()
{
IList<ClientCard> check = Bot.MonsterZone;
foreach (ClientCard card in check)
foreach (ClientCard card in Bot.GetMonsters())
{
if (card.Id == CardId.DiceJar && card.IsFacedown())
return true;
......@@ -512,7 +593,16 @@ namespace WindBot.Game.AI.Decks
}
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()
{
......
......@@ -110,8 +110,17 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.Lumina);
//activate
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
AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefiberesp);
//AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefibersp);
AddExecutor(ExecutorType.SpSummon, CardId.UltimateConductorTytanno, UltimateConductorTytannosp);
AddExecutor(ExecutorType.Activate, CardId.UltimateConductorTytanno, UltimateConductorTytannoeff);
AddExecutor(ExecutorType.Activate, CardId.DoubleEvolutionPill, DoubleEvolutionPilleff);
......@@ -128,11 +137,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.ShaddollHedgehog, ShaddollHedgehogeff);
AddExecutor(ExecutorType.Activate, CardId.GiantRex);
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.ElShaddollWinda);
AddExecutor(ExecutorType.Activate, CardId.CrystronNeedlefiber, CrystronNeedlefibereff);
AddExecutor(ExecutorType.Activate, CardId.TG_WonderMagician);
//spellset
AddExecutor(ExecutorType.SpellSet, CardId.MonsterReborn, spellset);
AddExecutor(ExecutorType.SpellSet, CardId.PotOfAvarice, spellset);
......@@ -144,7 +151,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, CardId.infiniteTransience, SetIsFieldEmpty);
//trap activate
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.Repos, MonsterRepos);
}
......@@ -224,51 +231,6 @@ namespace WindBot.Game.AI.Decks
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()
{
......@@ -452,26 +414,15 @@ namespace WindBot.Game.AI.Decks
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()
{
return Enemy.GetMonsterCount()>=2;
}
private bool FairyTailSnoweff()
{
......@@ -482,6 +433,7 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool SouleatingOviraptoreff()
{
if (!OvertexCoatlseff_used)
......@@ -513,73 +465,11 @@ namespace WindBot.Game.AI.Decks
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()
{
IList<ClientCard> materials = Bot.Hand;
IList<ClientCard> check = new List<ClientCard>();
// IList<ClientCard> check = new List<ClientCard>();
ClientCard mat = null;
foreach (ClientCard card in materials)
{
......@@ -649,20 +539,14 @@ namespace WindBot.Game.AI.Decks
});
return true;
}
private bool SinisterShadowGames()
{
AI.SelectCard(new[]
{
CardId.ShaddollBeast,
});
return true;
}
// all Shaddoll
private bool ElShaddollConstructeff()
{
/* if (Duel.Phase == DuelPhase.Battle)
if (Enemy.BattlingMonster.Attack < 2800)
return false;*/
if(ActivateDescription==-1)
{
AI.SelectCard(CardId.ShaddollSquamata);
......@@ -676,23 +560,117 @@ namespace WindBot.Game.AI.Decks
else
{
if (DefaultBreakthroughSkill())
{
AI.SelectCard(new[]
{
CardId.ShaddollBeast,
CardId.ShaddollSquamata,
CardId.ShaddollHedgehog,
CardId.ShaddollDragon,
CardId.ShaddollFalco,
}
);
}
else
return false;
}
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,
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;
}
}
else
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()
{
if (Card.Location != CardLocation.MonsterZone)
......@@ -789,15 +767,6 @@ namespace WindBot.Game.AI.Decks
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()
......@@ -806,6 +775,16 @@ namespace WindBot.Game.AI.Decks
if (Card.Id == CardId.GhostOgre && Card.Location == CardLocation.Hand && Bot.HasInMonstersZone(CardId.GhostOgre)) return false;
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()
{
if (Card.Location == CardLocation.MonsterZone)
......@@ -844,11 +823,173 @@ namespace WindBot.Game.AI.Decks
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)
{
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())
attacker.RealPower = 9999;
}
......@@ -859,6 +1000,16 @@ namespace WindBot.Game.AI.Decks
{
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