示例#1
0
        public void GetAddBattleLog(User user, Enemy enemy)
        {
            if (enemy.CurrentHp <= 0)
            {
                user.Result = "Won";
            }
            else if (user.CurrentHp <= 0)
            {
                user.Result = "Lost";
            }
            else if (user.CurrentHp > 0 && enemy.CurrentHp > 0)
            {
                user.Result = "Fled";
            }

            userContext.AddBattleLog(user, enemy);
        }