Commit f5abfa21 authored by mercury233's avatar mercury233

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

parents ff957ee2 9d28e904
......@@ -523,7 +523,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(e_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
/*AI.SelectCard(new[] {
CardId.BingirsuTheWorldChaliceWarrior,
CardId.TopologicTrisbaena,
......@@ -548,7 +548,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(s_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......
......@@ -468,13 +468,13 @@ namespace WindBot.Game.AI.Decks
IList<ClientCard> material_list = new List<ClientCard>();
if(Bot.HasInExtra(CardId.BorreloadDragon))
{
AI.SelectCard(
AI.SelectMaterials(new[] {
CardId.TopologicBomberDragon,
CardId.TopologicTrisbaena,
CardId.KnightmareGryphon,
CardId.SummonSorceress,
CardId.BorreloadDragon
);
}, HintMsg.Remove);
}
else
{
......@@ -483,6 +483,7 @@ namespace WindBot.Game.AI.Decks
if (material_list.Count == 5) break;
material_list.Add(m);
}
AI.SelectMaterials(material_list, HintMsg.Remove);
}
return true;
}
......
......@@ -709,7 +709,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(e_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......@@ -719,7 +719,7 @@ namespace WindBot.Game.AI.Decks
targets.Add(s_c);
if (targets.Count >= 5)
{
AI.SelectCard(targets);
AI.SelectMaterials(targets, HintMsg.Remove);
return true;
}
}
......
......@@ -63,6 +63,7 @@ namespace WindBot.Game.AI
public const int SolemnWarning = 84749824;
public const int SolemnStrike = 40605147;
public const int TorrentialTribute = 53582587;
public const int EvenlyMatched = 15693423;
public const int HeavyStorm = 19613556;
public const int HammerShot = 26412047;
public const int DarkHole = 53129443;
......@@ -791,7 +792,8 @@ namespace WindBot.Game.AI
_CardId.EvilswarmExcitonKnight,
_CardId.BlackRoseDragon,
_CardId.JudgmentDragon,
_CardId.TopologicTrisbaena
_CardId.TopologicTrisbaena,
_CardId.EvenlyMatched
};
int[] destroyAllOpponentSpellList =
{
......
......@@ -98,6 +98,7 @@ namespace WindBot.Game
m_position.Clear();
m_selector_pointer = -1;
m_materialSelector = null;
m_materialSelectorHint = 0;
m_option = -1;
m_yesno = -1;
m_announce = 0;
......@@ -266,10 +267,18 @@ namespace WindBot.Game
}
}
else
{
if (m_materialSelector != null && hint == m_materialSelectorHint)
{
//Logger.DebugWriteLine("m_materialSelector hint match");
selector = m_materialSelector;
}
else
{
// Update the next selector.
selector = GetSelectedCards();
}
}
// If we selected a card, use this card.
if (selector != null)
......@@ -745,6 +754,7 @@ namespace WindBot.Game
private CardSelector m_materialSelector;
private int m_materialSelectorHint;
private int m_place;
private int m_option;
private int m_number;
......@@ -912,34 +922,40 @@ namespace WindBot.Game
m_selector.Insert(m_selector_pointer, new CardSelector(loc));
}
public void SelectMaterials(ClientCard card)
public void SelectMaterials(ClientCard card, int hint = 0)
{
m_materialSelector = new CardSelector(card);
m_materialSelectorHint = hint;
}
public void SelectMaterials(IList<ClientCard> cards)
public void SelectMaterials(IList<ClientCard> cards, int hint = 0)
{
m_materialSelector = new CardSelector(cards);
m_materialSelectorHint = hint;
}
public void SelectMaterials(int cardId)
public void SelectMaterials(int cardId, int hint = 0)
{
m_materialSelector = new CardSelector(cardId);
m_materialSelectorHint = hint;
}
public void SelectMaterials(IList<int> ids)
public void SelectMaterials(IList<int> ids, int hint = 0)
{
m_materialSelector = new CardSelector(ids);
m_materialSelectorHint = hint;
}
public void SelectMaterials(CardLocation loc)
public void SelectMaterials(CardLocation loc, int hint = 0)
{
m_materialSelector = new CardSelector(loc);
m_materialSelectorHint = hint;
}
public void CleanSelectMaterials()
{
m_materialSelector = null;
m_materialSelectorHint = 0;
}
public bool HaveSelectedCards()
......
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