Ejemplo n.º 1
0
        public override void DoEffect(BaseCreature creature, Mobile m)
        {
            var def = AuraDefinition.GetDefinition(creature);

            if (def.Damage > 0)
            {
                AOS.Damage(
                    m,
                    creature,
                    def.Damage,
                    def.Physical,
                    def.Fire,
                    def.Cold,
                    def.Poison,
                    def.Energy,
                    def.Chaos,
                    def.Direct,
                    DamageType.SpellAOE);

                m.RevealingAction();
            }

            if (creature is IAuraCreature)
            {
                ((IAuraCreature)creature).AuraEffect(m);
            }
        }
Ejemplo n.º 2
0
            public static void Initialize()
            {
                AuraDefinition defaul;
                AuraDefinition cora;
                AuraDefinition fireAura;
                AuraDefinition coldAura;

                defaul = new AuraDefinition();
                Definitions.Add(defaul);

                cora        = new AuraDefinition(typeof(CoraTheSorceress));
                cora.Range  = 3;
                cora.Damage = 10;
                cora.Fire   = 0;
                Definitions.Add(cora);

                fireAura        = new AuraDefinition(typeof(FlameElemental), typeof(FireDaemon), typeof(LesserFlameElemental));
                fireAura.Range  = 5;
                fireAura.Damage = 7;
                Definitions.Add(fireAura);

                coldAura        = new AuraDefinition(typeof(ColdDrake), typeof(FrostDrake), typeof(FrostDragon), typeof(SnowElemental), typeof(FrostMite), typeof(IceFiend), typeof(IceElemental), typeof(CorporealBrume));
                coldAura.Damage = 15;
                coldAura.Fire   = 0;
                coldAura.Cold   = 100;
                Definitions.Add(coldAura);
            }
Ejemplo n.º 3
0
            public static AuraDefinition GetDefinition(BaseCreature bc)
            {
                AuraDefinition def = null;

                for (var index = 0; index < Definitions.Count; index++)
                {
                    var d = Definitions[index];

                    bool any = false;

                    for (var i = 0; i < d.Uses.Length; i++)
                    {
                        var t = d.Uses[i];

                        if (t == bc.GetType())
                        {
                            any = true;
                            break;
                        }
                    }

                    if (any)
                    {
                        def = d;
                        break;
                    }
                }

                if (def == null)
                {
                    return(Definitions[0]); // Default
                }

                return(def);
            }
Ejemplo n.º 4
0
            public static void Initialize()
            {
                var defaul = new AuraDefinition();

                Definitions.Add(defaul);

                var cora = new AuraDefinition(typeof(CoraTheSorceress))
                {
                    Damage = 10,
                    Fire   = 0
                };

                Definitions.Add(cora);

                var fireAura = new AuraDefinition(typeof(FlameElemental), typeof(FireDaemon), typeof(LesserFlameElemental))
                {
                    Damage = 7
                };

                Definitions.Add(fireAura);

                var coldAura = new AuraDefinition(typeof(ColdDrake), typeof(FrostDrake), typeof(FrostDragon), typeof(SnowElemental), typeof(FrostMite), typeof(IceFiend), typeof(IceElemental), typeof(CorporealBrume))
                {
                    Damage = 15,
                    Fire   = 0,
                    Cold   = 100
                };

                Definitions.Add(coldAura);
            }
Ejemplo n.º 5
0
        public override void DoEffect(BaseCreature creature, Mobile m)
        {
            AuraDefinition def = AuraDefinition.GetDefinition(creature);

            if (def.Damage > 0)
            {
                AOS.Damage(
                    m,
                    creature,
                    def.Damage,
                    def.Physical,
                    def.Fire,
                    def.Cold,
                    def.Poison,
                    def.Energy,
                    def.Chaos,
                    def.Direct,
                    DamageType.SpellAOE);

                creature.DoHarmful(m); // Need to re-look at this.
                m.RevealingAction();
            }

            if (creature is IAuraCreature auraCreature)
            {
                auraCreature.AuraEffect(m);
            }
        }
Ejemplo n.º 6
0
            public static AuraDefinition GetDefinition(BaseCreature bc)
            {
                AuraDefinition def = Definitions.FirstOrDefault(d => d.Uses.Any(t => t == bc.GetType()));

                if (def == null)
                {
                    return(Definitions[0]); // Default
                }

                return(def);
            }
Ejemplo n.º 7
0
 public override TimeSpan GetCooldown(BaseCreature bc)
 {
     return(AuraDefinition.GetDefinition(bc).Cooldown);
 }