Commit 7a48d60f authored by xiaoye's avatar xiaoye

Update DefaultExecutor.cs

parent 8054f07a
Pipeline #39545 failed with stage
in 46 seconds
...@@ -597,25 +597,6 @@ namespace WindBot.Game.AI ...@@ -597,25 +597,6 @@ namespace WindBot.Game.AI
base.OnChainEnd(); base.OnChainEnd();
} }
/// <summary>
/// Reset variables for new turn.
/// </summary>
public override void OnNewTurn()
{
if (Duel.Turn <= 1) calledbytheGraveIdCountMap.Clear();
List<int> keyList = calledbytheGraveIdCountMap.Keys.ToList();
foreach (int dic in keyList)
{
if (calledbytheGraveIdCountMap[dic] > 0)
{
calledbytheGraveIdCountMap[dic] -= 1;
}
}
crossoutDesignatorIdList.Clear();
base.OnNewTurn();
}
public override void OnMove(ClientCard card, int previousControler, int previousLocation, int currentControler, int currentLocation) public override void OnMove(ClientCard card, int previousControler, int previousLocation, int currentControler, int currentLocation)
{ {
if (card != null) if (card != null)
...@@ -1291,9 +1272,9 @@ namespace WindBot.Game.AI ...@@ -1291,9 +1272,9 @@ namespace WindBot.Game.AI
AI.SelectOption(SYNCHRO); AI.SelectOption(SYNCHRO);
return true; return true;
} }
for (int i=1; i<=12; i++) for (int i = 1; i <= 12; i++)
{ {
if (levels[i]>1) if (levels[i] > 1)
{ {
AI.SelectOption(XYZ); AI.SelectOption(XYZ);
return true; return true;
...@@ -1564,7 +1545,8 @@ namespace WindBot.Game.AI ...@@ -1564,7 +1545,8 @@ namespace WindBot.Game.AI
/// </summary> /// </summary>
protected bool DefaultVaylantzWorld_ShinraBansho() protected bool DefaultVaylantzWorld_ShinraBansho()
{ {
if (DefaultSpellWillBeNegated()) { if (DefaultSpellWillBeNegated())
{
return false; return false;
} }
...@@ -1576,12 +1558,14 @@ namespace WindBot.Game.AI ...@@ -1576,12 +1558,14 @@ namespace WindBot.Game.AI
/// </summary> /// </summary>
protected bool DefaultVaylantzWorld_KonigWissen() protected bool DefaultVaylantzWorld_KonigWissen()
{ {
if (DefaultSpellWillBeNegated()) { if (DefaultSpellWillBeNegated())
{
return false; return false;
} }
List<ClientCard> monsters = Enemy.GetMonsters(); List<ClientCard> monsters = Enemy.GetMonsters();
if (monsters.Count == 0) { if (monsters.Count == 0)
{
return false; return false;
} }
...@@ -1649,13 +1633,6 @@ namespace WindBot.Game.AI ...@@ -1649,13 +1633,6 @@ namespace WindBot.Game.AI
base.OnNewTurn(); base.OnNewTurn();
} }
public override void OnChainEnd()
{
if (!calledbytheGraveIdCountMap.ContainsKey(cardId)) return 0;
return calledbytheGraveIdCountMap[cardId];
}
protected virtual bool DefaultSetForDiabellze() protected virtual bool DefaultSetForDiabellze()
{ {
if (Card == null) return false; if (Card == null) return false;
...@@ -1679,28 +1656,10 @@ namespace WindBot.Game.AI ...@@ -1679,28 +1656,10 @@ namespace WindBot.Game.AI
} }
return false; return false;
} }
protected int GetCalledbytheGraveIdCount(int cardId)
public override void OnMove(ClientCard card, int previousControler, int previousLocation, int currentControler, int currentLocation)
{
if (card != null) {
int cardId = card.Id;
if (previousLocation == 0 && currentLocation == (int)CardLocation.MonsterZone)
{
if (!sendEventMsg2 && event2TriggerIdList.Contains(cardId) && currentControler == 1)
{
AI.SendCustomChat((int)CustomMessage.MSG_FOR_EVENT_2);
sendEventMsg2 = true;
}
if (!sendEventMsg5 && event5TriggerIdList.Contains(cardId) && currentControler == 0 && Duel.Phase == DuelPhase.Standby)
{ {
AI.SendCustomChat((int)CustomMessage.MSG_FOR_EVENT_5); if (!calledbytheGraveIdCountMap.ContainsKey(cardId)) return 0;
sendEventMsg5 = true; return calledbytheGraveIdCountMap[cardId];
}
}
}
base.OnMove(card, previousControler, previousLocation, currentControler, currentLocation);
} }
} }
} }
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