public static AddStatCurse ( Mobile caster, Mobile target, StatType type ) : bool | ||
caster | Mobile | |
target | Mobile | |
type | StatType | |
Résultat | bool |
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)this.Circle, Caster, ref m); SpellHelper.AddStatCurse(Caster, m, StatType.Dex, TimeSpan.FromSeconds(0)); if (m.Spell != null) { m.Spell.OnCasterHurt(); } m.Paralyzed = false; Effects.SendTargetParticles(m, 0x3779, 10, 15, 5002, EffectLayer.Head); m.PlaySound(0x1DF); } FinishSequence(); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { SpellHelper.Turn(Caster, m); int malus = (int)(malusMax * GetSpellScaling(Caster, Info.skillForCasting)); TimeSpan duration = TimeSpan.FromSeconds(durationMax * GetSpellScaling(Caster, Info.skillForCasting)); SpellHelper.AddStatCurse(Caster, m, StatType.All, malus, duration); SpellHelper.DisableSkillCheck = true; if (m.Spell != null) { m.Spell.OnCasterHurt(); } m.Paralyzed = false; Effects.SendTargetParticles(m, 0x374A, 10, 15, 5028, EffectLayer.Waist); m.PlaySound(0x1EA); } FinishSequence(); }
public static void ToogleCurse(Spell spell, Mobile Caster, Mobile m) { SpellHelper.Turn(Caster, m); SpellHelper.CheckReflect((int)spell.Circle, Caster, ref m); SpellHelper.AddStatCurse(Caster, m, StatType.Str, TimeSpan.FromSeconds(0)); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatCurse(Caster, m, StatType.Dex, TimeSpan.FromSeconds(0)); SpellHelper.AddStatCurse(Caster, m, StatType.Int, TimeSpan.FromSeconds(0)); SpellHelper.DisableSkillCheck = false; TimeSpan duration = TimeSpan.FromSeconds(0); new MaledictionSpell.InternalTimer(m, duration).Start(); if (m.Spell != null) { m.Spell.OnCasterHurt(); } m.Paralyzed = false; Effects.SendTargetParticles(m, 0x374A, 10, 15, 5028, EffectLayer.Waist); m.PlaySound(0x1EA); }
public void Target(IPoint3D p) { Party party = Engines.PartySystem.Party.Get(Caster); bool inParty = false; if (!Caster.CanSee(p)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckSequence()) { SpellHelper.Turn(Caster, p); SpellHelper.GetSurfaceTop(ref p); ArrayList targets = new ArrayList(); Map map = Caster.Map; if (map != null) { IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 4); foreach (Mobile m in eable) { if (SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanSee(m) && Caster.CanBeHarmful(m, false)) { if (party != null && party.Count > 0) { for (int k = 0; k < party.Members.Count; ++k) { PartyMemberInfo pmi = (PartyMemberInfo)party.Members[k]; Mobile member = pmi.Mobile; if (member.Serial == m.Serial) { inParty = true; } } if (!inParty) { targets.Add(m); } } else { targets.Add(m); } } inParty = false; } eable.Free(); } for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; Caster.DoHarmful(m); SpellHelper.AddStatCurse(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatCurse(Caster, m, StatType.Dex); SpellHelper.AddStatCurse(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false; if (m.Spell != null) { m.Spell.OnCasterHurt(); } m.Paralyzed = false; Effects.SendTargetParticles(m, 0x374A, 10, 15, 5028, EffectLayer.Waist); m.PlaySound(0x1FB); } } FinishSequence(); }