1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mod for BaseDesItem / DamagableItem Ver. 1

Hits displayed are now correct, do not regen, and no longer bleed

  1. zerodowned
    You can manually modify the base script with the instructions below or use the download and just replace your existing script.
    ** No matter which option you choose you'll need to make the change to BaseCreature and BaseWeapon manually

    Ran into some other problems but I have it working now.

    To share my work, if you want modify your (implying who ever happens to be reading this) existing script
    After the Constructable for IDamageableItem, add

    Code (C#):
    3. public override bool CanRegenHits { get { return false; } } // prevents mobile from regenerating hits
    5. public override void OnHitsChange( int oldvalue )
    6. {
    7. if ( m_Parent.Hits != Hits )
    8. { m_Parent.Hits = Hits; }
    10. InvalidateProperties();
    11. }
    Now, if you also want to prevent the child mobile from bleeding when you hit the DamagableItem you'll need to go into BaseCreature

    below public virtual bool BleedImmune { get { return false; } }
    I added public virtual bool DoesNotBleed { get { return false;} }

    Then in BaseWeapon find
    public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)

    and change the top part to this
    *edit: noticed an error that wasn't happening in Orb and I posted this before testing the same code for Serv. You need to add the extra if (defender is BaseCreature) as shown below.

    Code (C#):
    2. public virtual void AddBlood(Mobile attacker, Mobile defender, int damage)
    3.      {
    5.      if (defender is BaseCreature)
    6.      {
    7.            if( ((BaseCreature)defender).DoesNotBleed )
    8.            {
    9.              return;
    10.            }
    11.      }
    13.   else if (damage > 0)
    14.        {

    Then back to BaseDesItem and add
    public override bool DoesNotBleed{ get{ return true;}}
    after private DamageableItem m_Parent;


    fyi - for family shards that want to disable bleeding you'll need to change the part in BaseCreature

    public virtual bool DoesNotBleed { get { return false;} }
    to true instead of false and still add the part in BaseWeapon

Recent Reviews

  1. Kilra Yan
    Kilra Yan
    Version: Ver. 1
    very useful, especially the bleed part! Thank you