public static void DDSlow(Mobile from, Mobile target) { if (target == null) { return; } else if (BlueSpell.SavingThrow(target, DDSave.Fort, 30)) { target.SendMessage("You makes a successful save against a spell"); return; } target.SendMessage("You failed your save verses Slow!"); Slow.SlowWalk(target, 60); }
public override bool OnMoveOver(Mobile m) { if (m != null) { if (m is BlueKaysa || m is BlueTreeGuardian || m.AccessLevel != AccessLevel.Player) { return(true); } Slow.SlowWalk(m, 15); m.SendMessage("The thorns pierce your shoes and injure your feet."); m.Damage(Utility.RandomMinMax(1, 4)); } return(true); }
public override void SpellEffect(Mobile target) { if (target == Caster) { return; } target.SendMessage("You breath in a noxious gas"); // Done primarly to draw aggro. SpellHelper.Damage(this, target, GetDamage(Caster, target, DamageSkill, 0.5), 0, 0, 100, 0, 0); if (target == null) { return; } int dc = 10 + (int)ScaleBySkill(Caster, DamageSkill); int debuff = (int)(ScaleBySkill(Caster, DamageSkill) / 2); debuff = -debuff; bool totalfail = true; StringBuilder sb = new StringBuilder(); sb.Append("You see "); sb.Append(target.Name); sb.Append(" suffer penalties to:"); if (FullPower()) { dc += 120; } if (!SavingThrow(target, DDSave.Will, dc)) { Slow.SlowWalk(target, dc * 2); target.SendMessage("You have been slowed"); sb.Append(" Speed"); totalfail = false; } if (!SavingThrow(target, DDSave.Fort, dc)) { target.AddSkillMod(new TimedSkillMod(SkillName.Tactics, true, debuff, TimeSpan.FromSeconds(dc * 2))); target.AddStatMod(new StatMod(StatType.Str, "Bad Breath Str", debuff, TimeSpan.FromSeconds(dc * 2))); target.AddStatMod(new StatMod(StatType.Dex, "Bad Breath Dex", debuff, TimeSpan.FromSeconds(dc * 2))); target.AddStatMod(new StatMod(StatType.Int, "Bad Breath Int", debuff, TimeSpan.FromSeconds(dc * 2))); sb.Append(" Tactics"); totalfail = false; if (dc > 120) { target.AddSkillMod(new TimedSkillMod(SkillName.MagicResist, true, debuff, TimeSpan.FromSeconds(dc * 2))); } } if (!SavingThrow(target, DDSave.Refl, dc)) { ResistanceMod[] mods = { new ResistanceMod(ResistanceType.Physical, debuff), new ResistanceMod(ResistanceType.Fire, debuff), new ResistanceMod(ResistanceType.Cold, debuff), new ResistanceMod(ResistanceType.Poison, debuff), new ResistanceMod(ResistanceType.Energy, debuff) }; for (int i = 0; i < mods.Length; ++i) { target.AddResistanceMod(mods[i]); } TimedResistanceMod.AddMod(target, "Bad Breath", mods, TimeSpan.FromSeconds(Caster.Skills[DamageSkill].Value)); sb.Append(" Resistance"); totalfail = false; } if (dc > 120) { target.ApplyPoison(Caster, Poison.Greater); } if (totalfail) { Caster.SendMessage(target.Name + " saved against your spell."); } else { Caster.SendMessage(sb.ToString()); } }