Esempio n. 1
0
        public static void TestGame()
        {
            IDamageActor humen = new Character("Humen", 300, 50);
            IDamageActor orc   = new Character("Orc", 350, 75);

            humen = new DefenceBuff(new DefenceBuff(humen, 10), 30);

            while (!humen.IsDead() && !orc.IsDead())
            {
                humen.Hit(orc);
                orc.Hit(humen);
            }
        }
Esempio n. 2
0
 public void Defenderse()
 {
     if (!defenderseUsado)
     {
         var buff = new DefenceBuff(1, 2);
         buff.Apply(this);
         Buffs.Add(buff);
         Debug.Log("Buffo de defenderse usado");
         defenderse.gameObject.SetActive(false);
         defenderseUsado = true;
         MovementPoints  = 0;
         ActionPoints    = 0;
     }
 }
Esempio n. 3
0
    // **TODO** Implémenter les dégâts supplémentaires au centre.

    public override void Apply(Unit caster, List <Unit> receivers, CellGrid cellgrid)
    {
        Animator anim = caster.GetComponentInChildren <Animator>();

        anim.SetBool("Skill", true);
        anim.SetBool("Idle", false);

        foreach (var receiver in receivers)
        {
            DefenceBuff ArmorVoidBuff = new DefenceBuff(2, 1.5f);
            receiver.Buffs.Add(ArmorVoidBuff);
            ArmorVoidBuff.Apply(receiver);
        }


        caster.ActionPoints--;
        SetCooldown();
    }