adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] New combat / damage thoughts


From: Kai Sterker
Subject: [Adonthell-devel] New combat / damage thoughts
Date: Sun, 27 Apr 2003 16:33:43 +0200

Here are some fresh ideas about damage objects and chains.

As explained in my last mail, damage objects implement the effect of a
certain attack. Therefore, the following things will need such an
object:

* fighting feats
* (offensive) runes
* (offensive) spells
* poisons
* weapons
* ammunition
* characters (for unarmed combat)

Also as explained before, all damage objects will be collected in a
damage chain. However, I have a completely new idea how damage chains
are created and used.

First of all, damage chains are created by passing a character to their
constructor. In pseude-code, this will look as follows:

   def __init__ (self, character):
       chain = []

       # -- apply optional fighting feat
       if character.fighting_feat != None:
           chain.append (character.fighting_feat.damage_objects ())

       # -- if weapon is equipped --> use weapon
       if character.weapon != None:
           chain.append (character.weapon.damage_objects ())

       # -- else --> unarmed combat
       else:
           chain.append (character.damage_objects ())

That means, damage chains are created dynamically. This has the
advantage that they need not be saved/loaded, elements need never be
removed, and they will always be up-to-date. On the downside, they are
only valid for a single attack, but I think the overhead is quite small.

Another thing to note is that feats, weapons and characters can have
multiple damage objects. That allows us to split complex damage types
into several, less complex ones. Which means we will have to code less
damage objects. And we can make those we have more re-useable.


One aspect of my damage chain proposition was that weapons can be
enhanced (that is another reason why weapons may have multiple damage
objects). However, I now think that there are better ways than damage
chains to implement weapon enhancements:

I would suggest that weapons have 3 item slots:

* rune
* poison
* spell

Ranged weapons have an extra slot:

* ammunition

With that in mind, weapon::damage_objects () could look as follows:

   def damage_objects (self):
       list = [self.DamageObjects]
       
       if not self.Rune.empty (): 
           list.append (self.Rune.damage_objects ())

       if not self.Poison.empty (): 
           list.append (self.Poison.damage_objects ())

       if not self.Spell.empty (): 
           list.append (self.Spell.damage_objects ())
      
       return list

I guess this is not as flexible as the original damage chain idea, but
it should be sufficient for our rules.


One last thought:

When describing damage objects, I had mainly melee combat and physical
damage in mind. However, many fighting feats or spells may not directly
damage health of the target. Some may not damage the target at all but
instead effect the user. So perhaps we should rather call them "effect 
objects" and allow them to have any kind of effect on characters. We
also have to keep spells in mind that will effect a group of characters.
(All friends, all foes, all characters in a certain area, all undead, 
etc ...)

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]