public void Attack(EntityScript user, EntityScript target, EntityScript.Attack attack)
    {
        foreach (StatusLibrary.StatusEnum e in attack.effectList)
        {
            target.Afflicted(e);
        }
        if (target.TakeDamage(attack.damage) <= 0)
        {
            target.HPZero();
            activeEnemies.Remove(target);
            FinishCheck();
        }

        user.EndTurn();
    }
예제 #2
0
 public void EndCombat()
 {
     if (entityAttacking != null)
     {
         entityAttacking.EndTurn();
     }
     StopCoroutine(turnCoroutine);
     //DeleteEnemies();
     for (int i = 0; i < enemylist.Count; i++)
     {
         Debug.Log(enemylist[i] + " should be deleted");
         //enemylist[i].GetComponent<EnemyScript>().Deletion();
         enemylist[i] = null;
         Debug.Log("Destroy");
     }
     entityList.Clear();
     entityAttacking = null;
     Debug.Log("EndCombat");
     enemylist.Clear();
     battleManager.CombatEnd();
 }