The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Hp training bug Damacus mentioned.. Valid point...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Dawn Of Time Forum Index » 1.69q fixes already included as part of 1.69r
View previous topic :: View next topic  
Author Message
mythoseknight



Joined: 18 Sep 2003
Posts: 23

PostPosted: Thu Nov 06, 2003 7:01 am    Post subject: Hp training bug Damacus mentioned.. Valid point... Reply with quote

Damacus amazingly enough had a valid point with the hp train bug.
Players can train their hp beyond the max hp you have set for specific
races. It also does give random numbers and affect your hp in strange
ways when doing so. Here is an example of it, I set a male minotuar
warriors max hp to 180, restore him, gave him 100 trains and went
to a trainer and trained hp... this was the result...

Quote:

[D 9:35am 180/180hp 100/100m 100mv 2000xp> train hp
Your durability increases from 180 to 185!
You now have 99 training sessions left.

[D 9:35am 185/185hp 100/100m 100mv 2000xp> train hp
Your durability increases from 180 to 183!
You now have 98 training sessions left.

[D 9:35am 188/188hp 100/100m 100mv 2000xp> train hp
Your durability increases from 180 to 186!
You now have 97 training sessions left.

[D 9:40am 194/194hp 100/100m 100mv 2000xp> train hp
Your durability increases from 180 to 183!
You now have 96 training sessions left.

[D 10:00am 197/197hp 100/100m 100mv 2000xp>


as you can see it would say your hp increased from 180 to 183 from
the last train i did but the hp actually inscreased from 194 to 197.
Perhaps this can be fixed. I did test this bug on some stock DoT I have
and my current code that I've been working on. Thanks for taking a
look guys.
ALSO.... if you could perhaps post a reply with how to fix this,
before just fixing it in the next release of the code, I would be greatful
and I'm sure many others would be too. thanks again.

Mythose Knight



_________________
-<[Mythose Knight]>-
Back to top
View user's profile Send private message
Kalahn
Codebase Developer


Joined: 18 Jan 2003
Posts: 710
Location: New Zealand

PostPosted: Thu Nov 06, 2003 10:52 am    Post subject: Reply with quote

What I understood of Damacus's "bug" report, was that the amount you got for each train you did into hp varied (but this is done like this by design).

The "fix" for your problem is to take off all equipment which boosts your HP. Technically in 1.69Q you can do one train before hitting the max hp for your race which may slightly bump it over the racial max... I can't remember if I changed this to make it hard limit in 1.69R.

- Kal


Back to top
View user's profile Send private message Visit poster's website
Daos



Joined: 29 Jan 2003
Posts: 1217
Location: United States

PostPosted: Thu Nov 06, 2003 2:39 pm    Post subject: Reply with quote

Hi,

Yeah - I remember this problem but I don't remember if Kal wrote a code for it or not. It was a long time ago. Anyways, here is a code fix that stops train bug. If there is a fix in 1.69r - feel free to remove it. The code starts on line 2757 in void do_train() - Just insert the code where it says "your hps are already maxed."

Code:
if (!str_cmp("hp",argument))
   {
      if ( cost > ch->train )
      {
         ch->println( "You don't have enough training sessions." );
         return;
      }
      
      // Darksun Fix by Daos
      if(ch->pcdata->perm_hit >= race_table[ch->race]->max_hp)
      {
         ch->println( "Your hps are already maxed." );
         return;
      }
      
      ch->train -= cost;
      
      amount = number_range(class_table[ch->clss].hp_min,
         class_table[ch->clss].hp_max);
      ch->printlnf( "Your durability increases from %d to %d!",
         ch->pcdata->perm_hit, ch->pcdata->perm_hit+amount);
      ch->pcdata->perm_hit += amount;
      ch->pcdata->perm_hit=UMIN(ch->pcdata->perm_hit, race_table[ch->race]->max_hp);

      ch->max_hit += amount;
      ch->hit += amount;
      act( "$n's durability increases!",ch,NULL,NULL,TO_ROOM);
      ch->printlnf( "You now have %d training session%s left.",
            ch->train, ch->train==1?"":"s");
      return;
   }


I do remember one bug involving gain-hp at level gain in which the hp gain didn't cap off at the racial max. Kalahn did fix that Smile



_________________
- Daos

http://www.dawnoftime.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kalahn
Codebase Developer


Joined: 18 Jan 2003
Posts: 710
Location: New Zealand

PostPosted: Mon Apr 18, 2005 4:53 am    Post subject: Reply with quote

Just confirming that 1.69r does not have this problem.


Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    The Dawn Of Time Forum Index » 1.69q fixes already included as part of 1.69r All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin