示例#1
0
    public void HealUnit(int value, Skill.Actions action)
    {
        Debug.Log("Healing: " + GetData().characterMoniker + " for " + value.ToString());
        int nwHlth = GetData().GetCurrHealth() + value;

        nwHlth = nwHlth > GetData().GetMaxHP() ? GetData().GetMaxHP() : nwHlth;
        if (nwHlth != GetData().GetCurrHealth())
        {
            GetData().SetCurrHealth(nwHlth);
            //FloatUp(action, "+" + value.ToString(), Color.green, "Unit Healed", false);
            HealAnim(AnimationInteractionController.ReturnWaitTime(action));
        }
    }
示例#2
0
 public void ReceiveAtkBuff(int buff, Skill.Actions action = Skill.Actions.None)
 {
     GetData().SetAttackBuff(GetData().GetAttackBuff() + buff);
     //int newAtk = GetData().GetAttack() + buff;
     if (buff != 0)
     {
         if (buff > 0)
         {
             RageAnim(AnimationInteractionController.ReturnWaitTime(action));
             //FloatUp(action, "+" + buff + " atk", Color.blue, "atk buff", false);
         }
         else
         {
             HobbleAnim(AnimationInteractionController.ReturnWaitTime(action));
             //FloatUp(action, "-" + buff + " atk", Color.cyan, "atk sickness", true);
         }
     }
 }
示例#3
0
    public bool IsAttackedEnvironment(int atkPwr, Skill.Actions act = Skill.Actions.None)
    {
        if (_data.GetAegis())
        {
            SetAegis(false, AnimationInteractionController.ReturnWaitTime(act));
            return(false);
        }

        //Damage the unit
        GetData().IsAttacked(atkPwr);
        //FloatUp("-" + atkPwr.ToString(), Color.red, ATK_WAIT);
        FloatUp(act, "-" + atkPwr.ToString(), Color.red, "Took env damage", true);
        if (GetData().IsDead() && !givenExp)
        {
            givenExp = true;
            BoardProxy.instance.GiveLowestCharLvl(this);
            return(true);
        }
        return(false);
    }