Source Code

Timezone: Central Time (US & Canada) (GMT-06:00)
� Previous :: Next �
AuthorMessage
sulik
Source Code
Tuesday, February 5th, 2008 at 11:52 am
Can anyone explain to me the formula in the source code for thaco and tohit? What does += / -= mean?

Dominus
Dungeonmaster
Re: Source Code
Tuesday, February 5th, 2008 at 2:57 pm
Bane's redoing thaco, so it'll be gone soon.

Mordor based their to-hit system on 2nd edition D&D. It's always confusing when I try to remember how it works; but lower is better.

If you're asking about += / -= syntax, they work like this:
These two code fragments do the same thing; decrement a variable by 5.
Code:
var = var - 5;
var -= 5;
Angel Heaven doesn't want me and Hell is afraid I'll take over. Evil

Bane
Dungeonmaster
Re: Source Code
Tuesday, February 5th, 2008 at 4:41 pm
I'll try to get the new combat system done before I fly out, but otherwise sometime this month. Thac0, AC and weapon profs will be going away.

In place of them there will be weapon skills (swords, axes, maces, etc), a defense skill, and your armor rating. Chances to hit/critical/riposite etc will be based on the difference between the attacker's weapon skill and the target's defense skill. Armor will result in damage reduction. Wearing full plate you'll be easier to hit...but you'll get hit for less.

Details will be released when it's finalized or you can look for yourself when the branch gets merged back in.

Bodhi
Watcher
Re: Source Code
Tuesday, February 5th, 2008 at 5:24 pm
When are you going to need some PTesting? I've been looking over combatSystem.cpp and it looks pretty sweet!

-Bodhi

Bane
Dungeonmaster
Re: Source Code
Tuesday, February 5th, 2008 at 5:41 pm
I'm hoping to get it into a workable state before I leave on Monday (I still have to do monster combat and see how it works out overall). If not, after the 22nd when I get back.

-Bane

Bane
Dungeonmaster
Re: Source Code
Wednesday, February 20th, 2008 at 5:24 am
It's looking nicer and nicer every day: I'm quite happy with it right now. I'm still over in China for another week but working on it when I'm bored.

Special attacks for monsters have been rewritten as has much of the monster combat function. General attacks for players have been updated and once I'm satisfied with things, I'll go through and update the special attacks (backstab, bash, etc)

-Bane

Realms ForumQuestionsSource Code