Thread: Multiple pvals
View Single Post
Old April 18, 2011, 22:56   #2
Angband Devteam member
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Originally Posted by PowerWyrm View Post
This is something I wanted to see implemented for a long time now... Nice to see it's gonna make it to 3.3...

I've checked the current source code, and something is bugging me though. It seems that the current implementation simply adds the pvals from base item and ego item (if the item is an ego).

For example: an Elven Cloak (+2 to stealth) can become "of the Magi" (+2 to int/stealth)

For what I've understood, this would become an Elven Cloak of the Magi (+4 to int/stealth). This is probably a bit overpowered...

A better item would be an Elven Cloak of the Magi <+2, +2> (+2 to int, +4 to stealth) where the ego pval is affected to the object's second pval slot, leaving the base item pval unaffected.

This would work for item/ego with single pval... No idea what to do with multiple pvals items/egos with the current system. For multiplayer Angband (MAngband), a new field "bpval" has been added on the object to keep track of the "base" pval given by the object kind. When an ego item is generated, the ego pval is affected to the object pval, leaving the base pval untouched. Of course, this would add another level of complexity...
Er, if you've described the current functionality correctly, then it's not what I intended. I intended it to work exactly as you suggested: that a base item with +2 of something, when combined with an ego template giving +2 of the same and one other thing, would end up with <+2, +4>, not +4 to both.

This is probably because I didn't pay sufficient attention to the generation of ego items - but since this is an area ripe for development at some point (see tickets #1080, #1179, #1394, #1395), I'm confident it will get fixed eventually.
Magnate is offline   Reply With Quote