fix: Updates mysticism spells and adds bombard (#1124)
This commit is contained in:
parent
54da2c94a5
commit
fbf60b65a5
8 changed files with 153 additions and 75 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Collections;
|
||||
|
||||
namespace Server.Spells.Mysticism
|
||||
{
|
||||
|
|
@ -23,7 +23,9 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
public void Target(IPoint3D p)
|
||||
{
|
||||
if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
|
||||
var loc = (p as Item)?.GetWorldLocation() ?? new Point3D(p);
|
||||
|
||||
if (SpellHelper.CheckTown(loc, Caster) && CheckSequence())
|
||||
{
|
||||
/* Summons a gale of lethal winds that strikes all Targets within a radius around
|
||||
* the Target's Location, dealing chaos damage. In addition to inflicting damage,
|
||||
|
|
@ -35,20 +37,12 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
SpellHelper.Turn(Caster, p);
|
||||
|
||||
if (p is Item item)
|
||||
{
|
||||
p = item.GetWorldLocation();
|
||||
}
|
||||
|
||||
var targets = new List<Mobile>();
|
||||
|
||||
var map = Caster.Map;
|
||||
|
||||
var pvp = false;
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
var loc = new Point3D(p);
|
||||
using var pool = PooledRefQueue<Mobile>.Create();
|
||||
var pvp = false;
|
||||
|
||||
PlayEffect(loc, Caster.Map);
|
||||
|
||||
|
|
@ -66,7 +60,7 @@ namespace Server.Spells.Mysticism
|
|||
continue;
|
||||
}
|
||||
|
||||
targets.Add(m);
|
||||
pool.Enqueue(m);
|
||||
|
||||
if (m.Player)
|
||||
{
|
||||
|
|
@ -74,20 +68,21 @@ namespace Server.Spells.Mysticism
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var damage = GetNewAosDamage(51, 1, 5, pvp);
|
||||
var reduction = (GetBaseSkill(Caster) + GetBoostSkill(Caster)) / 1200.0;
|
||||
var damage = GetNewAosDamage(51, 1, 5, pvp);
|
||||
var reduction = (GetBaseSkill(Caster) + GetDamageSkill(Caster)) / 1200.0;
|
||||
|
||||
foreach (var m in targets)
|
||||
{
|
||||
Caster.DoHarmful(m);
|
||||
SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 0, 100);
|
||||
while (pool.Count > 0)
|
||||
{
|
||||
var m = pool.Dequeue();
|
||||
Caster.DoHarmful(m);
|
||||
SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 0, 100);
|
||||
|
||||
var resistedReduction = reduction - m.Skills.MagicResist.Value / 800.0;
|
||||
var resistedReduction = reduction - m.Skills.MagicResist.Value / 800.0;
|
||||
|
||||
m.Stam -= (int)(m.StamMax * resistedReduction);
|
||||
m.Mana -= (int)(m.ManaMax * resistedReduction);
|
||||
m.Stam -= (int)(m.StamMax * resistedReduction);
|
||||
m.Mana -= (int)(m.ManaMax * resistedReduction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue