Ejemplo n.º 1
0
        private Spell GetInstantSpell(SpellBombTemplate spellTemplate)
        {
            var instantSpell = Singleton <SpellManager> .Instance.GetSpellTemplate(spellTemplate.InstantSpellId);

            if (instantSpell != null)
            {
                return(new Spell(instantSpell, (byte)base.Dice.DiceFace));
            }

            return(null);
        }
Ejemplo n.º 2
0
        public SummonedBomb(int id, FightTeam team, SpellBombTemplate spellBombTemplate, MonsterGrade monsterBombTemplate, FightActor summoner, Cell cell)
            : base(team)
        {
            Id                  = id;
            Position            = summoner.Position.Clone();
            Look                = monsterBombTemplate.Template.EntityLook.Clone();
            Cell                = cell;
            MonsterBombTemplate = monsterBombTemplate;
            Summoner            = summoner;
            SpellBombTemplate   = spellBombTemplate;
            m_stats             = new StatsFields(this);
            m_stats.Initialize(monsterBombTemplate);
            WallSpell = new Spell((int)wallsSpells[SpellBombTemplate.WallId], (byte)MonsterBombTemplate.GradeId);
            m_color   = wallsColors[SpellBombTemplate.WallId];
            AdjustStats();

            ExplodSpell = new Spell(spellBombTemplate.ExplodReactionSpell, (byte)MonsterBombTemplate.GradeId);

            Fight.TurnStarted += OnTurnStarted;
            Team.FighterAdded += OnFighterAdded;

            m_initialized = true;
        }