protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = MagicEffectFlags.ToString();

            ele.TryPathTo("BaseCost", true, out subEle);
            subEle.Value = BaseCost.ToString("G15");

            ele.TryPathTo("AssociatedItem", true, out subEle);
            AssociatedItem.WriteXML(subEle, master);

            ele.TryPathTo("MagicSchool", true, out subEle);
            subEle.Value = MagicSchool.ToString();

            ele.TryPathTo("ResistanceType", true, out subEle);
            subEle.Value = ResistanceType.ToString();

            ele.TryPathTo("Unknown", true, out subEle);
            subEle.Value = Unknown.ToString();

            WriteUnusedXML(ele, master);

            ele.TryPathTo("Light", true, out subEle);
            Light.WriteXML(subEle, master);

            ele.TryPathTo("ProjectileSpeed", true, out subEle);
            subEle.Value = ProjectileSpeed.ToString("G15");

            ele.TryPathTo("EffectShader", true, out subEle);
            EffectShader.WriteXML(subEle, master);

            ele.TryPathTo("ObjectDisplayShader", true, out subEle);
            ObjectDisplayShader.WriteXML(subEle, master);

            ele.TryPathTo("EffectSound", true, out subEle);
            EffectSound.WriteXML(subEle, master);

            ele.TryPathTo("BoltSound", true, out subEle);
            BoltSound.WriteXML(subEle, master);

            ele.TryPathTo("HitSound", true, out subEle);
            HitSound.WriteXML(subEle, master);

            ele.TryPathTo("AreaSound", true, out subEle);
            AreaSound.WriteXML(subEle, master);

            ele.TryPathTo("ConstantEffectEnchantmentFactor", true, out subEle);
            subEle.Value = ConstantEffectEnchantmentFactor.ToString("G15");

            ele.TryPathTo("ConstantEffectBarterFactor", true, out subEle);
            subEle.Value = ConstantEffectBarterFactor.ToString("G15");

            ele.TryPathTo("Archetype", true, out subEle);
            subEle.Value = Archetype.ToString();

            ele.TryPathTo("ActorValue", true, out subEle);
            subEle.Value = ActorValue.ToString();
        }
Beispiel #2
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                Caster.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
                Caster.PlaySound(0x101);

                Caster.PrivateOverheadMessage(MessageType.Regular, 1150, 1156017, Caster.NetState);  // *Your throw is enhanced by the Elemental Fury!*

                double skill = BaseSkillBonus;

                TimeSpan duration = TimeSpan.FromSeconds(skill);
                _MaxAdd = (int)(skill / 10) + Utility.RandomMinMax(-1, 0);

                Expires = DateTime.UtcNow + duration;
                BeginTimer();

                _Type = GetResistanceType(GetWeapon());

                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.ElementalFury, 1156018, 1156019, duration, Caster, String.Format("{0}\t69\t{1}", _Type.ToString(), _MaxAdd.ToString())));
                //Each attack the caster deals with ~1_TYPE~ damage will add up to ~3_VAL~ damage to the Fury Pool. Once the Fury Pool
                //reaches ~2_VAL~ the throwing weapon will unleash the Elemental Fury.
            }

            FinishSequence();
        }
Beispiel #3
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            BaseWeapon weapon = attacker.Weapon as BaseWeapon;

            if (weapon != null && !HasOnslaught(attacker, defender))
            {
                ClearCurrentMove(attacker);

                int phys, fire, cold, pois, nrgy, chaos, direct;
                weapon.GetDamageTypes(null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct);

                int highest = phys;
                int type    = 0;

                if (fire > phys)
                {
                    type    = 1;
                    highest = fire;
                }

                if (cold > highest)
                {
                    type    = 2;
                    highest = cold;
                }

                if (pois > highest)
                {
                    type    = 3;
                    highest = pois;
                }

                if (nrgy > highest)
                {
                    type    = 4;
                    highest = nrgy;
                }

                ResistanceType resistType = (ResistanceType)type;

                int amount   = (int)(attacker.Skills[MoveSkill].Value + attacker.Skills[SkillName.Tactics].Value / 12);
                int duration = (MasteryInfo.GetMasteryLevel(attacker, MoveSkill) * 2) + 1;

                if (defender is PlayerMobile)
                {
                    amount /= 2;
                }

                ResistanceMod mod = new ResistanceMod(resistType, -amount);
                defender.AddResistanceMod(mod);

                attacker.PrivateOverheadMessage(MessageType.Regular, 1150, 1156008, attacker.NetState);                                                                                                        // You deliver an onslaught of sword strikes!
                BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.Onslaught, 1156009, 1156010, TimeSpan.FromSeconds(duration), defender, String.Format("{0}\t{1}", amount.ToString(), resistType.ToString()))); // -~2_VAL~% ~1_RESIST~ Debuff.

                defender.FixedEffect(0x37B9, 10, 5, 632, 0);

                if (_Table == null)
                {
                    _Table = new Dictionary <Mobile, Mobile>();
                }

                _Table[attacker] = defender;

                Timer.DelayCall(TimeSpan.FromSeconds(duration), () =>
                {
                    defender.RemoveResistanceMod(mod);
                    _Table.Remove(attacker);
                });
            }
        }
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("AnimationType", true, out subEle);
            subEle.Value = AnimationType.ToString();

            ele.TryPathTo("AnimationMultiplier", true, out subEle);
            subEle.Value = AnimationMultiplier.ToString("G15");

            ele.TryPathTo("Reach", true, out subEle);
            subEle.Value = Reach.ToString("G15");

            ele.TryPathTo("Flags1", true, out subEle);
            subEle.Value = Flags1.ToString();

            ele.TryPathTo("GripAnimation", true, out subEle);
            subEle.Value = GripAnimation.ToString();

            ele.TryPathTo("AmmoUse", true, out subEle);
            subEle.Value = AmmoUse.ToString();

            ele.TryPathTo("ReloadAnimation", true, out subEle);
            subEle.Value = ReloadAnimation.ToString();

            ele.TryPathTo("MinSpread", true, out subEle);
            subEle.Value = MinSpread.ToString("G15");

            ele.TryPathTo("Spread", true, out subEle);
            subEle.Value = Spread.ToString("G15");

            ele.TryPathTo("Unknown", true, out subEle);
            subEle.Value = Unknown.ToHex();

            ele.TryPathTo("SightFOV", true, out subEle);
            subEle.Value = SightFOV.ToString("G15");

            ele.TryPathTo("Unknown2", true, out subEle);
            subEle.Value = Unknown2.ToString("G15");

            ele.TryPathTo("Projectile", true, out subEle);
            Projectile.WriteXML(subEle, master);

            ele.TryPathTo("BaseVATSToHitChance", true, out subEle);
            subEle.Value = BaseVATSToHitChance.ToString();

            ele.TryPathTo("AttackAnimation", true, out subEle);
            subEle.Value = AttackAnimation.ToString();

            ele.TryPathTo("ProjectileCount", true, out subEle);
            subEle.Value = ProjectileCount.ToString();

            ele.TryPathTo("EmbeddedWeaponActorValue", true, out subEle);
            subEle.Value = EmbeddedWeaponActorValue.ToString();

            ele.TryPathTo("Range/Min", true, out subEle);
            subEle.Value = MinRange.ToString("G15");

            ele.TryPathTo("Range/Max", true, out subEle);
            subEle.Value = MaxRange.ToString("G15");

            ele.TryPathTo("LimbKillBehavior", true, out subEle);
            subEle.Value = LimbKillBehavior.ToString();

            ele.TryPathTo("Flags2", true, out subEle);
            subEle.Value = Flags2.ToString();

            ele.TryPathTo("AttackAnimationMultiplier", true, out subEle);
            subEle.Value = AttackAnimationMultiplier.ToString("G15");

            ele.TryPathTo("FireRate", true, out subEle);
            subEle.Value = FireRate.ToString("G15");

            ele.TryPathTo("ActionPointCost", true, out subEle);
            subEle.Value = ActionPointCost.ToString("G15");

            ele.TryPathTo("Rumble/LeftMotorStrength", true, out subEle);
            subEle.Value = RumbleLeftMotorStrength.ToString("G15");

            ele.TryPathTo("Rumble/RightMotorStrength", true, out subEle);
            subEle.Value = RumbleRightMotorStrength.ToString("G15");

            ele.TryPathTo("Rumble/Duration", true, out subEle);
            subEle.Value = RumbleDuration.ToString("G15");

            ele.TryPathTo("DamageToWeaponMult", true, out subEle);
            subEle.Value = DamageToWeaponMult.ToString("G15");

            ele.TryPathTo("AttackShotsPerSecond", true, out subEle);
            subEle.Value = AttackShotsPerSecond.ToString("G15");

            ele.TryPathTo("ReloadTime", true, out subEle);
            subEle.Value = ReloadTime.ToString("G15");

            ele.TryPathTo("JamTime", true, out subEle);
            subEle.Value = JamTime.ToString("G15");

            ele.TryPathTo("AimArc", true, out subEle);
            subEle.Value = AimArc.ToString("G15");

            ele.TryPathTo("Skill", true, out subEle);
            subEle.Value = Skill.ToString();

            ele.TryPathTo("Rumble/Pattern", true, out subEle);
            subEle.Value = RumblePattern.ToString();

            ele.TryPathTo("Rumble/Wavelength", true, out subEle);
            subEle.Value = RumbleWavelength.ToString("G15");

            ele.TryPathTo("LimbDamageMult", true, out subEle);
            subEle.Value = LimbDamageMult.ToString("G15");

            ele.TryPathTo("ResistanceType", true, out subEle);
            subEle.Value = ResistanceType.ToString();

            ele.TryPathTo("SightUsage", true, out subEle);
            subEle.Value = SightUsage.ToString("G15");

            ele.TryPathTo("SemiAutomaticFireDelay/Min", true, out subEle);
            subEle.Value = SemiAutomaticFireDelayMin.ToString("G15");

            ele.TryPathTo("SemiAutomaticFireDelay/Max", true, out subEle);
            subEle.Value = SemiAutomaticFireDelayMax.ToString("G15");

            ele.TryPathTo("Unknown3", true, out subEle);
            subEle.Value = Unknown3.ToString("G15");

            ele.TryPathTo("Mods/Mod1/Effect", true, out subEle);
            subEle.Value = Mod1Effect.ToString();

            ele.TryPathTo("Mods/Mod2/Effect", true, out subEle);
            subEle.Value = Mod2Effect.ToString();

            ele.TryPathTo("Mods/Mod3/Effect", true, out subEle);
            subEle.Value = Mod3Effect.ToString();

            ele.TryPathTo("Mods/Mod1/ValueA", true, out subEle);
            subEle.Value = Mod1ValueA.ToString("G15");

            ele.TryPathTo("Mods/Mod2/ValueA", true, out subEle);
            subEle.Value = Mod2ValueA.ToString("G15");

            ele.TryPathTo("Mods/Mod3/ValueA", true, out subEle);
            subEle.Value = Mod3ValueA.ToString("G15");

            ele.TryPathTo("PowerAttackAnimation", true, out subEle);
            subEle.Value = PowerAttackAnimation.ToString();

            ele.TryPathTo("StrengthRequirement", true, out subEle);
            subEle.Value = StrengthRequirement.ToString();

            ele.TryPathTo("Unknown4", true, out subEle);
            subEle.Value = Unknown4.ToString();

            ele.TryPathTo("Mods/Mod1/ReloadAnimation", true, out subEle);
            subEle.Value = Mod1ReloadAnimation.ToString();

            ele.TryPathTo("Unknown5", true, out subEle);
            subEle.Value = Unknown5.ToHex();

            ele.TryPathTo("AmmoRegenRate", true, out subEle);
            subEle.Value = AmmoRegenRate.ToString("G15");

            ele.TryPathTo("KillImpulse", true, out subEle);
            subEle.Value = KillImpulse.ToString("G15");

            ele.TryPathTo("Mods/Mod1/ValueB", true, out subEle);
            subEle.Value = Mod1ValueB.ToString("G15");

            ele.TryPathTo("Mods/Mod2/ValueB", true, out subEle);
            subEle.Value = Mod2ValueB.ToString("G15");

            ele.TryPathTo("Mods/Mod3/ValueB", true, out subEle);
            subEle.Value = Mod3ValueB.ToString("G15");

            ele.TryPathTo("ImpulseDistance", true, out subEle);
            subEle.Value = ImpulseDistance.ToString("G15");

            ele.TryPathTo("SkillRequirement", true, out subEle);
            subEle.Value = SkillRequirement.ToString();
        }