Commit 6f114a50 authored by wyykak's avatar wyykak

支持特召恋爱

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent c69d4a4b
......@@ -11,6 +11,9 @@
16010003
74561011
74561011
23019
23019
23019
14000267
14000267
82434
......@@ -42,9 +45,13 @@
16011501
16011501
#extra
74561100
74561045
74561045
74561045
23165
66917017
23501
23504
23504
23504
......@@ -53,4 +60,3 @@
17030980
!side
74561004
23501
......@@ -30,10 +30,15 @@ namespace WindBot.Game.AI.Decks
public const int 茧墨场地 = 16011501;
public const int 灵符 = 10278;
public const int 茧墨怪 = 16010003;
public const int 早苗 = 23019;
public const int 幼女化 = 74561045;
public const int 天狗L2 = 23504;
public const int 叮当 = 17030980;
public const int 连接早苗 = 23501;
public const int 青蛙 = 23165;
public const int 魔女 = 66917017;
public const int 恋爱 = 74561100;
}
readonly int[] 叮当素材 = { CardId.幼女化, CardId.女神天子, CardId.天子翼, CardId.萨丽艾尔, 16019999};
......@@ -56,6 +61,8 @@ namespace WindBot.Game.AI.Decks
AddExecutor(ExecutorType.Activate, CardId.天子翼, 特召天子翼);
AddExecutor(ExecutorType.SpSummon, CardId.美兔, 特召彩虹);
AddExecutor(ExecutorType.SpSummon, CardId., 特召彩虹);
AddExecutor(ExecutorType.Summon, CardId.美兔, NeedMonsterForLove);
AddExecutor(ExecutorType.Summon, CardId., NeedMonsterForLove);
AddExecutor(ExecutorType.Activate, CardId.光影, 光影检索);
AddExecutor(ExecutorType.SpSummon, CardId.天狗L2, 天狗L2特召);
AddExecutor(ExecutorType.Activate, CardId.天狗L2, 天狗L2弹卡);
......@@ -67,13 +74,27 @@ namespace WindBot.Game.AI.Decks
() => !(AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生)));
AddExecutor(ExecutorType.Activate, CardId.灵符);
AddExecutor(ExecutorType.SpSummon, CardId.叮当, 叮当特召);
AddExecutor(ExecutorType.SpSummon, CardId.连接早苗, 连接早苗特召);
AddExecutor(ExecutorType.Activate, CardId.连接早苗, 信仰指示物);
AddExecutor(ExecutorType.SpSummon, CardId.青蛙, 青蛙特召);
AddExecutor(ExecutorType.Activate, CardId.青蛙, 检索早苗);
AddExecutor(ExecutorType.SpSummon, CardId.早苗, 特召早苗);
AddExecutor(ExecutorType.SpSummon, CardId.魔女, 特召魔女);
AddExecutor(ExecutorType.Activate, CardId.魔女, 特召恋爱);
}
private bool JMUsed = false;
private bool JMRestrict = false;
private bool loveMode = false;
public override void OnNewTurn()
{
JMUsed = false;
JMRestrict = false;
loveMode = false;
if (CanSpSummonLove())
{
loveMode = true;
}
base.OnNewTurn();
}
public override bool OnSelectHand()
......@@ -115,7 +136,7 @@ namespace WindBot.Game.AI.Decks
{
return false;
}
return (!HasDSTunerOnField() && HasSpSummonableNonTuner(Card)) || NeedToFreeSZone();
return (!HasDSTunerOnField() && HasSpSummonableNonTuner(Card)) || NeedToFreeSZone() || NeedMonsterForLove();
}
private bool 女神天子等级提升()
{
......@@ -129,6 +150,10 @@ namespace WindBot.Game.AI.Decks
}
private bool 星态死士等级提升()
{
if (Card.Location != CardLocation.Hand)
{
return false;
}
AI.SelectCard(CardId.星态死士);
return true;
}
......@@ -156,6 +181,10 @@ namespace WindBot.Game.AI.Decks
{
return false;
}
if (NeedMonsterForLove())
{
return true;
}
if (!HasSpSummonableNonTuner(null))
{
if (HasNonTunerOnField())
......@@ -174,6 +203,10 @@ namespace WindBot.Game.AI.Decks
}
private bool 特召彩虹()
{
if (NeedMonsterForLove())
{
return true;
}
if (AlreadySucceeded() || HasNonTunerOnField())
{
return false;
......@@ -221,16 +254,33 @@ namespace WindBot.Game.AI.Decks
if (ActivateDescription == Util.GetStringId(CardId.茧墨场地, 1))
{
if (loveMode && Bot.HasInMonstersZone(CardId.早苗) && Bot.HasInMonstersZone(CardId.幼女化))
{
AI.SelectCard(CardId.幼女化);
return true;
}
if (loveMode && Bot.HasInMonstersZoneOrInGraveyard(CardId.幼女化) && Bot.HasInMonstersZoneOrInGraveyard(CardId.早苗) && Bot.HasInMonstersZone(CardId.青蛙))
{
AI.SelectCard(CardId.青蛙);
return true;
}
return false;
}
if (ActivateDescription == Util.GetStringId(CardId.茧墨场地, 0))
{
if (loveMode)
{
return false;
}
JMRestrict = true;
}
if (AlreadySucceeded())
{
AI.SelectCard(CardId.萨丽艾尔, CardId.天子翼);
return true;
}
if (Card.Location == CardLocation.Hand &&
!(Bot.GetFieldSpellCard() != null && Bot.GetFieldSpellCard().IsCode(CardId.茧墨场地) && !Bot.GetFieldSpellCard().IsDisabled() && !JMUsed) ||
NeedToFreeSZone())
!(Bot.GetFieldSpellCard() != null && Bot.GetFieldSpellCard().IsCode(CardId.茧墨场地) && !Bot.GetFieldSpellCard().IsDisabled() && !JMUsed))
{
JMUsed = false;
return true;
......@@ -253,11 +303,15 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(CardId.天子翼);
return true;
}
if (ActivateDescription == Util.GetStringId(CardId.茧墨场地, 0))
{
JMRestrict = false;
}
return false;
}
private bool 守备特召()
{
if (Bot.HasInMonstersZone(CardId.叮当))
if (Bot.HasInMonstersZone(CardId.叮当) || loveMode)
{
return false;
}
......@@ -266,6 +320,10 @@ namespace WindBot.Game.AI.Decks
}
private bool 天狗L2特召()
{
if (loveMode)
{
return false;
}
var material = Bot.GetMonstersInMainZone().GetMatchingCards((c) => !c.IsCode(CardId.幼女化));
bool hasMaterial = material.Count >= 2;
if (hasMaterial && NeedToFreeSZone())
......@@ -298,7 +356,7 @@ namespace WindBot.Game.AI.Decks
}
private bool 叮当特召()
{
if (AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生) || Duel.Turn == 1)
if (AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生) || Duel.Turn == 1 || loveMode)
{
return false;
}
......@@ -326,7 +384,64 @@ namespace WindBot.Game.AI.Decks
}
return false;
}
private bool 连接早苗特召()
{
if (loveMode && !Bot.HasInHandOrHasInMonstersZone(CardId.早苗) && !Bot.HasInGraveyard(CardId.早苗))
{
AI.SelectMaterials(CardId.幼女化);
return true;
}
return false;
}
private bool 信仰指示物()
{
AI.SelectCard(CardId.连接早苗);
return true;
}
private bool 青蛙特召()
{
if (loveMode)
{
AI.SelectPlace(Zones.MainMonsterZones);
return true;
}
return false;
}
private bool 检索早苗()
{
AI.SelectCard(CardId.早苗);
return true;
}
private bool 特召早苗()
{
if (loveMode)
{
AI.SelectCard(Bot.GetMonsters());
return true;
}
return false;
}
private bool 特召魔女()
{
return loveMode;
}
private bool 特召恋爱()
{
if ((Duel.IsFirst && Duel.Turn % 2 == 0) || (!Duel.IsFirst && Duel.Turn % 2 == 1))
{
AI.SelectPosition(CardPosition.FaceUpDefence);
return true;
}
return false;
}
private bool HasSpSummonableNonTuner(ClientCard ex)
{
return Bot.Hand.IsExistingMatchingCard((ClientCard c) => c.IsCode(CardId.美兔, CardId., CardId.茧墨场地) && !ReferenceEquals(c,ex));
......@@ -359,5 +474,58 @@ namespace WindBot.Game.AI.Decks
{
return AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生) && Bot.GetSpellCountWithoutField() >= 5;
}
private bool CanSpSummonLove()
{
if (!Bot.HasInMonstersZoneOrInGraveyard(CardId.幼女化) || !Bot.HasInExtra(CardId.魔女))
{
return false;
}
if (Enemy.GetMonsters().GetHighestAttackMonster() != null && Enemy.GetMonsters().GetHighestAttackMonster().Attack > 2000)
{
return false;
}
if (AlreadySucceeded() && Bot.HasInHand(CardId.梦想天生))
{
return false;
}
if (!Bot.HasInHand(CardId.早苗) && (!Bot.HasInExtra(CardId.连接早苗) || !Bot.HasInExtra(CardId.青蛙)))
{
return false;
}
if (Bot.Hand.Count((ClientCard c) => c.IsMonster()) < 1)
{
return false;
}
int mCountNeeded = 3;
if (Bot.HasInSpellZone(CardId.茧墨场地))
{
if (Bot.LifePoints > 3000)
{
mCountNeeded--;
}
mCountNeeded--;
}
if (Bot.HasInHand(new List<int> { CardId.美兔, CardId., CardId.女神天子, CardId.星态死士}) && Bot.Hand.Count((ClientCard c) => c.IsMonster()) >= 2)
{
mCountNeeded--;
}
if (mCountNeeded > Bot.GetMonsterCount())
{
return false;
}
return true;
}
private bool NeedMonsterForLove()
{
if (!loveMode)
{
return false;
}
if (!Bot.HasInMonstersZone(CardId.连接早苗) && !Bot.HasInMonstersZone(CardId.青蛙) && !Bot.HasInMonstersZone(CardId.魔女) && Bot.GetMonsterCount() < 2)
{
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