Exemplo n.º 1
0
 // Initialise from monster event
 public Monster(EventManager.MonsterEvent monsterEvent)
 {
     monsterData = monsterEvent.cMonster;
     unique      = monsterEvent.qMonster.unique;
     uniqueTitle = monsterEvent.GetUniqueTitle();
     uniqueText  = monsterEvent.qMonster.uniqueText;
 }
Exemplo n.º 2
0
        // Initialise from monster event
        // When an event adds a monster group this is called
        public Monster(EventManager.MonsterEvent monsterEvent)
        {
            monsterData = monsterEvent.cMonster;
            unique      = monsterEvent.qMonster.unique;
            uniqueTitle = monsterEvent.GetUniqueTitle();
            uniqueText  = monsterEvent.qMonster.uniqueText;

            Game          game = Game.Get();
            HashSet <int> dupe = new HashSet <int>();

            foreach (Monster m in game.quest.monsters)
            {
                if (m.monsterData == monsterData || m.duplicate != 0)
                {
                    dupe.Add(m.duplicate);
                }
            }

            while (dupe.Contains(duplicate))
            {
                duplicate++;
            }
        }
Exemplo n.º 3
0
        // Initialise from monster event
        // When an event adds a monster group this is called
        public Monster(EventManager.MonsterEvent monsterEvent)
        {
            monsterData = monsterEvent.cMonster;
            unique      = monsterEvent.qMonster.unique;
            uniqueTitle = monsterEvent.GetUniqueTitle();
            uniqueText  = monsterEvent.qMonster.uniqueText;
            healthMod   = Mathf.RoundToInt(monsterEvent.qMonster.uniqueHealthBase + (Game.Get().quest.GetHeroCount() * monsterEvent.qMonster.uniqueHealthHero));

            Game          game = Game.Get();
            HashSet <int> dupe = new HashSet <int>();

            foreach (Monster m in game.quest.monsters)
            {
                if (m.monsterData == monsterData || m.duplicate != 0)
                {
                    dupe.Add(m.duplicate);
                }
            }

            while (dupe.Contains(duplicate))
            {
                duplicate++;
            }
        }