Пример #1
0
        protected override bool InternalApply()
        {
            var bombSpell       = SpellManager.Instance.GetSpellBombTemplate(Dice.DiceNum);
            var monsterTemplate = MonsterManager.Instance.GetMonsterGrade(Dice.DiceNum, Dice.DiceFace);

            var targets = GetAffectedActors();

            if (targets.Any())
            {
                var spell = new Spell(bombSpell.InstantReactionSpell, Spell.CurrentLevel);
                var cast  = SpellManager.Instance.GetSpellCastHandler(Caster, spell, TargetedCell, Critical);

                cast.Initialize();
                cast.Execute();
            }
            else
            {
                if (!Caster.CanSummonBomb())
                {
                    return(false);
                }

                var bomb = new SummonedBomb(Fight.GetNextContextualId(), Caster.Team, bombSpell, monsterTemplate, Caster,
                                            TargetedCell)
                {
                    SummoningEffect = this
                };

                ActionsHandler.SendGameActionFightSummonMessage(Fight.Clients, bomb);

                Caster.AddBomb(bomb);
                Caster.Team.AddFighter(bomb);

                Fight.TriggerMarks(bomb.Cell, bomb, TriggerType.MOVE);
            }

            return(false);
        }
Пример #2
0
 public static void SendGameActionFightSummonMessage(IPacketReceiver client, SummonedBomb summon)
 {
     client.Send(new GameActionFightSummonMessage((short)ActionsEnum.ACTION_SUMMON_BOMB, summon.Summoner.Id, new[] { summon.GetGameFightFighterInformations() }));
 }
Пример #3
0
 public WallsBinding(SummonedBomb bomb1, SummonedBomb bomb2, Color color)
 {
     m_color = color;
     Bomb1 = bomb1;
     Bomb2 = bomb2;
 }