Magicbane
) Magicbane  

Base item  athame 
Damage vs. small  1d4 +1d4 +(special) (28) 
Damage vs. large  1d3 +1d4 +(special) (27) 
Tohit bonus  +2 +1d3 
Bonus versus  fail monster MR check or player without MR 
Weapon skill  dagger 
Size  onehanded 
Affiliation  
When carried 
(none) 
When wielded 

When invoked 
(none) 
Base price  3500 zm 
Weight  10 
Material  iron 
Magicbane is an artifact athame that appears in NetHack. It is neutral and is the guaranteed first sacrifice gift for Wizards.
Contents
Generation
Archliches have a minuscule chance (1/1170, or approximately 0.085%) of being generated with Magicbane.
Description
Magicbane has a +d3 tohit bonus, and hitting a monster with it has a 40% chance of inflicting a magical effect and dealing +1d4 damage to the victim in that order, subject to monster MR or playerstyle magic resistance. When thrown, Magicbane will do the same to a monster it hits, though this is obviously impractical.^{[1]} The probability of each applicable magical effect is determined by Magicbane's enchantment  Magicbane will react as follows when enchanted to certain thresholds:
 Your right hand itches!
 Magicbane's has been enchanted to +0 or +1.
 Your right hand flinches.
 Magicbane has been enchanted to +2 or above.
Magicbane also grants magic resistance while wielded, and will also absorb and negate 95% of of curses directed at its wielder. As its base item type is an athame, Magicbane can engrave a semipermanent Elbereth in one turn without dulling like other athames (unless it is cursed).
Magical effects
There are four "bonus" effects that Magicbane can produce upon hitting, with details listed below:
Effect  Details  Notes 

Probe monster  Reveals the monster's HP, AC and inventory as if zapped with a wand of probing  'Replaces' other effects as enchantment increases 
Stun monster  Stuns the attacked monster.  Odds drop significantly once Magicbane is enchanted 
Scare monster  Scares the attacked monster.  Odds drop significantly once enchanted past +2 
Cancel monster  Cancels the attacked monster as if zapped with the spell or wand of cancellation. If the cancelled monster is a spellcaster, you will also absorb energy and increase your current and maximum energy by 1.^{[2]}  Odds drop significantly once enchanted past +2 Absorption occurs regardless of if the target is already canceled 
Strategy
Enchanting
The chance of stunning drops progressively from +0, scaring and cancellation drop progressively after +2, and cancellation is eliminated after +5; probing takes their place. However, the average damage it inflicts increases with each level of enchantment, which is typically desirable for dealing maximum damage as a primary weapon.^{[3]}
Increasing Magicbane's enchantment from +6 to +7 is typically not worth the effort. As with other weapons, you need to lower it to +5 to safely attempt to enchant to +7, but lowering Magicbane's enchantment can be very difficult: because it's an athame, engraving with it will not dull it, and because it's an artifact, it will resist most attempts at disenchantment from a cursed scroll of enchant weapon. Drain life can work, but typically takes many attempts. Hitting a disenchanter with Magicbane can also work, though the disenchanter may be able to disenchant your armor if you stand around hitting it for too long (the attack is subject to magic cancellation, so this is rarely a major issue by the time you're worried about enchanting Magicbane to +7).
If you have copious amounts amounts of holy water and unholy water on hand, it is also possible to lower Magicbane's enchantment by cursing it with unholy water and engraving a single letter with it. Remember to rebless it afterward.
Damage
Strength, skill and blessed damage bonuses are also added.
Note the progressive drop of stun from +0, the progressive drop of scare and cancel after +2, and cancel is eliminated after +5 while average damage keeps increasing.
Enchantment  Monster Resisted  Base Damage  Chance of +1d4 Extra  Chance of +1d4 Stun  Chance of +1d4 Scare  Chance of +1d4 Cancel  Mean Damage 

+0  No  (1d4 or 1d3) + 1d4  8 / 20  8 / 20 * 10 / 11  4 / 20  2 / 20  7.66 or 7.16 
Yes  1d4 or 1d3  8 / 20  8 / 20 * 6 / 7  3 / 20  1 / 20  4.86 or 4.36  
+1  No  (1d4 or 1d3) + 1d4 + 1  8 / 20  8 / 20 * 9 / 11  4 / 20  2 / 20  8.57 or 8.07 
Yes  (1d4 or 1d3) + 1  8 / 20  8 / 20 * 5 / 7  3 / 20  1 / 20  5.71 or 5.21  
+2  No  (1d4 or 1d3) + 1d4 + 2  8 / 20  8 / 20 * 8 / 11  4 / 20  2 / 20  9.48 or 8.98 
Yes  (1d4 or 1d3) + 2  8 / 20  8 / 20 * 4 / 7  3 / 20  1 / 20  6.57 or 6.07  
+3  No  (1d4 or 1d3) + 1d4 + 3  8 / 20  8 / 20 * 7 / 11  2 / 20  1 / 20  10.01 or 9.51 
Yes  (1d4 or 1d3) + 3  8 / 20  8 / 20 * 3 / 7  1 / 20  0 / 20  7.05 or 6.55  
+4  No  (1d4 or 1d3) + 1d4 + 4  8 / 20  8 / 20 * 6 / 11  2 / 20  1 / 20  10.92 or 10.42 
Yes  (1d4 or 1d3) + 4  8 / 20  8 / 20 * 2 / 7  1 / 20  0 / 20  7.91 or 7.41  
+5  No  (1d4 or 1d3) + 1d4 + 5  8 / 20  8 / 20 * 5 / 11  2 / 20  1 / 20  11.83 or 11.33 
Yes  (1d4 or 1d3) + 5  8 / 20  8 / 20 * 1 / 7  1 / 20  0 / 20  8.77 or 8.27  
+6  No  (1d4 or 1d3) + 1d4 + 6  8 / 20  8 / 20 * 4 / 11  1 / 20  0 / 20  12.49 or 11.99 
Yes  (1d4 or 1d3) + 6  8 / 20  8 / 20 * 0 / 7  0 / 20  0 / 20  9.5 or 9  
+7  No  (1d4 or 1d3) + 1d4 + 7  8 / 20  8 / 20 * 3 / 11  1 / 20  0 / 20  13.40 or 12.90 
Yes  (1d4 or 1d3) + 7  8 / 20  8 / 20 * 0 / 7  0 / 20  0 / 20  10.5 or 10  
+8  No  (1d4 or 1d3) + 1d4 + 8  8 / 20  8 / 20 * 2 / 11  1 / 20  0 / 20  14.31 or 13.81 
Yes  (1d4 or 1d3) + 8  8 / 20  8 / 20 * 0 / 7  0 / 20  0 / 20  11.5 or 11  
+9  No  (1d4 or 1d3) + 1d4 + 9  8 / 20  8 / 20 * 1 / 11  0 / 20  0 / 20  15.09 or 14.59 
Yes  (1d4 or 1d3) + 9  8 / 20  8 / 20 * 0 / 7  0 / 20  0 / 20  12.5 or 12  
+10 or more  No  (1d4 or 1d3) + 1d4 + Enchantment  8 / 20  8 / 20 * 0 / 11  0 / 20  0 / 20  (6 or 5.5) + Enchantment 
Yes  (1d4 or 1d3) + Enchantment  8 / 20  8 / 20 * 0 / 7  0 / 20  0 / 20  (3.5 or 3) + Enchantment 
Exact mechanics
The base damage is 1d4 to small monsters and 1d3 to large monsters. If the monster fails a magic resistance check, an additional 1d4 damage is added to the base damage and the further special attacks are more likely. This magic resistance check is, however, an unusual one, because it doesn't consider level bonuses. There is an 8 / 20 (40%) chance of an additional +1d4 damage and possibly more. Given there is additional damage:
 There is a chance of an additional +1d4 stun damage.
 If the monster failed the previous magic resistance check, the probability of this stun damage is .
 If the monster passed the magic resistance check, the probability of this stun damage is .
 There is a chance of an additional +1d4 scare damage or +2d4 scare & cancellation damage.
 The roll for scare or cancellation damage is scaled by , where is integer division. The base roll for scare damage is and the base roll for cancellation damage is . ^{[4]}
 If the monster failed the previous magic resistance check, the probability of scare damage is simply and the probability of cancellation damage is simply .
 If the monster passed the previous magic resistance check, the probability of scare damage is and the probability of cancellation damage is .
 Exactly one of the following occurs:
 The probability of +1d4 scare damage is .
 The probability of +2d4 scare & cancellation damage is . (Note that this means there is a probability of +1d4 scare and a probability of +1d4 cancellation, which is used in the table below.)
 The probability of no scare or cancellation damage is .
 If there is also no stun damage, the attack probes. The probe has a 1 in (abs(enchantment) * 3) of being insightful and actually probing the monster, otherwise nothing happens. The +0 magicbane will always successfully probe the target.
 The roll for scare or cancellation damage is scaled by , where is integer division. The base roll for scare damage is and the base roll for cancellation damage is . ^{[4]}
 Finally, there is a 1in12 chance of confusing the target with any magical attack. This chance is not affected by enchantment.
The monster can resist the scare and cancellation effects using a Magic resistance (monster) check (if you are attacked, you resist if you have Magic resistance instead), but the extra damage of these effects is dealt even in that case. The monster cannot resist the stun, probe, or confuse effects.^{[1]}
History
Magicbane is introduced in NetHack 3.1.0.
Messages
 The magicabsorbing blade probes/stuns/scares/cancels the <monster>!
 Magicbane's additional effects were triggered.
 The magicabsorbing blade prods/amazes/tickles/purges the <monster>!
 As above, while hallucinating.^{[5]}
 You absorb magical energy!
 The cancellation effect increased your energy.
Variants
SLASH'EM
) Magicbane  

Base item  athame 
Damage vs. small  1d4 + 4 + (special) (28) 
Damage vs. large  1d3 + 4 + (special) (27) 
Tohit bonus  +2 +3 
Bonus versus  fail monster MR check or player without MR 
Weapon skill  dagger 
Size  onehanded 
Affiliation  
When carried 
(none) 
When wielded 

When invoked 
(none) 
Base price  3500 zm 
Weight  10 
Material  iron 
In SLASH'EM, as with other SLASH'EM artifacts, a target that fails a magic resistance check takes a flat bonus of +4 damage, rather than +1d4;^{[6]} this adds 1.5 to the mean damage for such attacks. Additionally, Magicbane can hit through enchantment resistance (requiring an enchanted weapon to hit) and is technically the only such weapon that can do so  lightsabers are also capable of this, though they are considered tools by the game.
SLASH'EM also gives the option of wielding artifacts in the offhand while twoweaponing  however, Magicbane will not convey its curse or magic resistance unless it is wielded as a primary weapon.
FIQHack
In FIQHack, the base item for Magicbane is a quarterstaff,^{[7]} improving Magicbane's base damage but making it a twohanded weapon. All staves, including Magicbane, enhance spellcasting in the same way robes do.^{[8]} Besides these traits, Magicbane retains its usual effects  magic resistance, special attacks, and curse protection.
dNetHack
In dNetHack, Magicbane is more powerful vs. monsters that resist magic (it requires powerful magic to resist magic, and Magicbane is effective against such magic). Each magical effect that triggers deals an additional 6d6 (636) damage to targets that have playerstyle MR or that have passed their monster MR check. Magicbane also receives a +10% bonus to the chances of the probing, scare monster, and cancellation effects occurring vs. such targets. Wizards in dNetHack are therefore advised to leave Magicbane unenchanted to maximize the chances of the additional magical effects occurring when fighting magicresistant foes.
EvilHack
In EvilHack, the base item for Magicbane is a quarterstaff, and placing Magicbane into a bag of holding has a ^{1}⁄_{3} chance of causing the bag to explode, much like a wand of cancellation.
Magicbane can be forged together with Secespita to create The Staff of the Archmagi, an artifact quarterstaff.
Hack'EM
In Hack'EM, the base item for Magicbane is a quarterstaff as in EvilHack, but it will not cause an explosion if placed in a bag of holding.
Encyclopedia entry
A highly enchanted athame said to hold the power to channel and direct magical energy.
See also
References
 ↑ ^{1.0} ^{1.1} src/artifact.c in NetHack 3.6.7, line 961: function
Mb_hit()
 ↑ src/artifact.c in NetHack 3.6.7, line 1051
 ↑ http://www.steelypips.org/nethack/343/art2343.html
 ↑ (The rolls are out of 20, but require at least an 8 out of 20, which is why 8 is used as the denominator below).
 ↑ src/artifact.c in NetHack 3.6.7, line 956
 ↑ Source:SLASH'EM 0.0.7E7F2/artifact.c.
 ↑ https://github.com/FredrIQ/fiqhack/blob/865c9091803e844b66255e122877ae6c70950e51/libnethack/include/artilist.h#L126
 ↑ https://github.com/FredrIQ/fiqhack/blob/865c9091803e844b66255e122877ae6c70950e51/libnethack/src/spell.c#L2272