Commit d5482925 authored by wind2009's avatar wind2009 Committed by mercury233

Fix Crossout Designator for Witchcraft

parent eb222c82
......@@ -446,6 +446,21 @@ namespace WindBot.Game.AI.Decks
/// <returns>Card's id to annouce.</returns>
public override int OnAnnounceCard(IList<int> opcodes, int preAnnouced)
{
const int OPCODE_OR = 0x40000005;
const int OPCODE_ISCODE = 0x40000100;
IList<int> codes = new List<int>();
foreach (int opcode in opcodes) {
if (opcode != OPCODE_OR && opcode != OPCODE_ISCODE)
{
codes.Add(opcode);
}
}
// if annouced card not in required list, return random card from list.
if (!codes.Contains(preAnnouced))
{
Logger.DebugWriteLine("No annouced card in required list, annouce randomly.");
return codes[Program.Rand.Next(codes.Count)];
}
return base.OnAnnounceCard(opcodes, preAnnouced);
}
......
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