Commit 650a0ad9 authored by wyykak's avatar wyykak

add THC_DSReimu

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent f99c1073
#created by ...
#main
74561023
16011501
14050011
14050011
10278
74561023
74561023
74561020
74561020
74562017
74562017
74562017
16010003
74561011
74561011
14000267
14000267
82434
82434
82434
82435
82435
82435
16000006
16000006
10278
10020
10020
10020
14050018
14050018
14050018
74563011
74563011
74563011
86379728
86379728
86379728
14050011
16011501
16011501
#extra
74561045
74561045
74561045
23504
23504
23504
!side
74561004
23501
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindBot;
using WindBot.Game;
using WindBot.Game.AI;
using YGOSharp.OCGWrapper.Enums;
namespace WindBot.Game.AI.Decks
{
[Deck("THC_DSReimu", "AI_THC_DSReimu")]
class THC_DSReimuExecutor : DefaultExecutor
{
public class CardId
{
public const int 女神天子 = 74561020;
public const int 天子翼 = 74561023;
public const int 萨丽艾尔 = 74562017;
public const int 暴风文 = 74561011;
public const int 星态死士 = 14000267;
public const int 美兔 = 82434;
public const int = 82435;
public const int 猎梦者 = 16000006;
public const int 梦想天生 = 10020;
public const int 光影 = 86379728;
public const int 有顶天永续 = 14050018;
public const int 有顶天场地 = 14050011;
public const int 多面体 = 74563011;
public const int 茧墨场地 = 16011501;
public const int 灵符 = 10278;
public const int 茧墨怪 = 16010003;
public const int 幼女化 = 74561045;
public const int 天狗L2 = 23504;
}
public THC_DSReimuExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.Activate, CardId.梦想天生);
AddExecutor(ExecutorType.SpSummon, CardId.幼女化, 守备特召);
AddExecutor(ExecutorType.SpSummon, CardId.茧墨怪, () => NeedToFreeSZone());
AddExecutor(ExecutorType.Activate, CardId.茧墨怪, () => NeedToFreeSZone());
AddExecutor(ExecutorType.Summon, CardId.女神天子, 通召女神天子);
AddExecutor(ExecutorType.Summon, CardId.萨丽艾尔,
() => !AlreadySucceeded() && !HasNonTunerOnField() && HasSpSummonableDSTuner(Card));
AddExecutor(ExecutorType.Summon, CardId.星态死士,
() => (!AlreadySucceeded() && !HasDSTunerOnField() && HasSpSummonableNonTuner(Card)) || NeedToFreeSZone());
AddExecutor(ExecutorType.Activate, CardId.星态死士, 星态死士检索);
AddExecutor(ExecutorType.Activate, CardId.猎梦者, 星态死士等级提升);
AddExecutor(ExecutorType.Activate, CardId.暴风文, 暴风文检索);
AddExecutor(ExecutorType.Activate, CardId.女神天子, 女神天子等级提升);
AddExecutor(ExecutorType.Activate, CardId.天子翼, 特召天子翼);
AddExecutor(ExecutorType.SpSummon, CardId.美兔, 特召彩虹);
AddExecutor(ExecutorType.SpSummon, CardId., 特召彩虹);
AddExecutor(ExecutorType.Activate, CardId.光影, 光影检索);
AddExecutor(ExecutorType.SpSummon, CardId.天狗L2, 天狗L2特召);
AddExecutor(ExecutorType.Activate, CardId.天狗L2, 天狗L2弹卡);
AddExecutor(ExecutorType.Activate, CardId.茧墨场地, 茧墨特召);
AddExecutor(ExecutorType.Activate, CardId.多面体,
() => (Bot.GetSpellCountWithoutField() < 4 && Bot.LifePoints <= 4000) || (Bot.GetSpellCountWithoutField() < 3));
AddExecutor(ExecutorType.Activate, CardId.有顶天永续, 有顶天永续抽卡);
AddExecutor(ExecutorType.Activate, CardId.有顶天场地,
() => !(AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生)));
AddExecutor(ExecutorType.Activate, CardId.灵符);
}
private bool JMUsed = false;
public override void OnNewTurn()
{
JMUsed = false;
base.OnNewTurn();
}
public override bool OnSelectHand()
{
// go first
return true;
}
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
if (hint == HintMsg.Discard)
{
var g = cards.GetMatchingCards((c) => !c.IsCode(CardId.梦想天生));
if (g == null)
{
return null;
}
if (g.Count < min)
{
return null;
}
else
{
return g.Take(min).ToList();
}
}
return null;
}
private bool 通召女神天子()
{
if (ActivateDescription != Util.GetStringId(CardId.女神天子, 2))
{
return false;
}
return (!AlreadySucceeded() && !HasDSTunerOnField() && HasSpSummonableNonTuner(Card)) || NeedToFreeSZone();
}
private bool 女神天子等级提升()
{
AI.SelectCard(CardId.暴风文);
return true;
}
private bool 星态死士检索()
{
AI.SelectCard(CardId.猎梦者);
return true;
}
private bool 星态死士等级提升()
{
AI.SelectCard(CardId.星态死士);
return true;
}
private bool 暴风文检索()
{
if (AlreadySucceeded() || ActivateDescription == Util.GetStringId(CardId.暴风文,0))
{
return false;
}
if (HasSpSummonableNonTuner(Card) && Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.星态死士) && c.Level == 4))
{
AI.SelectCard(CardId.猎梦者);
return true;
}
AI.SelectCard(CardId.天子翼, CardId.女神天子);
return true;
}
private bool 特召天子翼()
{
if (NeedToFreeSZone() && !HasDSTunerOnField())
{
return true;
}
if (AlreadySucceeded() || HasDSTunerOnField())
{
return false;
}
if (!HasSpSummonableNonTuner(null))
{
if (HasNonTunerOnField())
{
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
private bool 特召彩虹()
{
if (AlreadySucceeded() || HasNonTunerOnField())
{
return false;
}
if (HasDSTunerOnField())
{
var tc = Bot.GetMonsters().GetFirstMatchingFaceupCard((ClientCard c) => c.IsTuner() && c.HasSetcode(0x6208) && c.Level == 12);
if (tc != null)
{
AI.SelectCard(tc);
return true;
}
else
{
return false;
}
}
return false;
}
private bool 光影检索()
{
if (AlreadySucceeded())
{
return false;
}
if (HasSpSummonableDSTuner(Card) && !HasSpSummonableNonTuner(Card) && !HasSummonableNonTuner(Card) && Bot.GetMonsterCount() == 0)
{
AI.SelectCard(CardId.萨丽艾尔);
return true;
}
if ((HasSummonableNonTuner(Card) || HasNonTunerOnField()) && !HasSpSummonableDSTuner(Card))
{
AI.SelectCard(CardId.天子翼);
return true;
}
if (HasSpSummonableNonTuner(Card) && !HasSpSummonableDSTuner(Card) && !HasSummonableDSTuner(Card))
{
AI.SelectCard(CardId.天子翼, CardId.女神天子);
return true;
}
return false;
}
private bool 茧墨特召()
{
if (AlreadySucceeded() || ActivateDescription == Util.GetStringId(CardId.茧墨场地, 1))
{
return false;
}
if (Card.Location == CardLocation.Hand &&
!(Bot.GetFieldSpellCard() != null && Bot.GetFieldSpellCard().IsCode(CardId.茧墨场地) && !Bot.GetFieldSpellCard().IsDisabled() && !JMUsed) ||
NeedToFreeSZone())
{
JMUsed = false;
return true;
}
if (Card.Location == CardLocation.FieldZone && NeedToFreeSZone())
{
JMUsed = true;
AI.SelectCard(CardId.萨丽艾尔, CardId.天子翼);
return true;
}
if (HasSpSummonableDSTuner(Card) || HasSummonableDSTuner(Card) || HasDSTunerOnField())
{
JMUsed = true;
AI.SelectCard(CardId.萨丽艾尔);
return true;
}
if (HasSpSummonableNonTuner(Card) || HasNonTunerOnField())
{
JMUsed = true;
AI.SelectCard(CardId.天子翼);
return true;
}
return false;
}
private bool 守备特召()
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
}
private bool 天狗L2特召()
{
var material = Bot.GetMonstersInMainZone().GetMatchingCards((c) => !c.IsCode(CardId.幼女化));
bool hasMaterial = material.Count >= 2;
if (hasMaterial && NeedToFreeSZone())
{
AI.SelectMaterials(material);
return true;
}
return false;
}
private bool 天狗L2弹卡()
{
if (!NeedToFreeSZone() || ActivateDescription != Util.GetStringId(CardId.天狗L2, 1))
{
return false;
}
AI.SelectCard(Bot.GetSpells());
return true;
}
private bool 有顶天永续抽卡()
{
if (ActivateDescription == -1)
{
if (Bot.GetSpellCountWithoutField() < 4 && !(AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生)))
{
return true;
}
return false;
}
return true;
}
private bool HasSpSummonableNonTuner(ClientCard ex)
{
return Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.美兔, CardId., CardId.茧墨场地) && !ReferenceEquals(c,ex));
}
private bool HasSpSummonableDSTuner(ClientCard ex)
{
return Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.天子翼, CardId.光影, CardId.茧墨场地, CardId.暴风文) && !ReferenceEquals(c, ex));
}
private bool HasSummonableNonTuner(ClientCard ex)
{
return Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.光影, CardId.萨丽艾尔) && !ReferenceEquals(c, ex));
}
private bool HasSummonableDSTuner(ClientCard ex)
{
return Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.暴风文, CardId.光影, CardId.女神天子) && !ReferenceEquals(c, ex));
}
private bool HasNonTunerOnField()
{
return Bot.GetMonsters().IsExistingMatchingCard((ClientCard c) => !c.IsTuner());
}
private bool HasDSTunerOnField()
{
return Bot.GetMonsters().IsExistingMatchingCard((ClientCard c) => c.IsTuner() && c.HasSetcode(0x6208) && c.Level == 12);
}
private bool AlreadySucceeded()
{
return Bot.HasInMonstersZone(CardId.幼女化, true, false, true) || (HasNonTunerOnField() && HasDSTunerOnField());
}
private bool NeedToFreeSZone()
{
return AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生) && Bot.GetSpellCountWithoutField() >= 5;
}
}
}
......@@ -1423,12 +1423,16 @@ namespace WindBot.Game
count = packet.ReadByte();
for (int i = 0; i < count; ++i)
{
packet.ReadInt32(); // card id
int tempId = packet.ReadInt32(); // card id
int con = GetLocalPlayer(packet.ReadByte());
CardLocation loc = (CardLocation)packet.ReadByte();
int seq = packet.ReadByte();
ClientCard card = _duel.GetCard(con, loc, seq);
if (card == null) continue;
if (loc == CardLocation.Deck)
{
card.SetId(tempId);
}
card.ActionIndex[k] = i;
switch (k)
{
......
......@@ -82,6 +82,7 @@
<Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" />
<Compile Include="Game\AI\Decks\TearlamentsExecutor.cs" />
<Compile Include="Game\AI\Decks\ThunderDragonExecutor.cs" />
<Compile Include="Game\AI\Decks\THC_DSReimuExecutor.cs" />
<Compile Include="Game\AI\Decks\TimeThiefExecutor.cs" />
<Compile Include="Game\AI\Decks\ToadallyAwesomeExecutor.cs" />
<Compile Include="Game\AI\Decks\NekrozExecutor.cs" />
......
{
"windbots": [
{
"name": "伊芙·墨菲",
"deck": "Toadally Awesome",
"dialog": "wof-Eve-Murphy"
},
{
"name": "梦前菜菜",
"deck": "Rainbow",
"dialog": "wof-Yumesaki-Nana"
},
{
"name": "石砂原奈绪",
"deck": "Dragunity",
"dialog": "wof-Isagohara-Nao"
},
{
"name": "鸣野凪子",
"deck": "Rank V",
"dialog": "wof-Shigino-Nagiko"
},
{
"name": "绫濑亚梦",
"deck": "Zexal Weapons",
"dialog": "wof-Ayase-Amu"
},
{
"name": "埃莉丝·科菲",
"deck": "Level VIII",
"dialog": "wof-Elyse-Coffey"
},
{
"name": "城崎千夏",
"deck": "Zoodiac",
"dialog": "wof-Jougasaki-Chinatsu"
},
{
"name": "下垣鸣海凛央奈",
"deck": "Blue-Eyes",
"dialog": "wof-Shimogakinarumi-Riona"
},
{
"name": "鹭泽由依",
"deck": "Yosenju",
"dialog": "wof-Sagisawa-Yui"
},
{
"name": "十十六木花奏子",
"deck": "Qliphort",
"dialog": "wof-Todoroki-Kanako"
},
{
"name": "七草一花",
"deck": "Trickstar",
"dialog": "wof-Nanakusa-Ichika"
},
{
"name": "凯瑟琳·罗森塔尔",
"deck": "Altergeist",
"dialog": "wof-Catherine-Rosenthal"
},
{
"name": "白石唯",
"deck": "Nekroz",
"dialog": "wof-Shiraishi-Yui"
},
{
"name": "水晶艾蕾娜",
"deck": "ST1732",
"dialog": "wof-Suisho-Erena"
},
{
"name": "音羽真寻",
"deck": "Lightsworn",
"dialog": "wof-Otoha-Mahiro"
},
{
"name": "神崎春瑚",
"deck": "Blackwing",
"dialog": "wof-Kanzaki-Haruko"
},
{
"name": "樱庭小梅",
"deck": "CyberDragon",
"dialog": "wof-Sakuraba-Koume"
},
{
"name": "淡野美妙子",
"deck": "Evilswarm",
"dialog": "wof-Awaya-Mieko"
},
{
"name": "璃池樱空",
"deck": "Gravekeeper",
"dialog": "wof-Akiike-Sara"
},
{
"name": "月白五十铃",
"deck": "Graydle",
"dialog": "wof-Tsukishiro-Isuzu"
},
{
"name": "晴海夏佳",
"deck": "OldSchool",
"dialog": "wof-Harumi-Natsuka"
},
{
"name": "晴海夏佳",
"deck": "LightswornShaddoldinosour",
"dialog": "wof-Harumi-Natsuka"
},
{
"name": "濑名歌铃",
"deck": "SkyStriker",
"dialog": "wof-Sena-Karin"
},
{
"name": "椎名咪玉",
"deck": "DarkMagician",
"dialog": "wof-Shiina-Miu"
},
{
"name": "薇薇安·伊文捷琳",
"deck": "Orcust",
"dialog": "wof-Vivian-Evangeline"
},
{
"name": "海伦·薇萨拉兹",
"deck": "Salamangreat",
"dialog": "wof-Helen-Virsaladze"
},
{
"name": "蓝叶雾叶",
"deck": "Dragun",
"dialog": "wof-Aiha-Kiriha"
},
{
"name": "诺玛·林斯科特",
"deck": "MathMech",
"dialog": "wof-Norma-Linscott"
},
{
"name": "砂冢明音",
"deck": "TimeThief",
"dialog": "wof-Sunazuka-Akane"
},
{
"name": "早见虹羽",
"deck": "PureWinds",
"dialog": "wof-Hayami-Nijiha"
},
{
"name": "白雪安娜",
"deck": "Witchcraft",
"dialog": "wof-Shirayuki-Anna"
},
{
"name": "星希花音",
"deck": "Burn",
"dialog": "wof-Hoshiki-Kanon"
},
{
"name": "浅见空子",
"deck": "Frog",
"dialog": "wof-Asami-Sorako"
},
{
"name": "佐佐木茜",
"deck": "Horus",
"dialog": "wof-Sasaki-Akane"
},
{
"name": "克里斯汀·罗森塔尔",
"deck": "BlueEyesMaxDragon",
"dialog": "wof-Christine-Rosenthal"
},
{
"name": "白鸟芽衣",
"deck": "Phantasm",
"dialog": "wof-Shiratori-Mei"
},
{
"name": "八宫一月",
"deck": "GrenMajuThunderBoarder",
"dialog": "wof-Hachimiya-Kaduki"
},
{
"name": "浅仓纱花",
"deck": "ChainBurn",
"dialog": "wof-Asukura-Sayaka"
},
{
"name": "黑崎智秋",
"deck": "FamiliarPossessed",
"dialog": "wof-Kurosaki-Chiaki"
},
{
"name": "神代心春",
"deck": "Brave",
"dialog": "wof-Kamishiro-Koharu"
},
{
"name": "玻名城夏爱",
"deck": "Exosister",
"dialog": "wof-Hanagusuku-Kea"
},
{
"name": "珠洲岛拓海",
"deck": "Labrynth",
"dialog": "wof-Suzujima-Takumi"
},
{
"name": "空鸽子",
"deck": "ThunderDragon",
"dialog": "wof-Empty-Pigeon"
},
{
"name": "朝比奈千夜",
"deck": "Kashtira",
"dialog": "wof-Asabina-Chiya"
},
{
"name": "露卡希娅",
"deck": "Tearlaments",
"dialog": "wof-Rukahira"
},
{
"name": "二宫爱丽丝",
"deck": "Zefra",
"dialog": "wof-Ninomiya-Arisu"
},
{
"name": "时谷彼方",
"deck": "Swordsoul",
"dialog": "wof-Tokitani-Kanata"
},
{
"name": "三水小雪",
"deck": "Dogmatika",
"dialog": "wof-Samisui-Koyuki"
},
{
"name": "鹫见花火",
"deck": "Albaz",
"dialog": "wof-Sumi-Hanabi"
},
{
"name": "宫水静香",
"deck": "SuperheavySamurai",
"dialog": "wof-Miyamizu-Shizuka"
}
]
}
......@@ -249,6 +249,11 @@
"name": "宫水静香",
"deck": "SuperheavySamurai",
"dialog": "wof-Miyamizu-Shizuka"
},
{
"name": "摆烂型王圆圆",
"deck": "THC_DSReimu",
"dialog": "default"
}
]
}
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