MONSTER ATTACKS--Melee Attacks, Methods, and Effects Version 0.1.1a Updated 2005-05-04 ========================= Methods of Attack ========================= For the most part, the method of attack that a monster uses has only two effects--it determines whether or not the attack can cut or stun the character. The most common method of attack, 'hit', is also the only one which can cause both cuts and stunning; all others can induce at most one of the two. Note, however, than any single blow can only inflict one of the two--if the method could possibly inflict both, for each blow there is a 50% chance that that blow is allowed to inflict only cuts and a 50% chance that it is allowed to inflict only stuns, and this chance is independent for each blow made. +----------------+------+-------+ | Attack | Cut? | Stun? | +----------------+------+-------+ | hit | Yes | Yes | | touch | No | No | | punch | No | Yes | | kick | No | Yes | | claw | Yes | No | | bite | Yes | No | | sting | No | No | | butt | No | Yes | | crush | No | Yes | | engulf | No | No | | crawl on you | No | No | | drool on you | No | No | | spit | No | No | | gaze | No | No | | wail | No | No | | release spores | No | No | | beg | No | No | | insult | No | No | | sneer | No | No | | offer to trade | No | No | +----------------+------+-------+ The one method which has more than just those two effects is 'offer to trade', which is used by only one monster (the Desperate Adventurer). It works as follows: a random slot is chosen from your pack repeatedly, until a torch, flask of oil, food ration, or scroll of Word of Recall is found, or until 51 unsuccessfull attempts have been made. The monster then requests to trade for the entire stack (if 10 or fewer items are in the stack) or for 9 items plus one fifth the stack (if more than 10 items are present in the stack). An amount of gold is offered in trade equal to the base value of all the items being traded for plus either 600, 700, 800, 900, or 1000 gold, each with equal probability. If the player accepts, the character gains the gold and loses the items traded for; otherwise, nothing changes. In either case, the monster is deleted, and if a unique, is marked as killed (though no experience is gained). =========================== Attack Effects =========================== The attack effect determines both how likely the attack is to hit you, what resistances may be applicable, and what side effects the attack may have. The chance to hit is based upon the attack's 'power'; generally, attacks with less severe side effects tend to have greater power (and thus a greater chance to hit). There is one important special case, though. Attacks which have no effect (like a monster that just sneers, rather than sneers to hit or the like) always hit but do no damage and have no side effects. +-----------------------------+-------+ | Effect | Power | +-----------------------------+-------+ | attack | 60 | | poison | 25 | | disenchant | 20 | | drain charges | 15 | | steal gold | 5 | | steal items | 5 | | eat your food | 5 | | absorb light | 5 | | shoot acid | 50 | | electrify | 50 | | burn | 50 | | freeze | 50 | | blind | 2 | | confuse | 10 | | terrify | 10 | | paralyze | 2 | | reduce strength | 0 | | reduce intelligence | 0 | | reduce wisdom | 0 | | reduce dexterity | 0 | | reduce constitution | 0 | | reduce charisma | 0 | | reduce all stats | 2 | | shatter | 60 | | lower experience (by 10d6+) | 5 | | lower experience (by 20d6+) | 5 | | lower experience (by 40d6+) | 5 | | lower experience (by 80d6+) | 5 | +-----------------------------+-------+ Attack Effects: 'attack' The most basic form of attack; armor class reduces the amount of damage taken. The damage is reduced by the proportion of the character's armor class over 250, with a maximum reduction of three fifths of the damage for armor classes of at least 150. 'poison' Poisons the character, if you do not possess both permanent and temporary resistance to poison. Neither permanent nor temporary resistance reduces the damage taken, though. Having one of temporary or permanent resistance reduces the damage for the purposes of determining how long the character is poisoned to one third (rounded up). The enhance magic specialty in combination with temporary resistance reduces it to a further one sixth (again rounded up). If not already poisoned, the character's poison counter becomes 4, plus half the damage dealt (rounded down), plus a random number between one and half the damage dealt (rounded up). If already poisoned, the character's poison counter is only increased by one third the damage dealt (rounded down) plus a random number betwenn one and a third the damage dealt (rounded up). 'disenchant' Can disenchant the player's equipment, if you do not possess resistance to disenchantment. Disenchantment resistance does not reduce the amount of damage taken, though. Note that this form of disenchantment cannot force a shapeshifted character back into normal form, and so cannot damage such a character's equipment. Assuming that the character is not shapechanged and does not have disenchantment resistance, a random slot is chosen (from weapon, bow, body armor, cloak, shield, head, hands, and feet) and is attempted to be disenchanted. If no weapon or armor occupies that slot, or if the piece of equipment in that slot does not have a positive to hit, to damage, or to AC bonus, nothing happens. Otherwise, artifacts have a flat 70% chance to resist disenchantment, in which case nothing happens. For other objects, or if an artifact fails to resist, it loses 1 point each from its to hit, to damage, and to AC bonuses, if positive. Each bonus which was at least +7 to start has an individual 20% chance to lose an additional point. 'drain charges' Can drain charges from rods, staffs, and wands in the character's backpack. To determine whether a item gets drained and if so which one, a random item is chosen from the character's backpack. If it is not a wand or staff with at least one charge, or a rod at least partially charged, a new item is chosen. If in ten tries a drainable item is not found, nothing is drained. If a drainable item is found, the amount of mana the monster gains is determined by adding two to one twentieth the monster's depth, then multiplying by the number of total number of charges in the stack (for a stack of wands or staffs) or by one thirtieth the number of game turns the stack is from being fully drained (for a stack of rods). This total, divided by 10 and adding one, is the amount of mana the monster gains. If one tenth this total is more enough to bring the monster up to full mana, it also gains HPs. The number of HPs gained in this case is equal to twice the quantity the total minus 10 times the number of points required to restore the monster's mana to full (but not, unlike with SPs, divided by 10). Therefore, a monster native to 3000' (level 60) draining a stack of 2 staffs, each with 25 charges (for a total of 50 charges in the stack) would gain ((2 + 60 / 20) * 50) / 10 + 1 = 26 mana. If the monster only needed 15 mana to regain full mana, it would instead gain those 15 mana plus 2 * (((((2 + 60 / 20) * 50) / 10) - (15 * 10)) = 200 hit points. 'steal gold' Can steal some or all of the character's gold. If the monster is confused, it can't even attempt to steal. Otherwise, if the character is paralyzed, it gets no chance to save. Assuming an unconfused monster and an unparalyzed character, the chance to avoid theft is determined by the base chance to avoid theft from dexterity (shown in the table below) added to the difference between the character's level and half the monster's level. If the theft fails, there is a two thirds chance the thief will blink away but the character's gold will remain unchanged. If it succeeds, the character will lose one twelfth their current gold plus between one and twenty-five gold. If this amount is less than two gold, the character loses two gold; if it is more than 5000 gold, the character instead loses one twentieth their current gold plus between one and 2000 gold. However, the character cannot lose more than their current gold total (if this would otherwise happen, all gold is lost but no more). The thief will then always blink away. The distance of the blink is equal to twice the maximum sight range plus five squares, for a total of 45 squares. +-----------------+---------------+ | Dexterity | Theft Avoid % | +-----------------+---------------+ | 3 - 4 | 5% | | 5 - 6 | 6% | | 7 - 8 | 7% | | 9 - 10 | 8% | | 11 | 9% | | 12 | 10% | | 13 | 12% | | 14 | 14% | | 15 | 16% | | 16 | 18% | | 17 | 20% | | 18 - 18/09 | 22% | | 18/10 - 18/19 | 25% | | 18/20 - 18/29 | 27% | | 18/30 - 18/39 | 30% | | 18/40 - 18/49 | 32% | | 18/50 - 18/59 | 35% | | 18/60 - 18/69 | 40% | | 18/70 - 18/79 | 45% | | 18/80 - 18/89 | 50% | | 18/90 - 18/99 | 55% | | 18/100 - 18/109 | 60% | | 18/110 - 18/109 | 65% | | 18/120 - 18/109 | 70% | | 18/130 - 18/109 | 75% | | 18/140 - 18/109 | 80% | | 18/150 - 18/109 | 82% | | 18/160 - 18/109 | 85% | | 18/170 - 18/109 | 87% | | 18/180 - 18/109 | 90% | | 18/190 - 18/109 | 92% | | 18/200+ | 95% | +-----------------+---------------+ 'steal items' Can steal one of the character's items. As with the 'steal gold' attack effect, a confused monster cannot attempt to steal and a paralyzed player gets no save against an attempt to steal. The chance to save for an unparalyzed player is the same as in the 'steal gold' case, except that on an unsuccessful attempt the thief will always blink away. On a successful attempt, a random slot is chosen from the character's pack up to ten times or until a non-artifact object is chosen. That item (or one item from a stack) is then stolen by the monster, added to its inventory and removed from that of the character. 'eat your food' Can eat one of your food items. A random slot is chosen from the character's pack up to ten times or until a food item is found. That item (or one item from a stack) is then eaten by the monster. No effects that the food would normally have when eaten or thrown are inflicted upon the monster. 'absorb light' Will drain some fuel from the character's light source, assuming one is present, it currently has some fuel, and it is not an artifact. Each attack will drain a random number between 251 and 500 turns from the light source, to a minimum of one turn of light remaining. 'shoot acid' This damage is one third unresistable and two thirds acid damage. Therefore, single resistance to acid reduces damage from this attack effect to five ninths its normal value, double resistance reduces damage to eleven twenty-sevenths, and immunity reduces damage to one third. The acid portion of the damage can have all the normal effects of acid, including damaging armor, etc. 'electrify' Similar to the 'shoot acid' effect, except the damage is one third unresistable and two third electricity damage. 'burn' Similar to the 'shoot acid' effect, except the damage is one third unresistable and two third fire damage. 'freeze' Similar to the 'shoot acid' effect, except the damage is one third unresistable and two third cold damage. 'blind' Can blind the character, if they do not have blindness resistance. If the character is not already blind, they become blind for 12 plus a random number between one and the monster's level in turns. Otherwise, they are blinded for an additional 6 plus a random number between one and half the monster's level in turns. Note that blindness resistance does not reduce the damage from the attack. 'confuse' Can confuse the character, if they do not have confusion resistance. If the character is not already confused, they become confused for 5 plus a random number between one and the monster's level in turns. Otherwise, they are blinded for an additional 2 plus a random number between one and half the monster's level in turns. Note that confusion resistance does not reduce the damage from the attack. 'terrify' Can frighten the character, if they do not have fear resistance. The character receives a normal saving throw; if they succeed that are not made (more) afraid. If it fails and the character is not already afraid, they are scared for 6 plus a random number between one and the monster's level in turns. Otherwise, they are scared for an additional 2 plus a random number between one and half the monster's level in turns. Note that fear resistance does not reduce the damage from the attack. 'paralyze' Can paralyze the character, if they do not have free action. Even if they do not have free action, they recieve a normal saving throw to avoid becoming (more) paralyzed; if this fails, they are paralyzed for 4 plus a random number between one and half the monster's level in turns, or for 2 plus a random number between one and one sixth the monster's level more turns if already paralyzed. Note that all attacks to paralyze do at least 1 point of damage against a character who is already paralyzed, to prevent death via starvation. Also note that free action does not reduce the damage from the attack. 'reduce strength' Can reduce the character's strength temporarily, if they do not have their strength sustained. If the character's strength is not sustained, a current internal strength of from 3 to 18 will be reduced by 1 point, and a greater strength will be reduced by 5 percentage points (from 18/100 to 18/95, for example), but not below 18. Note that also there is theoretically some randomness in the amount drained from a high stat, this can only show up when the amount drained is at least 50% (and the only thing that can drain a stat this amount is one of the random effects from the one ring), and even then, only rarely. Note also that having your strength sustained does not reduce the damage from the attack. 'reduce intelligence' As 'reduce strength', except it can reduce your intelligence temporarily. 'reduce wisdom' As 'reduce strength', except it can reduce your wisdom temporarily. 'reduce dexterity' As 'reduce strength', except it can reduce your dexterity temporarily. 'reduce constitution' As 'reduce strength', except it can reduce your constitution temporarily. 'reduce charisma' As 'reduce strength', except it can reduce your charisma temporarily. 'reduce all stats' Can reduce all of the character's stats temporarily, if they are not sustained. Each stat that is not sustained will be reduced as described in the 'reduce strength' effect. Note that sustains do not reduce the damage from the attack. 'shatter' Damage can be reduced by armor class, as with the 'attack' effect. In addition, any blow which causes at least 24 points of damage to the character (after the effects of armor class) also causes a radius 6 earthquake, centered on the monster. 'lower experience (by 10d6+)' Can drain some of the character's experience. If the character has hold life, they have a 95% chance of avoiding all experience drain. A character without hold life will lose 2% of their current experience plus 10d6 points; one with hold life who still has experience drained will lose one tenth as much. Note that hold life does not reduce the damage taken from the attack, only the experience loss. 'lower experience (by 20d6+)' As 'lower experience (by 10d6+)', except that hold life only gives a 90% chance to avoid any experience drain and the amount lost is 2% of the character's current experience plus 20d6 points, or one tenth that for a character with hold life. 'lower experience (by 40d6+)' As 'lower experience (by 10d6+)', except that hold life only gives a 75% chance to avoid any experience drain and the amount lost is 2% of the character's current experience plus 40d6 points, or one tenth that for a character with hold life. 'lower experience (by 80d6+)' As 'lower experience (by 10d6+)', except that hold life only gives a 50% chance to avoid any experience drain and the amount lost is 2% of the character's current experience plus 80d6 points, or one tenth that for a character with hold life. =========================== Chance to Hit =========================== The chance for a monster to hit the character is similar to the chance for the character to hit a monster. It depends on only four things--the native depth of the monster, whether it is stunned, the character's AC, and the terrain the character is standing on. 5% of the time, the monster will always hit regardless of depth, AC, or terrain, and 5% of the time, the monster will always miss. The remaining 90% of the time, the "attack quality" of the monster is determined. This is power of the attack method (from the table above in the section on attack effects) added to three times its level normally, or added to twice its level if it is stunned. The character's AC is then adjusted for terrain effects as per the table below. If the character has the unlight specialty and the attacking monster is on a dark grid (or, due to a bug, if the character is blind), the character's AC is increased by 10 + 1/8 its current value (after terrain effects). If the attack quality is at least one, a random number is generated between 1 and the attack quality, and if this is greater than three quarters of the character's modified AC, the attack hits; otherwise, it misses. +------------------------------+----------------------+ | Terrain | AC Adjustment | +------------------------------+----------------------+ | Rubble | 5 + 1/8 current AC | | Trees, for a ranger or druid | 10 + 1/8 current AC | | Trees, for other classes | 2 + 1/10 current AC | | Water | - 1/3 current AC | +------------------------------+----------------------+ If the character has the evasion specialty, he has a chance equal to his evasion chance out of 100 of avoiding the attack (and all side effects) anyway. Similarly, if the character is protected from evil and the monster is evil, there is a chance that the monster could be repelled instead of the hit doing damage. If the monster's level is no greater than that 3/2 the character's level, then a random number between 0 and 100 plus the character's level minus 5/4 the monster's level is generated; if it is greater than 50, the attack is repelled. ====================== Damage and Side Effects ====================== The damage inflicted by a monster's attack is fairly simple to compute, compared with that done by the character's attacks. Simply check the number of dice and number of sides per dice for the given attack by the given monster (from lib/edit/monster.txt), then roll that number of dice with that many sides each. There are no modifiers for deadliness, slays, or anything else. There are, however, several side effects that monster attacks can inflict. First is the black breath, which can be inflicted on the player by deep undead. Any unique undead with native depth of at least 2000' has a chance equal to 1 in 250 - it's level to inflict the black breath with each blow that hits the character. Any non-unique undead with native depth of at least 2500' has a chance equal to 1 in 500 - it's level to inflict the black breath with each blow that hits. The second possible side effect from a monster blow is cuts. If the method of attack used can inflict cuts (from the table above), the blow is checked for a critical hit. For a monster, a critical hit can occur whenever blow must deal at least 95% of the maximum possible damage for that blow (rather than the 90% mentioned in the comments). If this happens, there is a flat 1/3 chance that no critical occurs. Even then, if the blow dealt less than 20 points of damage, there is only a 1% chance per point of damage dealt that a critical hit occurs. If a critical hit did occur, its severity must be determined; this is based upon the damage dealt by the blow as shown in the table below. If the blow dealt the maximum possible damage it could have, the severity is increased by one. Finally, if the blow dealt at least 20 points of damage, there is a 1% chance for the severity to be increased by one; if this occurs, the 1% chance repeats until it does not occur--note that this may increase the severity of the critical without bound. On a critical hit, the character's cuts counter is increased by the amount shown in the table below. A similar process happens for stuns. If the attack method could stun the character, the blow is checked for a critical hit. If one occurs, the character's stun counter is increased as shown in the table below. +---------+----------+------------+-----------+ | Damage | Severity | Cuts | Stun | +---------+----------+------------+-----------+ | 1 - 11 | 1 | d5 | d5 | | 12 - 18 | 2 | 5 + d5 | 8 + d8 | | 19 - 25 | 3 | 20 + d20 | 15 + d15 | | 26 - 33 | 4 | 50 + d50 | 25 + d25 | | 34 - 45 | 5 | 100 + d100 | 35 + d35 | | 46+ | 6 | 300 | 60 | | | 7+ | 500 | 100 | +---------+----------+------------+-----------+