Tuesday, January 6, 2009

I'm here, but you can't see me!

With the revision 149 today I uploaded onto the SVN a fully playable version of the game with the stealth mode (I prefer the term rogue mode).

What this mean? First of all, the next 0.2.0 release will have a new tag "roguelike" on the Pygame page, when I'll finally release it! :-)

More important is that the game has now some more doable action. This modality will be really important in the future first level called "The Last Bridge" (see the map).
You can enable this pressing the SHIFT key.

All the stealth logic has been moved away from the Character main class, into a specific class Stealth. Some modification has been done outside the new class too (mainly in the Level class).

The Stealth class incapsulates all code needed to perform a stealth attempt, but also all code required to "resist" (AKA get noticed of the rogue enemy).

Every character now has a stealthLevel, in addition of the more common experienceLevel. The stealthLevel:
  • reduce the prey sight range (only if the character is in stealth mode)
  • raise the character stealthIndex (not done yet).
  • modify (but only a little) the anti-stealth feat of the character.
The most important property of the stealthLevel attribute is the second ones. This isn't done right now (a rogue that isn't moving has a 0.5 value, 0.7 if he's moving).

The prey sight reduction is automatic (10%, +5% per every stealth level) and doesn't depends on random roll.

For the last point I think this: a character that know well how to hide himself is also capable of find better other rogues. But mainly the anti stealth depends on the character experience level.
How this works? I think this logic: the success of the rogue hiding in shadows only count on the rogue's attributes (so he has the same success chance with a level 1 or level 5 enemy... this is the same for the thief old D&D first edition rules), but the prey experience level will indicate how often the prey can repeat the check if he fails!

Also an attack done while the prey isn't noticed of the rogue presence do a lot of damage. If the targer die in the attack the rogue remain hidden, otherwise the stealth effect finish when hit.

How often you can enter and exit the rogue mode?
Not every time. Each character need a little time to reenter the the rogue mode when exits from it (because you release the SHIFT key, or you have been damaged).

So why don't always stay in the rogue mode? Because you are slower... a lot slower!