Friday, November 23, 2007

Potions

Currently, the item system is a bit messy. When I add a new condition, I have to create lots of redundant stuff in the code :
- the new condition itself
- an enchantment (item modification) associated with this condition if I want an enchanted item to apply this condition to the player
- a skill type that generate this condition if I want a skill that apply this condition to the player or to a creature when casted
- an item feature associated with this condition if I want an item applying this condition (for example a potion or a sword that apply this condition on target when it hits)


So I started cleaning a bit the code. Now I have a generic APPLY_CONDITION skill type that can be used for all skills that result in a condition and a generic APPLY_CONDITION item feature. I still have to make this for the items modifications and the world will be a better place to live (at least the world of Doryen...)

Anyway, as announced yesterday, I created potions of vigour. In the same time, I improved the way potions were described in the inventory. Now you can know exactly the effect of the potion :