Dart trap damage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fph
    Veteran
    • Apr 2009
    • 1030

    Dart trap damage

    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.
    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);
    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.
    Last edited by fph; November 11, 2013, 11:11.
    --
    Dive fast, die young, leave a high-CHA corpse.
  • half
    Knight
    • Jan 2009
    • 910

    #2
    Originally posted by fph
    Just a small detail, but I wanted to ask if this "works as intended" or is a typo/leftover from testing.
    Yeah, that is as intended. I couldn't think of a better way to get darts to work. Think of the current thing as doing 1d15 damage for the purpose of penetrating armour (so armour is useful in avoiding it), but has actual damage capped at 1. The problem is that Sil combat can't really model things like this that would do a small amount of damage and need to find a crack in your armour. If it only did a straight 1d1 damage, then wearing some gauntlets would make you immune, but on the other hand, I think having a dart do a raw 10 damage to you or whatever is silly. This is my compromise. I only spent 15 minutes or so on it though as it has a niche effect on play, there might be better ways.

    Comment

    • locus
      Adept
      • Nov 2012
      • 165

      #3
      Originally posted by half
      Yeah, that is as intended. I couldn't think of a better way to get darts to work. Think of the current thing as doing 1d15 damage for the purpose of penetrating armour (so armour is useful in avoiding it), but has actual damage capped at 1. The problem is that Sil combat can't really model things like this that would do a small amount of damage and need to find a crack in your armour. If it only did a straight 1d1 damage, then wearing some gauntlets would make you immune, but on the other hand, I think having a dart do a raw 10 damage to you or whatever is silly. This is my compromise. I only spent 15 minutes or so on it though as it has a niche effect on play, there might be better ways.
      I think it's sensible. It's basically an opposed check based on armor.

      Maybe it should even be expanded to cover more cases, like all the poisonous spiders and insects?

      Comment

      • fph
        Veteran
        • Apr 2009
        • 1030

        #4
        Originally posted by half
        Yeah, that is as intended.
        Ok - thanks for the explanation, makes sense. Just wanted to double-check.
        --
        Dive fast, die young, leave a high-CHA corpse.

        Comment

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