#W# Exhuation system implimented. And Food has been tweaked.

This commit is contained in:
WarrentyExpired 2026-07-24 21:01:31 -04:00
parent 6cb014d51c
commit 15bb9dccb8
9 changed files with 211 additions and 181 deletions

View file

@ -99,6 +99,7 @@ namespace Server.Mobiles
private string m_MapMarkers;
private int m_VirtuePoints;
private bool m_VirtueTomeCompleted;
private int m_ExhaustionPoints;
#region Getters & Setters
@ -294,6 +295,13 @@ namespace Server.Mobiles
set { m_VirtueTomeCompleted = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public int ExhaustionPoints
{
get { return m_ExhaustionPoints; }
set { m_ExhaustionPoints = value; }
}
#endregion
#region Auto Arrow Recovery
@ -1399,6 +1407,39 @@ namespace Server.Mobiles
Timer.DelayCall( TimeSpan.FromSeconds( 10 ), new TimerCallback( ((PlayerMobile) from).RecoverAmmo ) );
base.OnDamage( amount, from, willKill );
// --- EXHAUSTION SYSTEM START ---
if ( this.AccessLevel == AccessLevel.Player && this.Alive && !willKill )
{
this.ExhaustionPoints += amount;
if ( this.ExhaustionPoints >= 100 )
{
this.ExhaustionPoints -= 100;
bool decayed = false;
if ( this.Hunger > 0 )
{
this.Hunger -= 1;
decayed = true;
}
if ( this.Thirst > 0 )
{
this.Thirst -= 1;
decayed = true;
}
if ( decayed )
{
if ( this.Hunger <= 25 || this.Thirst <= 25 )
this.SendMessage( 38, "The physical toll of combat is severely draining your body. You need nourishment!" );
else
this.SendMessage( "Healing your wounds and taking damage makes you feel a bit more hungry and thirsty." );
}
}
}
// --- EXHAUSTION SYSTEM END ---
}
public override void Resurrect()
@ -1414,8 +1455,8 @@ namespace Server.Mobiles
Hits = HitsMax;
Stam = StamMax;
Mana = ManaMax;
Hunger = 20;
Thirst = 20;
Hunger = 100;
Thirst = 100;
if ( !EquipItem( deathRobe ) )
deathRobe.Delete();