Exemplo n.º 1
0
        public static void ConductRound(ref Entity play, ref Entity foe)
        {
            if (foe.Guile <= play.Guile)
            {
                foe.MakePlans(ref play);
                //announce their decision

                //execute player's plan
                if (play.plan.HasFlag(Choice.OptionAttack))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else if (play.plan.HasFlag(Choice.OptionDefend))
                {
                    //they don't need to do anything here yet, the flags are set
                }
                //just using attack for the rest for now, no other systems are up yet
                else if (play.plan.HasFlag(Choice.PowerAlpha))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else if (play.plan.HasFlag(Choice.PowerBeta))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else if (play.plan.HasFlag(Choice.PowerDelta))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else if (play.plan.HasFlag(Choice.OptionAlpha))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else if (play.plan.HasFlag(Choice.OptionBeta))
                {
                    Combat.ConductAttack(ref play, ref foe);
                }
                else
                {
                    //they didn't decide to do anything...
                }


                //execute foe's plan
                if (foe.plan.HasFlag(Choice.OptionAttack))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else if (foe.plan.HasFlag(Choice.OptionDefend))
                {
                    //they don't need to do anything here yet, the flags are set
                }
                //just using attack for the rest for now, no other systems are up yet
                else if (foe.plan.HasFlag(Choice.PowerAlpha))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else if (foe.plan.HasFlag(Choice.PowerBeta))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else if (foe.plan.HasFlag(Choice.PowerDelta))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else if (foe.plan.HasFlag(Choice.OptionAlpha))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else if (foe.plan.HasFlag(Choice.OptionBeta))
                {
                    Combat.ConductAttack(ref foe, ref play);
                }
                else
                {
                    //they didn't decide to do anything...
                }
            }



            if (foe.Guile > play.Guile)
            {
                foe.MakePlans(ref play);
                //do not announce their decision
            }
        }
Exemplo n.º 2
0
 public static void SetPlayerAction(Choice ch, ref Entity play, ref Entity foe)
 {
     play.plan = ch;
     Combat.ConductRound(ref play, ref foe);
 }