goldbox.traits

The ten trait slots at 0x0AD, and what the codes mean. No Qt, no I/O.

This is where racial abilities, spell effects and monster specials live. It is one namespace, 1-139 on the C64, shared with the DOS port: Stephen S. Lee’s Pool of Radiance guide (section 12.2.3) enumerates ids 1-127 for the DOS build and every id our own census of the player’s disks turned up lands on the creature that id’s meaning demands. docs/128-guide-and-scripting.md is the write-up.

The names below are transcribed from a third-party document and then checked against the player’s own disks. 67 are CONFIRMED. Most were settled by the census: a MON* record or an item template carries the code on exactly the creature or item the meaning requires – the anhkheg carries 121 “anhkheg acid squirt”, the troll carries 100 and 101, the ghoul carries the paralysis that spares elves, the wight carries “silver or magic” and the wraith the “silver does half” variant, which is the Monster Manual distinction between them. Seventeen more were settled by playing: P3-EFFECTS.D64 was saved with 26 spells running, and each one named the code it had just written – 1 Bless, 25 invisible, 39 hasted and the rest, docs/90-specimens.md. One more was settled by a live fight: 53 sleeping, five Sleep-struck orcs in one slums ambush all naming it. 61 are PROBABLE: the guide names them, nothing on the C64 exercises them, and a third-party document on its own is never CONFIRMED.

The census is 108 MON* records across the eight POOL disks and the 163 item templates in the ITEMFILE* lists. 52 of the 129 codes are carried by something; the other 77 have no C64 carrier at all and cannot be promoted by any amount of looking. Only four item templates carry a passive power, and all four were already confirmed – the item side of this table is exhausted.

Four were promoted on the vampire’s block (P55): 103 gaseous form, 114 and 118 the half damage from electricity and cold, 126 the avoidable gaze. The vampire is the only creature on the disks carrying any of them, and together with the four the census had already confirmed on it the block reads as the Monster Manual’s vampire entry line for line.

Two that look promotable are not. 117 lands on all nine undead and nothing else – but so would “undead, and therefore turnable”, which is what this table used to call it, and the population cannot separate the two readings. 120 lands on both giants and nothing else – but so would “hurls boulders”, and hurling is an attack form at 0x0D9. Both stay PROBABLE until something other than the carrier set decides them.

Three codes are ours rather than theirs. 139 is past the end of their table and PHASE SPIDER carries it – which is why it stays PROBABLE, since the carrier is also where the name came from and one observation cannot corroborate itself. 92 they call unused and TYRANITHRAXUS carries it. 255 is a fill byte in the last slot: 38 of the 108 records carry it, every one of them in slot 9, and no record has a real code after one.

GEN $0BF3 seeds the list per race from [1, 0, 107, 0, 124, 0, 0, 0], indexed by the race byte itself, which is 1-based: elf is race 2 and is born with 107, half-elf is race 4 and is born with 124, and the leading 1 sits at index 0, which no created character reaches. That kills the old reading of it as a dwarf’s seed – MAGNUS, a dwarf, carries an empty trait block.

Not to be confused with item byte +14, which shares these slots and only sometimes shares their meaning. Item byte `+15` bit 7 is the discriminator: a passive item’s +14 is an effect id and SPELLE04 $ADD4 copies it verbatim into a free slot, while a consumable’s +14 is a spell id. Four item templates on the disks set bit 7 and only four: CLOAK OF DISPLACEMENT reads +14 89 / +15 $85 and TWO-HANDED SWORD +1 +3 VS UNDEAD reads 3 / $88 – displaced and undead-slaying, the guide’s names for both. GAUNTLETS OF OGRE POWER reads 38 / $83. The fourth, LONG SWORD +3 at $84, is not evidence about any code: $84 is the alignment-locked sword and its +14 is two nibbles, not an id. POTION OF HEALING reads 85 / $00 and is a potion, not a level drain.

The table below is Pool of Radiance’s, and Curse of the Azure Bonds shares it. Secret of the Silver Blades does not – it gives an elf 95 where Pool of Radiance gives 107, and five of the nine codes its character generation seeds mean something else here. NAMES_SILVER_BLADES below is that title’s own, and for_game() is how a caller asks for the right one; the evidence for the split is in the comment above the table.

Lives in goldbox/ rather than in the editor because the combat view names the same codes on a monster’s tooltip, and one table cannot be allowed to become two.

Module Attributes

NAMES_SILVER_BLADES

Secret of the Silver Blades' codes, as far as its own GEN establishes them.

TABLES

Code table per title key.

DEFAULT_NAMES

What a caller gets when it says nothing.

Functions

confidence(code[, game])

How sure the name is.

describe(code[, game])

What a slot says.

for_game([game])

The code table for a title.

traits(raw[, game])

The occupied slots of one ten-byte trait block.

Classes

Trait

One occupied slot, named if we can and numbered either way.

goldbox.traits.DEFAULT_NAMES = {1: ('Bless', 'CONFIRMED'), 2: ('Curse', 'PROBABLE'), 3: ('wielding an undead-slaying weapon', 'CONFIRMED'), 4: ('starting to train with a Manual of Bodily Health', 'PROBABLE'), 5: ('Detect Magic', 'CONFIRMED'), 6: ('wielding a Flame Tongue', 'PROBABLE'), 7: ('training with a Manual of Bodily Health', 'PROBABLE'), 8: ('Protection from Evil', 'CONFIRMED'), 9: ('Protection from Good', 'CONFIRMED'), 10: ('Resist Cold', 'CONFIRMED'), 11: ('charmed', 'PROBABLE'), 12: ('Enlarge', 'CONFIRMED'), 13: ('Reduce', 'PROBABLE'), 14: ('Friends', 'CONFIRMED'), 15: ('Slow Poison, damage', 'PROBABLE'), 16: ('Read Magic', 'CONFIRMED'), 17: ('Shield', 'CONFIRMED'), 18: ('gnome THAC0 bonus against kobolds and goblins', 'PROBABLE'), 19: ('Find Traps', 'CONFIRMED'), 20: ('Resist Fire', 'CONFIRMED'), 21: ("Silence, 15' Radius", 'PROBABLE'), 22: ('Slow Poison, expiry', 'PROBABLE'), 23: ('Spiritual Hammer', 'PROBABLE'), 24: ('sees invisible creatures', 'CONFIRMED'), 25: ('invisible', 'CONFIRMED'), 26: ('dwarf THAC0 bonus against orcs, half-orcs, goblins and hobgoblins', 'PROBABLE'), 27: ('feather falling', 'PROBABLE'), 28: ('Mirror Image', 'CONFIRMED'), 29: ('Ray of Enfeeblement', 'PROBABLE'), 30: ('coughing in a Stinking Cloud', 'PROBABLE'), 31: ('helpless', 'PROBABLE'), 32: ('Animate Dead', 'PROBABLE'), 33: ('blind', 'PROBABLE'), 34: ('diseased', 'PROBABLE'), 35: ('under an allied Prayer', 'CONFIRMED'), 36: ('Bestow Curse', 'PROBABLE'), 37: ('blinking', 'CONFIRMED'), 38: ('extra strength', 'CONFIRMED'), 39: ('hasted', 'CONFIRMED'), 40: ('cast Stinking Cloud', 'PROBABLE'), 41: ('Protection from Normal Missiles', 'CONFIRMED'), 42: ('slowed', 'PROBABLE'), 43: ('diseased: strength drain', 'PROBABLE'), 44: ('diseased: hit-point drain', 'PROBABLE'), 45: ("Protection from Evil, 10' Radius", 'PROBABLE'), 46: ("Protection from Good, 10' Radius", 'PROBABLE'), 47: ('dwarf/gnome AC bonus against ogres, trolls, ogre magi, giants and titans', 'PROBABLE'), 48: ('gnome AC bonus against gnolls and bugbears', 'PROBABLE'), 49: ('Prayer', 'PROBABLE'), 50: ('mummy rot, blocking healing', 'PROBABLE'), 51: ('Snake Charm', 'PROBABLE'), 52: ('held or paralysed', 'PROBABLE'), 53: ('sleeping', 'CONFIRMED'), 54: ('repulsed (bronze dragon; the handler is unimplemented)', 'PROBABLE'), 55: ('poisoned', 'PROBABLE'), 56: ('wearing a Ring of Invisibility', 'PROBABLE'), 57: ('mummy rot, degenerating', 'PROBABLE'), 58: ('immobile', 'PROBABLE'), 59: ('gains regeneration when this expires', 'PROBABLE'), 60: ('unused', 'PROBABLE'), 61: ('wearing a Ring of Fire Resistance', 'CONFIRMED'), 62: ('regeneration from constitution 20 or better', 'PROBABLE'), 63: ('unimplemented -- no handler exists', 'PROBABLE'), 64: ('melee poison, no save modifier', 'CONFIRMED'), 65: ('melee poison, +4 to save', 'CONFIRMED'), 66: ('melee poison, +2 to save', 'CONFIRMED'), 67: ('melee paralysis, 2d8 minutes', 'CONFIRMED'), 68: ('melee paralysis, elves immune', 'CONFIRMED'), 69: ('melee paralysis, -2 to save', 'PROBABLE'), 70: ('melee poison, -2 to save', 'PROBABLE'), 71: ('invisible from dust -- detect invisibility does not find it', 'PROBABLE'), 72: ('camouflaged by a Cloak of Elvenkind', 'PROBABLE'), 73: ('rear claw rake', 'CONFIRMED'), 74: ('bite and hold, in progress', 'PROBABLE'), 75: ('blood being drained', 'PROBABLE'), 76: ('melee blood drain, attaching', 'CONFIRMED'), 77: ('melee bite and hold', 'CONFIRMED'), 78: ('healed out of unconsciousness during combat', 'PROBABLE'), 79: ('melee fire touch, 2d10', 'CONFIRMED'), 80: ('melee acid attack, 1d4', 'CONFIRMED'), 81: ('dragon fear aura', 'CONFIRMED'), 82: ('mummy fear aura', 'CONFIRMED'), 83: ('petrifying gaze', 'CONFIRMED'), 84: ('charming gaze', 'PROBABLE'), 85: ('melee level drain, one level', 'CONFIRMED'), 86: ('melee level drain, two levels', 'CONFIRMED'), 87: ('melee mummy rot', 'CONFIRMED'), 88: ('electrical breath weapon', 'PROBABLE'), 89: ('displaced', 'CONFIRMED'), 90: ('dwarf/halfling constitution bonus to poison and death saves', 'PROBABLE'), 91: ('immune to electricity and Magic Missile', 'CONFIRMED'), 92: ('not named -- the guide has this id unused', 'UNKNOWN'), 93: ('half damage from fire', 'CONFIRMED'), 94: ('half damage from blunt or piercing weapons', 'CONFIRMED'), 95: ('fights on from -6 to 0 hit points', 'PROBABLE'), 96: ('hit only by silver or magical weapons', 'CONFIRMED'), 97: ('dwarf/gnome/halfling constitution bonus to spell and wand saves', 'PROBABLE'), 98: ('regenerates 3 hit points a round', 'CONFIRMED'), 99: ('keeps fighting once unconscious', 'CONFIRMED'), 100: ('troll: vulnerable to fire and acid, else returns from death', 'CONFIRMED'), 101: ('troll: regeneration', 'CONFIRMED'), 102: ('troll: getting back up', 'PROBABLE'), 103: ('can assume gaseous form', 'CONFIRMED'), 104: ('missile evasion, 60%', 'CONFIRMED'), 105: ('50% magic resistance (unused)', 'PROBABLE'), 106: ('85% magic resistance', 'PROBABLE'), 107: ('elf: 90% resistance to sleep and charm', 'CONFIRMED'), 108: ('immune to sleep and charm', 'CONFIRMED'), 109: ('immune to paralysis, from Hold Person and wands only', 'PROBABLE'), 110: ('immune to cold', 'CONFIRMED'), 111: ('immune to paralysis and poison', 'PROBABLE'), 112: ('immune to fire', 'CONFIRMED'), 113: ('efreeti fire resistance, -1 a damage die', 'CONFIRMED'), 114: ('half damage from electricity', 'CONFIRMED'), 115: ('half damage from piercing or slashing weapons', 'CONFIRMED'), 116: ('half damage from magical weapons', 'CONFIRMED'), 117: ('vulnerable to holy water', 'PROBABLE'), 118: ('half damage from cold', 'CONFIRMED'), 119: ('immune to non-magical weapons', 'CONFIRMED'), 120: ('boulder evasion, 50%', 'PROBABLE'), 121: ('acid squirt, 8d4 at range 3', 'CONFIRMED'), 122: ('mummy: vulnerable to fire', 'CONFIRMED'), 123: ('hit only by magical weapons; silver does half', 'CONFIRMED'), 124: ('half-elf: 30% resistance to sleep and charm', 'CONFIRMED'), 125: ('immune to sleep, charm, paralysis and poison', 'CONFIRMED'), 126: ('gaze attack, avoidable', 'CONFIRMED'), 127: ('gaze attack, reflectable', 'CONFIRMED'), 139: ('phasing', 'PROBABLE'), 255: ('fill, not a code', 'CONFIRMED')}

What a caller gets when it says nothing.

goldbox.traits.NAMES_SILVER_BLADES: dict[int, tuple[str, str]] = {18: ('half-elf: 30% resistance to sleep and charm', 'PROBABLE'), 26: ('dwarf THAC0 bonus against orcs, half-orcs, goblins and hobgoblins', 'PROBABLE'), 45: ("Protection from Evil, 10' Radius", 'PROBABLE'), 47: ('dwarf/gnome AC bonus against ogres, trolls, ogre magi, giants and titans', 'PROBABLE'), 48: ('gnome AC bonus against gnolls and bugbears', 'PROBABLE'), 95: ('elf: 90% resistance to sleep and charm', 'PROBABLE')}

Secret of the Silver Blades’ codes, as far as its own GEN establishes them. Six of the nine it seeds; the strings are Pool of Radiance’s own, pointed at the numbers this title uses for the same abilities.

PROBABLE throughout. The evidence is which race or class the game seeds each code on – the same argument the Pool of Radiance names were earned by – and no Silver Blades record has been watched using one.

goldbox.traits.TABLES: dict[str, dict[int, tuple[str, str]]] = {'curse-of-the-azure-bonds': {1: ('Bless', 'CONFIRMED'), 2: ('Curse', 'PROBABLE'), 3: ('wielding an undead-slaying weapon', 'CONFIRMED'), 4: ('starting to train with a Manual of Bodily Health', 'PROBABLE'), 5: ('Detect Magic', 'CONFIRMED'), 6: ('wielding a Flame Tongue', 'PROBABLE'), 7: ('training with a Manual of Bodily Health', 'PROBABLE'), 8: ('Protection from Evil', 'CONFIRMED'), 9: ('Protection from Good', 'CONFIRMED'), 10: ('Resist Cold', 'CONFIRMED'), 11: ('charmed', 'PROBABLE'), 12: ('Enlarge', 'CONFIRMED'), 13: ('Reduce', 'PROBABLE'), 14: ('Friends', 'CONFIRMED'), 15: ('Slow Poison, damage', 'PROBABLE'), 16: ('Read Magic', 'CONFIRMED'), 17: ('Shield', 'CONFIRMED'), 18: ('gnome THAC0 bonus against kobolds and goblins', 'PROBABLE'), 19: ('Find Traps', 'CONFIRMED'), 20: ('Resist Fire', 'CONFIRMED'), 21: ("Silence, 15' Radius", 'PROBABLE'), 22: ('Slow Poison, expiry', 'PROBABLE'), 23: ('Spiritual Hammer', 'PROBABLE'), 24: ('sees invisible creatures', 'CONFIRMED'), 25: ('invisible', 'CONFIRMED'), 26: ('dwarf THAC0 bonus against orcs, half-orcs, goblins and hobgoblins', 'PROBABLE'), 27: ('feather falling', 'PROBABLE'), 28: ('Mirror Image', 'CONFIRMED'), 29: ('Ray of Enfeeblement', 'PROBABLE'), 30: ('coughing in a Stinking Cloud', 'PROBABLE'), 31: ('helpless', 'PROBABLE'), 32: ('Animate Dead', 'PROBABLE'), 33: ('blind', 'PROBABLE'), 34: ('diseased', 'PROBABLE'), 35: ('under an allied Prayer', 'CONFIRMED'), 36: ('Bestow Curse', 'PROBABLE'), 37: ('blinking', 'CONFIRMED'), 38: ('extra strength', 'CONFIRMED'), 39: ('hasted', 'CONFIRMED'), 40: ('cast Stinking Cloud', 'PROBABLE'), 41: ('Protection from Normal Missiles', 'CONFIRMED'), 42: ('slowed', 'PROBABLE'), 43: ('diseased: strength drain', 'PROBABLE'), 44: ('diseased: hit-point drain', 'PROBABLE'), 45: ("Protection from Evil, 10' Radius", 'PROBABLE'), 46: ("Protection from Good, 10' Radius", 'PROBABLE'), 47: ('dwarf/gnome AC bonus against ogres, trolls, ogre magi, giants and titans', 'PROBABLE'), 48: ('gnome AC bonus against gnolls and bugbears', 'PROBABLE'), 49: ('Prayer', 'PROBABLE'), 50: ('mummy rot, blocking healing', 'PROBABLE'), 51: ('Snake Charm', 'PROBABLE'), 52: ('held or paralysed', 'PROBABLE'), 53: ('sleeping', 'CONFIRMED'), 54: ('repulsed (bronze dragon; the handler is unimplemented)', 'PROBABLE'), 55: ('poisoned', 'PROBABLE'), 56: ('wearing a Ring of Invisibility', 'PROBABLE'), 57: ('mummy rot, degenerating', 'PROBABLE'), 58: ('immobile', 'PROBABLE'), 59: ('gains regeneration when this expires', 'PROBABLE'), 60: ('unused', 'PROBABLE'), 61: ('wearing a Ring of Fire Resistance', 'CONFIRMED'), 62: ('regeneration from constitution 20 or better', 'PROBABLE'), 63: ('unimplemented -- no handler exists', 'PROBABLE'), 64: ('melee poison, no save modifier', 'CONFIRMED'), 65: ('melee poison, +4 to save', 'CONFIRMED'), 66: ('melee poison, +2 to save', 'CONFIRMED'), 67: ('melee paralysis, 2d8 minutes', 'CONFIRMED'), 68: ('melee paralysis, elves immune', 'CONFIRMED'), 69: ('melee paralysis, -2 to save', 'PROBABLE'), 70: ('melee poison, -2 to save', 'PROBABLE'), 71: ('invisible from dust -- detect invisibility does not find it', 'PROBABLE'), 72: ('camouflaged by a Cloak of Elvenkind', 'PROBABLE'), 73: ('rear claw rake', 'CONFIRMED'), 74: ('bite and hold, in progress', 'PROBABLE'), 75: ('blood being drained', 'PROBABLE'), 76: ('melee blood drain, attaching', 'CONFIRMED'), 77: ('melee bite and hold', 'CONFIRMED'), 78: ('healed out of unconsciousness during combat', 'PROBABLE'), 79: ('melee fire touch, 2d10', 'CONFIRMED'), 80: ('melee acid attack, 1d4', 'CONFIRMED'), 81: ('dragon fear aura', 'CONFIRMED'), 82: ('mummy fear aura', 'CONFIRMED'), 83: ('petrifying gaze', 'CONFIRMED'), 84: ('charming gaze', 'PROBABLE'), 85: ('melee level drain, one level', 'CONFIRMED'), 86: ('melee level drain, two levels', 'CONFIRMED'), 87: ('melee mummy rot', 'CONFIRMED'), 88: ('electrical breath weapon', 'PROBABLE'), 89: ('displaced', 'CONFIRMED'), 90: ('dwarf/halfling constitution bonus to poison and death saves', 'PROBABLE'), 91: ('immune to electricity and Magic Missile', 'CONFIRMED'), 92: ('not named -- the guide has this id unused', 'UNKNOWN'), 93: ('half damage from fire', 'CONFIRMED'), 94: ('half damage from blunt or piercing weapons', 'CONFIRMED'), 95: ('fights on from -6 to 0 hit points', 'PROBABLE'), 96: ('hit only by silver or magical weapons', 'CONFIRMED'), 97: ('dwarf/gnome/halfling constitution bonus to spell and wand saves', 'PROBABLE'), 98: ('regenerates 3 hit points a round', 'CONFIRMED'), 99: ('keeps fighting once unconscious', 'CONFIRMED'), 100: ('troll: vulnerable to fire and acid, else returns from death', 'CONFIRMED'), 101: ('troll: regeneration', 'CONFIRMED'), 102: ('troll: getting back up', 'PROBABLE'), 103: ('can assume gaseous form', 'CONFIRMED'), 104: ('missile evasion, 60%', 'CONFIRMED'), 105: ('50% magic resistance (unused)', 'PROBABLE'), 106: ('85% magic resistance', 'PROBABLE'), 107: ('elf: 90% resistance to sleep and charm', 'CONFIRMED'), 108: ('immune to sleep and charm', 'CONFIRMED'), 109: ('immune to paralysis, from Hold Person and wands only', 'PROBABLE'), 110: ('immune to cold', 'CONFIRMED'), 111: ('immune to paralysis and poison', 'PROBABLE'), 112: ('immune to fire', 'CONFIRMED'), 113: ('efreeti fire resistance, -1 a damage die', 'CONFIRMED'), 114: ('half damage from electricity', 'CONFIRMED'), 115: ('half damage from piercing or slashing weapons', 'CONFIRMED'), 116: ('half damage from magical weapons', 'CONFIRMED'), 117: ('vulnerable to holy water', 'PROBABLE'), 118: ('half damage from cold', 'CONFIRMED'), 119: ('immune to non-magical weapons', 'CONFIRMED'), 120: ('boulder evasion, 50%', 'PROBABLE'), 121: ('acid squirt, 8d4 at range 3', 'CONFIRMED'), 122: ('mummy: vulnerable to fire', 'CONFIRMED'), 123: ('hit only by magical weapons; silver does half', 'CONFIRMED'), 124: ('half-elf: 30% resistance to sleep and charm', 'CONFIRMED'), 125: ('immune to sleep, charm, paralysis and poison', 'CONFIRMED'), 126: ('gaze attack, avoidable', 'CONFIRMED'), 127: ('gaze attack, reflectable', 'CONFIRMED'), 139: ('phasing', 'PROBABLE'), 255: ('fill, not a code', 'CONFIRMED')}, 'pool-of-radiance': {1: ('Bless', 'CONFIRMED'), 2: ('Curse', 'PROBABLE'), 3: ('wielding an undead-slaying weapon', 'CONFIRMED'), 4: ('starting to train with a Manual of Bodily Health', 'PROBABLE'), 5: ('Detect Magic', 'CONFIRMED'), 6: ('wielding a Flame Tongue', 'PROBABLE'), 7: ('training with a Manual of Bodily Health', 'PROBABLE'), 8: ('Protection from Evil', 'CONFIRMED'), 9: ('Protection from Good', 'CONFIRMED'), 10: ('Resist Cold', 'CONFIRMED'), 11: ('charmed', 'PROBABLE'), 12: ('Enlarge', 'CONFIRMED'), 13: ('Reduce', 'PROBABLE'), 14: ('Friends', 'CONFIRMED'), 15: ('Slow Poison, damage', 'PROBABLE'), 16: ('Read Magic', 'CONFIRMED'), 17: ('Shield', 'CONFIRMED'), 18: ('gnome THAC0 bonus against kobolds and goblins', 'PROBABLE'), 19: ('Find Traps', 'CONFIRMED'), 20: ('Resist Fire', 'CONFIRMED'), 21: ("Silence, 15' Radius", 'PROBABLE'), 22: ('Slow Poison, expiry', 'PROBABLE'), 23: ('Spiritual Hammer', 'PROBABLE'), 24: ('sees invisible creatures', 'CONFIRMED'), 25: ('invisible', 'CONFIRMED'), 26: ('dwarf THAC0 bonus against orcs, half-orcs, goblins and hobgoblins', 'PROBABLE'), 27: ('feather falling', 'PROBABLE'), 28: ('Mirror Image', 'CONFIRMED'), 29: ('Ray of Enfeeblement', 'PROBABLE'), 30: ('coughing in a Stinking Cloud', 'PROBABLE'), 31: ('helpless', 'PROBABLE'), 32: ('Animate Dead', 'PROBABLE'), 33: ('blind', 'PROBABLE'), 34: ('diseased', 'PROBABLE'), 35: ('under an allied Prayer', 'CONFIRMED'), 36: ('Bestow Curse', 'PROBABLE'), 37: ('blinking', 'CONFIRMED'), 38: ('extra strength', 'CONFIRMED'), 39: ('hasted', 'CONFIRMED'), 40: ('cast Stinking Cloud', 'PROBABLE'), 41: ('Protection from Normal Missiles', 'CONFIRMED'), 42: ('slowed', 'PROBABLE'), 43: ('diseased: strength drain', 'PROBABLE'), 44: ('diseased: hit-point drain', 'PROBABLE'), 45: ("Protection from Evil, 10' Radius", 'PROBABLE'), 46: ("Protection from Good, 10' Radius", 'PROBABLE'), 47: ('dwarf/gnome AC bonus against ogres, trolls, ogre magi, giants and titans', 'PROBABLE'), 48: ('gnome AC bonus against gnolls and bugbears', 'PROBABLE'), 49: ('Prayer', 'PROBABLE'), 50: ('mummy rot, blocking healing', 'PROBABLE'), 51: ('Snake Charm', 'PROBABLE'), 52: ('held or paralysed', 'PROBABLE'), 53: ('sleeping', 'CONFIRMED'), 54: ('repulsed (bronze dragon; the handler is unimplemented)', 'PROBABLE'), 55: ('poisoned', 'PROBABLE'), 56: ('wearing a Ring of Invisibility', 'PROBABLE'), 57: ('mummy rot, degenerating', 'PROBABLE'), 58: ('immobile', 'PROBABLE'), 59: ('gains regeneration when this expires', 'PROBABLE'), 60: ('unused', 'PROBABLE'), 61: ('wearing a Ring of Fire Resistance', 'CONFIRMED'), 62: ('regeneration from constitution 20 or better', 'PROBABLE'), 63: ('unimplemented -- no handler exists', 'PROBABLE'), 64: ('melee poison, no save modifier', 'CONFIRMED'), 65: ('melee poison, +4 to save', 'CONFIRMED'), 66: ('melee poison, +2 to save', 'CONFIRMED'), 67: ('melee paralysis, 2d8 minutes', 'CONFIRMED'), 68: ('melee paralysis, elves immune', 'CONFIRMED'), 69: ('melee paralysis, -2 to save', 'PROBABLE'), 70: ('melee poison, -2 to save', 'PROBABLE'), 71: ('invisible from dust -- detect invisibility does not find it', 'PROBABLE'), 72: ('camouflaged by a Cloak of Elvenkind', 'PROBABLE'), 73: ('rear claw rake', 'CONFIRMED'), 74: ('bite and hold, in progress', 'PROBABLE'), 75: ('blood being drained', 'PROBABLE'), 76: ('melee blood drain, attaching', 'CONFIRMED'), 77: ('melee bite and hold', 'CONFIRMED'), 78: ('healed out of unconsciousness during combat', 'PROBABLE'), 79: ('melee fire touch, 2d10', 'CONFIRMED'), 80: ('melee acid attack, 1d4', 'CONFIRMED'), 81: ('dragon fear aura', 'CONFIRMED'), 82: ('mummy fear aura', 'CONFIRMED'), 83: ('petrifying gaze', 'CONFIRMED'), 84: ('charming gaze', 'PROBABLE'), 85: ('melee level drain, one level', 'CONFIRMED'), 86: ('melee level drain, two levels', 'CONFIRMED'), 87: ('melee mummy rot', 'CONFIRMED'), 88: ('electrical breath weapon', 'PROBABLE'), 89: ('displaced', 'CONFIRMED'), 90: ('dwarf/halfling constitution bonus to poison and death saves', 'PROBABLE'), 91: ('immune to electricity and Magic Missile', 'CONFIRMED'), 92: ('not named -- the guide has this id unused', 'UNKNOWN'), 93: ('half damage from fire', 'CONFIRMED'), 94: ('half damage from blunt or piercing weapons', 'CONFIRMED'), 95: ('fights on from -6 to 0 hit points', 'PROBABLE'), 96: ('hit only by silver or magical weapons', 'CONFIRMED'), 97: ('dwarf/gnome/halfling constitution bonus to spell and wand saves', 'PROBABLE'), 98: ('regenerates 3 hit points a round', 'CONFIRMED'), 99: ('keeps fighting once unconscious', 'CONFIRMED'), 100: ('troll: vulnerable to fire and acid, else returns from death', 'CONFIRMED'), 101: ('troll: regeneration', 'CONFIRMED'), 102: ('troll: getting back up', 'PROBABLE'), 103: ('can assume gaseous form', 'CONFIRMED'), 104: ('missile evasion, 60%', 'CONFIRMED'), 105: ('50% magic resistance (unused)', 'PROBABLE'), 106: ('85% magic resistance', 'PROBABLE'), 107: ('elf: 90% resistance to sleep and charm', 'CONFIRMED'), 108: ('immune to sleep and charm', 'CONFIRMED'), 109: ('immune to paralysis, from Hold Person and wands only', 'PROBABLE'), 110: ('immune to cold', 'CONFIRMED'), 111: ('immune to paralysis and poison', 'PROBABLE'), 112: ('immune to fire', 'CONFIRMED'), 113: ('efreeti fire resistance, -1 a damage die', 'CONFIRMED'), 114: ('half damage from electricity', 'CONFIRMED'), 115: ('half damage from piercing or slashing weapons', 'CONFIRMED'), 116: ('half damage from magical weapons', 'CONFIRMED'), 117: ('vulnerable to holy water', 'PROBABLE'), 118: ('half damage from cold', 'CONFIRMED'), 119: ('immune to non-magical weapons', 'CONFIRMED'), 120: ('boulder evasion, 50%', 'PROBABLE'), 121: ('acid squirt, 8d4 at range 3', 'CONFIRMED'), 122: ('mummy: vulnerable to fire', 'CONFIRMED'), 123: ('hit only by magical weapons; silver does half', 'CONFIRMED'), 124: ('half-elf: 30% resistance to sleep and charm', 'CONFIRMED'), 125: ('immune to sleep, charm, paralysis and poison', 'CONFIRMED'), 126: ('gaze attack, avoidable', 'CONFIRMED'), 127: ('gaze attack, reflectable', 'CONFIRMED'), 139: ('phasing', 'PROBABLE'), 255: ('fill, not a code', 'CONFIRMED')}, 'secret-of-the-silver-blades': {18: ('half-elf: 30% resistance to sleep and charm', 'PROBABLE'), 26: ('dwarf THAC0 bonus against orcs, half-orcs, goblins and hobgoblins', 'PROBABLE'), 45: ("Protection from Evil, 10' Radius", 'PROBABLE'), 47: ('dwarf/gnome AC bonus against ogres, trolls, ogre magi, giants and titans', 'PROBABLE'), 48: ('gnome AC bonus against gnolls and bugbears', 'PROBABLE'), 95: ('elf: 90% resistance to sleep and charm', 'PROBABLE')}}

Code table per title key. A title that is not here gets Pool of Radiance’s, which is what every caller written before this table existed means.

class goldbox.traits.Trait[source]

Bases: object

One occupied slot, named if we can and numbered either way.

game is whatever for_game() takes, and None means Pool of Radiance’s table – which is what every caller written before the second title means.

__init__(slot, code, game=None)
Parameters:
Return type:

None

code: int
property detail: str
game: object | None = None
property is_fill: bool
property label: str

petrifying gaze for a code we know, trait 91 for one we do not.

The number is what makes a new code visible rather than silently dropped, which is how the census grew in the first place.

property named: bool
property names: dict[int, tuple[str, str]]
slot: int
goldbox.traits.confidence(code, game=None)[source]

How sure the name is. UNNAMED codes have no confidence to report.

Parameters:

code (int)

Return type:

str

goldbox.traits.describe(code, game=None)[source]

What a slot says. An unnamed code is visibly unnamed, never blank.

An unnamed code keeps its number: two slots we cannot name still have to be told apart, and the number is what somebody takes away to look it up.

Parameters:

code (int)

Return type:

str

goldbox.traits.for_game(game=None)[source]

The code table for a title.

Takes a goldbox.games.Game, a game key, a table, or None. Duck-typed on .key rather than importing goldbox.games, which is what goldbox/spells.py:for_game does and for the same reason: a whole module of coupling for one string.

An unrecognised title gets Pool of Radiance’s – the Krynn pair and Gateway have never had their seeds read, and this is the behaviour they have always had.

Return type:

dict[int, tuple[str, str]]

goldbox.traits.traits(raw, game=None)[source]

The occupied slots of one ten-byte trait block.

Parameters:

raw (bytes)

Return type:

tuple[goldbox.traits.Trait, …]