[3.5-dev] Boulder damage calculation error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • molybdenum
    Apprentice
    • May 2013
    • 84

    [3.5-dev] Boulder damage calculation error

    In nonhp_dam(), there is this calculation (which is only used by boulder attacks):

    Code:
    	if (rs_ptr->rlev_dam.m_bonus == 1) /* then rlev affects dice */
    		dam += damcalc(MIN(1, rs_ptr->rlev_dam.dice * rlev / 100), 
    				rs_ptr->rlev_dam.sides, dam_aspect);
    MIN() should probably be changed to MAX(). Otherwise, boulders will only do a max of 24 damage.
  • takkaria
    Veteran
    • Apr 2007
    • 1951

    #2
    Originally posted by molybdenum
    In nonhp_dam(), there is this calculation (which is only used by boulder attacks):

    Code:
    	if (rs_ptr->rlev_dam.m_bonus == 1) /* then rlev affects dice */
    		dam += damcalc(MIN(1, rs_ptr->rlev_dam.dice * rlev / 100), 
    				rs_ptr->rlev_dam.sides, dam_aspect);
    MIN() should probably be changed to MAX(). Otherwise, boulders will only do a max of 24 damage.
    Fixed, thanks.
    takkaria whispers something about options. -more-

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 5110

      #3
      Originally posted by takkaria
      Fixed, thanks.
      Apologies, that's one of mine.
      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎