Detecting if 2 Iterators point to the same thing?

Started by
39 comments, last by Sean_Seanston 9 years ago


Maybe I'm still thinking of your design wrong, but in this sense, it seems like 'conditions' is less like armor durability (which is how I was thinking of it), and seems more like different items entirely. "Rusty sword" vs "Polished sword", "Tainted potion" vs "Fresh potion", {"New","Like-new","Great","Good","Poor"}.

Hmmm... kind of. It sort of is like durability, but more like a "modifier" that would be applied to certain formulae/functions performed on the item. They should very much be the same sort of item, but a condition 5 would be more desirable and valuable than a condition 1 which might be almost worthless or even dangerous to use.

My idea being (and it is quite a sketchy idea ATM) something like: you acquire 50,000 rounds of condition 4 ammunition -> you put it into storage to sell later -> you wait too long or you stored it wrong so now it's condition 2, which will affect its value/performance.

So there might be a sense of risk/reward. Perhaps low condition could represent poor-quality copies that function identically but with higher chance of malfunction and a lower value. Or just old weapons that have been poorly treated or are in need of repair. Something like that.

The player would probably start by having access to low condition goods, and need to expand to higher quality in order to progress effectively.

I don't foresee a need to define them as separate types when the condition ought to affect their behaviour in much the same ways as typical attributes like health, or an ammo count, i.e. everything should be the same except for using different values to calculate certain other values.

Maybe e.g. float sellValue = baseValue * ( itemCond / 3 ); to calculate the sale value of an item, where condition 3 will equal the baseValue and above or below will increase or decrease the price.

If I then decide to add any number of extra attributes along with condition, I should be able to just add them to the Item class and change the == operator to account for the new variables.

This topic is closed to new replies.

Advertisement