Login
User Name:

Password:



Register
Forgot your password?
 Just a few issues.
Yesterday, 10:13 pm
By Kayle
Compile Error & Overflows
Sep 5, 2010, 8:03 pm
By Daygon
Would anyone be willing
Sep 5, 2010, 9:33 am
By Remcon
Playing a MUD through Lan?
Aug 30, 2010, 11:04 am
By Raine
LoP1.39 Questions/Issues/Anomalies + Suggestions?
Aug 19, 2010, 4:24 pm
By Remcon
LOP 1.39r1
Author: Remcon
Submitted by: Remcon
Yaeger areas
Author: Yaeger
Submitted by: Cyberthrope
The City of Anon
Author: Yaeger
Submitted by: Cyberthrope
The Walls of Anon - Smaug
Author: Yaeger
Submitted by: Cyberthrope
LOP 1.39
Author: Remcon
Submitted by: Remcon
CommonCrawl, Yahoo!, Sogou, Google, Bing

Members: 0
Guests: 2
Stats
Files
Topics
Posts
Members
Newest Member
375
3,323
16,514
561
Aurin
Affiliates
Smaug Building Institute Arthmoor
» SmaugMuds.org » Codebases » SmaugFUSS » Combat damage - which functio...
Forum Rules | Mark all | Recent Posts

Combat damage - which function?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 11, 2008, 4:11 pm
Go to the bottom of the page Go to the top of the page


Trevlyn13
Apprentice
GroupMembers
Posts63
JoinedNov 30, 2007

I've been revamping combat in the codebase I've been working on, and I've come to a problem. In multihit it calls one_hit for each time an actor would attack during a round. In the one_hit function, it looks as though it calculates the damages, including RIS. My question is where the damage function comes in to all of this. It looks like at the end of one_hit it does an ifcheck dealing with the retcode from damage(. Where exactly is the actual damage to a player calculated and inflicted then, in the one_hit or in damage? .........................
-= DB =-
Nova, an original Science Fiction MUD based on SmaugFUSS
       
Post is unread #2 Aug 11, 2008, 5:49 pm
Go to the bottom of the page Go to the top of the page


David Haley
Sorcerer
GroupMembers
Posts902
JoinedJan 29, 2007
WWW

(From memory, so take it with a grain of salt.) I think there are a few phases to calculating damage, the first being in one_hit where the "normal" damage is calculated; then, in damage, the actual damage is calculated after adjusting based on various factors. The damage is inflicted in 'damage', though.

In other words, the 'damage' function means "take this much damage and apply it to the character, adjusting if necessary". .........................
David Haley
Head Coder, Legends of the Darkstone
BabbleMUD Project
http://david.the-haleys.org
       
Post is unread #3 Aug 11, 2008, 9:04 pm
Go to the bottom of the page Go to the top of the page


Trevlyn13
Apprentice
GroupMembers
Posts63
JoinedNov 30, 2007

Okay, I think I figured this out. one_hit calculates base damage and makes a few adjustments, including ones based on the RIS PLUSx. After that the dam value is passed to damage for final adjustments before it is applied. The thing that was throwing me off was the PLUSx section; it's different from the RIS checks in damage. I think that eventually I'll be moving most of the adjustments in one_hit over to damage to simply things for my own sake; it is confusing and pointless to have RIS checks in two places, IMO. .........................
-= DB =-
Nova, an original Science Fiction MUD based on SmaugFUSS
       
Post is unread #4 Aug 11, 2008, 10:38 pm
Go to the bottom of the page Go to the top of the page


David Haley
Sorcerer
GroupMembers
Posts902
JoinedJan 29, 2007
WWW

Well, it does actually make sense to have adjustments in two places. The 'damage' function is used whenever damage of any type is applied to a character. This includes things like traps, spells, etc., basically anything other than weapon attacks. If all adjustments are moved to 'one_hit', then every other method of doing damage will have no adjustments.

If you really want everything in one place, it might make more sense to move everything into 'damage'. Nonetheless you should think about the distinction that is made between damage adjustments that depend only on the fact that it is a weapon combat, and damage adjustments specific to a given character. It is possible that a given adjustment might only apply when fighting somebody, e.g. a reduction of damage based on the alignment of the attacking character. .........................
David Haley
Head Coder, Legends of the Darkstone
BabbleMUD Project
http://david.the-haleys.org
       
Post is unread #5 Aug 12, 2008, 1:10 am
Go to the bottom of the page Go to the top of the page


Trevlyn13
Apprentice
GroupMembers
Posts63
JoinedNov 30, 2007

Oops, sorry for the confusion. I did mean to say that I was going to move the adjustments from one_hit to damage. .........................
-= DB =-
Nova, an original Science Fiction MUD based on SmaugFUSS
       
Pages:<< prev 1 next >>

 
Contact Us