For a mod I am developing, I have been going through Sil's codebase recently, and I noticed this oddity. It's the code in cmd1.c that processes the player hitting a dart trap.
Essentially, the code makes a hit roll, check if 1d15 damage would be absorbed by the player's protection roll, and if not it deals a flat 1 damage (not the original 1d15 minus protection).
The fact that it's commented makes me think it's deliberate, but this feels oddly inconsistent with the rest of the game, which is quite uniform in how damage is dealt and prevented.
Just a small detail, but I wanted to ask if this "works as intended" or is a typo/leftover from testing.
Code:
case FEAT_TRAP_DART: { if (check_hit(15, TRUE)) { dam = damroll(1,15); prt = protection_roll(GF_HURT, FALSE); if (dam > prt) { msg_print("A small dart hits you!"); // do a tiny amount of damage take_hit(1, name);
The fact that it's commented makes me think it's deliberate, but this feels oddly inconsistent with the rest of the game, which is quite uniform in how damage is dealt and prevented.
Just a small detail, but I wanted to ask if this "works as intended" or is a typo/leftover from testing.
Comment