sahisahi
Member
Puffffff struggling right here.
Im trying to boost greater heals if caster is carrying an staff and target bodyvalue is bear (under polymorph spell):
You can see all the uncomment methods ive tried lol
Caster heals for 38, not for 60, idk whats wrong
Thanks!
Im trying to boost greater heals if caster is carrying an staff and target bodyvalue is bear (under polymorph spell):
Code:
using System;
using Server.Misc;
using Server.Items;
using System.Collections.Generic;
using Server.Mobiles;
using Server.Network;
using Server.Custom.Polymorph;
using Server.Regions;
using Server.Targeting;
namespace Server.Spells.Fourth
{
public class GreaterHealSpell : MagerySpell
{
public override SpellCircle Circle { get { return SpellCircle.Fourth; } }
public override int Sound { get { return 0x202; } }
private static readonly SpellInfo m_Info = new SpellInfo(
"Greater Heal", "In Vas Mani",
263,
9061,
Reagent.Garlic,
Reagent.Ginseng,
Reagent.MandrakeRoot,
Reagent.SpidersSilk
);
public GreaterHealSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
//private readonly PolymorphEntry m_PolymorphEntry;
public override TimeSpan GetCastDelay()
{
return TimeSpan.FromSeconds(2.80);
}
public override void OnPlayerCast()
{
if (SphereSpellTarget is Mobile)
Target((Mobile)SphereSpellTarget);
else if (SphereSpellTarget is BaseWand)
{
BaseWand bw = SphereSpellTarget as BaseWand;
bw.RechargeWand(Caster, this);
}
else
{
DoFizzle();
}
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
{
Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
}
else if ( m is Golem )
{
Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
}
/*else if ( m.Poisoned || Server.Items.MortalStrike.IsWounded( m ) )
{
Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
}*/
else if (CheckBSequence(m))
{
int healamount = 0;
if (m.Poisoned)
{
healamount = 0;
Caster.LocalOverheadMessage(MessageType.Regular, 0x22, true, "El veneno neutraliza la curacion!");
}
//Item bastond = Caster.FindItemOnLayer(Layer.TwoHanded);
//if (m.BodyValue != 0xD5)
// {
/*Item bastond = Caster.FindItemOnLayer(Layer.TwoHanded);
if (Caster.Player && bastond != null && bastond is bastondruida )
{
if (m.BodyValue != 213)
healamount = 60;
Caster.SendAsciiMessage (45,"Conjuras una poderosa Curacion!.");
}*/
if (Caster.Skills.Magery.Value ==105)
{
healamount = 42;
}
if (Caster.Skills.Magery.Value ==110)
{
healamount = 48;
}
Item bastond = Caster.FindItemOnLayer(Layer.TwoHanded);
if (Caster.Player && bastond != null && bastond is bastondruida )
{
// if (m.BodyValue == 213)
//if ( m_PolymorphEntry.BodyID == 0xD5 )
if (m.BodyValue != 213)
{
healamount = 60;
Caster.SendAsciiMessage (45,"Conjuras una poderosa Curacion!.");
}
}
else;
healamount = 38;
if (Scroll != null)
{
healamount -= 10;
}
m.Heal(healamount);
m.FixedParticles(0x376A, 10, 15, 5030, EffectLayer.Waist);
m.PlaySound(Sound);
}
FinishSequence();
}
public class InternalTarget : Target
{
private readonly GreaterHealSpell m_Owner;
public InternalTarget( GreaterHealSpell owner ) : base( 12, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}
protected override void OnTarget( Mobile from, object o )
{
if ( o is Mobile )
{
m_Owner.Target( (Mobile)o );
}
}
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}
You can see all the uncomment methods ive tried lol
Caster heals for 38, not for 60, idk whats wrong
Thanks!