//Set the TarMana model that we're going to be facilitating payment for public void StartPayment(TarMana _modTarMana) { //Move the panel onscreen MoveOnScreen(); modTarMana = _modTarMana; manaToPay = modTarMana.manaCostRequired.pManaCost.Get(); plyrPaying = modTarMana.skill.chrOwner.plyrOwner; //Check (and save the result) if the player can even possibly afford the cost bCanPayCost = plyrPaying.manapool.CanPayManaCost(modTarMana.manaCostRequired); manaToSpend = new Mana(0, 0, 0, 0, 0); manaToSpendOnEffort = new Mana(0, 0, 0, 0, 0); //Initialize the mana icons we're displaying the mana cost with (and determine what amounts of mana we're // paying for non-effort costs InitializeManaIcons(); if (bCanPayCost) { //Have the currently allocated mana for the effort cost auto-spend all effort mana (that we can) manaToSpendOnEffort[Mana.MANATYPE.EFFORT] = manaToSpend[Mana.MANATYPE.EFFORT]; //Have the paying player reserve the starting amount of mana plyrPaying.manapool.ReserveMana(manaToSpend); } KeyBindings.SetBinding(SubmitAllocatedMana, KeyCode.T); }
public static TarMana AddTarget(Skill _skill, ManaCost _manaCostRequried, FnValidSelection fnValidSelection) { TarMana tarmana = new TarMana(_skill, _manaCostRequried, fnValidSelection); _skill.lstTargets.Add(tarmana); return(tarmana); }
//Clear out anything from the current payment process public void CleanUp() { //Unbind the selection hotkey KeyBindings.Unbind(KeyCode.T); //Clear out the model we were paying for modTarMana = null; manaToPay = null; plyrPaying = null; bCanPayCost = false; //Destroy all the mana cost icons we had DestroyAllManaIcons(); manaToSpend = null; manaToSpendOnEffort = null; //Hide the panel offscreen until it's needed again MoveOffscreen(); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarChr.AddTarget(this, Target.AND(TarChr.IsDiffTeam(chrOwner), TarChr.IsFrontliner())); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarChr.AddTarget(this, TarChr.IsDiffTeam(chrOwner)); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarPosition.AddTarget(this, Target.AND(TarPosition.IsFrontline(), TarPosition.IsSameTeam(chrOwner))); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarChr.AddTarget(this, TarChr.TRUE); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarAdapt.AddTarget(this, TarSkillSlot.IsOwnedBySameChr(chrOwner), Target.TRUE); }
public override void InitTargets() { TarMana.AddTarget(this, manaCost); TarChr.AddTarget(this, TarChr.IsFrontliner()); }