import {generalTableSelect, highlightTableRow} from "./custom.js"
viewof form = Inputs.form(
{
button1: Inputs.button(html`<button style="color: black; background-color: lightgray;">Any</button>`, {value: 0,
reduce: () => highlightTableRow("#armor-weapon-table",
generalTableSelect([1,100,0],[[1,25],[26,35],[36,55],[56,85],[86,90],[91,95],[96,100]]))}),
button2: Inputs.button(html`<button style="color: black; background-color: lightgray;">Weapoon or Armor</button>`, {value: 0,
reduce: () => highlightTableRow("#armor-weapon-table",
generalTableSelect([1,100,0],[[1,70], [71,100]]))}),
button3: Inputs.button(html`<button style="color: black; background-color: lightgray;">Any Except Weapon</button>`, {value: 0,
reduce: () => highlightTableRow("#armor-weapon-table",
generalTableSelect([1,100,0],[[-2,-1],[1,12],[13,40],[41,79],[80,86],[87,93],[94,100]]))}),
},
{
template: (formParts) => htl.html`
<div>
<div style="
display: grid;
grid-template-columns: 15% 30% 30%;
column-gap: 10px
">
${Object.values(formParts)}
</div>
</div>`
})
32 Random Magical Treasure
As an aid to DMs here are tables for generating magical treasure to determine the sort of item found by rolling on the following table:
Any | Weapon or Armor | Any Except Weapons | Type of Item |
---|---|---|---|
01-25 | 01-70 | Weapon | |
26-35 | 71-00 | 01-12 | Armor |
36-55 | 13-40 | Potion | |
56-85 | 41-79 | Scroll | |
86-90 | 80-86 | Ring | |
91-95 | 87-93 | Wand, Staff, or Rod | |
96-00 | 94-00 | Miscellaneous Magic |
Magic Weapons
First, roll d% on the following table to determine the weapon type:
d% | Weapon Type |
---|---|
01-02 | Great Axe |
03-09 | Battle Axe |
10-11 | Hand Axe |
12-19 | Shortbow |
20-27 | Shortbow Arrow |
28-31 | Longbow |
32-35 | Longbow Arrow |
36-43 | Light Quarrel |
44-47 | Heavy Quarrel |
48-59 | Dagger |
60-65 | Shortsword |
66-79 | Longsword |
80-81 | Scimitar |
82-83 | Two-Handed Sword |
84-86 | Warhammer |
87-94 | Mace |
95 | Maul |
96 | Pole Arm |
97 | Sling Bullet |
98-00 | Spear |
Next, roll on the Weapon Bonus tables. Follow the directions given if a roll on the Special Enemy or Special Ability tables are indicated; generally multiple rolls on the Special Ability table should be ignored when rolled.
d% Melee | d% Missile | Weapon Bonus |
---|---|---|
01-40 | 01-46 | +1 |
41-50 | 47-58 | +2 |
51-55 | 59-64 | +3 |
56-57 | +4 | |
58 | +5 | |
59-75 | 65-82 | +1, +2 vs. Special Enemy |
76-85 | 83-94 | +1, +3 vs. Special Enemy |
86-95 | Roll Again + Special Ability | |
96-98 | 95-98 | Cursed, -1* |
99-00 | 99-00 | Cursed, -2* |
* If cursed weapons are rolled along with special abilities, ignore the special ability roll.
1d6 | Special Enemy |
---|---|
1 | Dragons |
2 | Enchanted |
3 | Lycanthropes |
4 | Regenerators |
5 | Spell Users |
6 | Undead |
1d20 | Special Ability |
---|---|
01-09 | Casts Light on Command |
10-11 | Charm Person |
12 | Drains Energy |
13-16 | Flames on Command |
17-19 | Locate Objects |
20 | Wishes |
Magic Armor
Generate the type and bonus of each item of magic armor on the tables below.
d% | Armor Type | d% | Armor Bonus |
---|---|---|---|
01-09 | Leather Armor | 01-50 | +1 |
10-28 | Chain Mail | 51-80 | +2 |
29-43 | Plate Mail | 81-90 | +3 |
44-00 | Shield | 91-95 | Cursed * |
96-00 | Cursed, AC 11 ** |
* If Cursed armor is rolled, roll again and reverse the bonus (e.g., -1 instead of +1).
** This armor has AC 11 but appears to be +1 when tested.
Potions
d% | Type |
---|---|
01-03 | Alchemist’s Fire |
04-06 | Potion of Cat’s Grace |
07-08 | Potion of Clairaudience |
09-11 | Potion of Clairvoyance |
12-14 | Potion of Cold Resistance |
15-17 | Potion of Control Animal |
18-20 | Potion of Control Dragon |
21-23 | Potion of Control Giant |
24-26 | Potion of Control Human |
27-29 | Potion of Control Plant |
30-32 | Potion of Control Undead |
33-36 | Potion of Delusion |
37-39 | Potion of Diminution |
40-42 | Potion of ESP |
43-45 | Potion of Extra Healing |
46-48 | Potion of Fire Resistance |
49-51 | Potion of Flying |
52-54 | Potion of Gaseous Form |
55-57 | Potion of Giant Strength |
58-60 | Potion of Growth |
61-63 | Potion of Healing |
64-66 | Potion of Heroism |
67-69 | Potion of Invisibility |
70-72 | Potion of Invulnerability |
71-75 | Keoghtom’s Ointment |
76-78 | Potion of Levitation |
79-81 | Potion of Longevity |
82-84 | Poison |
85-87 | Potion of Polymorph Self |
88-90 | Potion of Speed |
91-93 | Potion of Total Healing |
94-96 | Potion of Treasure Finding |
97-100 | Potion of Water Breathing |
Scrolls
d% | General Type |
---|---|
01-03 | Cleric Spell Scroll (1 Spell) |
04-06 | Cleric Spell Scroll (2 Spells) |
07-08 | Cleric Spell Scroll (3 Spells) |
09 | Cleric Spell Scroll (4 Spells) |
10-15 | Magic-User Spell Scroll (1 Spell) |
16-20 | Magic-User Spell Scroll (2 Spells) |
21-25 | Magic-User Spell Scroll (3 Spells) |
26-29 | Magic-User Spell Scroll (4 Spells) |
30-32 | Magic-User Spell Scroll (5 Spells) |
33-34 | Magic-User Spell Scroll (6 Spells) |
35 | Magic-User Spell Scroll (7 Spells) |
36-40 | Cursed Scroll |
41-46 | Protection from Elementals |
47-56 | Protection from Lycanthropes |
57-61 | Protection from Magic |
62-75 | Protection from Undead |
76-85 | Map to Treasure Type A |
86-89 | Map to Treasure Type E |
90-92 | Map to Treasure Type G |
93-00 | Map to 1d4 Magic Items |
Spell Scrolls: Spell Level
d% | Level of Spell |
---|---|
01-30 | 1st |
31-55 | 2nd |
56-75 | 3rd |
76-88 | 4th |
89-97 | 5th |
98-99 | 6th |
100 | 7th |
Rings
d% | Type |
---|---|
01-06 | Ring of Control Animal |
07-12 | Ring of Control Human |
13-19 | Ring of Control Plant |
20-30 | Ring of Delusion |
31-33 | Ring of Djinni Summoning |
34-39 | Ring of Eibon |
40-50 | Ring of Fire Resistance |
51-54 | Ring of Free Action |
55-63 | Ring of Invisibility |
64-68 | Ring of Protection +1 |
69-70 | Ring of Protection +2 |
71 | Ring of Protection +3 |
72-73 | Ring of Regeneration |
74-75 | Ring of Second Chances |
76-78 | Ring of Shooting Stars |
79-81 | Ring of Spell Storing |
82-83 | Ring of Spell Turning |
84-85 | Ring of Telekinesis |
86-90 | Ring of Water Walking |
91-97 | Ring of Weakness |
98 | Ring of Wishes |
99-00 | Ring of X-Ray Vision |
Wands, Staves and Rods
d% | Type |
---|---|
01-05 | Rod of Cancellation |
08-12 | Snake Staff |
13-16 | Staff of Commanding |
17-18 | Staff of Healing |
19-19 | Staff of Life |
20-20 | Staff of Power |
21-21 | Staff of Storm Clouds |
22-26 | Staff of Striking |
27-31 | Staff of Traveling and Leaping |
32-32 | Staff of Withering |
33-33 | Staff of Wizardry |
34-35 | Quarter Staff of the Abbot |
36-40 | Wand of Cold |
41-45 | Wand of Enemy Detection |
46-50 | Wand of Fear |
51-55 | Wand of Fireballs |
56-60 | Wand of Illusion |
61-65 | Wand of Lightning Bolts |
66-73 | Wand of Magic Detection |
74-79 | Wand of Paralyzation |
80-84 | Wand of Polymorph |
85-90 | Wand of Secret Door Detection |
91-96 | Wand of Trap Detection |
97-100 | Wand of Viscid Globs |
Miscellaneous Magic Items
Effect Subtables d% Subtable 01-57 Effect Subtable 1 58-00 Effect Subtable 2
Effect Subtables
d% | Subtable |
---|---|
01-57 | Effect Subtable 1 |
58-00 | Effect Subtable 2 |
Effect Subtable 1
d% | Effect | Form |
---|---|---|
01 | Blasting | G |
02-05 | Blending | F |
06-13 | Cold Resistance | F |
14-17 | Comprehension | E |
18-22 | Control Animal | C |
23-29 | Control Human | C |
30-35 | Control Plant | C |
36-37 | Courage | G |
38-40 | Deception | F |
41-52 | Delusion | A |
53-55 | Djinni Summoning | C |
56 | Doom | G |
57-67 | Fire Resistance | F |
68-80 | Invisibility | F |
81-85 | Levitation | B |
86-95 | Mind Reading | C |
96-97 | Panic | G |
98-00 | Penetrating Vision | D |
Effect Subtable 2
d% | Effect | Form |
---|---|---|
01-07 | Protection +1 | F |
08-10 | Protection +2 | F |
11 | Protection +3 | F |
12-14 | Protection from Energy Drain | F |
15-20 | Protection from Scrying | F |
21-23 | Regeneration | C |
24-29 | Scrying | H |
30-32 | Scrying, Superior | H |
33-39 | Speed | B |
40-42 | Spell Storing | C |
43-50 | Spell Turning | F |
51-69 | Stealth | B |
70-72 | Telekinesis | C |
73-74 | Telepathy | C |
75-76 | Teleportation | C |
77-78 | True Seeing | D |
79-88 | Water Walking | B |
89-99 | Weakness | C |
00 | Wishes | C |
Roll on the first table above to select a subtable, then roll again on the selected subtable to determine the exact effect. Finally, roll on the specified column of the Form table to determine the physical form of the item.
Form of Item
A | B | C | D | E | F | G | H | |
---|---|---|---|---|---|---|---|---|
Bell (or Chime) | 01-02 | 01-17 | ||||||
Belt or Girdle | 03-05 | 01-07 | ||||||
Boots | 06-13 | 01-25 | ||||||
Bowl | 14-15 | 01-17 | ||||||
Cloak | 16-28 | 08-38 | ||||||
Crystal Ball or Orb | 29-31 | 18-67 | ||||||
Drums | 32-33 | 18-50 | ||||||
Helm | 34-38 | 01-40 | ||||||
Horn | 39-43 | 51-00 | ||||||
Lens | 44-46 | 01-17 | ||||||
Mirror | 47-49 | 18-17 | 68-00 | |||||
Pendant | 50-67 | 26-50 | 01-40 | 18-50 | 41-80 | 39-50 | ||
Ring | 68-00 | 51-00 | 41-00 | 51-00 | 81-00 | 51-00 |
Rare Items
d% | Type |
---|---|
01-05 | Bag of Devouring |
06-20 | Bag of Holding |
21-32 | Boots of Traveling and Leaping |
33-47 | Broom of Flying |
48-57 | Device of Summoning Elementals (see below) |
58-59 | Efreeti Bottle |
60-64 | Flying Carpet |
65-81 | Gauntlets of Ogre Power |
82-86 | Girdle of Giant Strength |
87-88 | Mirror of Imprisonment |
89-00 | Rope of Climbing |
Devices of Summoning Elementals
Review the information for Elementals before randomly selecting any of these items, as you may not wish to allow all types of elementals in your campaign.
1d8 | Type |
---|---|
1 | Bowl of Summoning Water Elementals |
2 | Brazier of Summoning Fire Elementals |
3 | Censer of Summoning Air Elementals |
4 | Crucible of Summoning Metal Elementals |
5 | Mallet of Summoning Wood Elementals |
6 | Marble Plate of Summoning Cold Elementals |
7 | Rod of Summoning Lightning Elementals |
8 | Stone of Summoning Earth Elementals |