Commit b9dac6e5 authored by mercury233's avatar mercury233

update some default executors

parent ac1d1cdf
...@@ -94,8 +94,8 @@ namespace WindBot.Game.AI.Decks ...@@ -94,8 +94,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, (int)CardId.CardsOfConsonance, SetUselessCards); AddExecutor(ExecutorType.SpellSet, (int)CardId.CardsOfConsonance, SetUselessCards);
// Chain traps and monsters // Chain traps and monsters
AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragonAssaultMode, StardustDragon); AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragonAssaultMode, DefaultStardustDragonEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, StardustDragon); AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, DefaultStardustDragonEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap); AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultTrap); AddExecutor(ExecutorType.Activate, (int)CardId.MirrorForce, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultTrap); AddExecutor(ExecutorType.Activate, (int)CardId.DimensionalPrison, DefaultTrap);
...@@ -464,13 +464,6 @@ namespace WindBot.Game.AI.Decks ...@@ -464,13 +464,6 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool StardustDragon()
{
if (Card.Location == CardLocation.Grave)
return true;
return LastChainPlayer == 1;
}
private bool AssaultModeActivate() private bool AssaultModeActivate()
{ {
if (Duel.Player == 0 && Duel.Phase == DuelPhase.BattleStart) if (Duel.Player == 0 && Duel.Phase == DuelPhase.BattleStart)
......
...@@ -72,13 +72,13 @@ namespace WindBot.Game.AI.Decks ...@@ -72,13 +72,13 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Summon, (int)CardId.Goblindbergh, GoblindberghSummon); AddExecutor(ExecutorType.Summon, (int)CardId.Goblindbergh, GoblindberghSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.Goblindbergh, GoblindberghEffect); AddExecutor(ExecutorType.Activate, (int)CardId.Goblindbergh, GoblindberghEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightEffect); AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.CastelTheSkyblasterMusketeer, CastelTheSkyblasterMusketeerSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.CastelTheSkyblasterMusketeer, DefaultCastelTheSkyblasterMusketeerSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.CastelTheSkyblasterMusketeer, CastelTheSkyblasterMusketeerEffect); AddExecutor(ExecutorType.Activate, (int)CardId.CastelTheSkyblasterMusketeer, DefaultCastelTheSkyblasterMusketeerEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.ScarlightRedDragonArchfiend, ScarlightRedDragonArchfiendSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.ScarlightRedDragonArchfiend, DefaultScarlightRedDragonArchfiendSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.ScarlightRedDragonArchfiend, ScarlightRedDragonArchfiendEffect); AddExecutor(ExecutorType.Activate, (int)CardId.ScarlightRedDragonArchfiend, DefaultScarlightRedDragonArchfiendEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, NumberS39UtopiatheLightningSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning);
...@@ -217,80 +217,5 @@ namespace WindBot.Game.AI.Decks ...@@ -217,80 +217,5 @@ namespace WindBot.Game.AI.Decks
{ {
return Duel.Phase != DuelPhase.Main1; return Duel.Phase != DuelPhase.Main1;
} }
private bool EvilswarmExcitonKnightSummon()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount() + Bot.GetHandCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount() + Enemy.GetHandCount();
return (selfCount - 1 < oppoCount) && EvilswarmExcitonKnightEffect();
}
private bool EvilswarmExcitonKnightEffect()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount();
int selfAttack = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
selfAttack += monster.GetDefensePower();
}
int oppoAttack = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
oppoAttack += monster.GetDefensePower();
}
return (selfCount < oppoCount) || (selfAttack < oppoAttack);
}
private bool ScarlightRedDragonArchfiendSummon()
{
int selfBestAttack = AI.Utils.GetBestAttack(Bot);
int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return (selfBestAttack <= oppoBestAttack && oppoBestAttack <= 3000) || ScarlightRedDragonArchfiendEffect();
}
private bool ScarlightRedDragonArchfiendEffect()
{
int selfCount = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (!monster.Equals(Card) && monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
selfCount++;
}
int oppoCount = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
oppoCount++;
}
return (oppoCount > 0 && selfCount <= oppoCount) || oppoCount > 2;
}
private bool CastelTheSkyblasterMusketeerSummon()
{
return AI.Utils.GetProblematicEnemyCard() != null;
}
private bool CastelTheSkyblasterMusketeerEffect()
{
if (ActivateDescription == AI.Utils.GetStringId((int)CardId.CastelTheSkyblasterMusketeer, 0))
return false;
AI.SelectNextCard(AI.Utils.GetProblematicEnemyCard());
return true;
}
private bool NumberS39UtopiatheLightningSummon()
{
return AI.Utils.IsOneEnemyBetter();
}
} }
} }
\ No newline at end of file
...@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks ...@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, (int)CardId.Brionac, BrionacEffect); AddExecutor(ExecutorType.Activate, (int)CardId.Brionac, BrionacEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.Clausolas, ClausolasEffect); AddExecutor(ExecutorType.Activate, (int)CardId.Clausolas, ClausolasEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.Trishula); AddExecutor(ExecutorType.Activate, (int)CardId.Trishula);
AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightEffect); AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.PhantomOfChaos, PhantomOfChaosEffect); AddExecutor(ExecutorType.Activate, (int)CardId.PhantomOfChaos, PhantomOfChaosEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.MaxxC); AddExecutor(ExecutorType.Activate, (int)CardId.MaxxC);
AddExecutor(ExecutorType.Activate, (int)CardId.ThousandHands, ThousandHandsEffect); AddExecutor(ExecutorType.Activate, (int)CardId.ThousandHands, ThousandHandsEffect);
...@@ -98,7 +98,7 @@ namespace WindBot.Game.AI.Decks ...@@ -98,7 +98,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, (int)CardId.Brionac); AddExecutor(ExecutorType.SpSummon, (int)CardId.Brionac);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Unicore); AddExecutor(ExecutorType.SpSummon, (int)CardId.Unicore);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Clausolas); AddExecutor(ExecutorType.SpSummon, (int)CardId.Clausolas);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightSummon);
} }
private bool ThousandHandsSummon() private bool ThousandHandsSummon()
...@@ -167,20 +167,6 @@ namespace WindBot.Game.AI.Decks ...@@ -167,20 +167,6 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool EvilswarmExcitonKnightSummon()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount() + Bot.GetHandCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount() + Enemy.GetHandCount();
return (selfCount - 1 < oppoCount) && EvilswarmExcitonKnightEffect();
}
private bool EvilswarmExcitonKnightEffect()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount();
return selfCount < oppoCount;
}
private bool ValkyrusEffect() private bool ValkyrusEffect()
{ {
if (Duel.Phase == DuelPhase.Battle) if (Duel.Phase == DuelPhase.Battle)
......
...@@ -79,8 +79,8 @@ namespace WindBot.Game.AI.Decks ...@@ -79,8 +79,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, (int)CardId.GagagaCowboy, GagagaCowboySummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.GagagaCowboy, GagagaCowboySummon);
AddExecutor(ExecutorType.Activate, (int)CardId.GagagaCowboy); AddExecutor(ExecutorType.Activate, (int)CardId.GagagaCowboy);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightEffect); AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvolzarLaggia, EvolzarLaggiaSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvolzarLaggia, EvolzarLaggiaSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.EvolzarLaggia, EvolzarLaggiaEffect); AddExecutor(ExecutorType.Activate, (int)CardId.EvolzarLaggia, EvolzarLaggiaEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmNightmare, EvilswarmNightmareSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmNightmare, EvilswarmNightmareSummon);
...@@ -96,21 +96,21 @@ namespace WindBot.Game.AI.Decks ...@@ -96,21 +96,21 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, (int)CardId.SmashingGround, DefaultSmashingGround); AddExecutor(ExecutorType.Activate, (int)CardId.SmashingGround, DefaultSmashingGround);
AddExecutor(ExecutorType.SpSummon, (int)CardId.CastelTheSkyblasterMusketeer, CastelTheSkyblasterMusketeerSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.CastelTheSkyblasterMusketeer, DefaultCastelTheSkyblasterMusketeerSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.CastelTheSkyblasterMusketeer, CastelTheSkyblasterMusketeerEffect); AddExecutor(ExecutorType.Activate, (int)CardId.CastelTheSkyblasterMusketeer, DefaultCastelTheSkyblasterMusketeerEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.IgnisterProminenceTheBlastingDracoslayer, IgnisterProminenceTheBlastingDracoslayerSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.IgnisterProminenceTheBlastingDracoslayer, IgnisterProminenceTheBlastingDracoslayerSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.IgnisterProminenceTheBlastingDracoslayer, IgnisterProminenceTheBlastingDracoslayerEffect); AddExecutor(ExecutorType.Activate, (int)CardId.IgnisterProminenceTheBlastingDracoslayer, IgnisterProminenceTheBlastingDracoslayerEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.ScarlightRedDragonArchfiend, ScarlightRedDragonArchfiendSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.ScarlightRedDragonArchfiend, DefaultScarlightRedDragonArchfiendSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.ScarlightRedDragonArchfiend, ScarlightRedDragonArchfiendEffect); AddExecutor(ExecutorType.Activate, (int)CardId.ScarlightRedDragonArchfiend, DefaultScarlightRedDragonArchfiendEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, NumberS39UtopiatheLightningSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.SpSummon, (int)CardId.StardustDragon, StardustDragonSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.StardustDragon, DefaultStardustDragonSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, StardustDragonEffect); AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, DefaultStardustDragonEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Number59CrookedCook, Number59CrookedCookSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.Number59CrookedCook, Number59CrookedCookSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.Number59CrookedCook, Number59CrookedCookEffect); AddExecutor(ExecutorType.Activate, (int)CardId.Number59CrookedCook, Number59CrookedCookEffect);
...@@ -259,77 +259,6 @@ namespace WindBot.Game.AI.Decks ...@@ -259,77 +259,6 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool EvilswarmExcitonKnightSummon()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount() + Bot.GetHandCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount() + Enemy.GetHandCount();
return (selfCount - 1 < oppoCount) && EvilswarmExcitonKnightEffect();
}
private bool EvilswarmExcitonKnightEffect()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount();
int selfAttack = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
selfAttack += monster.GetDefensePower();
}
int oppoAttack = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
oppoAttack += monster.GetDefensePower();
}
return (selfCount < oppoCount) || (selfAttack < oppoAttack);
}
private bool ScarlightRedDragonArchfiendSummon()
{
int selfBestAttack = AI.Utils.GetBestAttack(Bot);
int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return (selfBestAttack <= oppoBestAttack && oppoBestAttack <= 3000) || ScarlightRedDragonArchfiendEffect();
}
private bool ScarlightRedDragonArchfiendEffect()
{
int selfCount = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (!monster.Equals(Card) && monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
selfCount++;
}
int oppoCount = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
// 没有办法获取特殊召唤的状态,只好默认全部是特招的
if (monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
oppoCount++;
}
return (oppoCount > 0 && selfCount <= oppoCount) || oppoCount > 2;
}
private bool CastelTheSkyblasterMusketeerSummon()
{
return AI.Utils.GetProblematicEnemyCard() != null;
}
private bool CastelTheSkyblasterMusketeerEffect()
{
if (ActivateDescription == AI.Utils.GetStringId((int)CardId.CastelTheSkyblasterMusketeer, 0))
return false;
AI.SelectNextCard(AI.Utils.GetProblematicEnemyCard());
return true;
}
private bool IgnisterProminenceTheBlastingDracoslayerSummon() private bool IgnisterProminenceTheBlastingDracoslayerSummon()
{ {
return AI.Utils.GetProblematicEnemyCard() != null; return AI.Utils.GetProblematicEnemyCard() != null;
...@@ -419,16 +348,6 @@ namespace WindBot.Game.AI.Decks ...@@ -419,16 +348,6 @@ namespace WindBot.Game.AI.Decks
return true; return true;
} }
private bool StardustDragonSummon()
{
return (AI.Utils.IsOneEnemyBetter() && !AI.Utils.IsOneEnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
}
private bool StardustDragonEffect()
{
return (Card.Location == CardLocation.Grave) || DefaultTrap();
}
private bool EvolzarLaggiaSummon() private bool EvolzarLaggiaSummon()
{ {
return (AI.Utils.IsAllEnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2(); return (AI.Utils.IsAllEnemyBetterThanValue(1700, false) && !AI.Utils.IsOneEnemyBetterThanValue(2400, true)) || AI.Utils.IsTurn1OrMain2();
...@@ -496,11 +415,6 @@ namespace WindBot.Game.AI.Decks ...@@ -496,11 +415,6 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool NumberS39UtopiatheLightningSummon()
{
return AI.Utils.IsOneEnemyBetter(true);
}
private bool TrapSet() private bool TrapSet()
{ {
return !Bot.HasInMonstersZone((int)CardId.Number59CrookedCook, true, true); return !Bot.HasInMonstersZone((int)CardId.Number59CrookedCook, true, true);
......
...@@ -120,18 +120,18 @@ namespace WindBot.Game.AI.Decks ...@@ -120,18 +120,18 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpellSet, (int)CardId.PotOfDuality, CardOfDemiseAcivated); AddExecutor(ExecutorType.SpellSet, (int)CardId.PotOfDuality, CardOfDemiseAcivated);
AddExecutor(ExecutorType.SpellSet, (int)CardId.CosmicCyclone, CardOfDemiseAcivated); AddExecutor(ExecutorType.SpellSet, (int)CardId.CosmicCyclone, CardOfDemiseAcivated);
AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, EvilswarmExcitonKnightEffect); AddExecutor(ExecutorType.Activate, (int)CardId.EvilswarmExcitonKnight, DefaultEvilswarmExcitonKnightEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.DarkRebellionXyzDragon, DarkRebellionXyzDragonSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.DarkRebellionXyzDragon, DarkRebellionXyzDragonSummon);
AddExecutor(ExecutorType.Activate, (int)CardId.DarkRebellionXyzDragon, DarkRebellionXyzDragonEffect); AddExecutor(ExecutorType.Activate, (int)CardId.DarkRebellionXyzDragon, DarkRebellionXyzDragonEffect);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, NumberS39UtopiatheLightningSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiaOne); AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiaOne);
AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, StardustDragonEffect); AddExecutor(ExecutorType.Activate, (int)CardId.StardustDragon, DefaultStardustDragonEffect);
AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap); AddExecutor(ExecutorType.Activate, (int)CardId.StarlightRoad, DefaultTrap);
AddExecutor(ExecutorType.Activate, (int)CardId.MagicDrain); AddExecutor(ExecutorType.Activate, (int)CardId.MagicDrain);
...@@ -298,20 +298,6 @@ namespace WindBot.Game.AI.Decks ...@@ -298,20 +298,6 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool EvilswarmExcitonKnightSummon()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount() + Bot.GetHandCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount() + Enemy.GetHandCount();
return (selfCount - 1 < oppoCount) && EvilswarmExcitonKnightEffect();
}
private bool EvilswarmExcitonKnightEffect()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount();
return selfCount < oppoCount;
}
private bool DarkRebellionXyzDragonSummon() private bool DarkRebellionXyzDragonSummon()
{ {
int selfBestAttack = AI.Utils.GetBestAttack(Bot); int selfBestAttack = AI.Utils.GetBestAttack(Bot);
...@@ -336,11 +322,5 @@ namespace WindBot.Game.AI.Decks ...@@ -336,11 +322,5 @@ namespace WindBot.Game.AI.Decks
int oppoBestAttack = AI.Utils.GetBestPower(Enemy); int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return selfBestAttack <= oppoBestAttack; return selfBestAttack <= oppoBestAttack;
} }
private bool StardustDragonEffect()
{
return LastChainPlayer == 1;
}
} }
} }
\ No newline at end of file
...@@ -71,7 +71,7 @@ namespace WindBot.Game.AI.Decks ...@@ -71,7 +71,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.SpSummon, (int)CardId.PhotonThrasher, PhotonThrasherSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.PhotonThrasher, PhotonThrasherSummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, NumberS39UtopiatheLightningSummon); AddExecutor(ExecutorType.SpSummon, (int)CardId.Number39Utopia, DefaultNumberS39UtopiaTheLightningSummon);
AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.SpSummon, (int)CardId.NumberS39UtopiatheLightning);
AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning); AddExecutor(ExecutorType.Activate, (int)CardId.NumberS39UtopiatheLightning);
...@@ -148,14 +148,6 @@ namespace WindBot.Game.AI.Decks ...@@ -148,14 +148,6 @@ namespace WindBot.Game.AI.Decks
return attacker.RealPower > defender.GetDefensePower(); return attacker.RealPower > defender.GetDefensePower();
} }
private bool NumberS39UtopiatheLightningSummon()
{
int selfBestAttack = AI.Utils.GetBestAttack(Bot);
int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return selfBestAttack < oppoBestAttack;
}
private bool PhotonThrasherSummon() private bool PhotonThrasherSummon()
{ {
return Bot.HasInHand((int)CardId.AleisterTheInvoker) return Bot.HasInHand((int)CardId.AleisterTheInvoker)
......
...@@ -19,9 +19,12 @@ namespace WindBot.Game.AI ...@@ -19,9 +19,12 @@ namespace WindBot.Game.AI
ThunderKingtheLightningstrikeKaiju = 48770333, ThunderKingtheLightningstrikeKaiju = 48770333,
DogorantheMadFlameKaiju = 93332803, DogorantheMadFlameKaiju = 93332803,
SuperAntiKaijuWarMachineMechaDogoran = 84769941, SuperAntiKaijuWarMachineMechaDogoran = 84769941,
MysticalSpaceTyphoon = 5318639, MysticalSpaceTyphoon = 5318639,
CosmicCyclone = 8267140, CosmicCyclone = 8267140,
ChickenGame = 67616300 ChickenGame = 67616300,
CastelTheSkyblasterMusketeer = 82633039
} }
protected DefaultExecutor(GameAI ai, Duel duel) protected DefaultExecutor(GameAI ai, Duel duel)
...@@ -555,5 +558,99 @@ namespace WindBot.Game.AI ...@@ -555,5 +558,99 @@ namespace WindBot.Game.AI
return false; return false;
} }
protected bool DefaultNumberS39UtopiaTheLightningSummon()
{
int bestBotAttack = AI.Utils.GetBestAttack(Bot);
return AI.Utils.IsOneEnemyBetterThanValue(bestBotAttack, false);
}
protected bool DefaultEvilswarmExcitonKnightSummon()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount() + Bot.GetHandCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount() + Enemy.GetHandCount();
return (selfCount - 1 < oppoCount) && DefaultEvilswarmExcitonKnightEffect();
}
protected bool DefaultEvilswarmExcitonKnightEffect()
{
int selfCount = Bot.GetMonsterCount() + Bot.GetSpellCount();
int oppoCount = Enemy.GetMonsterCount() + Enemy.GetSpellCount();
int selfAttack = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
selfAttack += monster.GetDefensePower();
}
int oppoAttack = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
oppoAttack += monster.GetDefensePower();
}
return (selfCount < oppoCount) || (selfAttack < oppoAttack);
}
protected bool DefaultStardustDragonSummon()
{
int selfBestAttack = AI.Utils.GetBestAttack(Bot);
int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return (selfBestAttack <= oppoBestAttack && oppoBestAttack <= 2500) || AI.Utils.IsTurn1OrMain2();
}
protected bool DefaultStardustDragonEffect()
{
return (Card.Location == CardLocation.Grave) || LastChainPlayer == 1;
}
protected bool DefaultCastelTheSkyblasterMusketeerSummon()
{
return AI.Utils.GetProblematicEnemyCard() != null;
}
protected bool DefaultCastelTheSkyblasterMusketeerEffect()
{
if (ActivateDescription == AI.Utils.GetStringId((int)CardId.CastelTheSkyblasterMusketeer, 0))
return false;
ClientCard target = AI.Utils.GetProblematicEnemyCard();
if (target != null)
{
AI.SelectNextCard(target);
return true;
}
return false;
}
protected bool DefaultScarlightRedDragonArchfiendSummon()
{
int selfBestAttack = AI.Utils.GetBestAttack(Bot);
int oppoBestAttack = AI.Utils.GetBestPower(Enemy);
return (selfBestAttack <= oppoBestAttack && oppoBestAttack <= 3000) || DefaultScarlightRedDragonArchfiendEffect();
}
protected bool DefaultScarlightRedDragonArchfiendEffect()
{
int selfCount = 0;
List<ClientCard> monsters = Bot.GetMonsters();
foreach (ClientCard monster in monsters)
{
// The bot don't know if the card is special summoned, so let we assume all monsters are special summoned
if (!monster.Equals(Card) && monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
selfCount++;
}
int oppoCount = 0;
monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters)
{
if (monster.HasType(CardType.Effect) && monster.Attack <= Card.Attack)
oppoCount++;
}
return (oppoCount > 0 && selfCount <= oppoCount) || oppoCount > 2;
}
} }
} }
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