TWiki Home Tharsis . Combat . ExistingCombatSystem (r1.1 vs. r1.4) Tharsis webs:
Design | Guilds | Combat | Website
Combat . { Home | Changes | Index | Search | Go }
 <<O>>  Difference Topic ExistingCombatSystem (r1.4 - 25 Mar 2006 - FantoM)
Changed:
<
<

Living attack It performs a single combat round for the living. Delegates to combat_d->attack(). Has problems because some weapons call attack() which means that the living gets multiple combat rounds, and each combat round might give a player several swings (eg when wearing the bracers).
>
>

Living attack It performs a single combat round for the living. Delegates to combat_d->attack().
Living heartbeat ...
Added:
>
>

Combat_D hit_player_from Does way more than it should? Checks for starts combat for the target, alters damage based on armour, alters target hp, checks for and handles target death (calls living->second_life), handles whimpy running.
Combat_D attack Handles an single attack from an attacker to a target. Will stop combat with the target if the living can not attack the target (living->query_may_attack()), will chose an alternative target in this case. Delegates to Combat_D->swing()
Combat_D execute_round Performs a single combat round for a living. Determines how many attacks the living gets and calls Combat_D->attack() for each
Combat_D swing Does one combat swing for a living against a target. Works out if the swing is a hit, determines base damage, delegates to living->hit_player() to deal the damage - which might alter it, does the "hit message", does the "You killed" message

 <<O>>  Difference Topic ExistingCombatSystem (r1.3 - 24 Mar 2006 - FantoM)
Changed:
<
<

-- FantoM - 08 Jan 2003

>
>

The Code

I've been making a few changes to the way this works, as part of the process of alleviating bits of these problems and moving towards a platform that allows us to fix the whole lot.

The code as it currently stands is:

Object Method Purpose
Living hit_player used to deal damage to a player. Delegates to living->hit_player_from
Living hit_player_from used to deal damage to a player. Delegates to combat_d->hit_player_from
Living attack It performs a single combat round for the living. Delegates to combat_d->attack(). Has problems because some weapons call attack() which means that the living gets multiple combat rounds, and each combat round might give a player several swings (eg when wearing the bracers).
BasePlayer hit_player_from Overrides living version to do hp reporting if it changes
Player hit_player_from Overrides BasePlayer version to do pk checks

-- FantoM - 24 Mar 2006


 <<O>>  Difference Topic ExistingCombatSystem (r1.2 - 08 Jan 2003 - PumaN)
Changed:
<
<

      • Special attacks, if performed, never miss, ignore armour class and all skills.
>
>

      • Special attacks, if performed, never miss, and ignores all skills.

 <<O>>  Difference Topic ExistingCombatSystem (r1.1 - 08 Jan 2003 - FantoM)
Added:
>
>

%META:TOPICINFO{author="FantoM" date="1041989415" format="1.0" version="1.1"}% %META:TOPICPARENT{name="WebHome"}% The existing combat system for Tharsis Gate is very inflexible and hard to change. Large amounts of data are stored in the player objects and the entire process is managed by the player object.

Currently it works as:

  • Party A starts combat through a kill command, or if a monster through agression
    • This simply records Party B as a potential target for swinging at
  • Each hearthbeat
    • Party A takes a swing at one of it's possible targets.
    • All rules governing ability to hit and damage are handled in the code of Party A, with a couple of calls to Party B to allow it to alter the results.
      • A very very limited form of attack type (magic/ice/fire/etc) is poorly considered.
    • If damage is to be dealt then Party B->hit_player( damage ) is called.
      • This may be the first time that Party B becomes aware of the combat.
      • Party B will add Party A as a potential target
    • If Party B dies then Party B->second_life() is called.
      • In monsters this removes the monster and places a corpse.
      • In players it makes them a ghost.
    • Hit messages are displayed.
      • Note this is AFTER the player has died, which looks shit.
    • Monsters now perform special attacks.
      • Special attacks, if performed, never miss, ignore armour class and all skills.

Crappy things:

  • Separate sides of combat controlled within each player separately.
    • Thus A can swing at B and miss for ages without B joining in.
    • Thus people assisting B are hard to code.
    • Thus a crash in B (loss of heartbeat) can remove B from combat while A continues.
    • Makes partying/combos hard.
    • Can't do initiative.
  • Duplicate instantiation of code across all living objects when we really only need one copy.
  • There is no way to incorporate alternative forms of combat for alternative environments.
  • Does not incorporate AAs well.
  • Current formulas do not take into account the wide range of offensive and defensive skills that exist in the current player base.
  • No such thing as rounds of combat, which makes it impossible to have fast vs slow weapons.

Things to think about

  • Having combat embeded in living objects allows, in theory although not in practice with the current code, the ability for certain monsters or monster types to have alternative forms of combat - like a flying monster attacking differently to a land based monster.

-- FantoM - 08 Jan 2003


Topic ExistingCombatSystem . { View | Diffs | r1.4 | > | r1.3 | > | r1.2 | More }
Revision r1.1 - 08 Jan 2003 - 01:30 GMT - FantoM
Revision r1.4 - 25 Mar 2006 - 11:47 GMT - FantoM
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding Tharsis? Send feedback.