Multiplayer Interactive-Fiction Game-Design Blog



Download 8.87 Mb.
Page122/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   118   119   120   121   122   123   124   125   ...   151

06 Combat


Describes the basics behind MIF's combat design.


Combat

Most MUDs and virtual worlds have a turn-based combat system

where each combatatant gets one attack evern 2-5 seconds.

Because there aren't any choices for a player (or NPC) to make,

players can press an "auto-attack" button and bash on their

opponent until either the opponent dies, or the player decides

to run away.

Circumreality's combat is entirely different...





  • An attack only occurs when the player presses the attack button or

    types in "attack ENEMY".



  • A player can attack once every second if they wish, except that

    their attacks become ineffective when done that rapidly.

    This is handled by the pWeaponAttackTime parameter.

    Attacking too quickly will significantly decrease the chance of hitting and

    reduce the attacker's damage. Attacking longer will slightly

    increase the hit chance and damage, but at the expense of attacks.

    The ActionEffectiveness() call is made to determine

    how effective the attack it.



  • Each attack also fatigues the attacker in

    a significant way, so a player wants to make their attacks count.

    A call to ActionFatigue() takes care of this.

    Note that it fatigues characters holding a lot of weight more

    than those lightly encumbered.





  • However, if an attacker does not attack quickly enough, the

    defender will get in a counterattack. This will cause

    the attacker to parry or dodge causing

    a distraction, that then distrupts the attacker's attack.

    The function to disrupt a character

    is ActionDistraction().



  • Since parrying and dodging both use fatigue, and end up

    distracting the attacker, a character can

    control how much parrying and dodging their character does.

    If they have both on full, they aren't likely to get hit,

    but they won't be able to effectively attack, and they'll

    tire quickly. Conversely, a character in a full suit of armor

    can turn both off and just attack without worrying about

    the enemy's attacks getting through his armor.



  • The attacker can also decide where to aim:

    high, middle, or low, and left, center, or right. If the

    attacker hits an undefended spot their chance of hitting

    increases.



  • Aiming also (obviously) influences what body

    part is hit, allowing the attacker to use different strategies,

    like taking out the defender's legs, etc.





  • Likewise, the defender can defend a location

    of their body.





  • Different weapons do different types of damage: Swords

    causes bleeding, maces cause tissue and bone damage, etc.





  • Some weapons have several attack types, such as

    swords being able to slash and stab, each producing a different

    type of damage.





  • Some armor provides better protection against some types

    of attack. For example: Chainmail is great against slashing

    damage, but lousy against clubs or impaling.





  • Characters can sustain several types of damage, including

    broken bones, severed limbs, tissue damage, and bleeding.

    Bleeding is very different from a traditional game because

    a wound will continue bleeding after it has been created, so

    a character hit by major sword wound won't fall unconscious right

    away, but may take 30 seconds before bloodloss overcomes him.






Attack function calls

When an attack is made, the following method calls are made:





  1. Attacker.CombatAttack() to initiate the attack.





  2. Attacker.CombatWeaponPrefGet() and

    Attacker.CombatWeaponPrefSet() to get and set the

    weapon that the attacker uses for combat.





  3. Defender.DamageParry() to allow the defender to

    parry the attack.



  4. Defender.DamageDodge() so the defender can dodge

    the attack.



  5. Defender.DamageArmor() is then called, letting

    the defender's armor absorb some of the damage.



  6. Defender.DamageNoArmor() is finally called with

    the damage that reaches the defender's flesh.



  7. cBodyPart.BodyPartDamage() receives the call

    with the damage that's specific to the body part.



  8. In turn, it calls BodyPartBloodLoss(),

    BodyPartBoneBreak(), BodyPartParalysis(), BodyPartSevered(),

    and BodyPartTissueDamage().





  9. These may make calls back into the cCharacter,

    including DamageBloodLoss(), DamageDazed(),

    DamageDeath(), DamageDisease(), DamageDodge(),

    DamageDropHeld(), DamageFatigue(), DamageKnockDown(),

    DamageMagicEffect(), DamageMana(), DamageUnconscious(),

    and DamageVenom().





Download 8.87 Mb.

Share with your friends:
1   ...   118   119   120   121   122   123   124   125   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page