public void cardAction(GameObject pos) { hero = battle.getCurrent().GetComponent <Hero>(); List <GameObject> hand = new List <GameObject>(); hand = hero.GetComponent <DeckManager>().getInPlay(); int count = 0; foreach (GameObject card in hand) { if (card.GetComponent <Treasure>() != null) { count++; hero.GetComponent <DeckManager>().Discard(card); } } if (count > 0) { hero.GetComponent <DeckManager>().Draw(count); battle.AddAction(count); } battle.MinusAction(); }
void QueueAction() { BattleAction theAction = _actions[_actionSelection]; theAction.source = this; _manager.AddAction(theAction); }
public void cardAction(GameObject pos) { hero = battle.getCurrent().GetComponent <Hero>(); GameObject Display = GameObject.FindWithTag("ActionCam"); Display.GetComponent <DisplayScene>().BattleDisplaySelf(hero, new Vector3(600, 50, 0), hero.decreaseHealth(Mathf.RoundToInt(.25f * hero.getMaxHealth()), hero.getBaseCrit())); battle.ViewBattle(0); battle.AddAction(); }