Commit 361a65e9 authored by mercury233's avatar mercury233

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

parents 18af9bdb 40a5021b
...@@ -93,3 +93,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE ...@@ -93,3 +93,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
Name=燃血鬥士 Deck=ChainBurn Dialog=kiwi.zh-TW Name=燃血鬥士 Deck=ChainBurn Dialog=kiwi.zh-TW
连锁烧卡组。 连锁烧卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
!复制梁龙-闪刀姬
Name=复制梁龙 Deck=SkyStriker Dialog=anothercopy.zh-CN
纯闪刀姬卡组。
SUPPORT_NEW_MASTER_RULE
#created by ...
#main
26077387
26077387
26077387
14558127
14558127
59438930
23434538
23434538
23434538
9742784
97268402
97268402
25955749
32807846
35726888
35726888
35726888
63166095
63166095
63166095
70368879
70368879
70368879
73594093
99550630
43898403
43898403
43898403
52340444
52340444
52340444
98338152
98338152
98338152
24010609
97616504
50005218
41420027
84749824
84749824
#extra
42110604
5821478
61665245
38342335
2857636
50588353
8491308
8491308
63288573
63288573
63288573
90673288
90673288
90673288
41999284
!side
{
"welcome": [
"你好,我是一个机器人。",
"AI功能正在测试中,遇到问题请及时反馈。"
],
"deckerror": [
"我的超主流卡组需要{0}才能玩。"
],
"duelstart": [
"闪刀姬卡组测试中,渣操是正常情况,请多指教。",
"超主流是游戏王的一环,不爽不要玩。",
"抄主流是游戏王的一环,不爽不要玩。",
"抄来的卡组不会用,怎么办?"
],
"newturn": [
"到我的回合了,抽卡!",
"我的回合,抽卡!",
"我抽了一张卡。"
],
"endturn": [
"回合结束。",
"我的回合结束了。",
"总觉得这波有点亏……",
"轮到你了。"
],
"directattack": [
"{0},直接攻击!",
"{0},直接攻击对手!",
"{0},没有防守的地方,攻击!",
"{0},攻击对手的生命值!",
"{0},直接攻击对手的生命值!",
"{0},通过直接攻击打倒对手!",
"{0},使用直接攻击打倒对手!",
"{0},直接攻击释放你的力量吧!",
"我的{0}将会粉碎你的生命值!",
"向对手展示你的力量吧,{0}!",
"你已经无法阻止我了。{0},攻击!"
],
"attack": [
"{0},攻击这只{1}!",
"{0},消灭这只{1}!",
"{0},打倒{1}!",
"{0},冲向那只{1}!",
"{0},把你的力量释放到{1}上吧!"
],
"ondirectattack": [
"可恶……",
"不过是{0}而已!",
"果然我还是太弱了……"
],
"facedownmonstername": "怪兽",
"activate": [
"我发动{0}。",
"我使用{0}的效果。",
"我使用{0}的力量。"
],
"summon": [
"我召唤{0}。",
"出来吧,{0}!",
"出现吧,{0}!",
"我召唤了美丽的{0}!",
"我呼唤{0}参加战斗!",
"我呼唤出{0}。",
"让我召唤{0}。"
],
"setmonster": [
"我放置了一只怪兽。",
"我里侧表示放置了一只怪兽。"
],
"chaining": [
"看这里!我发动{0}!",
"我使用{0}的力量。",
"准备!我使用{0}!",
"看样子你忘了我的{0}!",
"你考虑过我有{0}吗?"
]
}
...@@ -132,6 +132,25 @@ namespace WindBot.Game.AI ...@@ -132,6 +132,25 @@ namespace WindBot.Game.AI
return IsAllEnemyBetterThanValue(bestBotPower, onlyATK); return IsAllEnemyBetterThanValue(bestBotPower, onlyATK);
} }
public ClientCard GetBestBotMonster(bool onlyATK = false)
{
int bestPower = -1;
ClientCard bestMonster = null;
for (int i = 0; i < 7; ++i)
{
ClientCard card = Bot.MonsterZone[i];
if (card == null || card.Data == null) continue;
if (onlyATK && card.IsDefense()) continue;
int newPower = card.GetDefensePower();
if (newPower > bestPower)
{
bestPower = newPower;
bestMonster = card;
}
}
return bestMonster;
}
public ClientCard GetOneEnemyBetterThanValue(int value, bool onlyATK = false) public ClientCard GetOneEnemyBetterThanValue(int value, bool onlyATK = false)
{ {
ClientCard bestCard = null; ClientCard bestCard = null;
......
...@@ -590,7 +590,12 @@ namespace WindBot.Game.AI.Decks ...@@ -590,7 +590,12 @@ namespace WindBot.Game.AI.Decks
return false; return false;
} }
private bool CardOfDemiseeff() private bool CardOfDemiseeff()
{ {
foreach (ClientCard card in Bot.GetMonsters())
{
if (card.Id == CardId.CardcarD && card.IsFaceup())
return false;
}
if (Bot.GetHandCount() == 1 && Bot.GetSpellCountWithoutField() <= 3) if (Bot.GetHandCount() == 1 && Bot.GetSpellCountWithoutField() <= 3)
{ {
no_sp = true; no_sp = true;
......
...@@ -134,7 +134,7 @@ namespace WindBot.Game.AI.Decks ...@@ -134,7 +134,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.MinervaTheExalte, MinervaTheExaltedEffect); AddExecutor(ExecutorType.Activate, CardId.MinervaTheExalte, MinervaTheExaltedEffect);
AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefibersp); AddExecutor(ExecutorType.SpSummon, CardId.CrystronNeedlefiber, CrystronNeedlefibersp);
//Kaiju //Kaiju
AddExecutor(ExecutorType.SpSummon, CardId.GamecieltheSeaTurtleKaiju, DefaultKaijuSpsummon); AddExecutor(ExecutorType.SpSummon, CardId.GamecieltheSeaTurtleKaiju, GamecieltheSeaTurtleKaijusp);
AddExecutor(ExecutorType.SpSummon, CardId.RadiantheMultidimensionalKaiju, RadiantheMultidimensionalKaijusp); AddExecutor(ExecutorType.SpSummon, CardId.RadiantheMultidimensionalKaiju, RadiantheMultidimensionalKaijusp);
AddExecutor(ExecutorType.SpSummon, CardId.DogorantheMadFlameKaiju, DogorantheMadFlameKaijusp); AddExecutor(ExecutorType.SpSummon, CardId.DogorantheMadFlameKaiju, DogorantheMadFlameKaijusp);
//Reborn //Reborn
...@@ -353,13 +353,19 @@ namespace WindBot.Game.AI.Decks ...@@ -353,13 +353,19 @@ namespace WindBot.Game.AI.Decks
} }
return false; return false;
}
private bool GamecieltheSeaTurtleKaijusp()
{
if (!Bot.HasInMonstersZone(CardId.UltimateConductorTytanno))
return DefaultKaijuSpsummon();
return false;
} }
private bool RadiantheMultidimensionalKaijusp() private bool RadiantheMultidimensionalKaijusp()
{ {
if (Enemy.HasInMonstersZone(CardId.GamecieltheSeaTurtleKaiju)) return true; if (Enemy.HasInMonstersZone(CardId.GamecieltheSeaTurtleKaiju)) return true;
if (Bot.HasInHand(CardId.DogorantheMadFlameKaiju)) return DefaultKaijuSpsummon(); if (Bot.HasInHand(CardId.DogorantheMadFlameKaiju) && !Bot.HasInMonstersZone(CardId.UltimateConductorTytanno)) return DefaultKaijuSpsummon();
return false; return false;
} }
...@@ -403,8 +409,11 @@ namespace WindBot.Game.AI.Decks ...@@ -403,8 +409,11 @@ namespace WindBot.Game.AI.Decks
} }
private bool MonsterRepos() private bool MonsterRepos()
{ {
if (Card.Id == CardId.UltimateConductorTytanno && Card.IsFacedown()) return true;
if (Card.Id == CardId.ElShaddollConstruct && Card.IsFacedown()) return true;
if (Card.Id == CardId.ElShaddollConstruct && Card.IsAttack()) return false; if (Card.Id == CardId.ElShaddollConstruct && Card.IsAttack()) return false;
if (Card.Id == CardId.GlowUpBulb && Card.IsDefense()) return false;
if (Card.Id == CardId.ShaddollDragon && Card.IsFacedown() && Enemy.GetMonsterCount() >= 0) return true; if (Card.Id == CardId.ShaddollDragon && Card.IsFacedown() && Enemy.GetMonsterCount() >= 0) return true;
if (Card.Id == CardId.ShaddollSquamata && Card.IsFacedown() && Enemy.GetMonsterCount() >= 0) return true; if (Card.Id == CardId.ShaddollSquamata && Card.IsFacedown() && Enemy.GetMonsterCount() >= 0) return true;
return base.DefaultMonsterRepos(); return base.DefaultMonsterRepos();
...@@ -540,7 +549,14 @@ namespace WindBot.Game.AI.Decks ...@@ -540,7 +549,14 @@ namespace WindBot.Game.AI.Decks
int spell_count = 0; int spell_count = 0;
IList<ClientCard> grave = Bot.Graveyard; IList<ClientCard> grave = Bot.Graveyard;
IList<ClientCard> all = new List<ClientCard>(); IList<ClientCard> all = new List<ClientCard>();
foreach (ClientCard check in grave)
{
if (check.Id == CardId.GiantRex)
{
all.Add(check);
}
}
foreach (ClientCard check in grave) foreach (ClientCard check in grave)
{ {
if(check.HasType(CardType.Spell)||check.HasType(CardType.Trap)) if(check.HasType(CardType.Spell)||check.HasType(CardType.Trap))
...@@ -556,12 +572,8 @@ namespace WindBot.Game.AI.Decks ...@@ -556,12 +572,8 @@ namespace WindBot.Game.AI.Decks
all.Add(check); all.Add(check);
} }
} }
if (AI.Utils.GetLastChainCard()!=null) if (AI.Utils.ChainContainsCard(CardId.FairyTailSnow)) return false;
{
if (AI.Utils.GetLastChainCard().Id == CardId.FairyTailSnow) return false;
}
if ( Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && Bot.BattlingMonster == null && Enemy_atk >=Bot.LifePoints || if ( Duel.Player == 1 && Duel.Phase == DuelPhase.BattleStart && Bot.BattlingMonster == null && Enemy_atk >=Bot.LifePoints ||
Duel.Player == 0 && Duel.Phase==DuelPhase.BattleStart && Enemy.BattlingMonster == null && Enemy.LifePoints<=1850 Duel.Player == 0 && Duel.Phase==DuelPhase.BattleStart && Enemy.BattlingMonster == null && Enemy.LifePoints<=1850
) )
...@@ -577,10 +589,10 @@ namespace WindBot.Game.AI.Decks ...@@ -577,10 +589,10 @@ namespace WindBot.Game.AI.Decks
private bool SouleatingOviraptoreff() private bool SouleatingOviraptoreff()
{ {
if (!OvertexCoatlseff_used) if (!OvertexCoatlseff_used && Bot.GetRemainingCount(CardId.OvertexCoatls, 3) > 0)
{ {
AI.SelectCard(CardId.OvertexCoatls); AI.SelectCard(CardId.OvertexCoatls);
AI.SelectYesNo(false); AI.SelectYesNo(false);
} }
else else
{ {
...@@ -721,13 +733,13 @@ namespace WindBot.Game.AI.Decks ...@@ -721,13 +733,13 @@ namespace WindBot.Game.AI.Decks
{ {
List<ClientCard> extra_zone_check = Bot.GetMonstersInExtraZone(); List<ClientCard> extra_zone_check = Bot.GetMonstersInExtraZone();
foreach (ClientCard extra_monster in extra_zone_check) foreach (ClientCard extra_monster in extra_zone_check)
if (extra_monster.HasType(CardType.Xyz) || extra_monster.HasType(CardType.Fusion)) return false; if (extra_monster.HasType(CardType.Xyz) || extra_monster.HasType(CardType.Fusion) || extra_monster.HasType(CardType.Synchro)) return false;
bool deck_check = false; bool deck_check = false;
List<ClientCard> monsters = Enemy.GetMonsters(); List<ClientCard> monsters = Enemy.GetMonsters();
foreach (ClientCard monster in monsters) foreach (ClientCard monster in monsters)
{ {
if (monster.HasType(CardType.Synchro) || monster.HasType(CardType.Fusion) || monster.HasType(CardType.Xyz)) if (monster.HasType(CardType.Synchro) || monster.HasType(CardType.Fusion) || monster.HasType(CardType.Xyz) || monster.HasType(CardType.Link))
deck_check = true; deck_check = true;
} }
...@@ -748,7 +760,7 @@ namespace WindBot.Game.AI.Decks ...@@ -748,7 +760,7 @@ namespace WindBot.Game.AI.Decks
CardId.ShaddollHedgehog, CardId.ShaddollHedgehog,
CardId.ShaddollDragon, CardId.ShaddollDragon,
CardId.ShaddollFalco, CardId.ShaddollFalco,
CardId.FairyTailSnow,
}); });
AI.SelectPosition(CardPosition.FaceUpAttack); AI.SelectPosition(CardPosition.FaceUpAttack);
return true; return true;
...@@ -891,11 +903,9 @@ namespace WindBot.Game.AI.Decks ...@@ -891,11 +903,9 @@ namespace WindBot.Game.AI.Decks
} }
else else
{ {
if (Enemy.GetMonsterCount() == 0) return false;
ClientCard target = AI.Utils.GetBestEnemyMonster(); ClientCard target = AI.Utils.GetBestEnemyMonster();
AI.SelectCard(target); AI.SelectCard(target);
if (Enemy.GetMonsterCount() == 0)
return false;
} }
return true; return true;
} }
...@@ -972,6 +982,7 @@ namespace WindBot.Game.AI.Decks ...@@ -972,6 +982,7 @@ namespace WindBot.Game.AI.Decks
} }
else else
{ {
if (Enemy.GetSpellCount() == 0) return false;
ClientCard target = AI.Utils.GetBestEnemySpell(); ClientCard target = AI.Utils.GetBestEnemySpell();
AI.SelectCard(target); AI.SelectCard(target);
return true; return true;
...@@ -981,6 +992,8 @@ namespace WindBot.Game.AI.Decks ...@@ -981,6 +992,8 @@ namespace WindBot.Game.AI.Decks
private bool LostWindeff() private bool LostWindeff()
{ {
if (Card.Location == CardLocation.Grave)
return true;
List<ClientCard> check = Enemy.GetMonsters(); List<ClientCard> check = Enemy.GetMonsters();
foreach (ClientCard m in check) foreach (ClientCard m in check)
{ {
......
This diff is collapsed.
...@@ -154,6 +154,11 @@ namespace WindBot.Game ...@@ -154,6 +154,11 @@ namespace WindBot.Game
return HasType(CardType.Monster); return HasType(CardType.Monster);
} }
public bool IsTuner()
{
return HasType(CardType.Tuner);
}
public bool IsSpell() public bool IsSpell()
{ {
return HasType(CardType.Spell); return HasType(CardType.Spell);
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<Compile Include="Game\AI\DecksManager.cs" /> <Compile Include="Game\AI\DecksManager.cs" />
<Compile Include="Game\AI\Decks\BlackwingExecutor.cs" /> <Compile Include="Game\AI\Decks\BlackwingExecutor.cs" />
<Compile Include="Game\AI\Decks\CyberDragonExecutor.cs" /> <Compile Include="Game\AI\Decks\CyberDragonExecutor.cs" />
<Compile Include="Game\AI\Decks\SkyStrikerExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyKingExecutor.cs" /> <Compile Include="Game\AI\Decks\MokeyMokeyKingExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" /> <Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" />
<Compile Include="Game\AI\Decks\ToadallyAwesomeExecutor.cs" /> <Compile Include="Game\AI\Decks\ToadallyAwesomeExecutor.cs" />
......
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