Difference between revisions of "Proc:Damage (Area)"

From WikiName
Jump to: navigation, search
(Overview)
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
|-
 
|-
 
| DAMAGE_FREQUENCY
 
| DAMAGE_FREQUENCY
| 60 seconds
+
| 60 (seconds)
 
| How often the proc should deal damage, in seconds.  The MUD only runs procs every 10 seconds, so it should be a multiple of 10.
 
| How often the proc should deal damage, in seconds.  The MUD only runs procs every 10 seconds, so it should be a multiple of 10.
 
|-
 
|-
 
| DAMAGE_CHANCE
 
| DAMAGE_CHANCE
| 100%
+
| 100 (%)
 
| The percentage chance of hitting any player in the area.
 
| The percentage chance of hitting any player in the area.
 
|-
 
|-
Line 41: Line 41:
 
8 = BYPASS_SPECTRAL_SHIELD - Ignore spectral shield if active<br/>
 
8 = BYPASS_SPECTRAL_SHIELD - Ignore spectral shield if active<br/>
 
16 = BYPASS_SPELL_SHIELD - Ignore spell shield if active<br/>
 
16 = BYPASS_SPELL_SHIELD - Ignore spell shield if active<br/>
 +
|-
 +
| SAVING_THROW
 +
| None
 +
| Type of saving throw to apply to the damage.  Can be "paralysis", "poison", "petrification", "breath", or "spell".
 +
|-
 +
| SAVE_ADJUSTMENT
 +
| 0
 +
| Adjustment to the saving throw.  A positive number makes it easier for the player to save against the damage and a negative number makes it harder.
 
|-
 
|-
 
| DAMAGE_MOBILES
 
| DAMAGE_MOBILES
Line 69: Line 77:
 
= Sample =
 
= Sample =
  
Need a proper sample here!
+
A lightning bolt hits players in the area.
  
 
<pre>
 
<pre>
 +
addproc area Damage
 +
 +
setproc area # DAMAGE_FREQUENCY 10
 +
setproc area # DAMAGE_CHANCE 50
 +
setproc area # DAMAGE_DICE 6
 +
setproc area # DAMAGE_DIE_SIZE 6
 +
setproc area # DAMAGE_ADDITIONAL 6
 +
setproc area # DAMAGE_TYPE 30
 +
setproc area # DAMAGE_FLAGS 24
 +
 +
setproc area # DAMAGE_MOBILES 1
 +
setproc area # DAMAGE_MSG_ACTOR_0 The hairs on your arms begin to stand up!
 +
setproc area # DAMAGE_MSG_ACTOR_1 YOU'RE HIT! Lightning arcs from your body to the ground!
 +
setproc area # DAMAGE_MSG_ACTOR_2 Your body convulses as a bolt of lightning strikes you!
 +
setproc area # DAMAGE_MSG_ROOM_0 There is a flash of light as the air crackles all about!
 +
setproc area # DAMAGE_MSG_ROOM_1 There is a loud BOOM as a bolt of lightning strikes $n!
 +
setproc area # DAMAGE_MSG_ROOM_2 $n glows brightly as a bolt of lightning strikes $m with full force!
 +
 +
 +
setproc area # MISS_MSG_ACTOR_0 Lightning comes down from the sky and barely misses you!
 +
 +
setproc area # MISS_MSG_ROOM_0 Lightning comes down from the sky and barely misses $n!
 +
 +
setproc area # PROC_ENABLED 1
 
</pre>
 
</pre>
  

Latest revision as of 01:55, 12 June 2018

Overview

The damage procedure allows builders to have a random chance of damage to hit all players in an area at a desired interval.


Here is a list of keys that the procedure will use:

Key Default Description
DAMAGE_FREQUENCY 60 (seconds) How often the proc should deal damage, in seconds. The MUD only runs procs every 10 seconds, so it should be a multiple of 10.
DAMAGE_CHANCE 100 (%) The percentage chance of hitting any player in the area.
DAMAGE_DICE 1 The number of dice to roll.
DAMAGE_DIE_SIZE 1 The size of the die to roll.
DAMAGE_ADDITIONAL 0 A modifier to the die roll to either add or subtract damage.
DAMAGE_TYPE UNDEFINED The type of damage to apply. This could be a spell id or hit type id.
DAMAGE_FLAGS 0 Flags to the damage function to modify behavior. Current flags are:

1 = HIT_ETHEREAL - Required if non-spell damage should hit ethereal mobs
2 = SILENT_ATTACK - Suppress normal damage function messages
8 = BYPASS_SPECTRAL_SHIELD - Ignore spectral shield if active
16 = BYPASS_SPELL_SHIELD - Ignore spell shield if active

SAVING_THROW None Type of saving throw to apply to the damage. Can be "paralysis", "poison", "petrification", "breath", or "spell".
SAVE_ADJUSTMENT 0 Adjustment to the saving throw. A positive number makes it easier for the player to save against the damage and a negative number makes it harder.
DAMAGE_MOBILES 0 (False) Whether the proc should target mobiles that are following players
ALLOW_DEATH 0 (False) Whether the proc should kill players or leave them at 0 hps.
DAMAGE_MESSAGE_ACTOR_0 No message. The message that is displayed to players in the area that are hit with damage. Similarly builders can configure DAMAGE_MESSAGE_ACTOR_1 to allow for multiple messages, where one is randomly selected. This can be done all the way up to whatever MAX value the builder would like.
DAMAGE_MESSAGE_ROOM_0 No message. The message that is displayed to the room when a player in the area is hit with damage. Similarly builders can configure DAMAGE_MESSAGE_ROOM_1 to allow for multiple messages, where one is randomly selected. This can be done all the way up to whatever MAX value the builder would like.
MISS_MESSAGE_ACTOR_0 No message. The message that is displayed to players in the room when they are missed by the damage. Similarly builders can configure MISS_MESSAGE_ACTOR_1 to allow for multiple messages, where one is randomly selected. This can be done all the way up to whatever MAX value the builder would like.
MISS_MESSAGE_ROOM_0 No message. The message that is displayed to the room when a player in the room is missed by the damage. Similarly builders can configure MISS_MESSAGE_ROOM_1 to allow for multiple messages, where one is randomly selected. This can be done all the way up to whatever MAX value the builder would like.

Sample

A lightning bolt hits players in the area.

addproc area Damage

setproc area # DAMAGE_FREQUENCY 10
setproc area # DAMAGE_CHANCE 50
setproc area # DAMAGE_DICE 6
setproc area # DAMAGE_DIE_SIZE 6
setproc area # DAMAGE_ADDITIONAL 6
setproc area # DAMAGE_TYPE 30
setproc area # DAMAGE_FLAGS 24

setproc area # DAMAGE_MOBILES 1
setproc area # DAMAGE_MSG_ACTOR_0 The hairs on your arms begin to stand up!
setproc area # DAMAGE_MSG_ACTOR_1 YOU'RE HIT! Lightning arcs from your body to the ground! 
setproc area # DAMAGE_MSG_ACTOR_2 Your body convulses as a bolt of lightning strikes you!
setproc area # DAMAGE_MSG_ROOM_0 There is a flash of light as the air crackles all about!
setproc area # DAMAGE_MSG_ROOM_1 There is a loud BOOM as a bolt of lightning strikes $n!
setproc area # DAMAGE_MSG_ROOM_2 $n glows brightly as a bolt of lightning strikes $m with full force!


setproc area # MISS_MSG_ACTOR_0 Lightning comes down from the sky and barely misses you!

setproc area # MISS_MSG_ROOM_0 Lightning comes down from the sky and barely misses $n!

setproc area # PROC_ENABLED 1