Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old January 29, 2009, 01:26   #1
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 1,124
Donated: $10
will_asher is on a distinguished road
YACQ: yet another code question

I'm looking in the code (v3.0.8 because that's what DaJAngband is based on) about melee damage. For DaJAngband, I want to make very light weapons have no strength bonus to damage, and very heavy weapons have extra strength bonus (to compensate a little bit for multiple blows with light weapons). Anyway, looking in the code, it doesn't look like there is any strength bonus to damage. Is this correct or am I just missing something in the code?
(I'm looking in cmd1.c, should I be looking somewhere else?)

I always thought that there was a strength bonus to melee damage.
__________________
Will_Asher
aka LibraryAdventurer

My old variant DaJAngband:
http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)
will_asher is offline   Reply With Quote
Old January 29, 2009, 01:30   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by will_asher View Post
I'm looking in the code (v3.0.8 because that's what DaJAngband is based on) about melee damage. For DaJAngband, I want to make very light weapons have no strength bonus to damage, and very heavy weapons have extra strength bonus (to compensate a little bit for multiple blows with light weapons). Anyway, looking in the code, it doesn't look like there is any strength bonus to damage. Is this correct or am I just missing something in the code?
(I'm looking in cmd1.c, should I be looking somewhere else?)

I always thought that there was a strength bonus to melee damage.
The code in question will be in xtra1.c:calc_bonuses(). In particular, the line "p_ptr->to_d += ((int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128);".
takkaria is offline   Reply With Quote
Old January 29, 2009, 03:27   #3
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 1,124
Donated: $10
will_asher is on a distinguished road
there it is, thanks
the way stats are done in the code is pretty complicated because of all that non-linear 18/xx stuff.
__________________
Will_Asher
aka LibraryAdventurer

My old variant DaJAngband:
http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)
will_asher 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
Question regarding character view code CJNyfalt Variants 1 September 12, 2008 16:05
fun with the code (and a big thank you) will_asher Idle chatter 0 March 3, 2008 05:24
Screensaver needs to rewrite some code APWhite Vanilla 0 October 16, 2007 21:19
Looking through the code K.I.L.E.R Vanilla 5 July 11, 2007 08:01
The safe_setuid code CJNyfalt Vanilla 11 June 26, 2007 03:25


All times are GMT +1. The time now is 22:17.


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