Exemplo n.º 1
0
 public async Task ActAsync(IActor target)
 {
     if (await AttackRoll.RollAsync() >= target.ArmorClass)
     {
         await target.DamageAsync(Damage);
     }
 }
Exemplo n.º 2
0
        //----------------------------------------------------------------------------
        //                    AttackHit
        //----------------------------------------------------------------------------

        #region AttackHit

        public IEnumerator AttackHit(AttackRoll attackRoll)
        {
            MyAttackRoll    = attackRoll;
            MyTextMesh.text = MyAttackData.MyHasAttack.MyName + " rolls a " + MyAttackRoll.PureRoll + " + "
                              + MyAttackData.SumOfModifiers + " to hit, hitting " + MyAttackData.MyIsVictim.Name + "."
                              + " It hits against their AC of " + MyAttackData.MyIsVictim.AC;

            while (!Input.GetMouseButton(0))
            {
                yield return(null);
            }

            yield return(new WaitForSeconds(0.2f));
        }
Exemplo n.º 3
0
        //----------------------------------------------------------------------------
        //                    AttackMiss
        //----------------------------------------------------------------------------

        #region AttackMiss

        public IEnumerator AttackMiss(AttackRoll attackRoll)
        {
            MyTextMesh.text = "The attack misses with a " + attackRoll.PureRoll + " + " +
                              MyAttackData.SumOfModifiers + ", glancing off " + MyAttackData.MyIsVictim.Name
                              + "'s shield.";

            while (!Input.GetMouseButton(0))
            {
                yield return(null);
            }

            yield return(StartCoroutine(HideCanvas()));

            yield return(new WaitForSeconds(0.2f));
        }
 public IEnumerator TakeAttack(AttackRoll attackRoll)
 {
     Debug.Log("Death!");
     yield break;
 }
Exemplo n.º 5
0
        public IEnumerator TakeAttack(AttackRoll attackRoll)
        {
            yield return(StartCoroutine(MyNarrator.HasTurnDeath(MyHasTurn)));

            yield return(StartCoroutine(MyDeathManager.Die(MyHasTurn)));
        }