Esempio n. 1
0
        private void Attack(string[] param)
        {
            //TODO: Implement when room is complete
            Attack attack = null;
            Player p      = Player.GetInstance();

            try
            {
                switch (param[0])
                {
                case "special":
                    attack = p.GetAttack("intermediate");
                    break;

                case "ultimate":
                    attack = p.GetAttack("advanced");
                    break;

                default:
                    attack = p.GetAttack(null);
                    break;
                }
            }catch (Exception) { Console.WriteLine("Huh? Who are you trying to hit?"); attack = p.GetAttack(null); }


            //TODO: Integrate rooms and enemies
            CommandPost.GetInstance().AddCommand(new AttackCommand(p, attack, p));
            CommandPost.GetInstance().AddCommand(RiposteCommand.GetInstance());
        }
Esempio n. 2
0
 public static RiposteCommand GetInstance()
 {
     if (rc == null)
     {
         rc = new RiposteCommand();
     }
     return(rc);
 }
Esempio n. 3
0
 public override void ActivateEffect(Entity attacker, Entity defender)
 {
     for (int i = 0; i < NumberOfHits; ++i)
     {
         CommandPost.GetInstance().AddCommand(new AttackCommand(attacker, new Repeater(this, int.MaxValue), defender));
         RiposteCommand.GetInstance().ToRiposte(defender);
     }
 }
Esempio n. 4
0
        private void Attack(string[] param)
        {
            //TODO: Implement when room is complete
            Attack attack = null;
            Player p      = Player.GetInstance();
            Enemy  e      = null;

            try
            {
                string[] target = param[0].Split('.');
                int      c      = 1;

                if (target.Length > 1)
                {
                    c = int.Parse(target[0]);
                }

                e = Game.GetInstance().CurrentRoom.GetEnemy(target[target.Length == 1 ? 0 : 1], c);

                if (e == null)
                {
                    throw new Exception();
                }

                attack = p.GetAttack(null);
                if (param.Length > 1)
                {
                    switch (param[1])
                    {
                    case "special":
                        attack = p.GetAttack("intermediate");
                        break;

                    case "ultimate":
                        attack = p.GetAttack("advanced");
                        break;

                    default:
                        break;
                    }
                }


                //TODO: Integrate rooms and enemies
                CommandPost.GetInstance().AddCommand(new AttackCommand(p, attack, e));
                CommandPost.GetInstance().AddCommand(RiposteCommand.GetInstance());
            }
            catch (Exception) { Console.WriteLine("Huh? Who are you trying to hit?"); return; }
        }
Esempio n. 5
0
 public virtual void ActivateEffect(Entity attacker, Entity defender)
 {
     RiposteCommand.GetInstance().ToRiposte(defender);
 }