adonthell-devel
[Top][All Lists]
Advanced

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

[Adonthell-devel] Combat related thoughts


From: Kai Sterker
Subject: [Adonthell-devel] Combat related thoughts
Date: Sat, 15 Mar 2003 13:48:16 +0100

There are various things related to the (lowlevel) combat system. I am
not really sure how to best integrate them, but I hope that this mail
(and the replies) will help :).

One issue are special characters, that are for example immune to
physical damage (which means they can only be hurt by real magic or
enchanted weapons). Same is true for poison, fire and magic. Instead of
using additional flags for those characters (which would just complicate
the damage calculations with additional cases), I guess we can use the
attribute modifiers. A +100 to physical (fire, poison, magic, ...)
resistance should do the trick.


Another thing are special weapons (or fighting feats) that are
especially potent against certain type of characters. I think that each
weapon script would bring it's own "deal_damage" method, so the special
cases can be handled there.

It might however make sense to seperate "deal_damage" from the actual
weapon class. That way, the axe "Bonesmiter" could use the normal
"weapon" template but reference a deal_damage implementation that adds a
special bonus when fighting against undead. That also makes other things
easier: when applying poison to a weapon, there is no need to replace
the underlying template. We just exchange the deal_damage function.

To go yet a step further, there are plenty of creatures that never use
weapons. But they will have to deal damage as well. So it might be a
good idea to make the actual deal_damage method a part of the character
class, while the weapon would only specify which implementation to use.


All of that gets a bit tricky when fighting feats are involved. I guess
there are two basic types of feats: the first would just modify some
attributes of the character: i.e. change them to a more defensive or
offensive setting. Higher rank feats would give a bonus to some
attributes without decreasing others. But the best feats would probably
have very special effects. Like the "Way of the Saint" could have the
same effect as Bonesmiter, no matter what weapon is equipped. The "Dance
of Flaming Fury" could add some points of extra fire damage to the
actual weapon damage. You see, the possibilities are endless :).

But on implementations side, it means that the weapon's deal_damage is
either replaced or enhanced by the feat's deal_damage method. With that
in mind, we could perhaps implement the following strategy: if the
character uses a feat (assuming that only one feat can be active at a
time), the deal_damage method specified by the feat is used. If the feat
does not have a deal_damage method, that of the equipped weapon is used
instead. If no weapon is equipped, then that of the character is used.

There is still a slight problem with ranged weapons. In their case, the
deal_damage method of the ammunition should be used, not that of the
bow. However, the "Bow of Fiery Missiles" might add an additional fire
damage, no matter what arrows are used. Guess the solution is that an
ordinary bow's deal_damage method would just call deal_damage of the
missily. But an enchanted bow could also apply it's own effect before
calling deal_damge of the arrow it just fired. (It would be similar for
fighting feats: if they only add an effect to the damage the weapon
does, it could call the weapon's deal_damage method afterwards.)

That however leads to yet another problem. Say our character uses the
"Dance of Flaming Fury" feat which adds +2 fire damage, and some
enchanted weapon that also adds +2 fire damage. The opponent has a fire
resistance of 3. If both effect of feat and weapon would be applied
individually, the opponent wouldn't take any fire damage. So it has to
be taken care that the effects are accumulated by the combat system.
Shouldn't be a big problem though.


Anyway, during combat we could have a chain of deal_damage calls,
instead of just a single call, which is very flexible, I think. For
example, applying poison y to any weapon would do the following:

* Instanciate the deal_damage_posion_y which gets the weapon's current
  deal_damage instance as an argument.
* Assign the deal_damage_poison_x instance to the weapon.

When using the weapon, deal_damage_poison_y is called, which does it's
work and calls the weapon's original deal_damage afterwards.

That also works if a Dwarf has inscribed runes on the weapon beforehand.
We'd then have a series of calls like

    deal_damage_poison_y
        deal_damage_rune_z
            deal_damage_normal

If a character with that weapon also uses a certain fighting feat, we'd
have:

    deal_damage_feat_x
        deal_damage_poison_y
            deal_damage_rune_z
                deal_damage_normal

All the damage effects would be accumulated. Sounds okay?


And finally, here's an idea I had concerning the "crossing of
abilities". As discussed earlier, a member of a certain faction might be
allowed a rank in an ability that isn't native to his race. Like a human
who joins the "Rods of Chaos" might be allowed a rank in (elven) fire
magic.

That's cool, no doubt. But if you think about it, there is little
benefit the human gains. Good, he can use lowlevel fire magic, but I
imagine that at the point where he can join the Rods of Chaos, lowlevel
fire magic will be quite useless already.

However, we could include some very potent artifacts that would for
example require a high rank in an human ability (like mechanics) but
also a rank in fire magic. Such an artifact would be more useful than a
lowlevel fire spell, which makes that 1 rank in fire magic a real
achievement.

Same could be done for all the other combinations. I imagine that these
artifacts would be amongst the best items available in the game. They
would be hard to find, but even harder to use. Gaining the abilities to
use them could be something very motivating for players. (It's like that
in Diablo, I think, where you'd often find items you cannot use at that
time, so you fight on to be able to use them).


Well, so much for now. The implementation of the deal_damage chains
needs some further thougths. But I guess it is the easiest way to
integrate weapon/armour improvements, enchanting and poisoning of
weapons and fighting feats.

Opinions and comments, please! :)

Kai




reply via email to

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