TONPPAMF

The Official NPPAngband And NPPMoria Forum

You are not logged in.

Announcement

November 28, 2016 - NPPAngband forum has been migrated to a new host. SSL has been enabled so please use https:// if possible.

#1 2011-01-16 03:14:04

BarlowBrad
Member
From: California
Registered: 2004-10-22
Posts: 67

Combat Info

I just started a new NPPAngband character after having been away for a while and it's nice to see some great changes have taken place since I last played. One of them I love is the value of items sold in the "average shop". That's great, now I never have to guess which items to leave behind when taking loot back to sell!

I also noticed on the Angband Ladder that in Vanilla Angband (at least since 3.2.0) there is a field for weapons called "Combat Info" that describes the damage per attack. For example:
t) The Broad Sword of Morth (3d5) (+9,+18) [+7] (+3) {@w1 *dragon !d!x}
     Dropped by a Black ogre at 3350 feet (level 67).
     
     +3 intelligence, wisdom.
     Slays animals, demons.
     *Slays* dragons.
     Branded with acid.
     Cannot be harmed by acid, electricity, fire, cold.
     Blessed by the gods.  Grants the ability to see invisible things.
     
     
     Combat info:
     4.0 blows/round.
     Average damage/round: 219.2 vs. animals, 258.8 vs. demons, 258.8
     vs. creatures not resistant to acid, 338 vs. dragons, and 179.6
     vs. others.


I poked through 3.2.0's source, and found it was in obj-info.c. It seems pretty straightforward, and while I'm sure it isn't just a copy/paste job to add it, how hard would it be to throw it into NPP?


--Brad

Offline

#2 2011-01-16 06:28:46

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Combat Info

I just added something similar, the closest I could get to it without making it a week-long project.  It is a bit more difficult for NPP, because there are many more variables affecting combat damage.  For example, the terrain you are standing in can affect the damage as well....using a fire branded weapon while standing on ice redults in the damage being reduced.

In NPP 0.5.2 I am going to add fractal blows from Angband 3.2, and that will require a little re-write of that part of the code.  Hopefully I can get closer to what Angband has at that time.

Offline

#3 2011-01-16 14:09:35

BarlowBrad
Member
From: California
Registered: 2004-10-22
Posts: 67

Re: Combat Info

Excellent! I can't wait to try it out!


--Brad

Offline

#4 2012-10-16 03:28:12

Sethos
Member
Registered: 2010-12-03
Posts: 80

Re: Combat Info

Sorry for the threadnomancy, but this idea has crossed my mind as well.

I wonder if a "Good Enough" solution would be to just include the combat modifiers from the weapon and character (a-la Vanilla) and leave out the special terrain modifiers. when terrain modifies your attack damage, you currently get a message telling you so anyways. And I really DON'T want my weapon to display:

100 damage/round to trolls, 200 damage/round to trolls on ice, 300 damage/round to trolls on water, 50 damage/round to trolls on fire...
xxx to evil creatures, ...on ice... in water... et cetera.

because, honestly, that's just overkill.

Another thought, you could even have a text string at the end stating that terrain could modify the damage... but I really think that even that would be unnecessary.

Offline

#5 2012-10-16 07:15:28

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Combat Info

It is on my list.  In order to do it the way vanilla does it, it requires a major re-write of a vital function in the game (the one that updates all of the player abilities every time you make the slightest change to your equipment/inventory, such as wield a new weapon or get hit with a confusion spell or even pick up a potion off the ground).   It is alot of work and de-bugging for very little end result.  I usually wind up making a change like this when there are multiple features that are being implemented that beneffit from the same code change.

Offline

Board footer

Powered by FluxBB