#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

@ -9,46 +9,42 @@ namespace Server.Scripts.Commands
{
public static void Initialize()
{
// Register the command so players can use [Vitals
CommandSystem.Register("Vitals", AccessLevel.Player, new CommandEventHandler(Vitals_OnCommand));
}
[Usage("Vitals")]
[Description("Displays your current hunger and thirst status.")]
[Description("Displays your current hunger and thirst status.")
public static void Vitals_OnCommand(CommandEventArgs e)
{
Mobile m = e.Mobile;
if (m is PlayerMobile)
{
// Standard UO Hues
int greenHue = 63;
int orangeHue = 43;
int redHue = 33;
// --- Hunger Status ---
if (m.Hunger >= 16)
m.SendMessage(greenHue, "You are completely full and not hungry at all.");
else if (m.Hunger >= 11)
m.SendMessage(greenHue, "Your stomach gives a slight rumble.");
else if (m.Hunger >= 6)
m.SendMessage(orangeHue, "You are starting to feel hungry.");
if (m.Hunger >= 75)
m.SendMessage(greenHue, "You are completely full and feeling invigorated.");
else if (m.Hunger >= 50)
m.SendMessage(greenHue, "You are satiated and not hungry.");
else if (m.Hunger >= 25)
m.SendMessage(orangeHue, "Your stomach gives a slight rumble. You should eat soon.");
else if (m.Hunger >= 1)
m.SendMessage(redHue, "You are getting extremely hungry. You should eat soon!");
m.SendMessage(redHue, "You are getting extremely hungry and feel weak!");
else
m.SendMessage(redHue, "You are starving to death!");
m.SendMessage(redHue, "You are starving to death!");
// --- Thirst Status ---
if (m.Thirst >= 16)
m.SendMessage(greenHue, "You are perfectly hydrated and not thirsty.");
else if (m.Thirst >= 11)
m.SendMessage(greenHue, "Your mouth feels a little dry.");
else if (m.Thirst >= 6)
m.SendMessage(orangeHue, "You are starting to feel thirsty.");
if (m.Thirst >= 75)
m.SendMessage(greenHue, "You are perfectly hydrated and refreshed.");
else if (m.Thirst >= 50)
m.SendMessage(greenHue, "You are not thirsty.");
else if (m.Thirst >= 25)
m.SendMessage(orangeHue, "Your mouth feels dry. You should drink soon.");
else if (m.Thirst >= 1)
m.SendMessage(redHue, "You are getting extremely thirsty. You should drink soon!");
m.SendMessage(redHue, "You are terribly thirsty and feel sluggish!");
else
m.SendMessage(redHue, "You are exhausted from thirst!");
m.SendMessage(redHue, "You are exhausted from thirst!");
}
}
}

View file

@ -33,7 +33,7 @@ namespace Server.Items
public class BeverageBottle : BaseBeverage
{
public override int BaseLabelNumber { get { return 1042959; } } // a bottle of Ale
public override int MaxQuantity { get { return 5; } }
public override int MaxQuantity { get { return 20; } }
public override bool Fillable { get { return false; } }
public override int ComputeItemID()
@ -112,7 +112,7 @@ namespace Server.Items
public class Jug : BaseBeverage
{
public override int BaseLabelNumber { get { return 1042965; } } // a jug of Ale
public override int MaxQuantity { get { return 10; } }
public override int MaxQuantity { get { return 25; } }
public override bool Fillable { get { return false; } }
public override int ComputeItemID()
@ -153,7 +153,7 @@ namespace Server.Items
public class CeramicMug : BaseBeverage
{
public override int BaseLabelNumber { get { return 1042982; } } // a ceramic mug of Ale
public override int MaxQuantity { get { return 1; } }
public override int MaxQuantity { get { return 5; } }
public override int ComputeItemID()
{
@ -201,7 +201,7 @@ namespace Server.Items
public class PewterMug : BaseBeverage
{
public override int BaseLabelNumber { get { return 1042994; } } // a pewter mug with Ale
public override int MaxQuantity { get { return 1; } }
public override int MaxQuantity { get { return 5; } }
public override int ComputeItemID()
{
@ -247,7 +247,7 @@ namespace Server.Items
public class Goblet : BaseBeverage
{
public override int BaseLabelNumber { get { return 1043000; } } // a goblet of Ale
public override int MaxQuantity { get { return 1; } }
public override int MaxQuantity { get { return 5; } }
public override int ComputeItemID()
{
@ -398,7 +398,7 @@ namespace Server.Items
public class Pitcher : BaseBeverage
{
public override int BaseLabelNumber { get { return 1048128; } } // a Pitcher of Ale
public override int MaxQuantity { get { return 5; } }
public override int MaxQuantity { get { return 25; } }
public override int ComputeItemID()
{
@ -978,24 +978,24 @@ namespace Server.Items
from.PlaySound( 0x4E );
}
}
else if ( from == targ && from.Thirst >= 20 )
else if ( from == targ && from.Thirst >= 100 )
{
from.SendMessage( "You are too quenched to drink more." );
}
else if ( from == targ )
{
int thirst = 1;
int thirst = 10;
switch( Content )
{
case BeverageType.Ale: thirst = 3; break;
case BeverageType.Cider: thirst = 2; break;
case BeverageType.Liquor: thirst = 1; break;
case BeverageType.Milk: thirst = 1; break;
case BeverageType.Wine: thirst = 2; break;
case BeverageType.Ale: thirst = 15; break;
case BeverageType.Cider: thirst = 10; break;
case BeverageType.Liquor: thirst = 5; break;
case BeverageType.Milk: thirst = 20; break;
case BeverageType.Wine: thirst = 10; break;
}
if( from.Thirst < 20 )
if( from.Thirst < 100 )
from.Thirst += thirst;
if( ContainsAlchohol )

View file

@ -63,7 +63,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 10;
}
public override bool Eat( Mobile from )
@ -101,7 +101,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 10;
}
public override bool Eat( Mobile from )
@ -139,7 +139,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 8;
}
public override bool Eat( Mobile from )
@ -177,7 +177,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 8;
}
public override bool Eat( Mobile from )
@ -215,7 +215,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 10;
}
public override bool Eat( Mobile from )
@ -253,7 +253,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 10;
}
public override bool Eat( Mobile from )
@ -291,7 +291,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 8;
}
public override bool Eat( Mobile from )
@ -329,7 +329,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 8;
}
public override bool Eat( Mobile from )
@ -367,7 +367,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 1.0;
FillFactor = 2;
FillFactor = 10;
}
public override bool Eat( Mobile from )
@ -461,7 +461,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 2.0;
FillFactor = 2;
FillFactor = 15;
}
public override bool Eat( Mobile from )
@ -499,7 +499,7 @@ namespace Server.Items
{
Stackable = false;
Weight = 2.0;
FillFactor = 2;
FillFactor = 15;
}
public override bool Eat( Mobile from )
@ -529,4 +529,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -41,7 +41,7 @@ namespace Server.Items
{
Stackable = true;
Amount = amount;
m_FillFactor = 1;
m_FillFactor = 5;
}
public Food( Serial serial ) : base( serial )
@ -91,7 +91,7 @@ namespace Server.Items
static public bool FillHunger( Mobile from, int fillFactor )
{
if ( from.Hunger >= 20 )
if ( from.Hunger >= 100 )
{
from.SendLocalizedMessage( 500867 ); // You are simply too full to eat any more!
return false;
@ -100,20 +100,20 @@ namespace Server.Items
int iHunger = from.Hunger + fillFactor;
if ( from.Stam < from.StamMax )
from.Stam += Utility.Random( 6, 3 ) + fillFactor/5;//restore some stamina
if ( iHunger >= 20 )
if ( iHunger >= 100 )
{
from.Hunger = 20;
from.Hunger = 100;
from.SendLocalizedMessage( 500872 ); // You manage to eat the food, but you are stuffed!
}
else
{
from.Hunger = iHunger;
if ( iHunger < 5 )
if ( iHunger < 30 )
from.SendLocalizedMessage( 500868 ); // You eat the food, but are still extremely hungry.
else if ( iHunger < 10 )
else if ( iHunger < 50 )
from.SendLocalizedMessage( 500869 ); // You eat the food, and begin to feel more satiated.
else if ( iHunger < 15 )
else if ( iHunger < 75 )
from.SendLocalizedMessage( 500870 ); // After eating the food, you feel much less hungry.
else
from.SendLocalizedMessage( 500871 ); // You feel quite full after consuming the food.
@ -186,7 +186,7 @@ namespace Server.Items
public BreadLoaf( int amount ) : base( amount, 0x103B )
{
this.Weight = 1.0;
this.FillFactor = 3;
this.FillFactor = 15;
}
public BreadLoaf( Serial serial ) : base( serial )
@ -219,7 +219,7 @@ namespace Server.Items
public Bacon( int amount ) : base( amount, 0x979 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 10;
}
public Bacon( Serial serial ) : base( serial )
@ -252,7 +252,7 @@ namespace Server.Items
public SlabOfBacon( int amount ) : base( amount, 0x976 )
{
this.Weight = 1.0;
this.FillFactor = 3;
this.FillFactor = 20;
}
public SlabOfBacon( Serial serial ) : base( serial )
@ -289,7 +289,7 @@ namespace Server.Items
[Constructable]
public FishSteak( int amount ) : base( amount, 0x97B )
{
this.FillFactor = 3;
this.FillFactor = 15;
}
public FishSteak( Serial serial ) : base( serial )
@ -326,7 +326,7 @@ namespace Server.Items
[Constructable]
public CheeseWheel( int amount ) : base( amount, 0x97E )
{
this.FillFactor = 3;
this.FillFactor = 15;
}
public CheeseWheel( Serial serial ) : base( serial )
@ -363,7 +363,7 @@ namespace Server.Items
[Constructable]
public CheeseWedge( int amount ) : base( amount, 0x97D )
{
this.FillFactor = 3;
this.FillFactor = 10;
}
public CheeseWedge( Serial serial ) : base( serial )
@ -400,7 +400,7 @@ namespace Server.Items
[Constructable]
public CheeseSlice( int amount ) : base( amount, 0x97C )
{
this.FillFactor = 1;
this.FillFactor = 5;
}
public CheeseSlice( Serial serial ) : base( serial )
@ -433,7 +433,7 @@ namespace Server.Items
public FrenchBread( int amount ) : base( amount, 0x98C )
{
this.Weight = 2.0;
this.FillFactor = 3;
this.FillFactor = 15;
}
public FrenchBread( Serial serial ) : base( serial )
@ -467,7 +467,7 @@ namespace Server.Items
public FriedEggs( int amount ) : base( amount, 0x9B6 )
{
this.Weight = 1.0;
this.FillFactor = 4;
this.FillFactor = 15;
}
public FriedEggs( Serial serial ) : base( serial )
@ -500,7 +500,7 @@ namespace Server.Items
public CookedBird( int amount ) : base( amount, 0x9B7 )
{
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public CookedBird( Serial serial ) : base( serial )
@ -533,7 +533,7 @@ namespace Server.Items
public RoastPig( int amount ) : base( amount, 0x9BB )
{
this.Weight = 45.0;
this.FillFactor = 20;
this.FillFactor = 50;
}
public RoastPig( Serial serial ) : base( serial )
@ -566,7 +566,7 @@ namespace Server.Items
public Sausage( int amount ) : base( amount, 0x9C0 )
{
this.Weight = 1.0;
this.FillFactor = 4;
this.FillFactor = 15;
}
public Sausage( Serial serial ) : base( serial )
@ -599,7 +599,7 @@ namespace Server.Items
public Ham( int amount ) : base( amount, 0x9C9 )
{
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public Ham( Serial serial ) : base( serial )
@ -628,7 +628,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 10;
this.FillFactor = 20;
}
public Cake( Serial serial ) : base( serial )
@ -661,7 +661,7 @@ namespace Server.Items
public Ribs( int amount ) : base( amount, 0x9F2 )
{
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public Ribs( Serial serial ) : base( serial )
@ -690,7 +690,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 4;
this.FillFactor = 15;
}
public Cookies( Serial serial ) : base( serial )
@ -719,7 +719,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 4;
this.FillFactor = 15;
}
public Muffins( Serial serial ) : base( serial )
@ -751,7 +751,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
this.FillFactor = 25;
}
public CheesePizza( Serial serial ) : base( serial )
@ -782,7 +782,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
this.FillFactor = 25;
}
public SausagePizza( Serial serial ) : base( serial )
@ -812,7 +812,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 6;
this.FillFactor = 20;
}
public Pizza( Serial serial ) : base( serial )
@ -844,7 +844,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 15;
}
public FruitPie( Serial serial ) : base( serial )
@ -875,7 +875,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public MeatPie( Serial serial ) : base( serial )
@ -906,7 +906,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 25;
}
public PumpkinPie( Serial serial ) : base( serial )
@ -937,7 +937,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public ApplePie( Serial serial ) : base( serial )
@ -968,7 +968,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 25;
}
public PeachCobbler( Serial serial ) : base( serial )
@ -999,7 +999,7 @@ namespace Server.Items
{
Stackable = false;
this.Weight = 1.0;
this.FillFactor = 5;
this.FillFactor = 15;
}
public Quiche( Serial serial ) : base( serial )
@ -1032,7 +1032,7 @@ namespace Server.Items
public LambLeg( int amount ) : base( amount, 0x160a )
{
this.Weight = 2.0;
this.FillFactor = 5;
this.FillFactor = 20;
}
public LambLeg( Serial serial ) : base( serial )
@ -1065,7 +1065,7 @@ namespace Server.Items
public ChickenLeg( int amount ) : base( amount, 0x1608 )
{
this.Weight = 1.0;
this.FillFactor = 4;
this.FillFactor = 20;
Name = "bird leg";
}
@ -1100,7 +1100,7 @@ namespace Server.Items
public HoneydewMelon( int amount ) : base( amount, 0xC74 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public HoneydewMelon( Serial serial ) : base( serial )
@ -1134,7 +1134,7 @@ namespace Server.Items
public YellowGourd( int amount ) : base( amount, 0xC64 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public YellowGourd( Serial serial ) : base( serial )
@ -1168,7 +1168,7 @@ namespace Server.Items
public GreenGourd( int amount ) : base( amount, 0xC66 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public GreenGourd( Serial serial ) : base( serial )
@ -1202,7 +1202,7 @@ namespace Server.Items
public EarOfCorn( int amount ) : base( amount, 0xC81 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public EarOfCorn( Serial serial ) : base( serial )
@ -1235,7 +1235,7 @@ namespace Server.Items
public Turnip( int amount ) : base( amount, 0xD3A )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Turnip( Serial serial ) : base( serial )
@ -1283,4 +1283,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -53,7 +53,7 @@ namespace Server.Items
public Banana( int amount ) : base( amount, 0x171f )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Banana( Serial serial ) : base( serial )
@ -86,7 +86,7 @@ namespace Server.Items
public Bananas( int amount ) : base( amount, 0x1721 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Bananas( Serial serial ) : base( serial )
@ -118,7 +118,7 @@ namespace Server.Items
public SplitCoconut( int amount ) : base( amount, 0x1725 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public SplitCoconut( Serial serial ) : base( serial )
@ -150,7 +150,7 @@ namespace Server.Items
public Lemon( int amount ) : base( amount, 0x1728 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Lemon( Serial serial ) : base( serial )
@ -182,7 +182,7 @@ namespace Server.Items
public Lemons( int amount ) : base( amount, 0x1729 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Lemons( Serial serial ) : base( serial )
@ -214,7 +214,7 @@ namespace Server.Items
public Lime( int amount ) : base( amount, 0x172a )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Lime( Serial serial ) : base( serial )
@ -246,7 +246,7 @@ namespace Server.Items
public Limes( int amount ) : base( amount, 0x172B )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Limes( Serial serial ) : base( serial )
@ -278,7 +278,7 @@ namespace Server.Items
public Coconut( int amount ) : base( amount, 0x1726 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Coconut( Serial serial ) : base( serial )
@ -310,7 +310,7 @@ namespace Server.Items
public OpenCoconut( int amount ) : base( amount, 0x1723 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public OpenCoconut( Serial serial ) : base( serial )
@ -342,7 +342,7 @@ namespace Server.Items
public Dates( int amount ) : base( amount, 0x1727 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Dates( Serial serial ) : base( serial )
@ -374,7 +374,7 @@ namespace Server.Items
public Grapes( int amount ) : base( amount, 0x9D1 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Grapes( Serial serial ) : base( serial )
@ -406,7 +406,7 @@ namespace Server.Items
public Peach( int amount ) : base( amount, 0x9D2 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Peach( Serial serial ) : base( serial )
@ -438,7 +438,7 @@ namespace Server.Items
public Pear( int amount ) : base( amount, 0x994 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Pear( Serial serial ) : base( serial )
@ -470,7 +470,7 @@ namespace Server.Items
public Apple( int amount ) : base( amount, 0x9D0 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Apple( Serial serial ) : base( serial )
@ -576,7 +576,7 @@ namespace Server.Items
public Squash( int amount ) : base( amount, 0xc72 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Squash( Serial serial ) : base( serial )
@ -609,7 +609,7 @@ namespace Server.Items
public Cantaloupe( int amount ) : base( amount, 0xc79 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Cantaloupe( Serial serial ) : base( serial )
@ -629,4 +629,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -30,16 +30,16 @@ namespace Server.Items
else
{
// increase characters thirst value based on type of drink
if ( from.Thirst < 20 )
if ( from.Thirst < 100 )
{
from.Thirst += 2;
from.Thirst += 5;
// Send message to character about their current thirst value
int iThirst = from.Thirst;
if ( iThirst < 5 )
if ( iThirst < 50 )
from.SendMessage( "You drink the ale but are still extremely thirsty" );
else if ( iThirst < 10 )
else if ( iThirst < 75 )
from.SendMessage( "You drink the ale and feel less thirsty" );
else if ( iThirst < 15 )
else if ( iThirst < 100 )
from.SendMessage( "You drink the ale and feel much less thirsty" );
else
from.SendMessage( "You drink the ale and are no longer thirsty" );
@ -101,11 +101,11 @@ namespace Server.Items
from.Thirst += 2;
// Send message to character about their current thirst value
int iThirst = from.Thirst;
if ( iThirst < 5 )
if ( iThirst < 50 )
from.SendMessage( "You drink the wine but are still extremely thirsty" );
else if ( iThirst < 10 )
else if ( iThirst < 75 )
from.SendMessage( "You drink the wine and feel less thirsty" );
else if ( iThirst < 15 )
else if ( iThirst < 100 )
from.SendMessage( "You drink the wine and feel much less thirsty" );
else
from.SendMessage( "You drink the wine and are no longer thirsty" );
@ -137,4 +137,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -15,7 +15,7 @@ namespace Server.Items
public Carrot( int amount ) : base( amount, 0xc78 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Carrot( Serial serial ) : base( serial )
@ -48,7 +48,7 @@ namespace Server.Items
public Cabbage( int amount ) : base( amount, 0xc7b )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Cabbage( Serial serial ) : base( serial )
@ -81,7 +81,7 @@ namespace Server.Items
public Onion( int amount ) : base( amount, 0xc6d )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Onion( Serial serial ) : base( serial )
@ -114,7 +114,7 @@ namespace Server.Items
public Lettuce( int amount ) : base( amount, 0xc70 )
{
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Lettuce( Serial serial ) : base( serial )
@ -147,7 +147,7 @@ namespace Server.Items
{
Name = "tomato";
this.Weight = 1.0;
this.FillFactor = 1;
this.FillFactor = 5;
}
public Tomato( Serial serial ) : base( serial )
@ -179,7 +179,7 @@ namespace Server.Items
public Pumpkin( int amount ) : base( amount, 0xC6A )
{
this.Weight = 1.0;
this.FillFactor = 8;
this.FillFactor = 18;
}
public Pumpkin( Serial serial ) : base( serial )
@ -240,4 +240,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -38,22 +38,22 @@ namespace Server.Misc
if ( m.Hunger >= 1 )
{
m.Hunger -= 1;
if ( m.Hunger == 15 )
if ( m.Hunger == 75 )
m.SendMessage( "Your stomach gives a slight rumble." );
else if ( m.Hunger == 10 )
else if ( m.Hunger == 50 )
m.SendMessage( "You are starting to feel hungry." );
else if ( m.Hunger == 5 )
else if ( m.Hunger == 25 )
m.SendMessage( "You are getting extremely hungry. You should eat soon!" );
}
if ( m.Thirst >= 1 )
{
m.Thirst -= 1;
if ( m.Thirst == 15 )
if ( m.Thirst == 75 )
m.SendMessage( "Your mouth feels a little dry." );
else if ( m.Thirst == 10 )
else if ( m.Thirst == 50 )
m.SendMessage( "You are starting to feel thirsty." );
else if ( m.Thirst == 5 )
else if ( m.Thirst == 25 )
m.SendMessage( "You are getting extremely thirsty. You should drink soon!" );
}
}
@ -89,61 +89,56 @@ namespace Server.Misc
{
if ( m is PlayerMobile && m.Alive )
{
if ( m.Hunger < 5 || m.Thirst < 5 )
// Starvation penalties begin when stats fall below 25
if ( m.Hunger < 25 || m.Thirst < 25 )
{
if ( m.Hunger < 5 )
if ( m.Hunger < 25 )
{
int hits = 0;
switch (m.Hunger)
if ( m.Hunger >= 20 ) hits = 2;
else if ( m.Hunger >= 15 ) hits = 3;
else if ( m.Hunger >= 10 ) hits = 4;
else if ( m.Hunger >= 5 ) hits = 5;
else
{
case 4: hits = 2; break;
case 3: hits = 3; break;
case 2: hits = 4; break;
case 1: hits = 5; break;
case 0:
{
hits = 6;
m.SendMessage( "You are starving to death!" );
m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am so hungry!");
break;
}
hits = 6;
m.SendMessage( "You are starving to death!" );
m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am so hungry!");
}
if ( m.Hits < hits )
hits = m.Hits-1;
hits = m.Hits - 1;
if ( hits > 0 )
m.Hits -= hits;
if ( m.Hunger < 3 && m.Hunger > 0 )
if ( m.Hunger < 15 && m.Hunger > 0 )
{
if ( Utility.RandomBool() ){ m.SendMessage( "You are getting very hungry!" ); }
if ( Utility.RandomMinMax(1,5)==1 ){ m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am getting hungry!"); }
if ( Utility.RandomBool() ) m.SendMessage( "You are getting very hungry!" );
if ( Utility.RandomMinMax(1,5) == 1 ) m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am getting hungry!");
}
}
if ( m.Thirst < 5 )
if ( m.Thirst < 25 )
{
switch (m.Thirst)
if ( m.Thirst >= 20 ) m.Stam -= 2;
else if ( m.Thirst >= 15 ) m.Stam -= 3;
else if ( m.Thirst >= 10 ) m.Stam -= 4;
else if ( m.Thirst >= 5 ) m.Stam -= 5;
else
{
case 4: m.Stam -= 2; break;
case 3: m.Stam -= 3; break;
case 2: m.Stam -= 4; break;
case 1: m.Stam -= 5; break;
case 0:
{
m.Stam -= 6;
m.SendMessage( "You are exhausted from thirst!" );
m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am so thirsty!");
break;
}
m.Stam -= 6;
m.SendMessage( "You are exhausted from thirst!" );
m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am so thirsty!");
}
if ( m.Thirst < 3 && m.Thirst > 0 )
if ( m.Thirst < 15 && m.Thirst > 0 )
{
if ( Utility.RandomBool() ){ m.SendMessage( "You are getting exhausted from thirst!" ); }
if ( Utility.RandomMinMax(1,5)==1 ){ m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am getting thirsty!"); }
if ( Utility.RandomBool() ) m.SendMessage( "You are getting exhausted from thirst!" );
if ( Utility.RandomMinMax(1,5) == 1 ) m.LocalOverheadMessage(MessageType.Emote, 1150, true, "I am getting thirsty!");
}
if ( m.Stam < 0 )
m.Stam = 0;
}
@ -152,35 +147,33 @@ namespace Server.Misc
if ( m.Hunger < m.Thirst )
test = m.Hunger;
switch (test)
{
case 4: m.Mana -= 2; break;
case 3: m.Mana -= 3; break;
case 2: m.Mana -= 4; break;
case 1: m.Mana -= 5; break;
case 0: m.Mana -= 6; break;
}
if ( test >= 20 ) m.Mana -= 2;
else if ( test >= 15 ) m.Mana -= 3;
else if ( test >= 10 ) m.Mana -= 4;
else if ( test >= 5 ) m.Mana -= 5;
else m.Mana -= 6;
if ( m.Mana < 0 )
m.Mana = 0;
}
else
{
if ( m.Hunger >= 15 && m.Hits < m.HitsMax )
{
int hpRegen = (int)(2 * Server.Misc.Settings.HitPoints());
// Well-Fed Regeneration starts when stats are 75 or higher
if ( m.Hunger >= 75 && m.Hits < m.HitsMax )
{
int hpRegen = (int)(2 * Server.Misc.Settings.HitPoints());
m.Hits += hpRegen;
}
}
if ( m.Thirst >= 15 && m.Stam < m.StamMax )
{
if ( m.Thirst >= 75 && m.Stam < m.StamMax )
{
m.Stam += 2;
}
}
if ( m.Hunger >= 15 && m.Thirst >= 15 && m.Mana < m.ManaMax )
{
if ( m.Hunger >= 75 && m.Thirst >= 75 && m.Mana < m.ManaMax )
{
m.Mana += 2;
}
}
}
}
}

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();