public virtual void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) { Card checkedCard = player.Game.GameTable.CheckDeck(); bool result = checkCallback(checkedCard); Game.Session.EventManager.OnPlayerCheckedDeck(player, checkedCard, causedBy, result); resultCallback(causedBy, result); }
public LuckyDukeResponseHandler(LuckyDuke parent, Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) : base(RequestType.LuckyDuke, parent.Player) { this.parent = parent; this.causedBy = causedBy; this.checkCallback = checkCallback; this.resultCallback = resultCallback; }
public void AddHandler(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) { AddHandler(new LuckyDukeResponseHandler(parent, causedBy, checkCallback, resultCallback)); }
public override void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) { queue.AddHandler(causedBy, checkCallback, resultCallback); if(!queue.Active) Game.GameCycle.PushTempHandler(queue); }
public void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) { character.CheckDeck(causedBy, checkCallback, resultCallback); }
public override void CheckDeck(Card causedBy, CheckDeckCallback checkCallback, CardResultCallback resultCallback) { if(characters.Count == 0) base.CheckDeck(causedBy, checkCallback, resultCallback); else if(characters.Count == 1) characters.First().CheckDeck(causedBy, checkCallback, resultCallback); else Game.GameCycle.PushTempHandler(new ChooseCharacterResponseHandler(this, RequestType.ChooseCharacterForCheckDeck, c => { if(c != null) c.CheckDeck(causedBy, checkCallback, resultCallback); else base.CheckDeck(causedBy, checkCallback, resultCallback); })); }