public Event(triggerEffectMethod triggerEffect, SpecialEffect se, CardWithGameProperties card) { triggerEffect_ = triggerEffect; this.se = se; this.card = card; type = AnimationAndEventsConstants.TYPETRIGGER; }
public void processDeckToMana(List <int> intArguments, bool own) { CardWithGameProperties card; for (int i = 0; i < intArguments.Count; i++) { card = new CardWithGameProperties(ctrl.getCardWithGamePropertiesByID(intArguments[i])); animateDeckToMana(card, own); // we update the info board updateInfoBoard("mana", own, 1); updateInfoBoard("deck", own, -1); } }
private void triggerEffect(SpecialEffect se, CardWithGameProperties card) { switch (se.Effect) { case "SendTo": triggerOwnSendTo(se); break; case "InstantSummon": card.hasCompletelyBeenSummoned = true; break; case "Draw": ctrl.send(new GameMessage("DRAWCARD", ctrl.GameRoomID, se.Arguments)); break; } }
public void DrawCards(List <int> arguments) { CardWithGameProperties card; for (int i = 0; i < arguments.Count; i++) { card = new CardWithGameProperties(ctrl.getCardWithGamePropertiesByID(arguments[i])); animateDrawCardOWN(card); // if we drew a card during our own Summon phase we add it to the ableToSelect list if (Phase == "Summon phase" && itIsOwnTurn) { ableToSelect.Add(listHand[listHand.Count - 1]); } // we update the info board updateInfoBoard("hand", OWN, 1); updateInfoBoard("deck", OWN, -1); } }
public GUIDefend(List <CardGUIModel> ownDefenders, CardWithGameProperties attacker, CardWithGameProperties target, string message, int count = 1) { InitializeComponent(); this.attacker = attacker; this.target = target; if (count == 999) { txtYou.Visibility = Visibility.Visible; } else if (count != 1) { txtTarget.Text = string.Format("Target (x{0})", count); } messageBlock.Text = message; this.ownDefenders = new List <SelectGUI_CardGUIModel>(); cardsToGUI(ownDefenders); }
public void addTriggerEvent(SpecialEffect se, CardWithGameProperties card, int position, int waitCount) { Event e = new Event(triggerEffect, se, card); lock (animationsAndEventsQueueLock) { if (position == -1) { animationsAndEvents.Add(e); if (waitCount > 0) { addWaitEvent(waitCount); } } else { animationsAndEvents.Insert(position++, e); if (waitCount > 0) { addWaitEvent(waitCount, position); } } } }