Tuesday, July 20, 2004

Sweet, sweet STEW...

It's a stew-pendous update...

I have an initial pass at line-of-sight and weapons/armor. The line-of-sight seems sound, but ranged attacks aren't in yet. (I know how I'm going to do them, though. I had been worried about the lack of modal events in my event-driven archetecture.)

I had an epiphany and I've decided on an approach to handle "objects having arbitrary verbs" which is a long-term goal of STEW, but really one I didn't expect to complete for the Rogue phase. With the help of some utility functions, arbitrary verbs can be placed on objects -- and written in Python. Yes, that's right. I'm ever so pleased.

The new verb logic is causing me to rewrite most (if not all) of the older attack logic. Yes, special attacks will soon be handled as arbitrary verbs placed upon creatures. Due to the crude nature of Rogue-style special attacks, we have a simple list containing the special attack verbs to use.

The existing armor and ring logic will also be rewritten for the new verb logic. In this case, there's a setup/tear-down structure that's only been sketched out in the new system so far.

It should allow things like a "ring of divine flame" which (1) burns every scoll in your possession when you put it on, (2) grants you immunity to fire, (3) gives any weapon you wield additional fire damage, (4) when empty-handed allows you to shoot bolts of fire at your foes, and (5) slowly gives you permanent sensitivity to water attacks. Yeah, such an artifact would be like cheating in most scenarios, but the very nature of the system is that such an artifact could be a third-party addition added specifically for cheating. (Did I mention the only way to disable cheating is for me to start on the network-based play?)

I may go so far as to actually push the normal attack logic in to verbs, but I'm thinking that may be more complicated than I might first imagine, so it may wait out for a bit. In any case, I'll need the ability to impliment removing of some of the ranged attacks so I can do "Wands of Cancellation" properly.