Exemplo n.º 1
0
        public void Attack(CharBase @char)
        {
            var Damage = (ATK.Get() - (@char.DEF.Get() * @char.DEFBUFF));

            DamegeShow(Damage, @char.CharDate.GetName());
            @char.HP.Set(@char.HP.Get() - Damage);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var Djeeta = new Char.CharBase("ジータ", "ヒューマン", "女", 500, 20, 2);

            var Enemy = new Char.CharBase("コキュートス", "エネミー", "-", 1000, 40, 5);

            var Random            = new Random();
            int BehaviorSelection = 0;

            Boolean Game = false;

            do
            {
                LineView();
                Console.WriteLine("あなたのターンです。");
                Console.WriteLine(Djeeta.Info());
                Djeeta.TurnReset();
                Console.WriteLine("行動を入力してください / 1:攻撃 / 2:防御 / 3:回復");
                BehaviorSelection = InputLine();
                ActionBranch(Djeeta, Enemy, BehaviorSelection);

                LineView();

                Console.WriteLine("敵のターンです。");
                Console.WriteLine(Enemy.Info());
                Enemy.TurnReset();
                ActionBranch(Enemy, Djeeta, Random.Next(1, 3));

                Game = Djeeta.IsState();
                Game = Enemy.IsState();
            }while (!Game);
        }
Exemplo n.º 3
0
        private static void ActionBranch(Char.CharBase @char, Char.CharBase Enemy, int Selection)
        {
            switch (Selection)
            {
            case 1:
                @char.Attack(Enemy);
                break;

            case 2:
                @char.Guard();
                break;

            case 3:
                @char.Heal();
                break;
            }
        }
Exemplo n.º 4
0
 private static Boolean IsEND(Char.CharBase @char)
 {
     return(@char.IsState());
 }