Esempio n. 1
0
        protected override void OnTarget(Mobile target)
        {
            if (CheckHSequence(target))
            {
                int music, peace, provo, disco;
                GetSkillBonus(out music, out peace, out provo, out disco);

                int resist = (int)Math.Max(0, (Target.Skills.MagicResist.Value - 80) / 10);

                int propMalus = 5 + (5 * disco) + (2 * (provo + peace));
                propMalus -= (2 * resist);

                int damageFactor = 8 + (8 * disco) + (3 * (provo + peace));
                damageFactor -= (4 * resist);

                if (propMalus <= 0 || damageFactor <= 0)
                {
                    Caster.SendLocalizedMessage(1115932);                       // Your target resists the effects of your spellsong.
                    target.SendLocalizedMessage(1115933);                       // You resist the effects of the spellsong.
                }
                else
                {
                    m_Mods = new AttributeMod[]
                    {
                        new AttributeMod(AosAttribute.AttackChance, -propMalus),
                        new AttributeMod(AosAttribute.SpellDamage, -propMalus)
                    };

                    if (CheckInstrumentSlays(target))
                    {
                        damageFactor = (int)(damageFactor * 1.5);
                    }

                    m_DamageFactor = damageFactor;

                    int damageChance = 15 + (15 * music) + (4 * (provo + peace));
                    m_DamageChance = damageChance;

                    // Tribulation / Target: ~1_val~ <br> Damage Factor: ~2_val~% <br> Damage Chance: ~3_val~%
                    Caster.AddBuff(new BuffInfo(BuffIcon.TribulationCaster, 1151387, 1151388,
                                                String.Format("{0}\t{1}\t{2}", target.Name, damageFactor, damageChance)));

                    // Tribulation / ~1_HCI~% Hit Chance.<br>~2_SDI~% Spell Damage.<br>Damage taken has a ~3_EXP~% chance to cause additional burst of physical damage.<br>
                    target.AddBuff(new BuffInfo(BuffIcon.TribulationTarget, 1115740, 1115742,
                                                String.Format("-{0}\t-{1}\t{2}", propMalus, propMalus, damageChance)));

                    StartSong();
                }
            }

            FinishSequence();
        }
Esempio n. 2
0
        protected override void OnTarget(Mobile target)
        {
            if (CheckHSequence(target))
            {
                int music, peace, provo, disco;
                GetSkillBonus(out music, out peace, out provo, out disco);

                int resist = (int)Math.Max(0, (Target.Skills.MagicResist.Value - 80) / 10);

                int strMalus = 4 + (2 * (disco + music) + provo + peace);
                strMalus -= (3 * resist);

                if (strMalus <= 0)
                {
                    Caster.SendLocalizedMessage(1115932);                       // Your target resists the effects of your spellsong.
                    target.SendLocalizedMessage(1115933);                       // You resist the effects of the spellsong.
                }
                else
                {
                    m_StatMods = new StatMod[]
                    {
                        new StatMod(StatType.Str, "Despair Str", -strMalus)
                    };

                    m_Damage = 9 + (5 * disco) + (4 * music) + (2 * (provo + peace)) - resist;

                    if (!target.Player)
                    {
                        if (CheckInstrumentSlays(target))
                        {
                            m_Damage = (int)(m_Damage * 3);
                        }
                        else
                        {
                            m_Damage = (int)(m_Damage * 1.5);
                        }
                    }

                    // Despair / Target: ~1_val~ <br>Damage: ~2_val~
                    Caster.AddBuff(new BuffInfo(BuffIcon.DespairCaster, 1151389, 1151390,
                                                String.Format("{0}\t{1}", target.Name, m_Damage)));

                    // Despair / ~1_STR~ Strength.<br>~2_DAM~ physical damage every 2 seconds while spellsong remains in effect.<br>
                    target.AddBuff(new BuffInfo(BuffIcon.DespairTarget, 1115741, 1115743,
                                                String.Format("-{0}\t{1}", strMalus, m_Damage)));

                    StartSong();
                }
            }

            FinishSequence();
        }
Esempio n. 3
0
        public override void Execute()
        {
            if (!m_initialized)
            {
                Initialize();
            }

            var buffId = Caster.PopNextBuffId();
            var effect = Spell.CurrentSpellLevel.Effects[0];

            var buff = new TriggerBuff(buffId, Caster, Caster, Handlers[0], Spell, Spell, false, FightDispellableEnum.DISPELLABLE_BY_DEATH, 0, SpellBuffTrigger)
            {
                Duration = (short)effect.Duration
            };

            buff.SetTrigger(BuffTriggerType.AfterDamaged);
            Caster.AddBuff(buff);
        }
Esempio n. 4
0
        protected override bool InternalApply()
        {
            foreach (var actor in GetAffectedActors())
            {
                if (!(actor is SummonedMonster))
                {
                    continue;
                }

                var id          = Caster.PopNextBuffId();
                var controlBuff = new TakeControlBuff(id, Caster, Caster, this, Spell, FightDispellableEnum.DISPELLABLE_BY_DEATH, actor as SummonedMonster)
                {
                    Duration = (short)Dice.Duration
                };

                Caster.AddBuff(controlBuff);
            }

            return(true);
        }
Esempio n. 5
0
 public override void OnApply()
 {
     Caster.AddBuff(Buff);
 }