Bug: !Heal too good

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bron
    Knight
    • May 2008
    • 515

    Bug: !Heal too good

    I'm playing the 3.1.0 beta, and potions of Healing are healing way too many HP. The offending code is in effects.c:
    ...
    case EF_CURE_FULL:
    {
    int amt = (p_ptr->mhp * 100) / 35;
    if (amt < 300) amt = 300;

    if (hp_player(amt)) *ident = TRUE;
    ...
    It's pretty clear that the author meant to say:
    int amt = (p_ptr->mhp * 35) / 100;
    but it seems that even better would be to use:
    if (heal_player(35, 300)) *ident = TRUE;
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎