예제 #1
0
 public Monster(Game game, MonsterManager.MonsterData monster)
     : base(game, monster.Name, monster.BaseImageName, game.Roll(monster.HitDice), monster.Initiative, monster.AttackModifier, monster.ArmorClass)
 {
     ChallengeRating = monster.ChallengeRating;
     MonsterId = monster.Identifier;
     actions = new List<IAction>();
     actions.Add(new WeaponAttack(monster.WeaponStats, null));
 }
예제 #2
0
        // Initialization that should happen after game loads goes here (ie. initializing non-serializable properites).
        public void Init()
        {
            monsterManager = new MonsterManager(this);
            itemManager = new ItemManager(this);
            nameManager = new NameManager(this);
            featManager = new FeatManager(this);
            effectManager = new EffectManager(this);
            Counter<string> badTags = new Counter<string>();
            monsterManager.ReadMonsters("monsters.xml", badTags);
            itemManager.ReadItems("items.xml", badTags);
            nameManager.ReadPlaceNames("place_names.txt");
            nameManager.ReadCharacterNames("character_names.txt");
            featManager.ReadFeats("feats.xml", badTags);
            effectManager.ReadEffects("effects.xml", badTags);

            foreach (var pair in badTags)
            {
                PrintMessage(LogLevel.DEBUG, string.Format("Found unhandled xml tag <{0}> {1} times.", pair.Key, pair.Value));
            }
        }