示例#1
0
        /// <summary>
        /// Rolls a die to determine npc's response
        /// </summary>
        private BattleModeName NPCBattleResponse()
        {
            BattleModeName npcBattleResponse = BattleModeName.RETREAT;

            switch (DieRoll(6))
            {
            case 1:
                npcBattleResponse = BattleModeName.ATTACK;
                break;

            case 2:
                npcBattleResponse = BattleModeName.RETREAT;
                break;

            case 3:
                npcBattleResponse = BattleModeName.ATTACK;
                break;

            case 4:
                npcBattleResponse = BattleModeName.RETREAT;
                break;

            case 5:
                npcBattleResponse = BattleModeName.ATTACK;
                break;

            case 6:
                npcBattleResponse = BattleModeName.ATTACK;
                break;
            }

            return(npcBattleResponse);
        }
示例#2
0
        private BattleModeName NpcBattleResponse()
        {
            BattleModeName npcBattleResponse = BattleModeName.RETREAT;

            switch (DieRoll(3))
            {
            case 1:
                npcBattleResponse = BattleModeName.ATTACK;
                break;

            case 2:
                npcBattleResponse = BattleModeName.DEFEND;
                break;

            case 3:
                npcBattleResponse = BattleModeName.RETREAT;
                break;
            }
            return(npcBattleResponse);
        }
        private BattleModeName NpcBattleResponse()
        {
            BattleModeName npcBattleResponse = BattleModeName.Retreat;

            switch (DieRoll(3))
            {
            case 1:
                npcBattleResponse = BattleModeName.Attack;
                break;

            case 2:
                npcBattleResponse = BattleModeName.Defence;
                break;

            case 3:
                npcBattleResponse = BattleModeName.Retreat;
                break;
            }
            return(npcBattleResponse);
        }