Ejemplo n.º 1
0
        /*
         * public void defend(MainPlayer mp) // maybe place main player in here to weaken attack
         * {
         *  mp.attck(); // not sure about this, need to think about it
         * }
         */
        public void heal()
        {
            string            Spear = "Spear Man";
            EnemyModelFactory emf   = EnemyModelFactory.getEnemyModelFactory();
            EnemyModel        em    = new EnemyModel();

            if (Spear == em.Type)
            {
                int hCheck = emf.getHealth("Spear");
                if (enemyModel.Health == hCheck)
                {
                    System.Console.WriteLine(em.Type + " can not heal anymore");
                }
                else
                {
                    enemyModel.Health += 10; // may heal more than their max atm
                }
            }



            // simple heal below - no check to see max health
            //enemyModel.Health += 10;
        }