Combat System Writeup

Nov 26, 2008 13:14

Ok, had a brainstorm last night, let's see what I can write about it.

The basic idea is that the processing for the pilot's attributes would be 'front ended' to when the pilot took the cockpit. This would let the combat system interact with both vehicles and players using the exact same systems. This would remove a lot of the if/than loops in the combat code, and looking up stats on the pilot when you attack the vehicle, etc.

To get this to work properly we would need 2 player commands, 1 @something dropped from me code, and one GM command.

+pilot/login (or just +pilot): this first checks to see if the player can take the wheel or not. if so, it does the math (using values stored on the vehicle to modify) and takes the relevant attributes from the player and sets them on the vehicle object. It also stores the pilot's dbref#, needed for command locks (I need to look at locktypes)

+pilot/logout : clears stats, or sets them to unpiloted defaults, clears 'who is pilot' attribute

If someone leaves the object, it should run a check to see if they are the pilot, and if so, to do the same as +pilot/logout

+unpilot * :GM command, used for resetting a vehicle.

Which brings me to some thoughts about the combat system; and I /really/ want to get my hands on MCM's code.

The system will have a command object, and a combat core object. All commands go through the command object to test if the use is valid. The command object handles all the error messages and such. If it is valid, it @triggers an attribute on the Combat Core object, sending along the relevant information about the command: who used it, the target, what options used in the command, etc.

For an attack...

(decide if it hits) -> Missed -> (miss messages, cleanup)
|
v
It hit
|
v
(decide/apply damage, hit messages, cleanup)
Previous post Next post
Up