Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

Reply
 
Thread Tools Display Modes
Old November 11, 2013, 08:36   #1
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 893
fph is on a distinguished road
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.
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.

Last edited by fph; November 11, 2013 at 10:11.
fph is offline   Reply With Quote
Old November 12, 2013, 16:01   #2
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
Quote:
Originally Posted by fph View Post
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.
half is offline   Reply With Quote
Old November 12, 2013, 17:49   #3
locus
Adept
 
Join Date: Nov 2012
Posts: 165
locus is on a distinguished road
Quote:
Originally Posted by half View Post
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?
locus is offline   Reply With Quote
Old November 12, 2013, 18:11   #4
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 893
fph is on a distinguished road
Quote:
Originally Posted by half View Post
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.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trap changes CunningGabe v4 79 May 27, 2012 14:50
Damage bonuses that don't provide extra damage? Egavactip v4 2 May 27, 2012 01:51
Trap detection Raxmei Vanilla 12 June 16, 2011 17:10
Trap Thoughts Netbrian Vanilla 8 April 29, 2011 15:11
Command for walking into a trap fph Vanilla 5 December 31, 2010 16:57


All times are GMT +1. The time now is 18:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.