Fatigue/Stamina Loss when shoving over someone

Fatigue/Stamina Loss when shoving over someone

Postby Batlin on Tue Oct 13, 2009 8:15 pm

It's 10 when you're weaker or as strong, otherwise a formula is applied.
Code: Select all
int StaminaLoss = 10;
int ESI = PlayerWalking->GetStat(0);  // Strength (+ Bonus)
int ECX = MobileInTheWay->GetStat(0); // Strength (+ Bonus)
if(ESI > ECX)
{
  //StaminaLoss = (MobileInTheWay->GetStat(0) * 10) / PlayerWalking->GetStat(0);
  StaminaLoss = (ECX * 10) / ESI;
}
PlayerWalking->SetFatigue(PlayerWalking->GetFatigue() - StaminaLoss);
Attachments
DexterityLoss.jpg
DexterityLoss.jpg (85.73 KiB) Viewed 360 times
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
Batlin
Site Admin
 
Posts: 306
Joined: Wed Apr 08, 2009 6:35 am


Re: Stamina Loss when shoving over someone

Postby Dies Irae on Wed Oct 14, 2009 7:49 am

Simply great.
:)
Dies Irae
 
Posts: 105
Joined: Sun Apr 19, 2009 8:49 am
Location: Gorizia - Italy


Re: Fatigue/Stamina Loss when shoving over someone

Postby xantier on Mon Jun 28, 2010 2:22 am

Good work, i appreciate your works for uodemo :P
xantier
 
Posts: 11
Joined: Sun Jan 03, 2010 4:28 am


Re: Fatigue/Stamina Loss when shoving over someone

Postby Batlin on Wed Dec 29, 2010 8:44 am

This thread is more than a year old now, I wanted to attach a new image of the original assembler code to give you guys an idea about how well the quality of the documented assembler code has been improved over time. It's still a time-consuming task though so progress is slow...
OSI's Stamina Loss Updated Screenshot.png
OSI's Stamina Loss Updated Screenshot.png (26.32 KiB) Viewed 99 times
NOTE: stamina & fatigue are the same thing, fatigue is the term OSI was (is?) using internally.
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything
Batlin
Site Admin
 
Posts: 306
Joined: Wed Apr 08, 2009 6:35 am


Re: Fatigue/Stamina Loss when shoving over someone

Postby Derrick on Wed Dec 29, 2010 7:47 pm

Nice. thanks for posting. That is much improved, 1C8h is not very descriptive. :)
Derrick
Site Admin
 
Posts: 250
Joined: Tue Jun 17, 2008 2:33 pm



Return to UO Demo

Who is online

Users browsing this forum: No registered users and 1 guest