Пример #1
0
 public Location(int id, string name, string description, Item itemRequiredToEnter = null, Quest questAvailableHere = null, Monster monsterLivingHere = null)
 {
     ID = id;
     Name = name;
     Description = description;
     ItemRequiredToEnter = itemRequiredToEnter;
     QuestAvailableHere = questAvailableHere;
     MonsterLivingHere = monsterLivingHere;
 }
Пример #2
0
        private void EndMonsterTurn(object sender, GameEventArgs eventArgs)
        {
            Contract.Requires(CurrentState == State.WaitForPerformAction);
            Contract.Ensures(CurrentState == (monstersRemaining.Count == 0 ? State.NewRound : State.WaitForOverlordChooseAction));

            monstersRemaining.Remove(currentMonster);
            currentMonster = null;

            MarkMonsters();

            stateMachine.PlaceStates(State.WaitForOverlordChooseAction);
            stateMachine.ChangeToNextState();

            if (monstersRemaining.Count == 0)
            {
                FinishedTurn(sender, eventArgs);
            }
        }
Пример #3
0
        private void StartMonsterTurn(object sender, CoordinatesEventArgs eventArgs)
        {
            Contract.Requires(CurrentState == State.WaitForOverlordChooseAction);
            Contract.Ensures(CurrentState == State.WaitForPerformAction);

            // Record monsterId
            currentMonster = (Monster)FullModel.Board[eventArgs.X, eventArgs.Y].Figure;

            stateMachine.PlaceStates(State.MonsterTurn);
            stateMachine.ChangeToNextState();
            MonsterTurnInitiation();
        }