コード例 #1
0
        public void Setup()
        {
            action = new BattleAction("attack");
            participant = new ActionParticipant("name");
            participant.AddAction(action);
            var participants = new[] { participant };

            partyViewModel = new PartyViewModel(participants);
            removeEnemyActionCommand = new RemoveEnemyActionCommand(partyViewModel);
        }
コード例 #2
0
        public void Setup()
        {
            action = new BattleAction("attack");
            participant = new ActionParticipant("name");
            participant.AddAction(action);
            var participants = new[] { participant };

            partyViewModel = new PartyViewModel(participants);
            editPartyMemberActionCommand = new EditPartyMemberActionCommand(partyViewModel);
        }
コード例 #3
0
        private IEnumerable<ActionParticipant> CreateDatabase()
        {
            var db = new List<ActionParticipant>();
            db.Add(new ActionParticipant("monster 1"));
            db.Add(new ActionParticipant("monster 2"));
            db.Add(new ActionParticipant("player 1"));

            var withActions = new ActionParticipant("Has actions");
            withActions.AddAction(new BattleAction("action"));
            db.Add(withActions);

            return db;
        }
コード例 #4
0
        public void Setup()
        {
            var name = new ActionParticipant("Name");
            var otherName = new ActionParticipant("Other Name");
            var participants = new[] { name, otherName };

            var action = new BattleAction("attack", 1, 1, true);
            name.Initiative = 2;
            otherName.Initiative = 1;
            name.AddAction(action);
            otherName.AddAction(action);

            roundViewModel = new RoundViewModel(1, participants);
        }
コード例 #5
0
        public void Setup()
        {
            var name = new ActionParticipant("name");
            var otherName = new ActionParticipant("other name");
            var participants = new[] { name, otherName };

            var firstAction = new BattleAction("attack 1", 1, 1, true);
            var secondAction = new BattleAction("attack 2", 1, 1, true);

            name.AddAction(firstAction);
            otherName.AddAction(secondAction);

            name.Initiative = 2;
            otherName.Initiative = 1;

            roundViewModel = new RoundViewModel(1, participants);
            getNextActionsCommand = new GetNextActionsCommand(roundViewModel);
        }
コード例 #6
0
        public void Setup()
        {
            enabledGoodGuy = new ActionParticipant("good guy", isEnemy: false);
            enabledBadGuy = new ActionParticipant("bad guy");
            var disabledGoodGuy = new ActionParticipant("good guy", isEnemy: false);
            disabledGoodGuy.Enabled = false;
            var disabledBadGuy = new ActionParticipant("bad guy");
            disabledBadGuy.Enabled = false;

            var participants = new[]
            {
                enabledGoodGuy,
                enabledBadGuy,
                disabledGoodGuy,
                disabledBadGuy
            };

            goodAction = new BattleAction("Good");
            badAction = new BattleAction("Bad");

            enabledGoodGuy.AddAction(goodAction);
            enabledBadGuy.AddAction(badAction);

            partyViewModel = new PartyViewModel(participants);
        }