#W# Exhuation system implimented. And Food has been tweaked.
This commit is contained in:
parent
6cb014d51c
commit
15bb9dccb8
9 changed files with 211 additions and 181 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue