Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Where to put magical bonuses of items? #11

Closed
Mikolaj opened this Issue Nov 2, 2010 · 1 comment

Comments

Projects
None yet
1 participant
Owner

Mikolaj commented Nov 2, 2010

I've added magical swords in b2b6af9.

The magical strength of the sword is stored as an attribute of the Sword item type. A goofy detail that illustrates the problem: when declaring item frequencies I need to create 'Sword (-1)' and assign a frequency to this item "type". I'm not sure I've done it right and I'm not sure if it's a game design or just technical data representation decision.

Perhaps I should add a new 'magical strength' field to the Item record instead. But what if I want only swords to have the strength attribute? So perhaps Item should have a field with a list of attributes and their values, one of which can be strength? What if it does not match item type?

Another possibility: have 5 (or an infinite list of) separate, generic, unit-less bonuses for each item and interpret them and scale differently, depending on what the item is. So, a sword may use the second and third for accuracy and damage bonuses and the first, divided by 5 and capped by 2, for extra blows. A magic ring of shielding may use the first for armor class bonus and the second for accuracy malus. Or perhaps the formulas would have to use all 5 bonuses in a way that makes the sum of the 5 an accurate description of the item overall power.

A nice feature of this approach is that when I polymorph (craft, brand, coat) item into another item type and then back, I get exactly the same item. At the same time, the polymorphed item may have very different properties, but similar overall power.

That's still quite type-less but at least I can't access a damage bonus field and a number of magical charges on a record representing a tripe ration. Or a nutritional value of a sword, for that matter. Or should I be able to?

Owner

Mikolaj commented Mar 26, 2011

gather all properties of an item in its definition; closed by f618512 (almost)

@Mikolaj Mikolaj closed this Mar 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment