xoBonesxo
Member
public void Explode(Mobile from, bool direct, Point3D loc, Map map)
{
if (Deleted)
{
return;
}
bool damageThrower = false;
if (from != null)
{
if (from.Target is ThrowTarget && ((ThrowTarget)from.Target).Potion == this)
{
Target.Cancel(from);
}
if (IsChildOf(from.Backpack) || Parent == from)
{
damageThrower = true;
}
}
Consume();
if (map == null)
{
return;
}
Effects.PlaySound(loc, map, 0x307);
Effects.SendLocationEffect(loc, map, 0x36B0, 9, 10, 0, 0);
int alchemyBonus = 0;
if (direct)
{
alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
}
int min = Scale(from, MinDamage);
int max = Scale(from, MaxDamage);
var list = SpellHelper.AcquireIndirectTargets(from, loc, map, ExplosionRange, false).OfType<Mobile>().ToList();
if (from != null && damageThrower && !list.Contains(from))
{
list.Add(from);
}
foreach (var m in list)
{
if (from != null)
{
from.DoHarmful(m);
}
public virtual bool IsHarmfulCriminal(IDamageable target)
{
if (this == target)
{
return false;
}
return (Notoriety.Compute(this, target) == Notoriety.Innocent);
}
But maybe you know a better way around itpublic virtual bool IsHarmfulCriminal(IDamageable target)
{
if (this == target)
{
return false;
}
return (Notoriety.Compute(this, target) == Notoriety.Criminal);
}
depends on what your end goal is really. But IMO a blue shouldn't flag grey when attacking a grey.Okay, so I've made some progress with what you sent me zero, now when a blue attacks a blue he flags grey (like its supposed to be) and now when the defender attacks back he flags grey to the attacker. Will do more testing with this change. Thank you
to
But maybe you know a better way around it
public void Explode(Mobile from, bool direct, Point3D loc, Map map)
{
if (Deleted)
{
return;
}
bool damageThrower = false;
if (from != null)
{
if (from.Target is ThrowTarget && ((ThrowTarget)from.Target).Potion == this)
{
Target.Cancel(from);
}
if (IsChildOf(from.Backpack) || Parent == from)
{
damageThrower = true;
}
}
Consume();
if (map == null)
{
return;
}
Effects.PlaySound(loc, map, 0x307);
Effects.SendLocationEffect(loc, map, 0x36B0, 9, 10, 0, 0);
int alchemyBonus = 0;
if (direct)
{
alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
}
int min = Scale(from, MinDamage);
int max = Scale(from, MaxDamage);
var list = SpellHelper.AcquireIndirectTargets(from, loc, map, ExplosionRange, false).OfType<Mobile>().ToList();
if (from != null && damageThrower && !list.Contains(from))
{
list.Add(from);
}
foreach (var m in list)
{
if (from != null)
{
from.DoHarmful(m);
}
int damage = Utility.RandomMinMax(min, max);
damage += alchemyBonus;
if (!Core.AOS && damage > 40)
{
damage = 40;
}
else if (Core.AOS && list.Count > 2)
{
damage /= list.Count - 1;
}
AOS.Damage(m, from, damage, 0, 100, 0, 0, 0, Server.DamageType.SpellAOE);
}
list.Clear();
}
Hope your well mateThanks for supporting my you-tube channel and liking and commenting on videos too.
We use essential cookies to make this site work, and optional cookies to enhance your experience.