xoBonesxo

Member
ServUO Version
Publish 57
Ultima Expansion
Renaissance
So I ran into a issue where my explosion potions won't damage a target unless they're flagged a criminal or a murder. Is there anyway I can fix to deal damage to innocents?
 

Attachments

  • BaseExplosionPotion.cs
    10.7 KB · Views: 3
new ExpansionInfo( 2, "Renaissance", ClientFlags.Felucca, FeatureFlags.ExpansionUOR, CharacterListFlags.ExpansionUOR, HousingFlags.None),

I have it all set to felucca ruleset in my Server/ExpansionInfo.cs
Is there another location I need to review?
 
Is the map where you use it, set to trammel ruleset or felucca in the mapdefeinitions
 
RegisterMap(0, 0, 0, 7168, 4096, 0, "Felucca", MapRules.FeluccaRules);

I was looking through SpellHelper.cs to try and see if maybe there was a code in that script but im not the best at coding :/
 
Maybe it's something to do with this line 130
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);
}
 
Can you actually do anything else to blue players? Like attacking them?

The code from the potions doesnt filter, so it is not the file you are looking for
 
That's the strange part. Blue on Blue can fight each other and cast spells. But a blue cant deal damage to another blue with the explosion potion, a murderer can also damage a blue with potion, but a grey can't damage a blue with potion. ??
 
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

public virtual bool IsHarmfulCriminal(IDamageable target)
{
if (this == target)
{
return false;
}

return (Notoriety.Compute(this, target) == Notoriety.Innocent);
}

to

public virtual bool IsHarmfulCriminal(IDamageable target)
{
if (this == target)
{
return false;
}

return (Notoriety.Compute(this, target) == Notoriety.Criminal);
}
But maybe you know a better way around it
 
Last edited:
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
depends on what your end goal is really. But IMO a blue shouldn't flag grey when attacking a grey.

My idea was taking out the DoHarmful check. That's what stops players from attacking eachother in Trammel ruleset iirc
 
So I took out the HarmfulCheck and fixed all errors in other scripts and still no damage for blue on blue :/
 

Attachments

  • Mobile.cs
    285.2 KB · Views: 4
I would like to have explosion potions to damage innocents , and not just greys/murders.
But if i'm a murderer i can damage blues...
 

Attachments

  • PotTestGrey.mp4
    4.7 MB
  • PotTestInnocent.mp4
    3.8 MB
  • Murder2Blue.mp4
    4.3 MB
Last edited:
The part that makes no sense is that blues can still cast spells on blues no issues. Its the explosion potion that wont damage.
 
It's part of public static bool ValidIndirectTarget(Mobile from, Mobile to), which is what you want with an explosion potion.
Look to Explode in BaseExplosionPotion.cs to see where its called. (Indirect Targets..)
 
5is this the section I'm looking to edit

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();
}
 
here's my spellhelper.cs its a little different than the one posted
 

Attachments

  • SpellHelper.cs
    58.2 KB · Views: 2

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back