Lost in a sea of abilities

Started by Vitoc, March 23, 2008, 03:43:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Just a quick update, for the past couple days I've been working on rewriting the abilities system completely.  Previously I had to add every ability in several places.  For example, let's take the ability illu (which is night vision):

There are several things that can add illu (off the top of my head: race, items, spells).  In the old style of code I had to do things like ApplyRaceAbilities/RemoveRaceAbilities, PlayerEquipsItem/PlayerRemovesItem, ApplySpellAbilities/RemoveSpellAbilities and I had to specifically handle each ability in each of those methods.  Obviously that's no good since one could easily forget to add an ability to one or more of those methods.  For example, I might have added the illu bonus in ApplyRaceAbilities but forgot to add it in PlayerEquipsItem so only race illu was checked, not worn items.  Even worse would be the case where an ability was added but the code wasn't added for it to be removed properly.

Anyway, this is a lot of coding so the bug fixing will be put on hold for a short time while this goes into place.  I hope to have this fixed in the next few days, and then will go back to fixing specific bugs and adding in missing features.


TGS v1.0 (coming soon)