Commit 4b2ffc27 authored by handsomekiwi's avatar handsomekiwi Committed by mercury233

update ChainBurn deck, fix DefaultBreakthroughSkill (#40)

parent 5c585506
......@@ -181,10 +181,11 @@ namespace WindBot.Game.AI.Decks
};
}
public int[] prevent_list()
public int[] pot_list()
{
return new[]
{
CardId.PotOfDesires,
CardId.SandaionTheTimloard,
CardId.BattleFader,
......@@ -205,10 +206,9 @@ namespace WindBot.Game.AI.Decks
}
return atk;
}
public bool Has_prevent_list(int id)
public bool Has_prevent_list_0(int id)
{
return (id == CardId.SandaionTheTimloard ||
id == CardId.BattleFader ||
return (
id == CardId.Waboku ||
id == CardId.ThreateningRoar||
id == CardId.MagicCylinder||
......@@ -216,6 +216,12 @@ namespace WindBot.Game.AI.Decks
id == CardId.RingOfDestruction
);
}
public bool Has_prevent_list_1(int id)
{
return (id == CardId.SandaionTheTimloard ||
id == CardId.BattleFader
);
}
bool no_sp = false;
bool one_turn_kill = false;
bool one_turn_kill_1 = false;
......@@ -223,7 +229,7 @@ namespace WindBot.Game.AI.Decks
bool prevent_used = false;
int preventcount = 0;
bool battleprevent = false;
bool OjamaTrioused = false;
bool OjamaTrioused = false;
bool OjamaTrioused_draw = false;
bool drawfirst = false;
int Waboku_count = 0;
......@@ -243,10 +249,9 @@ namespace WindBot.Game.AI.Decks
public override void OnNewTurn()
{
no_sp = false;
prevent_used = false;
battleprevent = false;
prevent_used = false;
}
......@@ -260,7 +265,7 @@ namespace WindBot.Game.AI.Decks
foreach (ClientCard card in trap)
{
if (Has_prevent_list(card.Id))
if (Has_prevent_list_0(card.Id))
{
preventcount++;
battleprevent = true;
......@@ -269,7 +274,7 @@ namespace WindBot.Game.AI.Decks
}
foreach (ClientCard card in monster)
{
if (Has_prevent_list(card.Id))
if (Has_prevent_list_1(card.Id))
{
preventcount++;
battleprevent = true;
......@@ -380,8 +385,14 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool OjamaTrioset()
{
if (Bot.HasInSpellZone(CardId.OjamaTrio)) return false;
return true;
}
private bool BrunSpellSet()
{
if (Card.Id == CardId.OjamaTrio && Bot.HasInSpellZone(CardId.OjamaTrio))return false;
return (Card.IsTrap() || Card.HasType(CardType.QuickPlay)) && Bot.GetSpellCountWithoutField() < 5;
}
private bool SandaionTheTimloard_summon()
......@@ -409,7 +420,8 @@ namespace WindBot.Game.AI.Decks
private bool PotOfDualityeff()
{
no_sp = true;
AI.SelectCard(prevent_list());
AI.SelectCard(pot_list());
return true;
}
private bool BlazingMirrorForceeff()
......@@ -479,9 +491,18 @@ namespace WindBot.Game.AI.Decks
}
private bool RecklessGreedeff()
{
int count=0;
foreach (ClientCard card in Bot.GetSpells())
{
if (card.Id == CardId.RecklessGreed)
count++;
}
bool Demiseused = AI.Utils.ChainContainsCard(CardId.CardOfDemise);
if (drawfirst) return DefaultUniqueTrap();
if (must_chain() && greed_count > 1) return true;
if (greed_count > 1) return true;
if (must_chain() && count > 1) return true;
if (Demiseused) return false;
if (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;
......@@ -509,18 +530,14 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool OjamaTrioset()
{
if (Bot.HasInSpellZone(CardId.OjamaTrio)) return false;
return true;
}
private bool OjamaTrioeff()
{
return OjamaTrioused||OjamaTrioused_draw;
}
private bool JustDessertseff()
{
if (Duel.Player == 0) return false;
if (drawfirst) return DefaultUniqueTrap();
if (one_turn_kill_1) return DefaultUniqueTrap();
if (one_turn_kill) return DefaultUniqueTrap();
......@@ -537,6 +554,7 @@ namespace WindBot.Game.AI.Decks
}
private bool ChainStrikeeff()
{
if (drawfirst) return true;
if (must_chain()) return true;
int chain = Duel.CurrentChain.Count;
......@@ -593,7 +611,7 @@ namespace WindBot.Game.AI.Decks
}
private bool Linkuriboheff()
{
ClientCard lastchaincard = AI.Utils.GetLastChainCard();
ClientCard lastchaincard = AI.Utils.GetLastChainCard();
if (lastchaincard == null) return true;
if (lastchaincard.Id == CardId.Linkuriboh) return false;
return true;
......
......@@ -144,13 +144,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, CardId.MonsterReborn, spellset);
AddExecutor(ExecutorType.SpellSet, CardId.PotOfAvarice, spellset);
AddExecutor(ExecutorType.SpellSet, CardId.ThatGrassLooksgreener, spellset);
//trap
//trapset
AddExecutor(ExecutorType.SpellSet, CardId.LostWind, TrapSetWhenZoneFree);
AddExecutor(ExecutorType.SpellSet, CardId.SinisterShadowGames, TrapSetWhenZoneFree);
AddExecutor(ExecutorType.SpellSet, CardId.ShaddollCore);
AddExecutor(ExecutorType.SpellSet, CardId.infiniteTransience, SetIsFieldEmpty);
//trap activate
AddExecutor(ExecutorType.Activate, CardId.LostWind, DefaultBreakthroughSkill);
AddExecutor(ExecutorType.Activate, CardId.LostWind, LostWindeff);
AddExecutor(ExecutorType.Activate, CardId.SinisterShadowGames, SinisterShadowGameseff);
AddExecutor(ExecutorType.Activate, CardId.ShaddollCore, ShaddollCoreeff);
AddExecutor(ExecutorType.Repos, MonsterRepos);
......@@ -262,12 +262,12 @@ namespace WindBot.Game.AI.Decks
CardId.GhostOgre,
CardId.MaxxC,
};
if (Bot.HasInHand(targets)|| Bot.HasInMonstersZone(targets))
{
AI.SelectCard(targets);
return true;
if (!Bot.HasInHand(targets) || !Bot.HasInMonstersZone(targets))
{
return false;
}
AI.SelectCard(targets);
return true;
}
if (Duel.Phase == DuelPhase.BattleStart)
{
......@@ -313,6 +313,7 @@ namespace WindBot.Game.AI.Decks
private bool OvertexCoatlseff()
{
if (Card.Location == CardLocation.MonsterZone) return false;
OvertexCoatlseff_used = true;
return true;
}
......@@ -485,10 +486,14 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool spellset()
{
return Bot.Hand.Count > 6;
}
private bool RebornEffect()
{
if(Bot.HasInGraveyard(CardId.UltimateConductorTytanno)&&Ultimate_ss>0)
......@@ -509,6 +514,8 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(targets);
return true;
}
private bool PotofAvariceeff()
{
return true;
......@@ -518,10 +525,14 @@ namespace WindBot.Game.AI.Decks
{
return Duel.Player == 1;
}
private bool SetIsFieldEmpty()
{
return !Bot.IsFieldEmpty();
}
private bool TrapSetWhenZoneFree()
{
return Bot.GetSpellCountWithoutField() < 4;
......@@ -553,6 +564,8 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool ElShaddollShekhinagaeff()
{
if (Card.Location != CardLocation.MonsterZone)
......@@ -576,6 +589,8 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool ElShaddollGrysraeff()
{
if (Card.Location != CardLocation.MonsterZone)
......@@ -690,6 +705,8 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool ShaddollHedgehogeff()
{
if (Card.Location != CardLocation.MonsterZone)
......@@ -705,6 +722,8 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool ShaddollDragoneff()
{
if (Card.Location == CardLocation.MonsterZone)
......@@ -720,6 +739,8 @@ namespace WindBot.Game.AI.Decks
return true;
}
}
private bool ShaddollSquamataeff()
{
if (Card.Location != CardLocation.MonsterZone)
......@@ -739,6 +760,17 @@ namespace WindBot.Game.AI.Decks
}
return true;
}
private bool LostWindeff()
{
List<ClientCard> check = Enemy.GetMonsters();
foreach (ClientCard m in check)
{
if (m.Attack>=2000) return DefaultBreakthroughSkill();
}
return false;
}
private bool FoolishBurialEffect()
{
if (Bot.GetRemainingCount(CardId.DoubleEvolutionPill, 3) > 0)
......@@ -752,7 +784,6 @@ namespace WindBot.Game.AI.Decks
return true;
}
return false;
}
else
{
......@@ -761,12 +792,9 @@ namespace WindBot.Game.AI.Decks
CardId.ShaddollSquamata,
CardId.FairyTailSnow,
});
}
return true;
}
}
public bool Hand_act_eff()
......@@ -823,6 +851,8 @@ namespace WindBot.Game.AI.Decks
return true;
}
}
public bool CrystronNeedlefibersp()
{
if (Bot.HasInMonstersZone(CardId.ElShaddollConstruct) ||
......@@ -879,6 +909,7 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool ScarlightRedDragoneff()
{
IList<ClientCard> targets = new List<ClientCard>();
......@@ -891,6 +922,8 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool CrystalWingSynchroDragoneff()
{
return Duel.LastChainPlayer != 0;
......@@ -926,7 +959,6 @@ namespace WindBot.Game.AI.Decks
}*/
return false;
}
private bool BlackRoseMoonlightDragoneff()
{
......@@ -941,6 +973,8 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool RedWyverneff()
{
IList<ClientCard> check = Enemy.MonsterZone;
......@@ -957,8 +991,6 @@ namespace WindBot.Game.AI.Decks
return false;
}
private bool CoralDragoneff()
{
if (Card.Location != CardLocation.MonsterZone)
......
......@@ -307,9 +307,10 @@ namespace WindBot.Game.AI
if (LastChainCard == null)
return false;
if (LastChainCard.Controller != 1 || LastChainCard.Location != CardLocation.MonsterZone || !DefaultUniqueTrap())
return false;
AI.SelectCard(LastChainCard);
return LastChainCard.Controller == 1 && LastChainCard.Location == CardLocation.MonsterZone && DefaultUniqueTrap();
return true;
}
/// <summary>
......
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