Best JavaScript code snippet using playwright-internal
randomencounter.js
Source:randomencounter.js
...5 // A shorthand to create new events in the encounters table.6 const createEvent = (freq, msg, lair, tracks) => ({message: msg, frequency: freq, lair: lair, tracks: tracks});7 let encounters = {8 arctic1:[9 createEvent(1, "1 giant owl", 5, 75),10 createEvent(4, "1d6+3 kobolds", 25, 25),11 createEvent(3, "1d4+3 trappers (commoners)", 20, 25),12 createEvent(3, "1 owl", 10, 50),13 createEvent(2, "2d4 blood hawks", 25, 5),14 createEvent(5, "2d6 bandits", 25, 15),15 createEvent(3, "1d3 winged kobolds with 1d6 kobolds", 20, 15),16 createEvent(5, "The partially eaten carcass of a mammoth, from which 1d4 weeks of rations can be harvested.", 10, 20),17 createEvent(4, "2d8 hunters tribal warriors", 15, 75),18 createEvent(6, "1 half-ogre", 15, 25),19 createEvent(5, "Single-file tracks in the snow that stop abruptly", 20, 5),20 createEvent(5, "1d3 ice mephits", 20, 10),21 createEvent(5, "1 brown bear", 25, 5),22 createEvent(3, "1d6+1 orcs", 5, 10),23 createEvent(2, "1 polar bear", 10, 50),24 createEvent(2, "1d6 scouts", 10, 15),25 createEvent(3, "1 saber-toothed tiger", 15, 75),26 createEvent(5, "A frozen pond with a jagged hole in the ice that appears recently made", 20, 25),27 createEvent(3, "1 berserker", 10, 40),28 createEvent(2, "1 ogre", 25, 40),29 createEvent(2, "1 griffon", 10, 25),30 createEvent(3, "1 druid", 10, 40),31 createEvent(5, "3d4 refugees (commoners) fleeing from orcs", 5, 20),32 createEvent(1, "1d3 veterans", 20, 50),33 createEvent(1, "1d4 orogs", 25, 5),34 createEvent(1, "2 brown bears", 5, 75),35 createEvent(1, "1 orc Eye of Gruumsh and 2d8 orcs", 5, 50),36 createEvent(1, "1d3 winter wolves", 25, 5),37 createEvent(2, "1d4 yetis", 20, 25),38 createEvent(1, "1 half-ogre", 20, 5),39 createEvent(1, "1d3 manticores", 15, 75),40 createEvent(1, "1 bandit captain with 2d6 bandits", 15, 40),41 createEvent(1, "1 revenant", 10, 15),42 createEvent(2, "1 troll", 5, 75),43 createEvent(2, "1 werebear", 10, 75),44 createEvent(2, "1 young remorhaz", 20, 15),45 createEvent(1, "1 mammoth", 5, 10),46 createEvent(1, "1 young white dragon", 20, 75),47 createEvent(1, "1 frost giant", 20, 15)48 ],49 arctic2:[50 createEvent(5, "2 saber-toothed tigers", 15, 40),51 createEvent(2, "1d4 half-ogres", 15, 10),52 createEvent(3, "1d3+1 brown bears", 5, 40),53 createEvent(5, "1d3 polar bears", 20, 75),54 createEvent(5, "2d4 berserkers", 5, 5),55 createEvent(5, "A half-orc druid tending to an injured polar bear. If the characters assist the druid, she gives them a vial of antitoxin.", 25, 5),56 createEvent(5, "2d8 scouts", 5, 15),57 createEvent(5, "2d4 ice mephits", 10, 20),58 createEvent(5, "2d6+1 zombies aboard a galleon trapped in the ice. Searching the ship yields 2d20 days of rations.", 10, 20),59 createEvent(5, "1 manticore", 5, 75),60 createEvent(5, "2d6+3 orcs", 15, 75),61 createEvent(3, "1d6+2 ogres", 20, 10),62 createEvent(2, "2d4 griffons", 5, 5),63 createEvent(2, "1d4 veterans", 20, 75),64 createEvent(3, "1 bandit captain with 1 druid, 1d3 berserkers, and 2d10+5 bandits", 5, 50),65 createEvent(5, "1d4 hours of extreme cold (see chapter 5 of the Dungeon Master's Guide)", 15, 50),66 createEvent(3, "1 young remorhaz", 15, 40),67 createEvent(4, "1 orc Eye of Gruumsh with 1d6 orogs and 2d8+6 orcs", 20, 25),68 createEvent(3, "1 revenant", 15, 5),69 createEvent(5, "A howl that echoes over the land for 1d3 minutes", 10, 5),70 createEvent(2, "1d3 mammoths", 5, 50),71 createEvent(2, "1 young white dragon", 20, 40),72 createEvent(2, "2d4 winter wolves", 10, 75),73 createEvent(2, "1d6+2 yetis", 15, 25),74 createEvent(2, "1d2 frost giants", 10, 50),75 createEvent(2, "1d3 werebears", 15, 20),76 createEvent(2, "1d4 trolls", 25, 10),77 createEvent(2, "1 abominable yeti", 20, 40),78 createEvent(2, "1 remorhaz", 20, 25),79 createEvent(1, "1 roc", 5, 50),80 createEvent(1, "2d4 young remorhazes", 15, 40)81 ],82 arctic3:[83 createEvent(1, "1 abominable yeti", 5, 50),84 createEvent(4, "1d6 revenants", 5, 75),85 createEvent(3, "1d4+1 werebears", 25, 20),86 createEvent(10, "1d3 young white dragons", 20, 20),87 createEvent(5, "A blizzard that reduces visibility to 5 feet for 1d6 hours", 20, 40),88 createEvent(10, "1 roc", 25, 50),89 createEvent(5, "A herd of 3d20+60 caribou (deer) moving through the snow", 20, 40),90 createEvent(10, "1d4 mammoths", 10, 40),91 createEvent(10, "1d8+1 trolls", 20, 10),92 createEvent(5, "A mile-wide frozen lake in which preserved corpses of strange creatures can be seen", 25, 50),93 createEvent(10, "2d4 young remorhazes", 5, 20),94 createEvent(5, "A crumbling ice castle littered with the frozen bodies of blue-skinned humanoids", 15, 75),95 createEvent(10, "1 adult white dragon", 10, 25),96 createEvent(6, "1d8+1 frost giants", 20, 20),97 createEvent(3, "1d4 young remorhazes", 25, 20),98 createEvent(1, "1 ancient white dragon", 25, 20)99 ],100 arctic4:[101 createEvent(2, "2d10 revenants", 20, 15),102 createEvent(2, "2d8 trolls", 10, 20),103 createEvent(2, "2d10 werebears", 15, 25),104 createEvent(2, "1 frost giant", 10, 5),105 createEvent(2, "2d4 young remorhazes", 20, 20),106 createEvent(10, "1d4 frost giants", 15, 15),107 createEvent(5, "A Circular patch of black ice on the ground. The air temperature around the patch is warmer than in the surrounding area, and characters who inspect the ice find bits of machinery frozen within.", 15, 40),108 createEvent(10, "1 ancient white dragon", 20, 5),109 createEvent(5, "An adventurer frozen 6 feet under the ice; 50% chance the corpse has a rare magic item of the DM's choice", 25, 10),110 createEvent(10, "1d3 abominable yetis", 5, 25),111 createEvent(10, "1d4 remorhazes", 5, 75),112 createEvent(5, "A 500-foot-high wall of ice that is 300 feet thick and spread across 1d4 miles", 25, 75),113 createEvent(10, "1d4 rocs", 20, 25),114 createEvent(5, "The likeness of a stern woman with long, flowing hair, carved into the side of a mountain", 20, 40),115 createEvent(10, "1d10 frost giants with 2d4 polar bears", 20, 10),116 createEvent(6, "1d3 adult white dragons", 25, 75),117 createEvent(3, "2d4 abominable yetis", 10, 20),118 createEvent(1, "1 ancient white dragon with 1d3 young white dragons", 5, 25)119 ],120 coastal1:[121 createEvent(1, "1 pseudodragon", 25, 40),122 createEvent(4, "2d8 crabs", 15, 50),123 createEvent(5, "2d6 fishers (commoners)", 20, 50),124 createEvent(1, "1d3 poisonous snakes", 10, 75),125 createEvent(2, "1d6 guards protecting a standard noble", 15, 75),126 createEvent(2, "2d4 scouts", 10, 25),127 createEvent(3, "2d10 merfolk", 5, 10),128 createEvent(2, "1d6+2 sahuagin", 20, 40),129 createEvent(5, "1d4 ghouls feeding on corpses aboard the wreckage of a merchant ship. A search uncovers 2d6 bolts of ruined silk, a 50-foot length of rope. and a barrel of salted herring.", 20, 75),130 createEvent(2, "1d4 winged kobolds with 1d6+1 kobolds", 5, 5),131 createEvent(2, "2d6 tribal warriors", 20, 15),132 createEvent(2, "3d4 kobolds", 10, 25),133 createEvent(2, "2d4+5 blood hawks", 10, 40),134 createEvent(2, "1d8+1 pteranodons", 5, 5),135 createEvent(5, "A few dozen baby turtles struggling to make their way to the sea", 25, 50),136 createEvent(2, "1d6+2 giant lizards", 5, 75),137 createEvent(2, "1d6+4 giant crabs", 5, 40),138 createEvent(2, "2d4 stirges", 10, 20),139 createEvent(2, "2d6+3 bandits", 10, 40),140 createEvent(5, "2d4 sahuagin", 25, 50),141 createEvent(2, "1d6+2 scouts", 25, 5),142 createEvent(5, "1 sea hag", 10, 75),143 createEvent(5, "A momentary formation in the waves that looks like an enormous humanoid face", 10, 40),144 createEvent(5, "1 druid", 15, 20),145 createEvent(5, "1d4 harpies", 20, 15),146 createEvent(5, "A lone hermit (acolyte) sitting on the beach contemplating the meaning of the multiverse", 15, 15),147 createEvent(1, "1d4 berserkers", 15, 50),148 createEvent(1, "1d6 giant eagles", 15, 5),149 createEvent(1, "2d4 giant toads", 10, 20),150 createEvent(1, "1d4 ogres or 1d4 merrow", 15, 5),151 createEvent(1, "3d6 sahuagin", 15, 15),152 createEvent(1, "1d4 veterans", 25, 15),153 createEvent(1, "1d2 plesiosauruses", 10, 50),154 createEvent(1, "1 bandit captain with 2d6 bandits", 20, 40),155 createEvent(1, "1d3 manticores", 5, 25),156 createEvent(1, "1 banshee", 20, 25),157 createEvent(2, "1d4+3 griffons", 25, 75),158 createEvent(2, "1 sahuagin priestess with 1d3 merrow and 2d6 sahuagin", 5, 25),159 createEvent(2, "1 sahuagin baron", 10, 15),160 createEvent(2, "1 water elemental", 10, 40),161 createEvent(1, "1 cyclops", 15, 20),162 createEvent(1, "1 young bronze dragon", 10, 20)163 ],164 coastal2:[165 createEvent(1, "2d8 giant wolf spiders", 15, 75),166 createEvent(2, "3d6 pteranodons", 15, 10),167 createEvent(2, "2d4 scouts", 20, 75),168 createEvent(2, "1d6+2 sahuagin", 20, 50),169 createEvent(1, "1 sea hag", 15, 10),170 createEvent(2, "1d4+1 giant toads", 25, 25),171 createEvent(5, "3d6 sahuagin", 25, 15),172 createEvent(5, "2d6 giant eagles", 20, 20),173 createEvent(5, "A pseudodragon chasing gulls through the air", 20, 20),174 createEvent(4, "1d2 druids", 15, 25),175 createEvent(3, "2d4+1 giant toads", 5, 15),176 createEvent(3, "1 commoner singing a dirge (day only) or 1 banshee (night only)", 10, 5),177 createEvent(5, "A stoppered bottle containing an illegible note and half buried in the sand", 5, 5),178 createEvent(3, "3 sea hags", 25, 15),179 createEvent(3, "1d8+1 harpies", 15, 25),180 createEvent(4, "1d4 plesiosauruses", 5, 5),181 createEvent(3, "1d4 manticores", 10, 10),182 createEvent(3, "2d4 ogres", 15, 20),183 createEvent(4, "1d10 griffons", 10, 25),184 createEvent(5, "A battle at sea between two galleons", 20, 15),185 createEvent(5, "1d4+3 merrow", 5, 15),186 createEvent(5, "A pirate crew consisting of 1 bandit captain, 1 druid, 2 berserkers, and 2d12 bandits, all searching for buried treasure", 20, 5),187 createEvent(5, "A severed humanoid hand tangled in a net", 15, 5),188 createEvent(2, "1 water elemental", 5, 50),189 createEvent(2, "1 cyclops", 5, 10),190 createEvent(2, "1d4 banshees (night only)", 10, 75),191 createEvent(2, "2d4 veterans", 25, 15),192 createEvent(2, "1 young bronze dragon", 20, 5),193 createEvent(3, "1d3 cyclopes", 5, 75),194 createEvent(2, "1 young blue dragon", 25, 5),195 createEvent(1, "1 sahuagin baron with 1d3 sahuagin priestesses and 2d8 sahuagin", 20, 5),196 createEvent(1, "1 djinni", 10, 20),197 createEvent(1, "1 marid", 20, 10),198 createEvent(1, "1 storm giant", 15, 5),199 createEvent(1, "", 20, 50)200 ],201 coastal3:[202 createEvent(1, "1d4 banshees (night only)", 10, 40),203 createEvent(3, "1 cyclops", 20, 10),204 createEvent(4, "1d6+2 manticores", 10, 5),205 createEvent(2, "1d8+2 veterans", 10, 15),206 createEvent(10, "1 young blue dragon", 15, 5),207 createEvent(5, "A nest of 1d6 dragon turtle eggs", 20, 40),208 createEvent(10, "1d4 sahuagin barons", 5, 75),209 createEvent(5, "A trident partially buried in the sand", 10, 10),210 createEvent(10, "1 young bronze dragon", 25, 75),211 createEvent(5, "1 marid", 25, 40),212 createEvent(5, "1d6 water elementals", 10, 15),213 createEvent(5, "2d6 ghasts crawling over 1d6 wrecked ships and feeding on the dead", 20, 5),214 createEvent(5, "1 djinni", 20, 50),215 createEvent(5, "1d3 young bronze dragons", 20, 10),216 createEvent(5, "A beached whale, dead and bloated. If it takes any damage, it explodes, and each creature within 30 feet of it must make a DC 15 Dexterity saving throw, taking 5d6 bludgeoning damage on a failed save, or half as much damage on a successful one.", 5, 5),217 createEvent(2, "2d4 cyclopes", 15, 10),218 createEvent(2, "1 storm giant", 15, 20),219 createEvent(2, "1d3 young blue dragons", 10, 20),220 createEvent(2, "1 adult bronze dragon", 20, 25),221 createEvent(2, "1 adult blue dragon", 5, 25),222 createEvent(3, "1d3 rocs", 25, 25),223 createEvent(4, "1 dragon turtle", 10, 5),224 createEvent(2, "1 ancient bronze dragon", 20, 5),225 createEvent(1, "1 ancient blue dragon", 25, 15)226 ],227 coastal4:[228 createEvent(10, "1 roc", 10, 40),229 createEvent(10, "1 storm giant", 15, 75),230 createEvent(5, "An adult bronze dragon fighting an adult blue dragon to the death", 5, 75),231 createEvent(15, "2d4 cyclopes", 5, 10),232 createEvent(10, "1 adult bronze dragon or 1 adult blue dragon", 15, 25),233 createEvent(10, "1d3 djinni or 1d3 marids", 25, 10),234 createEvent(10, "1 dragon turtle", 25, 20),235 createEvent(5, "1d3 rocs", 25, 10),236 createEvent(5, "1d6+2 waterspouts that dance on the water before stopping abruptly", 25, 15),237 createEvent(10, "1d6 young blue dragons", 10, 50),238 createEvent(6, "1 ancient bronze dragon", 5, 15),239 createEvent(3, "1 ancient blue dragon", 25, 25),240 createEvent(1, "1d3+1 storm giants", 25, 20)241 ],242 desert1:[243 createEvent(1, "3d8 scorpions", 20, 25),244 createEvent(1, "2d4 vultures", 15, 25),245 createEvent(1, "1 abandoned mule", 25, 5),246 createEvent(1, "2d6 commoners with 2d4 camels bound for a distant city", 10, 20),247 createEvent(1, "1d6 flying snakes", 20, 10),248 createEvent(1, "2d6 hyenas or 2d6 jackals", 10, 15),249 createEvent(1, "1d6 guards escorting a noble to the edge of the desert, all of them astride camels", 10, 25),250 createEvent(1, "1d6 cats", 20, 75),251 createEvent(1, "1 pseudodragon", 5, 75),252 createEvent(1, "1d4 poisonous snakes", 10, 10),253 createEvent(3, "2d4 stirges", 25, 25),254 createEvent(2, "1d6+2 giant wolf spiders", 15, 20),255 createEvent(2, "1 scout", 15, 40),256 createEvent(3, "2d4 giant poisonous snakes", 25, 40),257 createEvent(5, "Single-file tracks marching deeper into the desert", 25, 75),258 createEvent(2, "4d4 kobolds", 20, 25),259 createEvent(2, "1 jackalwere", 10, 40),260 createEvent(2, "3d6 tribal warriors", 10, 10),261 createEvent(2, "1d6 giant lizards", 5, 20),262 createEvent(2, "1 swarm of insects", 5, 20),263 createEvent(5, "An oasis surrounded by palm trees and containing the remnants of an old camp", 25, 10),264 createEvent(4, "3d6 bandits", 5, 10),265 createEvent(2, "1d4 constrictor snakes", 25, 40),266 createEvent(2, "2d4 winged kobold", 15, 20),267 createEvent(2, "1 dust mephit", 10, 75),268 createEvent(2, "1d3+1 giant toads", 10, 10),269 createEvent(2, "1d4 giant spiders", 5, 75),270 createEvent(1, "1 druid", 25, 10),271 createEvent(2, "2d4 hobgoblins", 25, 5),272 createEvent(1, "1 wight", 15, 50),273 createEvent(2, "1 ogre", 15, 40),274 createEvent(5, "A brass lamp lying on the ground", 10, 40),275 createEvent(2, "1d4 giant vultures", 5, 5),276 createEvent(1, "1 phase spider", 25, 50),277 createEvent(1, "1 giant constrictor snake", 5, 5),278 createEvent(2, "1 gnoll pack lord with 1d3 giant hyenas", 10, 40),279 createEvent(1, "1d6+2 gnolls", 5, 50),280 createEvent(2, "1 mummy", 5, 15),281 createEvent(1, "1d3 half-ogres", 20, 75),282 createEvent(5, "A pile of humanoid bones wrapped in rotting cloth", 25, 40),283 createEvent(2, "1 lamia", 15, 5),284 createEvent(1, "1 hobgoblin captain with 2d6 hobgoblins", 5, 50),285 createEvent(1, "2d4 death dogs", 25, 20),286 createEvent(2, "1d4 giant scorpions", 5, 25),287 createEvent(1, "1 yuan-ti malison with 1d4+1 yuan-ti purebloods", 15, 10),288 createEvent(2, "1 bandit captain with 1 druid and 3d6 bandits", 25, 15),289 createEvent(1, "2d4 thri-kreen", 5, 40),290 createEvent(1, "1 air elemental", 5, 75),291 createEvent(1, "1d3 couatls", 5, 5),292 createEvent(1, "1 fire elemental", 20, 25),293 createEvent(1, "1d4 gnoll fangs of Yeenoghu", 10, 50),294 createEvent(1, "1 revenant", 10, 75),295 createEvent(1, "1d4 weretigers", 15, 5),296 createEvent(1, "1 cyclops", 25, 15),297 createEvent(1, "1 young brass dragon", 20, 10),298 createEvent(1, "1 medusa", 10, 20),299 createEvent(1, "1 yuan-ti abomination", 25, 5)300 ],301 desert2:[302 createEvent(1, "1 scouts", 25, 15),303 createEvent(1, "2d4 jackalweres", 25, 50),304 createEvent(1, "2d6 hobgoblins", 15, 20),305 createEvent(1, "1d4+3 dust mephits", 5, 15),306 createEvent(1, "1d6 swarm of insects", 25, 40),307 createEvent(1, "1 giant constrictor snake", 20, 75),308 createEvent(2, "1 lion", 10, 10),309 createEvent(2, "2d4 gnolls", 10, 15),310 createEvent(2, "2d6 giant toads", 15, 10),311 createEvent(5, "1 mummy", 20, 15),312 createEvent(3, "1d8+1 giant vultures", 25, 10),313 createEvent(5, "A stone obelisk partly buried in the sand", 15, 50),314 createEvent(3, "1 ogre with 1d3 half-ogres", 15, 20),315 createEvent(7, "1d10 giant hyenas", 25, 15),316 createEvent(5, "1d6+1 empty tents", 25, 15),317 createEvent(3, "1d6+2 thri-kreen", 10, 25),318 createEvent(3, "2d4 yuan-ti purebloods", 25, 20),319 createEvent(4, "1d6+3 death dogs", 10, 25),320 createEvent(2, "1d4 giant scorpions", 20, 5),321 createEvent(1, "1 fire elemental", 15, 50),322 createEvent(2, "1 hobgoblin captain with 3d4 hobgoblins", 20, 75),323 createEvent(1, "1d6+2 ogres", 5, 40),324 createEvent(2, "1d4 lamias", 25, 75),325 createEvent(2, "1 air elemental", 20, 40),326 createEvent(5, "A meteorite resting at the bottom of a glassy crater", 10, 75),327 createEvent(1, "1d4+1 wights", 20, 20),328 createEvent(2, "1 young brass dragon", 20, 15),329 createEvent(2, "1 bandit captain with 1d3 berserkers and 3d6 bandits", 15, 5),330 createEvent(2, "1 cyclops", 10, 25),331 createEvent(1, "1d4 couatls", 5, 75),332 createEvent(2, "1d4 yuan-ti malisons", 15, 75),333 createEvent(5, "Strong winds that kick up dust and reduce visibility to 1d6 feet for 1d4 hours", 20, 75),334 createEvent(3, "1 revenant with 1d3 wights", 20, 20),335 createEvent(2, "1d8+1 phase spiders", 10, 10),336 createEvent(2, "1d6+2 weretigers", 25, 10),337 createEvent(3, "2d4 gnoll fangs of Yeenoghu", 20, 25),338 createEvent(1, "1 young blue dragon", 15, 5),339 createEvent(1, "1d4 cyclopes", 5, 75),340 createEvent(1, "1d3 yuan-ti abominations", 15, 5),341 createEvent(1, "1d4 medusas", 15, 40),342 createEvent(1, "1 guardian naga", 25, 50),343 createEvent(1, "1d3 young brass dragons", 20, 40),344 createEvent(1, "1 efreeti", 20, 20),345 createEvent(1, "1 roc", 10, 25),346 createEvent(1, "1 gynosphinx", 25, 50),347 createEvent(1, "1 adult brass dragon", 20, 15)348 ],349 desert3:[350 createEvent(1, "1 young brass dragon", 5, 25),351 createEvent(4, "4d6 gnolls", 10, 40),352 createEvent(5, "3d10 giant hyenas", 10, 5),353 createEvent(2, "1d8+1 lamias", 25, 75),354 createEvent(2, "2d4 gnoll fangs of Yeenoghu", 15, 10),355 createEvent(3, "1d6+2 giant scorpions", 20, 75),356 createEvent(3, "2d4 phase spiders", 25, 50),357 createEvent(5, "A desert caravan consisting of 1d6 merchants (nobles) with 2d6 guards", 25, 50),358 createEvent(2, "1d6+1 couatls", 25, 10),359 createEvent(3, "1d4 fire elementals", 15, 25),360 createEvent(2, "1 hobgoblin captain with 3d10+10 hobgoblins", 5, 15),361 createEvent(3, "2d4 wights", 25, 20),362 createEvent(5, "1d6 square miles of desert glass", 5, 15),363 createEvent(2, "1 young blue dragon", 25, 5),364 createEvent(3, "1d6+2 weretigers", 10, 15),365 createEvent(3, "1d4 air elementals", 20, 40),366 createEvent(2, "1d6+1 yuan-ti malisons", 15, 50),367 createEvent(5, "1d4 medusas", 10, 25),368 createEvent(5, "1d4 revenants with 3d12 skeletons", 10, 15),369 createEvent(5, "A plundered pyramid", 20, 50),370 createEvent(5, "1d4 young brass dragons", 15, 75),371 createEvent(5, "1d3 yuan-ti abominations", 5, 5),372 createEvent(3, "1d6+2 cyclopes", 15, 75),373 createEvent(4, "1 adult brass dragon", 10, 50),374 createEvent(3, "1 purple worm", 5, 40),375 createEvent(1, "1d2 young blue dragons", 15, 10),376 createEvent(2, "1 mummy lord", 20, 20),377 createEvent(1, "1d3 guardian nagas", 10, 25),378 createEvent(1, "1 adult blue dragon", 25, 5),379 createEvent(1, "1d2 gynosphinxes", 10, 40),380 createEvent(2, "1d3 efreet", 5, 25),381 createEvent(1, "1 androsphinx", 5, 25),382 createEvent(1, "1d4 rocs", 10, 20),383 createEvent(2, "1 adult blue dracolich", 10, 10),384 createEvent(2, "1 ancient brass dragon", 15, 25),385 createEvent(1, "1 ancient blue dragon", 20, 40)386 ],387 desert4:[388 createEvent(5, "1 ancient brass dragon", 20, 40),389 createEvent(5, "1 ancient blue dragon", 25, 10),390 createEvent(4, "1d6+2 medusas", 20, 75),391 createEvent(4, "1d2 purple worms", 10, 50),392 createEvent(4, "2d4 cyclopes", 10, 25),393 createEvent(3, "An abandoned city made from white marble, empty during the day. At night, harmless apparitions roam the streets, replaying the final moments of their lives.", 20, 40),394 createEvent(5, "1d3 young blue dragons", 15, 25),395 createEvent(5, "1 mummy lord", 15, 5),396 createEvent(5, "1d4 hours of extreme heat (see chapter 5 of the Dungeon Master's Guide)", 10, 5),397 createEvent(10, "1d3 guardian nagas", 10, 20),398 createEvent(10, "1d4 efreet", 5, 25),399 createEvent(3, "An old signpost identifying a single destination, called Pazar", 5, 40),400 createEvent(9, "1d4 rocs", 20, 50),401 createEvent(8, "1d3 gynosphinxes", 25, 25),402 createEvent(5, "1 adult blue dracolich", 5, 10),403 createEvent(5, "1 androsphinx", 20, 50),404 createEvent(6, "1 ancient brass dragon", 20, 50),405 createEvent(3, "1 ancient blue dragon", 5, 75),406 createEvent(1, "1d4 adult brass dragons", 25, 25)407 ],408 forest1:[409 createEvent(1, "1 giant owl", 25, 5),410 createEvent(1, "1d4 cats", 20, 40),411 createEvent(1, "2d4 woodcutters (commoners)", 25, 50),412 createEvent(1, "1 badger or 1d4 poisonous snakes", 15, 40),413 createEvent(1, "2d8 baboons", 10, 10),414 createEvent(1, "1d6+3 hyenas", 10, 20),415 createEvent(1, "1 owl", 20, 50),416 createEvent(1, "1 pseudodragon", 10, 40),417 createEvent(1, "1 panther", 5, 5),418 createEvent(1, "1 giant poisonous snake", 5, 5),419 createEvent(1, "1d6+2 boars", 20, 25),420 createEvent(1, "1d4+1 giant lizards", 20, 10),421 createEvent(1, "1 ape or 1 tiger", 25, 20),422 createEvent(1, "2d6 tribal warriors with 1d6 mastiffs", 25, 50),423 createEvent(1, "1d6+2 giant bats or 3d6 flying snakes", 15, 40),424 createEvent(1, "1 scout or 2d4 guards with 1d6 mastiffs", 10, 50),425 createEvent(1, "1d8+1 winged kobolds", 20, 10),426 createEvent(1, "1d3 constrictor snakes", 15, 20),427 createEvent(1, "1d10+5 giant rats or 2d6+3 giant weasels", 20, 50),428 createEvent(1, "1d4+1 needle blights with 1d6+3 twig blights", 15, 20),429 createEvent(5, "A lost, weeping child. If the characters take the child home, the parents reward them with 1d3 potions of healing.", 25, 5),430 createEvent(1, "1d8+1 giant frogs", 25, 40),431 createEvent(1, "4d4 kobolds", 10, 15),432 createEvent(1, "1d3 black bears", 20, 10),433 createEvent(1, "3d6 stirges", 15, 10),434 createEvent(1, "1 satyr", 15, 25),435 createEvent(1, "2d4 kenku", 25, 25),436 createEvent(1, "1d3 vine blights with 1d12 awakened shrubs", 15, 75),437 createEvent(1, "1d4 swarms of ravens", 25, 5),438 createEvent(1, "1 faerie dragon (yellow or younger)", 5, 10),439 createEvent(1, "1d4+2 giant badgers", 25, 50),440 createEvent(5, "A young woodcutter (scout) racing through the forest to rescue a lost friend", 10, 15),441 createEvent(1, "2d4 blink dogs", 15, 50),442 createEvent(1, "1d8+1 sprites", 10, 50),443 createEvent(1, "1d6+2 elk", 25, 15),444 createEvent(1, "1d4 lizardfolk or 3d6 bandits", 25, 25),445 createEvent(1, "1d4+4 wolves", 20, 75),446 createEvent(1, "2d4 giant wolf spiders", 15, 15),447 createEvent(1, "1 swarm of insects or 2d8 blood hawks", 15, 15),448 createEvent(1, "1d6+2 pixies", 10, 10),449 createEvent(1, "1 brown bear", 10, 15),450 createEvent(1, "1d4+3 goblins", 5, 50),451 createEvent(1, "1d3 dryads", 10, 10),452 createEvent(1, "1 awakened tree", 25, 5),453 createEvent(1, "1 phase spider", 10, 40),454 createEvent(1, "1d6 harpies", 20, 10),455 createEvent(1, "1 ettercap or 1d8+1 orcs", 5, 75),456 createEvent(1, "1 goblin boss with 2d6+1 goblins", 10, 25),457 createEvent(1, "1 ankheg", 15, 75),458 createEvent(1, "1 giant constrictor snake", 25, 20),459 createEvent(1, "1d4 bugbears or 2d4 hobgoblins", 10, 15),460 createEvent(1, "1 pegasus", 25, 20),461 createEvent(5, "A stream of cool, clean water flowing between the trees", 20, 40),462 createEvent(1, "1d4 half-ogres or 1 ogre", 10, 50),463 createEvent(1, "1 faerie dragon (green or older)", 20, 40),464 createEvent(1, "1 werewolf or 1d8+1 worgs", 15, 40),465 createEvent(1, "1 druid harvesting mistletoe", 25, 25),466 createEvent(1, "1 will-o'-wisp", 25, 40),467 createEvent(1, "1d4 dire wolves or 1 giant boar", 25, 50),468 createEvent(1, "1d10 giant wasps", 5, 25),469 createEvent(1, "1 owlbear or 1 giant elk", 15, 50),470 createEvent(1, "2d6 gnolls", 25, 15),471 createEvent(1, "1d6 giant toads", 20, 10),472 createEvent(5, "1d6 web cocoons hanging from the branches, holding withered carcasses", 10, 10),473 createEvent(1, "1 wereboar or 1d4 giant boars", 25, 75),474 createEvent(1, "1d6+2 giant spiders", 25, 10),475 createEvent(1, "1d4 centaurs or 1d4 giant elk", 25, 25),476 createEvent(1, "1 orc Eye of Gruumsh with 2d4+2 orcs", 15, 50),477 createEvent(1, "1 gnoll fang of Yeenoghu", 5, 75),478 createEvent(1, "1d4 gricks", 5, 10),479 createEvent(1, "1 bandit captain with 2d6+3 bandits", 15, 75),480 createEvent(1, "1d4 wererats", 5, 50),481 createEvent(1, "1 couatl (day) or 1 banshee (night)", 10, 40),482 createEvent(1, "1 gnoll pack lord with 1d4 giant hyenas", 15, 15),483 createEvent(1, "2d4 berserkers or 1d4 veterans", 15, 15),484 createEvent(1, "1 lizardfolk shaman with 1d3 swarms of poisonous snakes and 1d10+2 lizardfolk", 15, 10),485 createEvent(1, "1d4 displacer beasts", 25, 40),486 createEvent(1, "1d3 green hags", 5, 10),487 createEvent(1, "1 hobgoblin captain with 2d6 hobgoblins and 1d4 giant boars", 15, 75),488 createEvent(1, "1 yuan-ti malison with 1d6+1 yuan-ti purebloods", 20, 15),489 createEvent(1, "1d3 weretigers", 25, 20),490 createEvent(1, "1 gorgon or 1 unicorn", 20, 5),491 createEvent(1, "1 shambling mound", 10, 75),492 createEvent(1, "1 yuan-ti abomination", 5, 20)493 ],494 forest2:[495 createEvent(1, "2d4 vine blights", 20, 15),496 createEvent(1, "2d6 hobgoblins or 2d6 orcs", 20, 20),497 createEvent(1, "2d4 apes or 2d4 satyrs", 10, 50),498 createEvent(1, "1d3 will-o'-wisps", 10, 40),499 createEvent(1, "1d4 swarms of poisonous snakes", 15, 25),500 createEvent(1, "1 orc Eye of Gruumsh with 1d3 orogs and 1d8+2 orcs", 25, 25),501 createEvent(1, "1d3 constrictor snakes or 1d4 tigers", 20, 50),502 createEvent(1, "1 goblin boss with 3d6 goblins", 20, 15),503 createEvent(1, "1 faerie dragon (any age)", 15, 40),504 createEvent(1, "1 brown bear or 1d6+2 black bears", 5, 75),505 createEvent(3, "1d4 giant boars", 20, 50),506 createEvent(2, "1d8+1 giant spiders", 5, 75),507 createEvent(2, "1 lizardfolk shaman with 2d4 lizardfolk", 15, 50),508 createEvent(1, "1d10 giant toads", 20, 20),509 createEvent(1, "1d4 ankhegs", 15, 10),510 createEvent(1, "1d3 awakened trees (day) or 1 banshee (night)", 5, 20),511 createEvent(5, "A small shack almost hidden by the deep forest. The interior is empty aside from a large cast-iron oven.", 20, 50),512 createEvent(1, "1 couatl", 10, 20),513 createEvent(2, "1d4 ogres or 1d6+2 half-ogres", 10, 75),514 createEvent(2, "1 gnoll pack lord with 1d4+1 giant hyenas", 10, 15),515 createEvent(2, "1d6 wererats", 10, 15),516 createEvent(1, "1d4 gricks", 10, 5),517 createEvent(1, "1d8+1 yuan-ti purebloods", 20, 10),518 createEvent(1, "1d6 pegasi", 10, 10),519 createEvent(5, "An old stone archway of obvious elven design. Any character who passes under it makes Wisdom (Perception) checks with advantage for 1 hour.", 20, 5),520 createEvent(2, "1d6+2 dryads", 10, 50),521 createEvent(1, "1d4 giant elk", 15, 20),522 createEvent(1, "1d8+1 harpies", 5, 5),523 createEvent(2, "1 bandit captain with 1 druid and 1d6+5 bandits", 5, 15),524 createEvent(2, "2d4 dire wolves", 5, 25),525 createEvent(2, "2d4 bugbears", 15, 50),526 createEvent(2, "2d4 centaurs", 25, 25),527 createEvent(2, "3d10 blink dogs", 25, 15),528 createEvent(2, "1d4 owlbears", 20, 15),529 createEvent(2, "1d8+1 berserkers", 10, 50),530 createEvent(2, "1d3 green hags", 10, 15),531 createEvent(5, "A clear pool of water with 1d6 sleeping animals lying around its edge", 20, 15),532 createEvent(2, "1d4 werewolves", 20, 25),533 createEvent(2, "1 werebear", 20, 15),534 createEvent(2, "1d8+1 ettercaps", 5, 40),535 createEvent(2, "2d10 elk", 5, 15),536 createEvent(2, "1d4 veterans", 20, 50),537 createEvent(5, "An old tree with a wizened face carved into the trunk", 5, 75),538 createEvent(1, "1d4 wereboars", 20, 10),539 createEvent(1, "2d4 displacer beasts", 10, 20),540 createEvent(1, "1d4 shambling mounds", 20, 10),541 createEvent(1, "1 hobgoblin captain with 3d10 hobgoblins and 4d12 goblins", 5, 15),542 createEvent(1, "1 yuan-ti abomination", 5, 15),543 createEvent(1, "1d8+1 phase spiders", 20, 15),544 createEvent(1, "1d4 trolls", 25, 5),545 createEvent(1, "2d4 yuan-ti malisons", 20, 10),546 createEvent(1, "1 oni", 10, 15),547 createEvent(1, "1d4 unicorns", 10, 5),548 createEvent(1, "1d6+2 weretigers", 20, 40),549 createEvent(1, "1 young green dragon", 10, 10),550 createEvent(1, "1d4 gorgons", 10, 20),551 createEvent(1, "1d6+2 gnoll fangs of Yeenoghu", 20, 50),552 createEvent(1, "1 treant", 15, 15),553 createEvent(1, "1d4 revenants", 25, 10),554 createEvent(1, "1 grick alpha with 1d6+1 gricks", 15, 15),555 createEvent(1, "1d4 giant apes", 25, 50),556 createEvent(1, "1 guardian naga", 10, 10),557 createEvent(1, "1 adult gold dragon", 10, 50)558 ],559 forest3:[560 createEvent(3, "1 werebear", 15, 20),561 createEvent(2, "1d4 druids performing a ritual for the dead (day only) or 1d4 banshees (night only)", 10, 20),562 createEvent(2, "1d3 couatls", 5, 10),563 createEvent(3, "1d3 gnoll fangs of Yeenoghu with 2d6+3 gnolls", 15, 75),564 createEvent(-5, "2d4 displacer beasts", 20, 75),565 createEvent(5, "1d6+2 veterans", 25, 40),566 createEvent(5, "A pool of clear, still water. Gold coins litter the bottom, but they disappear if removed from the pool.", 10, 15),567 createEvent(5, "1d4+1 green hags with 1d3 owlbears", 5, 75),568 createEvent(5, "1d6+2 werewolves", 15, 10),569 createEvent(5, "A small woodland shrine dedicated to a mysterious cult named the Siswa", 25, 5),570 createEvent(5, "1d6+2 phase spiders", 20, 15),571 createEvent(5, "2d4 yuan-ti malisons", 25, 25),572 createEvent(2, "1d3 werebears", 10, 20),573 createEvent(2, "1d4 revenants", 10, 5),574 createEvent(2, "1 young green dragon", 15, 5),575 createEvent(2, "1d4 trolls", 5, 10),576 createEvent(2, "1d6+2 wereboars", 25, 40),577 createEvent(5, "A group of seven people (commoners) wearing animal masks and ambling through the woods", 20, 40),578 createEvent(2, "1d4 gorgons", 15, 15),579 createEvent(2, "1d3 shambling mounds", 15, 40),580 createEvent(2, "1 treant", 5, 5),581 createEvent(2, "1d4 unicorns", 20, 40),582 createEvent(2, "1d6+2 weretigers", 20, 25),583 createEvent(5, "Peals of silvery laughter that echo from a distance", 25, 40),584 createEvent(2, "1 guardian naga", 20, 25),585 createEvent(2, "1 young gold dragon", 10, 75),586 createEvent(2, "1 grick alpha with 2d4 gricks", 10, 25),587 createEvent(2, "1d3 yuan-ti abominations", 5, 25),588 createEvent(2, "1 adult green dragon", 25, 75),589 createEvent(3, "1d8+1 giant apes", 15, 75),590 createEvent(3, "2d4 oni", 20, 5),591 createEvent(3, "1d3 treants", 25, 20),592 createEvent(1, "1 ancient green dragon", 25, 15)593 ],594 forest4:[595 createEvent(5, "1 young green dragon", 15, 10),596 createEvent(5, "1 treant", 10, 25),597 createEvent(3, "1 guardian naga", 25, 15),598 createEvent(3, "1d10 revenants", 10, 10),599 createEvent(3, "1d8+1 unicorns", 15, 40),600 createEvent(3, "1d3 grick alphas", 10, 5),601 createEvent(3, "For a few hundred feet, wherever the characters step, flowers bloom and emit soft light.", 10, 10),602 createEvent(3, "1 young gold dragon", 10, 50),603 createEvent(3, "1d6+2 shambling mounds", 15, 40),604 createEvent(3, "2d4 werebears", 20, 40),605 createEvent(3, "1d4 oni", 25, 25),606 createEvent(3, "4d6+10 elves living in a small community in the treetop", 15, 75),607 createEvent(3, "1d6+2 gorgons", 5, 50),608 createEvent(3, "2d4 trolls", 15, 5),609 createEvent(3, "1d4 giant apes", 20, 15),610 createEvent(3, "1d3 yuan-ti abominations", 20, 50),611 createEvent(10, "1d3 young green dragons", 10, 40),612 createEvent(3, "A 50-foot-tall stone statue of an elf warrior with hand raised, palm out, as if to forbid travelers from coming this way", 10, 25),613 createEvent(10, "1d4 treants", 10, 5),614 createEvent(5, "A cairn set atop a low hill", 10, 50),615 createEvent(10, "1 adult gold dragon", 20, 5),616 createEvent(6, "1 ancient green dragon", 20, 40),617 createEvent(3, "2d4+1 treants", 20, 20),618 createEvent(3, "1 ancient gold dragon", 5, 25)619 ],620 grassland1:[621 createEvent(1, "1 hobgoblin captain with 1d4+1 hobgoblins", 25, 15),622 createEvent(1, "1 chimera", 10, 20),623 createEvent(1, "1 gorgon", 15, 75),624 createEvent(1, "1d2 couatls", 5, 25),625 createEvent(1, "1 ankylosaurus", 15, 40),626 createEvent(1, "1 weretiger", 15, 75),627 createEvent(1, "1d3 allosauruses", 15, 25),628 createEvent(2, "1d3 elephants", 20, 75),629 createEvent(5, "A circle of standing stones within which the air is utterly still, no matter how hard the wind blows outside", 20, 10),630 createEvent(2, "1 phase spider", 20, 25),631 createEvent(2, "1 gnoll pack lord with 1d4 giant hyenas", 10, 5),632 createEvent(2, "1 pegasus", 20, 20),633 createEvent(2, "1 ankheg", 25, 10),634 createEvent(2, "1d3 rhinoceroses", 15, 10),635 createEvent(4, "1d3 cockatrices", 20, 5),636 createEvent(4, "1d6+2 giant wasps or 1d4+3 swarms of insects", 5, 15),637 createEvent(4, "1d4 jackalweres or 1d4 scouts", 10, 40),638 createEvent(4, "1d8 giant goats or 1d8 worgs", 25, 25),639 createEvent(4, "2d4 hobgoblins, 2d4 orcs, or 2d4 gnolls", 20, 40),640 createEvent(2, "1d2 giant poisonous snakes", 10, 5),641 createEvent(2, "1d6+2 elves or 1d6+2 riding horses", 25, 75),642 createEvent(2, "2d4 goblins", 25, 50),643 createEvent(2, "1d3 boars", 15, 50),644 createEvent(2, "1 leopard (panther) 1 lion", 5, 25),645 createEvent(4, "1d6+3 goblins riding wolves", 5, 15),646 createEvent(4, "2d6 giant wolf spiders or 1 giant eagle", 10, 40),647 createEvent(3, "1d8+4 pteranodons", 20, 15),648 createEvent(4, "3d6 wolves", 5, 5),649 createEvent(5, "2d4+2 axe beaks", 5, 75),650 createEvent(2, "1 giant boar or 1d2 tigers", 20, 50),651 createEvent(2, "1 ogre or 1d3 bugbears", 15, 40),652 createEvent(2, "giant elk or 1 gnoll pack lord or 1d3 giant hyenas", 5, 75),653 createEvent(2, "1d3 giant vultures or 1d3 hippogriffs", 15, 40),654 createEvent(2, "1 goblin boss with 1d6+2 goblins and 1d4+3 wolves, or 1d3 thri-kreen", 20, 50),655 createEvent(5, "1d3 druids patrolling the wilds", 25, 15),656 createEvent(2, "1d6 scarecrows or 1 wereboar", 25, 15),657 createEvent(2, "1d3 centaurs or 1d3 griffons", 10, 40),658 createEvent(1, "1d3 gnoll fangs of Yeenoghu, or 1 orc Eye of Gruumsh with 2d4+1 orcs", 25, 50),659 createEvent(2, "1 triceratops", 25, 40),660 createEvent(1, "1 cyclops or 1 bulette", 10, 40),661 createEvent(2, "1d4 manticores", 20, 10),662 createEvent(1, "1 tyrannosaurus rex", 5, 50)663 ],664 grassland2:[665 createEvent(1, "1d3 gorgons", 15, 5),666 createEvent(1, "1d4 cyclopes", 10, 15),667 createEvent(2, "1d3 gnoll fangs of Yeenoghu", 15, 75),668 createEvent(2, "1 chimera", 20, 40),669 createEvent(3, "1d4+1 veterans on riding horses", 20, 50),670 createEvent(2, "A tornado that touches down 1d6 miles away, tearing up the land for 1 mile before it dissipates", 5, 40),671 createEvent(2, "1d3 manticores", 20, 10),672 createEvent(2, "2d4 ankhegs", 25, 50),673 createEvent(2, "1d8+1 centaurs", 5, 25),674 createEvent(2, "1d6+2 griffons", 25, 50),675 createEvent(2, "1d6 elephants", 10, 25),676 createEvent(3, "A stretch of land littered with rotting war machines, bones, and banners of forgotten armies", 15, 10),677 createEvent(4, "1d8+1 bugbears", 10, 20),678 createEvent(4, "1 gnoll pack lord with 1d4+1 giant hyenas", 20, 5),679 createEvent(4, "2d4 scarecrows", 5, 5),680 createEvent(4, "1d12 lions", 15, 25),681 createEvent(4, "1d10 thri-kreen", 15, 50),682 createEvent(2, "1 allosaurus", 15, 50),683 createEvent(2, "1 tiger", 25, 75),684 createEvent(2, "1d2 giant eagles or 1d2 giant vultures", 20, 50),685 createEvent(2, "1 goblin boss with 2d4 goblins", 25, 15),686 createEvent(2, "1d2 pegasi", 5, 20),687 createEvent(4, "1 ankylosaurus", 10, 20),688 createEvent(4, "1d2 couatls", 15, 10),689 createEvent(4, "1 orc Eye of Gruumsh with 1d8+1 orcs", 5, 20),690 createEvent(4, "2d4 hippogriffs", 10, 10),691 createEvent(4, "1d4+1 rhinoceroses", 25, 40),692 createEvent(2, "1 hobgoblin captain with 2d6 hobgoblins", 15, 75),693 createEvent(2, "1d3 phase spiders", 5, 20),694 createEvent(2, "1d6+2 giant boars", 10, 10),695 createEvent(2, "2d4 giant elk", 20, 10),696 createEvent(2, "1d4 ogres with 1d4 orogs", 25, 10),697 createEvent(3, "A hot wind that carries the stench of rot", 10, 75),698 createEvent(3, "1d3 weretigers", 25, 50),699 createEvent(2, "1 bulette", 15, 25),700 createEvent(2, "A tribe of 2d20 + 20 nomads (tribal warriors) on riding horses following a herd of antelope (deer). The nomads are willing to trade food, leather, and information for weapons.", 25, 25),701 createEvent(2, "1d6+2 wereboars", 15, 75),702 createEvent(1, "1 young gold dragon", 15, 10),703 createEvent(2, "1d4 triceratopses", 10, 10),704 createEvent(1, "1d3 tyrannosaurus rexes", 10, 25)705 ],706 grassland3:[707 createEvent(5, "3d6 wereboars", 15, 50),708 createEvent(5, "2d10 gnoll fangs of Yeenoghu", 15, 10),709 createEvent(5, "1d4 bulettes", 15, 5),710 createEvent(2, "An old road of paved stones, partly reclaimed by wilderness, that travels for 1d8 miles in either direction before ending", 15, 15),711 createEvent(10, "1d12 couatls", 10, 15),712 createEvent(3, "A witch (mage) dwelling in a crude hut. She offers potions of healing, antitoxins, and other consumable items for sale in exchange for food and news.", 25, 20),713 createEvent(10, "2d10 elephants", 20, 20),714 createEvent(6, "2d4 weretigers", 25, 5),715 createEvent(10, "1d8+1 cyclopes", 5, 50),716 createEvent(5, "1d3 chimeras", 10, 5),717 createEvent(5, "5 triceratopses", 5, 10),718 createEvent(3, "A giant hole 50 feet across that descends nearly 500 feet before opening into an empty cave", 25, 15),719 createEvent(10, "1d4+3 gorgons", 15, 15),720 createEvent(9, "1d3 young gold dragons", 15, 50),721 createEvent(2, "A circular section of grass nearly a quarter-mile across that appears to have been pressed down; 1d4 more such circles connected by lines can be seen from overhead.", 5, 75),722 createEvent(6, "2d4 tyrannosaurus rexes", 5, 75),723 createEvent(3, "1 adult gold dragon", 10, 15),724 createEvent(1, "1 ancient gold dragon", 20, 20)725 ],726 grassland4:[727 createEvent(10, "2d6 triceratopses", 25, 15),728 createEvent(10, "1d10 gorgons", 5, 20),729 createEvent(5, "2d6 hyenas feeding on the carcass of a dead dinosaur", 20, 15),730 createEvent(10, "3d6 bulettes", 25, 20),731 createEvent(5, "A fiery chariot that races across the sky", 20, 25),732 createEvent(10, "1d3 young gold dragons", 20, 15),733 createEvent(10, "2d4 cyclopes", 15, 50),734 createEvent(5, "A valley where all the grass has died and the ground is littered with stumps and fallen tree trunks, all petrified", 10, 40),735 createEvent(10, "2d10 wolves", 20, 40),736 createEvent(5, "A friendly adventuring party of 1d6 + 1 characters of varying races, classes, and levels (average level 1d6+2). They share information about their recent travels.", 20, 5),737 createEvent(10, "1d12 chimeras", 25, 5),738 createEvent(6, "1d6+2 tyrannosaurus rexes", 25, 50),739 createEvent(3, "1 adult gold dragon", 25, 15),740 createEvent(1, "1 ancient gold dragon", 25, 5)741 ],742 hills1:[743 createEvent(1, "1 eagle", 5, 50),744 createEvent(2, "2d4 baboons", 10, 40),745 createEvent(3, "1d6 bandits", 5, 40),746 createEvent(1, "1d4 vultures", 25, 15),747 createEvent(1, "1d10 commoners", 5, 25),748 createEvent(1, "1 raven", 5, 5),749 createEvent(1, "1 poisonous snake", 10, 10),750 createEvent(3, "2d6 bandits 2d6 tribal warriors", 25, 15),751 createEvent(1, "2d8 goats", 25, 75),752 createEvent(1, "1d6+4 blood hawks", 10, 25),753 createEvent(1, "1d4+3 giant weasels", 5, 75),754 createEvent(2, "1d3 guards with 1d2 mastiffs and 1 mule", 20, 25),755 createEvent(2, "1d6+5 hyenas", 10, 40),756 createEvent(2, "2d4 stirges", 20, 75),757 createEvent(3, "An empty cave littered with bones", 15, 50),758 createEvent(1, "1 pseudodragon or 1d3 giant owls", 20, 50),759 createEvent(1, "1 lion or 1 cougar (panther)", 5, 75),760 createEvent(3, "2d8 kobolds", 15, 20),761 createEvent(1, "1 hippogriff", 10, 20),762 createEvent(3, "2d4 goblins", 20, 75),763 createEvent(1, "1 worg", 5, 15),764 createEvent(1, "1d3 swarms of bats or 1d3 swarms of ravens", 10, 20),765 createEvent(1, "1 giant eagle", 20, 10),766 createEvent(3, "An old dwarf sitting on a stump, whittling a piece of wood", 5, 75),767 createEvent(1, "1d4 elk", 10, 5),768 createEvent(1, "1d4 winged kobolds with 1d6 kobolds", 10, 10),769 createEvent(1, "1d6+2 giant wolf spiders", 10, 10),770 createEvent(2, "2d4 wolves", 20, 40),771 createEvent(1, "1 swarm of insects", 10, 75),772 createEvent(1, "1d8+1 axe beaks", 20, 75),773 createEvent(2, "1 brown bear or 1d3 boars", 15, 40),774 createEvent(1, "1 scout", 10, 15),775 createEvent(1, "1 ogre", 15, 40),776 createEvent(2, "2d4 gnolls", 10, 5),777 createEvent(1, "1 giant elk", 10, 25),778 createEvent(1, "1d3+1 harpies", 25, 75),779 createEvent(1, "1 werewolf", 20, 20),780 createEvent(2, "2d4 orcs", 25, 5),781 createEvent(1, "1d4 half-ogres", 25, 25),782 createEvent(1, "1 druid or 1 veteran", 25, 50),783 createEvent(3, "The corpse of an adventurer that carries an intact explorer's pack and lies atop a longsword", 15, 20),784 createEvent(1, "1 green hag", 5, 20),785 createEvent(2, "1d3 dire wolves", 10, 50),786 createEvent(2, "A small cemetery containing 2d6 graves", 20, 20),787 createEvent(2, "1 hobgoblin captain with 2d4 hobgoblins", 10, 15),788 createEvent(1, "2d4 giant goats", 10, 40),789 createEvent(1, "1 manticore", 5, 15),790 createEvent(2, "1d6+2 hobgoblins", 25, 75),791 createEvent(1, "1 phase spider", 10, 15),792 createEvent(3, "A pile of droppings from a very large bird", 15, 50),793 createEvent(1, "1 gnoll fang of Yeenoghu", 15, 75),794 createEvent(1, "1d3 giant boars", 10, 10),795 createEvent(1, "1 gnoll pack lord with 1d3 giant hyenas", 15, 50),796 createEvent(1, "1 bandit captain with 2d4 bandits", 15, 25),797 createEvent(1, "1 orc Eye of Gruumsh with 1d8+2 orcs", 10, 5),798 createEvent(1, "1d3 orogs or 1d4 berserkers", 10, 15),799 createEvent(2, "1 ettin or 1 wereboar", 25, 50),800 createEvent(2, "1 goblin boss with 2d6 goblins", 25, 10),801 createEvent(1, "1d3 griffons", 20, 15),802 createEvent(1, "1d3 perytons or 1d4 pegasi", 20, 50),803 createEvent(6, "1d3 trolls", 15, 40),804 createEvent(3, "1 cyclops", 5, 25),805 createEvent(1, "1 stone giant", 15, 10)806 ],807 hills2:[808 createEvent(1, "1d4 pegasi or 1d3 perytons", 15, 5),809 createEvent(1, "1d6+2 giant goats", 5, 20),810 createEvent(1, "1 manticore", 20, 75),811 createEvent(1, "1d8+1 gnolls or 1d8+1 hobgoblins", 5, 75),812 createEvent(1, "1d4 lions", 15, 40),813 createEvent(1, "1d6+2 worgs", 15, 25),814 createEvent(1, "1d4 brown bears", 5, 40),815 createEvent(1, "3d6 axe beaks", 20, 40),816 createEvent(1, "1 half-ogre with 2d6 orcs", 15, 20),817 createEvent(1, "2d10 winged kobolds", 5, 75),818 createEvent(2, "1 goblin boss with 1d4 dire wolves and 2d6 goblins", 15, 25),819 createEvent(1, "1d6 giant elk", 15, 10),820 createEvent(2, "1d8+1 giant eagles", 10, 25),821 createEvent(2, "1d4 phase spiders", 25, 50),822 createEvent(2, "1 gnoll pack lord with 2d4 giant hyenas", 15, 40),823 createEvent(1, "2d4 hippogriffs", 5, 20),824 createEvent(5, "A 15-foot-tall stone statue of a dwarf warrior that has been tipped over on its side", 10, 75),825 createEvent(2, "2d4 orogs", 15, 75),826 createEvent(2, "1d4+1 griffons", 20, 20),827 createEvent(2, "1d6+2 harpies", 5, 15),828 createEvent(2, "1 orc Eye of Gruumsh with 2d6+3 orcs", 25, 5),829 createEvent(2, "1d4+3 giant boars", 5, 50),830 createEvent(5, "A stone door set into the side of a steep hill, opening onto 15 feet of descending stairs that end at a cave-in", 10, 5),831 createEvent(2, "1d3 green hags", 20, 75),832 createEvent(2, "1d4 werewolves", 15, 50),833 createEvent(2, "1d6+2 ogres", 25, 75),834 createEvent(2, "1 hobgoblin captain with 2d8 hobgoblins", 20, 10),835 createEvent(2, "1 bandit captain with 3d6 bandits", 5, 5),836 createEvent(4, "1 chimera", 10, 15),837 createEvent(4, "1d4 ettins", 10, 10),838 createEvent(4, "1d6+2 veterans with 2d6 berserkers", 10, 10),839 createEvent(3, "An abandoned wooden hut", 15, 40),840 createEvent(4, "1 galeb duhr", 10, 50),841 createEvent(4, "1 bulette", 10, 50),842 createEvent(4, "1 wyvern", 5, 20),843 createEvent(3, "2d6+10 goats with 1 herder (tribal warrior)", 25, 75),844 createEvent(2, "1d3 hill giants", 10, 50),845 createEvent(2, "2d4 wereboars", 10, 40),846 createEvent(2, "1d4 revenants", 20, 15),847 createEvent(2, "1d2 gorgons", 25, 10),848 createEvent(2, "1d8+1 gnoll fangs of Yeenoghu", 25, 50),849 createEvent(3, "1d4 cyclopes", 15, 10),850 createEvent(3, "1 young red dragon", 10, 40),851 createEvent(2, "1d4 stone giants", 5, 50),852 createEvent(1, "1d3 young copper dragons", 25, 20),853 createEvent(1, "1 roc", 15, 15)854 ],855 hills3:[856 createEvent(1, "1d4 pegasi or 1d3 perytons", 25, 75),857 createEvent(1, "1d6+2 giant goats", 15, 10),858 createEvent(1, "1 manticore", 20, 25),859 createEvent(1, "1d8+1 gnolls or 1d8+1 hobgoblins", 25, 15),860 createEvent(1, "1d4 lions", 10, 75),861 createEvent(1, "1d6+2 worgs", 10, 75),862 createEvent(1, "1d4 brown bears", 20, 75),863 createEvent(1, "3d6 axe beaks", 20, 40),864 createEvent(1, "1 half-ogre with 2d6 orcs", 15, 10),865 createEvent(1, "2d10 winged kobolds", 25, 40),866 createEvent(2, "1 goblin boss with 1d4 dire wolves and 2d6 goblins", 10, 40),867 createEvent(1, "1d6 giant elk", 5, 75),868 createEvent(2, "1d8+1 giant eagles", 20, 15),869 createEvent(2, "1d4 phase spiders", 20, 25),870 createEvent(2, "1 gnoll pack lord with 2d4 giant hyenas", 10, 50),871 createEvent(1, "2d4 hippogriffs", 10, 20),872 createEvent(5, "A 15-foot-tall stone statue of a dwarf warrior that has been tipped over on its side", 5, 25),873 createEvent(2, "2d4 orogs", 15, 5),874 createEvent(2, "1d4+1 griffons", 10, 75),875 createEvent(2, "1d6+2 harpies", 5, 75),876 createEvent(2, "1 orc Eye of Gruumsh with 2d6+3 orcs", 5, 75),877 createEvent(2, "1d4+3 giant boars", 10, 50),878 createEvent(5, "A stone door set into the side of a steep hill, opening onto 15 feet of descending stairs that end at a cave-in", 25, 50),879 createEvent(2, "1d3 green hags", 20, 15),880 createEvent(2, "1d4 werewolves", 25, 5),881 createEvent(2, "1d6+2 ogres", 20, 5),882 createEvent(2, "1 hobgoblin captain with 2d8 hobgoblins", 20, 25),883 createEvent(2, "1 bandit captain with 3d6 bandits", 5, 10),884 createEvent(4, "1 chimera", 5, 15),885 createEvent(4, "1d4 ettins", 25, 40),886 createEvent(4, "1d6+2 veterans with 2d6 berserkers", 5, 50),887 createEvent(3, "An abandoned wooden hut", 5, 40),888 createEvent(4, "1 galeb duhr", 15, 20),889 createEvent(4, "1 bulette", 5, 10),890 createEvent(4, "1 wyvern", 5, 20),891 createEvent(3, "2d6+10 goats with 1 herder (tribal warrior)", 10, 15),892 createEvent(2, "1d3 hill giants", 20, 5),893 createEvent(2, "2d4 wereboars", 15, 10),894 createEvent(2, "1d4 revenants", 25, 20),895 createEvent(2, "1d2 gorgons", 15, 25),896 createEvent(2, "1d8+1 gnoll fangs of Yeenoghu", 15, 50),897 createEvent(3, "1d4 cyclopes", 10, 10),898 createEvent(3, "1 young red dragon", 10, 50),899 createEvent(2, "1d4 stone giants", 10, 25),900 createEvent(1, "1d3 young copper dragons", 15, 5),901 createEvent(1, "1 roc", 15, 5)902 ],903 hills4:[904 createEvent(1, "1d2 rocs", 15, 40),905 createEvent(4, "1 young red dragon", 10, 50),906 createEvent(5, "2d6 ettins", 20, 75),907 createEvent(5, "1d4 bulettes", 10, 40),908 createEvent(5, "1d10 revenants", 10, 75),909 createEvent(5, "The white outline of an enormous horse carved into the side of a high hill", 10, 5),910 createEvent(5, "1d6+1 gorgons", 5, 75),911 createEvent(5, "2d4+1 trolls", 20, 20),912 createEvent(5, "The scorched remains of 2d10 humanoids littering a hillside", 10, 50),913 createEvent(5, "2d4 hill giants", 10, 40),914 createEvent(5, "1d6+2 werebears", 10, 75),915 createEvent(5, "2d4 galeb duhr", 5, 75),916 createEvent(5, "1d4+2 wyverns", 20, 25),917 createEvent(5, "A massive boulder partly buried in the earth as if it fell or was thrown there", 20, 5),918 createEvent(5, "1 adult copper dragon", 20, 40),919 createEvent(5, "1d6+3 cyclopes", 20, 10),920 createEvent(5, "The stub of an old stone tower jutting from the top of a hill", 10, 10),921 createEvent(5, "2d4 stone giants", 20, 10),922 createEvent(5, "1 adult red dragon", 10, 25),923 createEvent(6, "1 ancient copper dragon", 25, 50),924 createEvent(3, "1 ancient red dragon", 20, 20),925 createEvent(1, "1d2 adult red dragons with 1d3 young red dragons", 5, 50)926 ],927 mountain1:[928 createEvent(2, "1 eagle", 20, 15),929 createEvent(3, "1d3 swarms of bats", 25, 50),930 createEvent(3, "1d6 goats", 15, 10),931 createEvent(3, "1d10+5 tribal warriors", 20, 5),932 createEvent(3, "1d6+3 pteranodons", 5, 15),933 createEvent(3, "1d8+1 winged kobolds", 20, 15),934 createEvent(3, "1 lion", 25, 20),935 createEvent(4, "Stairs chiseled into the side of the mountain that climb 3d20 + 40 feet before ending abruptly", 5, 20),936 createEvent(3, "2d10 stirges", 5, 15),937 createEvent(3, "2d4 aarakocra", 5, 5),938 createEvent(3, "2d6 dwarf soldiers (guards) with 1d6 mules laden with iron ore", 20, 40),939 createEvent(3, "1 giant eagle", 20, 75),940 createEvent(2, "A small shrine dedicated to a lawful neutral god, perched on a stone outcropping", 25, 75),941 createEvent(3, "2d8+1 blood hawks", 20, 20),942 createEvent(3, "1 giant goat", 25, 20),943 createEvent(3, "3d4 kobolds", 5, 15),944 createEvent(3, "1 half-ogre", 20, 25),945 createEvent(3, "1 berserker", 10, 20),946 createEvent(2, "1 orog", 15, 5),947 createEvent(1, "1 hell hound", 5, 40),948 createEvent(1, "1 druid", 20, 40),949 createEvent(2, "1 peryton", 20, 5),950 createEvent(2, "1d2 hippogriffs", 20, 5),951 createEvent(1, "1 manticore", 20, 5),952 createEvent(2, "1d6+2 scouts", 10, 20),953 createEvent(3, "Enormous footprints left by a giant, which head into the mountain peaks", 25, 25),954 createEvent(6, "2d4 orcs", 10, 5),955 createEvent(2, "1 giant elk", 25, 10),956 createEvent(2, "1 veteran", 5, 25),957 createEvent(2, "1 orc Eye of Gruumsh", 5, 25),958 createEvent(1, "1d4 harpies", 10, 15),959 createEvent(1, "1 ogre", 25, 10),960 createEvent(1, "1 griffon", 25, 75),961 createEvent(1, "1 basilisk", 15, 40),962 createEvent(2, "1 saber-toothed tiger", 25, 40),963 createEvent(5, "A sparkling stream of water spilling from a crevice", 5, 10),964 createEvent(1, "1d2 ettins", 10, 5),965 createEvent(1, "1 cyclops", 20, 40),966 createEvent(1, "1 troll", 25, 10),967 createEvent(1, "1 galeb duhr", 20, 25),968 createEvent(1, "1 air elemental", 20, 75),969 createEvent(1, "1 bulette", 15, 5),970 createEvent(1, "1 chimera", 25, 10),971 createEvent(1, "1 wyvern", 25, 50),972 createEvent(1, "1 stone giant", 15, 15),973 createEvent(1, "1 frost giant", 10, 40)974 ],975 mountain2:[976 createEvent(2, "2d8+1 aarakocra", 20, 40),977 createEvent(2, "1 lion or 1 saber-toothed tiger", 10, 20),978 createEvent(2, "1d8+1 giant goats", 25, 40),979 createEvent(2, "1d4+3 dwarf trailblazers (scouts)", 15, 25),980 createEvent(2, "1d6+2 orcs", 15, 25),981 createEvent(5, "1d10 giant eagles", 10, 40),982 createEvent(5, "1d8+1 hippogriffs", 15, 15),983 createEvent(5, "1d8 fissures venting steam that partially obscures a 20-foot cube above each fissure", 5, 40),984 createEvent(5, "1 basilisk", 5, 75),985 createEvent(5, "1d12 half-ogres", 15, 40),986 createEvent(5, "A ravine blocked by a 100-foot-high wall, which has an opening in the center where a gate used to be", 15, 5),987 createEvent(5, "1 manticore", 10, 40),988 createEvent(5, "2d4 harpies", 10, 40),989 createEvent(2, "1 galeb duhr", 5, 15),990 createEvent(2, "1 bulette", 10, 75),991 createEvent(2, "1d10 berserkers", 25, 15),992 createEvent(2, "1d3 hell hounds", 20, 25),993 createEvent(2, "1d8+1 veterans", 15, 75),994 createEvent(5, "A distant mountain whose peak resembles a tooth", 25, 25),995 createEvent(4, "1d4 ettins", 5, 20),996 createEvent(4, "1 wyvern", 5, 10),997 createEvent(2, "1 orc Eye of Gruumsh with 1d6 orogs and 3d6+10 orcs", 10, 20),998 createEvent(5, "A row of 1d10 + 40 stakes upon which the bodies of kobolds, dwarves, or orcs are impaled", 15, 10),999 createEvent(3, "1 fire giant", 5, 25),1000 createEvent(2, "1 young silver dragon", 20, 50),1001 createEvent(2, "1d4 air elementals", 25, 50),1002 createEvent(3, "1d4 trolls", 20, 5),1003 createEvent(2, "1d3+1 cyclopes", 25, 5),1004 createEvent(2, "1d4 chimeras", 20, 15),1005 createEvent(2, "1 cloud giant", 25, 15),1006 createEvent(1, "1 roc", 20, 75),1007 createEvent(1, "1d4 stone giants", 5, 40),1008 createEvent(1, "1 young red dragon", 20, 15),1009 createEvent(1, "1d4 frost giants", 25, 75)1010 ],1011 mountain3:[1012 createEvent(2, "1d8+1 basilisks", 15, 20),1013 createEvent(2, "2d4 hell hounds", 20, 20),1014 createEvent(2, "1d3 chimeras", 20, 25),1015 createEvent(2, "1 galeb duhr", 20, 10),1016 createEvent(2, "2d6 veterans", 25, 50),1017 createEvent(5, "1 young silver dragon", 10, 5),1018 createEvent(5, "2d4 trolls", 10, 40),1019 createEvent(5, "1 red dragon gliding through the sky above the highest mountaintops", 25, 75),1020 createEvent(5, "1d8+1 manticores", 25, 75),1021 createEvent(5, "1d4 cyclopes", 5, 75),1022 createEvent(5, "Heavy snowfall that lasts for 1d6 hours", 10, 20),1023 createEvent(5, "1d10 air elementals", 20, 40),1024 createEvent(5, "1d6+2 bulettes", 10, 25),1025 createEvent(5, "1d4 stone giants", 15, 25),1026 createEvent(5, "1 fire giant", 5, 10),1027 createEvent(5, "2 stone giants playing catch with a boulder a few hundred feet away", 25, 15),1028 createEvent(5, "1d8+1 ettins", 15, 50),1029 createEvent(5, "1d3 frost giants", 15, 25),1030 createEvent(5, "A wide crevasse, its depths shrouded in mist", 25, 40),1031 createEvent(5, "1d4 cloud giants", 5, 50),1032 createEvent(5, "1 adult silver dragon", 20, 50),1033 createEvent(6, "1 adult red dragon", 5, 15),1034 createEvent(2, "1d4 rocs", 10, 20),1035 createEvent(1, "1 ancient silver dragon", 20, 40)1036 ],1037 mountain4:[1038 createEvent(5, "1d10 bulettes", 20, 10),1039 createEvent(5, "1d8+1 chimeras", 5, 20),1040 createEvent(5, "1 adult silver dragon", 10, 75),1041 createEvent(5, "1d8+1 wyverns", 15, 50),1042 createEvent(5, "A massive boat perched atop a mountain", 20, 25),1043 createEvent(5, "2d4 galeb duhr", 5, 10),1044 createEvent(5, "1d4 frost giants", 20, 50),1045 createEvent(5, "A wooded valley haunted by secretive and reclusive elves who tell warily of their master: a mad wizard who lives in the heart of the valley", 20, 40),1046 createEvent(5, "1d10 air elementals", 15, 15),1047 createEvent(5, "1d6+3 trolls", 15, 25),1048 createEvent(5, "1 adult red dragon", 25, 40),1049 createEvent(5, "1d4 cloud giants", 25, 10),1050 createEvent(5, "A waterfall hundreds of feet high that drops into a clear pool", 25, 10),1051 createEvent(5, "1d3 fire giants", 25, 5),1052 createEvent(5, "2d4 stone giants", 20, 5),1053 createEvent(5, "A force of 100 dwarves (veterans) standing guard at a mountain pass, permitting no passage until a traveler pays 100 gp (if on foot) or 200 gp (if mounted)", 25, 25),1054 createEvent(5, "1d4 rocs", 25, 75),1055 createEvent(5, "1d4 young red dragons", 20, 40),1056 createEvent(6, "1 ancient silver dragon", 25, 25),1057 createEvent(4, "1 ancient red dragon", 25, 75)1058 ],1059 openwater1:[1060 createEvent(3, "3d6 quippers", 0, 0),1061 createEvent(5, "1 swarm of quippers", 0, 0),1062 createEvent(4, "3d10 dolphins", 0, 0),1063 createEvent(2, "1 giant octopus", 0, 0),1064 createEvent(2, "1d4 killer whales", 0, 0),1065 createEvent(2, "1d6 merfolk", 0, 0),1066 createEvent(2, "1d6 giant sea horses", 0, 0),1067 createEvent(4, "1d8 giant crabs", 0, 0),1068 createEvent(4, "1d4 reef sharks", 0, 0),1069 createEvent(1, "1 hunter shark", 0, 0),1070 createEvent(5, "1d4 sahuagin", 0, 0),1071 createEvent(3, "1d4 koalinth", 0, 0),1072 createEvent(3, "A rank 1 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1073 createEvent(5, "1d4 locathahs", 0, 0),1074 createEvent(6, "1d3 harpies", 0, 0),1075 createEvent(3, "2 merrow", 0, 0),1076 createEvent(3, "1 sahuagin priestess and 1d4 sahuagin", 0, 0),1077 createEvent(2, "1 koalinth sergeant and 2d4 koalinth", 0, 0),1078 createEvent(3, "1 plesiosaurus", 0, 0),1079 createEvent(2, "1d3 sea hags", 0, 0),1080 createEvent(3, "1d4 blood hawks", 0, 0),1081 createEvent(3, "1 sahuagin champion", 0, 0),1082 createEvent(4, "1 giant shark", 0, 0),1083 createEvent(1, "1 young bronze dragon", 0, 0),1084 createEvent(25, "A ship (generated at random)", 0, 0)1085 ],1086 openwater2:[1087 createEvent(3, "1 giant shark", 0, 0),1088 createEvent(4, "1d4 swarms of quippers", 0, 0),1089 createEvent(4, "1d10 killer whales", 0, 0),1090 createEvent(6, "3d6 merfolk", 0, 0),1091 createEvent(8, "1 sahuagin high priestess and 1 sahuagin wave shaper", 0, 0),1092 createEvent(5, "2d8 giant crabs", 0, 0),1093 createEvent(5, "2d4 reef sharks", 0, 0),1094 createEvent(3, "1d4 hunter sharks", 0, 0),1095 createEvent(2, "1d4 water elementals", 0, 0),1096 createEvent(1, "A rank 2 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1097 createEvent(4, "2d4 locathahs", 0, 0),1098 createEvent(2, "1 harpy matriarch and 1d4 harpies", 0, 0),1099 createEvent(2, "2d4 merrow", 0, 0),1100 createEvent(3, "1 sahuagin baron and 1d4 sahuagin", 0, 0),1101 createEvent(5, "1 koalinth sergeant and 2d4 koalinth", 0, 0),1102 createEvent(2, "2d8 giant crabs", 0, 0),1103 createEvent(2, "1d4 plesiosauruses", 0, 0),1104 createEvent(2, "A coven of 3 sea hags", 0, 0),1105 createEvent(2, "1d4 sahuagin blademasters", 0, 0),1106 createEvent(4, "1 hydra", 0, 0),1107 createEvent(2, "1 marid", 0, 0),1108 createEvent(1, "1 storm giant", 0, 0),1109 createEvent(1, "1 adult bronze dragon", 0, 0),1110 createEvent(1, "1 dragon turtle", 0, 0),1111 createEvent(16, "A ship (generated at random)", 0, 0),1112 createEvent(10, "A mysterious island (generated at random)", 0, 0)1113 ],1114 openwater3:[1115 createEvent(3, "1 storm giant", 0, 0),1116 createEvent(4, "2d6 giant sharks", 0, 0),1117 createEvent(4, "1 marid", 0, 0),1118 createEvent(7, "1 sahuagin high priestess and 2d4 sahuagin champions", 0, 0),1119 createEvent(7, "1 sahuagin baron and 1d4 sahuagin blademasters", 0, 0),1120 createEvent(3, "3d6 reef sharks", 0, 0),1121 createEvent(4, "2d6 hunter sharks", 0, 0),1122 createEvent(7, "A rank 3 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1123 createEvent(4, "A rank 4 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1124 createEvent(2, "1d3 hydras", 0, 0),1125 createEvent(3, "1d4 koalinth sergeant and 3d10 koalinth", 0, 0),1126 createEvent(2, "2d4 plesiosauruses", 0, 0),1127 createEvent(3, "3d6 merrow", 0, 0),1128 createEvent(4, "1 harpy matriarch and 2d8 harpies", 0, 0),1129 createEvent(3, "A coven of 3 sea hags", 0, 0),1130 createEvent(3, "1 dragon turtle", 0, 0),1131 createEvent(1, "1 ancient bronze dragon", 0, 0),1132 createEvent(11, "A ship (generated at random)", 0, 0),1133 createEvent(-75, "A mysterious island (generated at random)", 0, 0)1134 ],1135 openwater4:[1136 createEvent(3, "1 storm giant", 0, 0),1137 createEvent(4, "2d6 giant sharks", 0, 0),1138 createEvent(4, "1 marid", 0, 0),1139 createEvent(7, "1 sahuagin high priestess and 2d4 sahuagin champions", 0, 0),1140 createEvent(7, "1 sahuagin baron and 1d4 sahuagin blademasters", 0, 0),1141 createEvent(3, "3d6 reef sharks", 0, 0),1142 createEvent(4, "2d6 hunter sharks", 0, 0),1143 createEvent(7, "A rank 3 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1144 createEvent(4, "A rank 4 whirlpool connected to the Elemental Plane of Water (see Whirlpools from Appendix A of Ghosts of Saltmarsh)", 0, 0),1145 createEvent(2, "1d3 hydras", 0, 0),1146 createEvent(3, "1d4 koalinth sergeant and 3d10 koalinth", 0, 0),1147 createEvent(2, "2d4 plesiosauruses", 0, 0),1148 createEvent(3, "3d6 merrow", 0, 0),1149 createEvent(4, "1 harpy matriarch and 2d8 harpies", 0, 0),1150 createEvent(3, "A coven of 3 sea hags", 0, 0),1151 createEvent(3, "1 dragon turtle", 0, 0),1152 createEvent(1, "1 ancient bronze dragon", 0, 0),1153 createEvent(11, "A ship (generated at random)", 0, 0),1154 createEvent(25, "A mysterious island (generated at random)", 0, 0)1155 ],1156 swamp1:[1157 createEvent(1, "1d4 poisonous snakes", 20, 25),1158 createEvent(4, "3d6 rats", 10, 5),1159 createEvent(5, "2d8 ravens", 5, 10),1160 createEvent(2, "3d6 giant rats", 10, 20),1161 createEvent(1, "1d10+5 tribal warriors", 15, 50),1162 createEvent(2, "1d8+1 giant lizards", 10, 20),1163 createEvent(2, "1 crocodile", 10, 10),1164 createEvent(2, "1 swarm of insects", 15, 10),1165 createEvent(1, "1 giant spider", 15, 15),1166 createEvent(2, "1d4+1 mud huts partially sunken in murky water", 5, 5),1167 createEvent(3, "2d8+1 kobolds", 25, 50),1168 createEvent(1, "2d4 mud mephits", 25, 50),1169 createEvent(3, "1d6+2 giant poisonous snakes", 5, 40),1170 createEvent(1, "2d4 winged kobolds", 15, 15),1171 createEvent(2, "1 scout", 25, 50),1172 createEvent(2, "The corpse of an adventurer tangled in the weeds. Looting the body turns up an explorer's pack and perhaps (50% chance) a random common magic item.", 15, 75),1173 createEvent(4, "1 giant toad", 20, 15),1174 createEvent(3, "1d6+2 constrictor snakes", 20, 20),1175 createEvent(3, "2d4 giant frogs", 10, 25),1176 createEvent(1, "1d8+1 swarms of rats or 1d6+2 swarms of ravens", 10, 25),1177 createEvent(3, "2d10 stirges", 20, 50),1178 createEvent(4, "2d6+3 bullywugs", 15, 20),1179 createEvent(2, "1d8+1 orcs", 20, 10),1180 createEvent(2, "1d4 yuan-ti purebloods", 5, 10),1181 createEvent(1, "1 druid", 5, 50),1182 createEvent(2, "1 yuan-ti malison: type 1, type 2, type 3", 20, 75),1183 createEvent(3, "1 giant constrictor snake", 25, 15),1184 createEvent(2, "A high-pitched shriek that lasts for 1d4 minutes", 15, 20),1185 createEvent(3, "2d4 lizardfolk", 10, 25),1186 createEvent(2, "1d4 ghouls", 25, 40),1187 createEvent(2, "1 will-o'-wisp", 15, 25),1188 createEvent(1, "1 wight", 15, 50),1189 createEvent(1, "1 ghast", 15, 50),1190 createEvent(2, "1 swarm of poisonous snakes", 15, 5),1191 createEvent(2, "A foul stench bubbling up from brackish waters", 25, 25),1192 createEvent(3, "1d4+2 ogres", 25, 50),1193 createEvent(3, "1 shambling mound", 5, 75),1194 createEvent(3, "1 lizardfolk shaman with 1d6 giant lizards and 2d10 lizardfolk", 20, 5),1195 createEvent(1, "1 troll", 25, 5),1196 createEvent(2, "1d4 green hags", 10, 50),1197 createEvent(2, "1 revenant", 20, 25),1198 createEvent(2, "1 giant crocodile", 10, 20),1199 createEvent(2, "1 orc Eye of Gruumsh with 1d3 orogs and 2d6+3 orcs", 25, 75),1200 createEvent(2, "1 young black dragon", 5, 40),1201 createEvent(1, "1 yuan-ti abomination", 10, 10),1202 createEvent(1, "1d4 water elementals", 10, 10),1203 createEvent(1, "1 hydra", 20, 40)1204 ],1205 swamp2:[1206 createEvent(1, "1 green hag", 5, 5),1207 createEvent(2, "2d4 giant lizards or 2d4 giant poisonous snakes", 10, 15),1208 createEvent(2, "2d8 winged kobolds", 5, 5),1209 createEvent(2, "1d10+1 bullywugs with 1d8+1 giant frogs", 15, 25),1210 createEvent(2, "1 druid", 25, 75),1211 createEvent(1, "1d8+1 swarms of insects", 20, 5),1212 createEvent(3, "1d12 ghouls", 5, 50),1213 createEvent(3, "2d8 scouts", 20, 20),1214 createEvent(3, "2d10 orcs", 10, 50),1215 createEvent(3, "2d4 giant spiders", 25, 20),1216 createEvent(2, "Tainted water that exposes creatures that move through it to sight rot (see Diseases in chapter 8 of the Dungeon Master's Guide)", 5, 50),1217 createEvent(3, "1d6+2 giant toads", 20, 15),1218 createEvent(3, "3d6 lizardfolk", 20, 40),1219 createEvent(3, "1d8+1 yuan-ti purebloods", 20, 10),1220 createEvent(3, "1d4+1 swarms of poisonous snakes", 10, 75),1221 createEvent(2, "A bloated humanoid corpse floating facedown in the water", 5, 50),1222 createEvent(3, "1 shambling mound", 15, 40),1223 createEvent(3, "1d4+1 will-o'-wisps", 10, 20),1224 createEvent(3, "2d6 crocodiles", 15, 40),1225 createEvent(3, "1d4+1 giant constrictor snakes", 15, 25),1226 createEvent(4, "1 lizardfolk shaman with 1d3 swarms of poisonous snakes and 1d8+2 lizardfolk", 20, 50),1227 createEvent(4, "1d8+1 ogres", 5, 15),1228 createEvent(4, "2d4 ghasts", 5, 75),1229 createEvent(3, "An altar partially sunk into the mud, devoted to a god that is part human and part frog", 25, 20),1230 createEvent(4, "1 giant crocodile", 20, 10),1231 createEvent(4, "1 shambling mound", 10, 75),1232 createEvent(4, "1 orc Eye of Gruumsh with 1d3 ogres and 2d10+5 orcs", 10, 5),1233 createEvent(3, "A torrential rain that lasts 1d6 minutes and puts out all unprotected flames within 1 mile", 10, 75),1234 createEvent(2, "1 young black dragon", 15, 75),1235 createEvent(2, "1d4 green hags with 1d6+1 ogres", 20, 20),1236 createEvent(2, "1 yuan-ti abomination", 15, 25),1237 createEvent(2, "1d4+1 wights", 5, 75),1238 createEvent(2, "1d6+1 yuan-ti malisons: type 1, type 2, type 3", 15, 40),1239 createEvent(3, "1d4+1 trolls", 15, 10),1240 createEvent(3, "1d10 revenants", 10, 15),1241 createEvent(3, "1d8+1 water elementals", 15, 25),1242 createEvent(1, "1d3 hydras", 25, 10)1243 ],1244 swamp3:[1245 createEvent(10, "1d4 giant crocodiles", 5, 40),1246 createEvent(5, "1d3 yuan-ti abominations", 20, 40),1247 createEvent(5, "1d6+1 green hags", 10, 25),1248 createEvent(5, "A large, spreading tree from which 2d6 armored knights hang by the neck", 25, 50),1249 createEvent(5, "2d4 wights", 25, 20),1250 createEvent(5, "1d8+1 yuan-ti malisons: type 1, type 2, type 3", 5, 25),1251 createEvent(5, "Fog that rolls across the terrain, making the area within 1d3 miles heavily obscured for 1d4 hours", 10, 40),1252 createEvent(5, "1d4 revenants", 10, 75),1253 createEvent(5, "1d6 shambling mounds", 15, 10),1254 createEvent(5, "1d10 water elementals", 15, 5),1255 createEvent(5, "1d4 young black dragons", 10, 20),1256 createEvent(5, "An eerie, bat-headed idol almost completely covered by vines", 25, 25),1257 createEvent(5, "1d8+2 trolls", 10, 10),1258 createEvent(5, "1d3 hydras", 10, 40),1259 createEvent(5, "The sound of drums beating several miles away", 10, 5),1260 createEvent(16, "1 adult black dragon", 5, 25),1261 createEvent(-96, "1 ancient black dragon", 10, 40)1262 ],1263 swamp4:[1264 createEvent(10, "1d4 giant crocodiles", 10, 10),1265 createEvent(5, "1d3 yuan-ti abominations", 10, 40),1266 createEvent(5, "1d6+1 green hags", 5, 5),1267 createEvent(5, "A large, spreading tree from which 2d6 armored knights hang by the neck", 25, 25),1268 createEvent(5, "2d4 wights", 25, 15),1269 createEvent(5, "1d8+1 yuan-ti malisons: type 1, type 2, type 3", 5, 15),1270 createEvent(5, "Fog that rolls across the terrain, making the area within 1d3 miles heavily obscured for 1d4 hours", 10, 10),1271 createEvent(5, "1d4 revenants", 10, 40),1272 createEvent(5, "1d6 shambling mounds", 10, 50),1273 createEvent(5, "1d10 water elementals", 25, 20),1274 createEvent(5, "1d4 young black dragons", 5, 10),1275 createEvent(5, "An eerie, bat-headed idol almost completely covered by vines", 25, 5),1276 createEvent(5, "1d8+2 trolls", 15, 25),1277 createEvent(5, "1d3 hydras", 5, 20),1278 createEvent(5, "The sound of drums beating several miles away", 10, 50),1279 createEvent(16, "1 adult black dragon", 10, 10),1280 createEvent(-96, "1 ancient black dragon", 5, 10)1281 ],1282 underdark1:[1283 createEvent(1, "1 mind flayer arcanist", 5, 50),1284 createEvent(1, "1d3+1 giant poisonous snakes", 10, 20),1285 createEvent(1, "1d3 giant lizards", 25, 40),1286 createEvent(1, "2d4 giant fire beetles", 25, 50),1287 createEvent(1, "1d8+1 flumphs", 25, 10),1288 createEvent(1, "1 shrieker", 15, 75),1289 createEvent(1, "1d12 giant rats", 15, 40),1290 createEvent(1, "2d4 kobolds", 20, 5),1291 createEvent(1, "1d8+1 stirges", 25, 25),1292 createEvent(1, "2d4 humans (tribal warriors) seeking the way to the surface, fleeing their Underdark oppressors", 10, 10),1293 createEvent(2, "1d10 troglodytes", 20, 5),1294 createEvent(2, "1d2 gray oozes", 5, 25),1295 createEvent(2, "3d6 stirges", 25, 50),1296 createEvent(2, "1d3 magma mephits", 25, 40),1297 createEvent(2, "1d10 goblins", 15, 10),1298 createEvent(2, "Orc graffiti on the walls, suggesting something rude about the mother of someone named Krusk", 15, 75),1299 createEvent(2, "1 swarm of insects", 5, 5),1300 createEvent(1, "1 deep gnome", 25, 50),1301 createEvent(3, "1d8+1 drow", 5, 40),1302 createEvent(2, "1d4 violet fungi", 5, 20),1303 createEvent(2, "1d12 kuo-toa", 15, 10),1304 createEvent(1, "1 rust monster", 10, 25),1305 createEvent(2, "A rubble-strewn passage that appears to have been recently cleared after a cave-in", 20, 75),1306 createEvent(2, "1d8+1 giant bats", 5, 75),1307 createEvent(2, "3d6 kobolds", 10, 50),1308 createEvent(2, "2d4 grimlocks", 5, 10),1309 createEvent(2, "1d4+3 swarms of bats", 10, 15),1310 createEvent(1, "1 dwarf prospector (scout) looking for gold", 20, 50),1311 createEvent(1, "1 carrion crawler or 1 gelatinous cube", 25, 75),1312 createEvent(1, "1d8 darkmantles or 2d4 piercers", 25, 20),1313 createEvent(1, "1 hell hound", 20, 5),1314 createEvent(1, "1d3 specters", 10, 75),1315 createEvent(1, "1d4 bugbears", 15, 20),1316 createEvent(1, "1d10+5 winged kobolds", 5, 40),1317 createEvent(1, "1d4 fire snakes", 25, 75),1318 createEvent(1, "2d8+1 troglodytes", 25, 40),1319 createEvent(1, "1d6 giant spiders", 15, 20),1320 createEvent(1, "3d6 kuo-toa", 20, 75),1321 createEvent(1, "1 goblin boss with 2d4 goblins", 20, 75),1322 createEvent(1, "4d4 grimlocks", 15, 75),1323 createEvent(1, "1 ochre jelly", 25, 75),1324 createEvent(1, "2d10 giant centipedes", 20, 15),1325 createEvent(1, "1 nothic or 1 giant toad", 25, 10),1326 createEvent(1, "1d4 myconid adults with 5d4 myconid sprouts", 25, 5),1327 createEvent(1, "1 minotaur skeleton or 1 minotaur", 15, 40),1328 createEvent(1, "3d6 drow", 10, 20),1329 createEvent(1, "1 mimic or 1 doppelganger", 15, 10),1330 createEvent(1, "1d6+3 hobgoblins", 10, 10),1331 createEvent(1, "1 intellect devourer or 1 spectator", 5, 20),1332 createEvent(1, "1d8+1 orcs", 20, 15),1333 createEvent(2, "A faint tapping coming from inside a nearby wall", 10, 50),1334 createEvent(1, "1 gibbering mouther or 1 water weird", 20, 25),1335 createEvent(1, "1d12 gas spores", 20, 75),1336 createEvent(1, "1 giant constrictor snake", 20, 20),1337 createEvent(1, "1d10 shadows", 15, 5),1338 createEvent(1, "1d3 grells", 15, 5),1339 createEvent(1, "1d4 wights", 5, 15),1340 createEvent(1, "1d8+1 quaggoth spore servants", 25, 50),1341 createEvent(1, "1d2 gargoyles", 10, 40),1342 createEvent(1, "1d4 ogres or 1d3 ettins", 15, 20),1343 createEvent(1, "1d4 dwarf explorers (veterans)", 15, 15),1344 createEvent(2, "An abandoned miners' camp spattered with blood and littered with the contents of 1d3 dungeoneer's packs", 20, 5),1345 createEvent(1, "1 chuul or 1 salamander", 25, 20),1346 createEvent(1, "1d4 phase spiders or 1d3 hook horrors", 10, 20),1347 createEvent(1, "5d4 duergar", 10, 15),1348 createEvent(1, "1 ghost or 1 flameskull or 1 wraith", 10, 50),1349 createEvent(1, "1 druid with 1 polar bear (cave bear)", 5, 10),1350 createEvent(1, "1 hobgoblin captain with 1d4 half-ogres and 2d10 hobgoblins", 15, 5),1351 createEvent(1, "1 earth elemental or 1 black pudding", 5, 10),1352 createEvent(1, "1 kuo-toa monitor with 1d8+1 kuo-toa whips", 5, 40),1353 createEvent(1, "1 quaggoth thonot with 1d3 quaggoths", 25, 75),1354 createEvent(1, "1 beholder zombie or 1 bone naga", 25, 10),1355 createEvent(1, "1 orc Eye of Gruumsh with 1d4 orogs and 2d8 orcs", 5, 50),1356 createEvent(1, "1d4 ghasts with 1d10 ghouls", 10, 40),1357 createEvent(3, "A reeking puddle where slimy water has dripped from the ceiling", 20, 75),1358 createEvent(1, "1 otyugh or 1 roper", 25, 5),1359 createEvent(1, "1 vampire spawn", 10, 50),1360 createEvent(1, "1 chimera", 5, 5),1361 createEvent(1, "1 mind flayer", 15, 50),1362 createEvent(1, "1 spirit naga", 25, 25),1363 createEvent(1, "", 5, 20),1364 createEvent(1, "", 25, 20),1365 createEvent(1, "", 10, 15),1366 createEvent(1, "", 15, 20)1367 ],1368 underdark2:[1369 createEvent(1, "3d6 swarms of bats", 10, 15),1370 createEvent(1, "1d4 giant spiders or 1d4 giant toads", 15, 5),1371 createEvent(1, "1 mimic", 15, 40),1372 createEvent(1, "2d4 grey oozes", 20, 40),1373 createEvent(1, "2d10 orcs or 3d6 troglodytes", 5, 40),1374 createEvent(1, "3d6 grimlocks", 10, 40),1375 createEvent(1, "1d6+2 magma mephits", 25, 15),1376 createEvent(1, "1 goblin boss with 2d4 goblins", 5, 10),1377 createEvent(1, "2d4 darkmantles", 10, 20),1378 createEvent(1, "2d8+1 drow", 15, 25),1379 createEvent(1, "2d10 piercers", 20, 15),1380 createEvent(1, "1d4 minotaur skeletons", 25, 20),1381 createEvent(2, "3d6 deep gnomes", 15, 15),1382 createEvent(1, "1 druid with 1 polar bear (cave bear)", 20, 40),1383 createEvent(2, "3d6 orcs", 5, 15),1384 createEvent(1, "1 bone naga", 20, 50),1385 createEvent(2, "2d6 bugbears", 10, 25),1386 createEvent(5, "Luminescent fungi growing on the walls of a moist cave, filling it with dim light", 10, 15),1387 createEvent(1, "2d4 specters", 5, 5),1388 createEvent(1, "1d12+4 shadows", 15, 25),1389 createEvent(1, "1d3 gibbering mouthers", 15, 75),1390 createEvent(2, "4d4 hobgoblins", 20, 75),1391 createEvent(2, "1d4 carrion crawlers", 5, 25),1392 createEvent(2, "1 black pudding", 20, 5),1393 createEvent(1, "1d4 ochre jellies", 5, 5),1394 createEvent(5, "A patch of mold that appears yellow when light is directed toward it", 5, 10),1395 createEvent(1, "1d4 nothics", 5, 5),1396 createEvent(2, "2d8+1 gas spores", 25, 25),1397 createEvent(2, "1d3 gelatinous cubes", 15, 15),1398 createEvent(1, "1 ghost", 20, 50),1399 createEvent(2, "1 flameskull", 5, 50),1400 createEvent(2, "2d8 duergar", 25, 25),1401 createEvent(1, "1 wraith", 5, 5),1402 createEvent(1, "1 umber hulk", 5, 10),1403 createEvent(1, "1 xorn", 20, 40),1404 createEvent(1, "1d6+2 dwarf hunters (veterans) searching for trolls", 20, 15),1405 createEvent(1, "1 hobgoblin captain with 3d10 hobgoblins", 5, 5),1406 createEvent(1, "1 roper", 10, 50),1407 createEvent(1, "1 kuo-toa monitor with 1d4 kuo-toa whips and 1d8+1 kuo-toa", 20, 25),1408 createEvent(1, "1d3 water weirds", 25, 40),1409 createEvent(1, "1d4 ghasts with 1d10 ghouls", 25, 5),1410 createEvent(1, "1 otyugh", 15, 5),1411 createEvent(2, "A merchant caravan consisting of 1 drow mage, 2 drow elite warriors, and 2d10 quaggoths", 10, 10),1412 createEvent(1, "1d4 wights", 5, 50),1413 createEvent(1, "1d4 doppelgangers", 25, 40),1414 createEvent(1, "2d8 fire snakes", 10, 5),1415 createEvent(1, "1d4 spectators", 5, 15),1416 createEvent(1, "1 orc Eye of Gruumsh with 1d4 orogs and 2d10+3 orcs", 15, 25),1417 createEvent(1, "1d3 vampire spawn", 10, 40),1418 createEvent(1, "1d4 hook horrors or 1d4 minotaurs", 25, 50),1419 createEvent(1, "3d6 quaggoth spore servants", 5, 5),1420 createEvent(2, "1d3 grells", 5, 50),1421 createEvent(1, "1d6+1 intellect devourers", 10, 40),1422 createEvent(1, "1d10 gargoyles", 25, 10),1423 createEvent(1, "1 beholder zombie", 5, 20),1424 createEvent(2, "1 quaggoth thonot with 2d4 quaggoths", 5, 25),1425 createEvent(1, "1d6 ettins or 1d4 trolls", 5, 25),1426 createEvent(1, "1d8+1 phase spiders", 10, 5),1427 createEvent(1, "1 fomorian or 1d3 cyclopes", 15, 75),1428 createEvent(1, "1d4 earth elementals", 10, 25),1429 createEvent(1, "3d6 ogres", 10, 15),1430 createEvent(1, "1d4+1 chuuls", 5, 25),1431 createEvent(1, "1d10 hell hounds", 15, 15),1432 createEvent(1, "1d3 drow elite warriors", 5, 40),1433 createEvent(1, "1d4 chimeras", 25, 10),1434 createEvent(1, "1d4 salamanders", 25, 25),1435 createEvent(1, "1 cloaker", 5, 10),1436 createEvent(1, "2d4 wights", 15, 5),1437 createEvent(1, "1d4 driders", 15, 25),1438 createEvent(1, "1 fire giant", 25, 40),1439 createEvent(1, "1 grick alpha with 2d4 gricks", 15, 20),1440 createEvent(1, "1 mind flayer arcanist", 5, 25),1441 createEvent(1, "1d4 drow mages", 20, 40),1442 createEvent(1, "1 spirit naga", 10, 5),1443 createEvent(1, "1d4 mind flayers", 5, 15),1444 createEvent(1, "1 behir", 20, 20),1445 createEvent(1, "1 aboleth", 20, 5),1446 createEvent(1, "1 dao or 1 stone giant", 25, 25),1447 createEvent(1, "1 beholder", 15, 5)1448 ],1449 underdark3:[1450 createEvent(2, "3d6 carrion crawlers", 20, 15),1451 createEvent(2, "1d6+1 gelatinous cubes", 15, 15),1452 createEvent(2, "1d8+2 gibbering mouthers", 5, 20),1453 createEvent(2, "2d8 minotaur skeletons", 15, 25),1454 createEvent(2, "2d6 ochre jellies", 10, 5),1455 createEvent(2, "2d4 doppelgangers", 20, 75),1456 createEvent(2, "1d4 quaggoth thonots with 1d10+2 quaggoths", 15, 40),1457 createEvent(2, "1d3 ropers", 15, 75),1458 createEvent(2, "3d6 gargoyles", 5, 5),1459 createEvent(2, "1d10 mimics", 25, 40),1460 createEvent(5, "A 100-foot-long ravine, 4d10 feet wide and 5d20+200 feet deep", 15, 25),1461 createEvent(2, "1 hobgoblin captain with 3d10 hobgoblins", 20, 75),1462 createEvent(2, "2d4 spectators", 25, 20),1463 createEvent(2, "3d6 ghasts", 10, 25),1464 createEvent(2, "2d8 intellect devourers", 15, 15),1465 createEvent(2, "1d3 orc Eyes of Gruumsh with 2d4 orogs and 2d10 orcs", 25, 15),1466 createEvent(5, "A large cave containing 2d10 extraordinarily detailed statues of various creatures", 20, 50),1467 createEvent(2, "1d8+1 kuo-toa monitors", 5, 50),1468 createEvent(2, "2d4 water weirds", 25, 25),1469 createEvent(2, "2d10 gricks", 20, 75),1470 createEvent(2, "3d6 nothics", 10, 50),1471 createEvent(2, "2d8+1 ogres", 5, 75),1472 createEvent(2, "1d6+2 chuuls", 25, 25),1473 createEvent(2, "1d8+1 ettins", 25, 75),1474 createEvent(1, "3d6 grells", 25, 40),1475 createEvent(1, "2d4 flameskulls", 5, 25),1476 createEvent(1, "2d12 dwarf soldiers (veterans) on patrol", 15, 5),1477 createEvent(1, "2d8 hell hounds", 25, 75),1478 createEvent(1, "1d10 ghosts", 25, 25),1479 createEvent(1, "3d4 wights", 20, 25),1480 createEvent(1, "3d6 phase spiders", 10, 5),1481 createEvent(1, "1d8+1 bone nagas", 25, 10),1482 createEvent(3, "A shrill scream followed by dark laughter", 10, 10),1483 createEvent(1, "1d4 chimeras", 10, 40),1484 createEvent(1, "1d10 black puddings", 5, 10),1485 createEvent(1, "3d6 minotaurs", 15, 20),1486 createEvent(1, "2d4 otyughs", 15, 5),1487 createEvent(1, "1d6+1 beholder zombies", 10, 40),1488 createEvent(1, "4d4 hook horrors", 25, 10),1489 createEvent(1, "1d8+1 umber hulks", 5, 40),1490 createEvent(1, "2d4 salamanders", 10, 75),1491 createEvent(1, "1d3 grick alphas", 20, 15),1492 createEvent(1, "1d6+2 xorn", 5, 10),1493 createEvent(5, "A ruined village that once belonged to deep gnomes. A search has a 50% chance of uncovering 1d3 potions of healing and a 25% chance of finding a random common magic item", 25, 25),1494 createEvent(1, "2d4 earth elementals", 20, 5),1495 createEvent(1, "1d3 spirit nagas", 10, 50),1496 createEvent(1, "1d8+1 cyclopes", 25, 50),1497 createEvent(1, "1d6+2 trolls", 15, 75),1498 createEvent(1, "2d4 stone giants", 10, 40),1499 createEvent(1, "2d4 wraiths", 5, 25),1500 createEvent(1, "1d4 fomorians", 5, 20),1501 createEvent(1, "1d3 drow mages with 1d4 drow elite warriors", 25, 25),1502 createEvent(1, "1d10 vampire spawn", 5, 15),1503 createEvent(1, "1d3 cloakers", 10, 10),1504 createEvent(1, "1d4 fire giants", 20, 40),1505 createEvent(1, "1 mind flayer arcanist with 1d6+1 mind flayers", 10, 50),1506 createEvent(1, "1d4 dao", 20, 5),1507 createEvent(1, "1d8+1 driders", 25, 25),1508 createEvent(1, "1d3 behirs", 5, 15),1509 createEvent(1, "1d4 aboleths", 5, 5),1510 createEvent(1, "1 beholder", 25, 5),1511 createEvent(1, "1 young red shadow dragon", 25, 40),1512 createEvent(1, "1 death tyrant", 20, 25),1513 createEvent(1, "1 purple worm", 10, 40)1514 ],1515 underdark4:[1516 createEvent(1, "1d4 grick alphas", 5, 5),1517 createEvent(1, "2d8 spectators", 5, 40),1518 createEvent(2, "3d6 minotaurs or 2d8 kuo-toa monitors", 15, 5),1519 createEvent(2, "2d8 grells", 15, 20),1520 createEvent(2, "2d10 phase spiders", 25, 50),1521 createEvent(2, "4d4 hell hounds", 15, 15),1522 createEvent(2, "1d6+2 ropers", 5, 40),1523 createEvent(2, "2d10 wights", 5, 50),1524 createEvent(2, "3d6 doppelgangers", 25, 75),1525 createEvent(2, "1d8+1 chimeras", 10, 25),1526 createEvent(2, "1d4 cloakers", 25, 75),1527 createEvent(1, "1d4 hobgoblin captains with 5d10 hobgoblins", 15, 20),1528 createEvent(2, "1d8+1 earth elementals", 10, 25),1529 createEvent(2, "2d4 vampire spawn", 20, 50),1530 createEvent(2, "3d6 minotaurs", 5, 20),1531 createEvent(3, "A 30-foot-tall inverted black pyramid floating 1 inch above the floor in a large cave", 15, 40),1532 createEvent(2, "1d10 beholder zombies", 10, 75),1533 createEvent(2, "1d4 mind flayer arcanists", 20, 10),1534 createEvent(2, "1d6+2 otyughs", 20, 10),1535 createEvent(2, "1d12 trolls", 15, 5),1536 createEvent(2, "1d10 wraiths", 10, 75),1537 createEvent(3, "A beautiful obsidian sculpture of a panther lying on the floor", 25, 15),1538 createEvent(2, "1d4 drow mages with 1d6 drow elite warriors", 10, 5),1539 createEvent(2, "1d4 spirit nagas", 15, 40),1540 createEvent(2, "1d8+1 salamanders", 25, 40),1541 createEvent(2, "2d4 umber hulks", 5, 10),1542 createEvent(2, "1d10 xorn", 10, 75),1543 createEvent(3, "1 young red shadow dragon", 25, 75),1544 createEvent(3, "2d4 fomorians", 20, 75),1545 createEvent(3, "1d8+1 driders", 10, 50),1546 createEvent(3, "1d20+20 spiders crawling on the walls of a web-filled cave", 20, 5),1547 createEvent(3, "1d4 fire giants", 20, 10),1548 createEvent(2, "1d10 mind flayers", 5, 40),1549 createEvent(3, "2d4 stone giants", 15, 50),1550 createEvent(3, "1d12 cyclopes", 10, 15),1551 createEvent(4, "A large cave in which stands a 50-foot-tall idol of Blibdoolpoolp", 20, 25),1552 createEvent(5, "1d3 dao", 5, 15),1553 createEvent(5, "1d4 beholders", 15, 15),1554 createEvent(3, "1d4 behirs", 10, 75),1555 createEvent(3, "1 death tyrant", 15, 5),1556 createEvent(3, "1d3 purple worms", 25, 20),1557 createEvent(1, "2d4 aboleths", 25, 75)1558 ],1559 underwater1:[1560 createEvent(10, "3d6 quippers", 0, 0),1561 createEvent(4, "2d4 steam mephits", 0, 0),1562 createEvent(4, "1d4 sahuagin", 0, 0),1563 createEvent(4, "2d6 merfolk", 0, 0),1564 createEvent(3, "2d4 corpses of drowned sailors tangled in kelp", 0, 0),1565 createEvent(4, "2d4 constrictor snakes", 0, 0),1566 createEvent(4, "1d4 reef sharks", 0, 0),1567 createEvent(4, "1 swarm of quippers", 0, 0),1568 createEvent(3, "A bed of enormous clams", 0, 0),1569 createEvent(5, "1d10 merfolk with 1d3 giant sea horses", 0, 0),1570 createEvent(5, "1 giant octopus", 0, 0),1571 createEvent(5, "1 merrow", 0, 0),1572 createEvent(5, "1 plesiosaurus", 0, 0),1573 createEvent(5, "2d10 pieces of corroded brass dinnerware littering the bottom", 0, 0),1574 createEvent(5, "1 giant constrictor snake", 0, 0),1575 createEvent(5, "1 sea hag", 0, 0),1576 createEvent(5, "A school of silvery fish darting through the water", 0, 0),1577 createEvent(5, "1d4 hunter sharks", 0, 0),1578 createEvent(5, "1 sahuagin priestess with 2d4 sahuagin", 0, 0),1579 createEvent(6, "1d4 killer whales", 0, 0),1580 createEvent(2, "1 giant shark", 0, 0),1581 createEvent(1, "1 water elemental", 0, 0),1582 createEvent(1, "1 sahuagin baron", 0, 0)1583 ],1584 underwater2:[1585 createEvent(2, "3d6 steam mephits", 0, 0),1586 createEvent(2, "1d10 sahuagin", 0, 0),1587 createEvent(2, "1 giant octopus", 0, 0),1588 createEvent(2, "3d6 constrictor snakes", 0, 0),1589 createEvent(2, "2d10 merfolk with 1d4 giant sea horses", 0, 0),1590 createEvent(5, "1d4 sea hags", 0, 0),1591 createEvent(5, "2d4 swarms of quippers", 0, 0),1592 createEvent(5, "A sunken galleon with a 50% chance of a random treasure hoard inside (roll on the Treasure Hoard: Challenge 5-10 table in chapter 7 of the Dungeon Master's Guide)", 0, 0),1593 createEvent(5, "1d4 plesiosauruses", 0, 0),1594 createEvent(5, "3d6 reef sharks", 0, 0),1595 createEvent(5, "An abandoned bathysphere", 0, 0),1596 createEvent(10, "1d4 giant constrictor snakes", 0, 0),1597 createEvent(5, "2d4 hunter sharks", 0, 0),1598 createEvent(5, "1d3 sahuagin priestesses with 2d10 sahuagin", 0, 0),1599 createEvent(5, "An empty castle made from coral", 0, 0),1600 createEvent(5, "1d4 killer whales", 0, 0),1601 createEvent(5, "1d10 merrow", 0, 0),1602 createEvent(5, "An eerie statue of a squatting humanoid, with bat wings on its back and tentacles sprouting from its face", 0, 0),1603 createEvent(5, "1d4 water elementals", 0, 0),1604 createEvent(5, "1 sahuagin baron with 2d8 sahuagin", 0, 0),1605 createEvent(6, "1d4 giant sharks", 0, 0),1606 createEvent(3, "1 marid", 0, 0),1607 createEvent(1, "1 storm giant", 0, 0)1608 ],1609 underwater3:[1610 createEvent(10, "1 sahuagin baron with 1d4 sahuagin priestesses and 2d10 sahuagin", 0, 0),1611 createEvent(25, "1d10 killer whales", 0, 0),1612 createEvent(5, "A ghost ship passing overhead, containing 2d6+10 ghosts", 0, 0),1613 createEvent(20, "1d6 giant sharks", 0, 0),1614 createEvent(5, "A 1-mile-radius sphere of effervescent water that allows air-breathing creatures to breathe water while in the sphere", 0, 0),1615 createEvent(10, "1d10 water elementals", 0, 0),1616 createEvent(5, "A shimmering, blue-green portal to the Elemental Plane of Water", 0, 0),1617 createEvent(10, "1d4 marids", 0, 0),1618 createEvent(6, "1d3 storm giants", 0, 0),1619 createEvent(3, "1 dragon turtle", 0, 0),1620 createEvent(1, "1 kraken", 0, 0)1621 ],1622 underwater4:[1623 createEvent(10, "1 sahuagin baron with 1d4 sahuagin priestesses and 2d10 sahuagin", 0, 0),1624 createEvent(25, "1d10 killer whales", 0, 0),1625 createEvent(5, "A ghost ship passing overhead, containing 2d6+10 ghosts", 0, 0),1626 createEvent(20, "1d6 giant sharks", 0, 0),1627 createEvent(5, "A 1-mile-radius sphere of effervescent water that allows air-breathing creatures to breathe water while in the sphere", 0, 0),1628 createEvent(10, "1d10 water elementals", 0, 0),1629 createEvent(5, "A shimmering, blue-green portal to the Elemental Plane of Water", 0, 0),1630 createEvent(10, "1d4 marids", 0, 0),1631 createEvent(6, "1d3 storm giants", 0, 0),1632 createEvent(3, "1 dragon turtle", 0, 0),1633 createEvent(1, "1 kraken", 0, 0)1634 ],1635 urban1:[1636 createEvent(1, "1d6 cats", 5, 5),1637 createEvent(2, "1 commoner with 1d6 goats", 10, 50),1638 createEvent(2, "2d10 rats", 15, 15),1639 createEvent(1, "1 raven perched on a signpost", 15, 5),1640 createEvent(1, "1 commoner on a draft horse", 15, 5),1641 createEvent(1, "2d4 mastiffs", 10, 50),1642 createEvent(1, "1d2 commoners leading 1d4 mules or 1d4 ponies", 5, 40),1643 createEvent(1, "1 pseudodragon", 15, 40),1644 createEvent(1, "1 spy", 10, 15),1645 createEvent(2, "1d8+1 acolytes", 5, 5),1646 createEvent(1, "1d6+6 flying snakes", 15, 40),1647 createEvent(1, "3d6 kobolds", 5, 15),1648 createEvent(1, "2d4 giant centipedes", 15, 5),1649 createEvent(1, "1d8+1 skeletons", 15, 75),1650 createEvent(2, "1d6+2 swarms of rats", 10, 75),1651 createEvent(1, "1d12 zombies", 10, 75),1652 createEvent(5, "A peddler weighed down with a load of pots, pans, and other basic supplies", 5, 20),1653 createEvent(1, "1 giant wasp", 10, 10),1654 createEvent(2, "1 warhorse", 5, 25),1655 createEvent(1, "2d8 cultists", 5, 25),1656 createEvent(2, "3d4 giant rats", 5, 40),1657 createEvent(1, "2d8 stirges", 10, 5),1658 createEvent(1, "1d3+2 giant poisonous snakes", 15, 5),1659 createEvent(1, "1d4+2 swarms of bats", 15, 5),1660 createEvent(1, "2d4 winged kobolds", 15, 10),1661 createEvent(5, "A wagon loaded with apples that has a broken wheel and holds up traffic", 10, 75),1662 createEvent(1, "1 crocodile", 5, 15),1663 createEvent(2, "1 swarm of insects", 15, 20),1664 createEvent(2, "3d6 bandits", 10, 50),1665 createEvent(2, "1d3+2 nobles on riding horses with an escort of 1d10 guards", 15, 50),1666 createEvent(1, "2d4 kenku", 5, 40),1667 createEvent(1, "1d6+2 smoke mephits", 10, 25),1668 createEvent(1, "1d8+1 swarms of ravens", 5, 10),1669 createEvent(2, "1 wererat", 5, 20),1670 createEvent(2, "1d3 half-ogres", 15, 50),1671 createEvent(2, "1 mimic", 5, 10),1672 createEvent(2, "1d4 ghouls", 5, 40),1673 createEvent(2, "1d4 specters", 15, 25),1674 createEvent(2, "1d10 shadows", 10, 40),1675 createEvent(3, "Someone empties a chamber pot onto the street from a second-floor window", 10, 15),1676 createEvent(2, "1 ghast", 15, 20),1677 createEvent(2, "1 priest", 5, 25),1678 createEvent(2, "1 will-o'-wisp", 5, 50),1679 createEvent(2, "1d3 giant-spiders", 10, 15),1680 createEvent(2, "1d4 yuan-ti purebloods", 15, 20),1681 createEvent(2, "2d4 thugs", 10, 15),1682 createEvent(3, "A doomsayer who preaches the end of the world from a street corner", 5, 20),1683 createEvent(1, "1 cambion", 5, 5),1684 createEvent(1, "1 vampire spawn", 5, 25),1685 createEvent(1, "1 couatl", 5, 15),1686 createEvent(1, "1 ghost", 10, 5),1687 createEvent(1, "1 succubus or 1 incubus", 5, 10),1688 createEvent(1, "1 bandit captain with 3d6 bandits", 15, 20),1689 createEvent(1, "1d4+1 cult fanatics", 15, 20),1690 createEvent(1, "1 knight or 1 veteran", 5, 40),1691 createEvent(1, "1 water weird", 10, 25),1692 createEvent(1, "1 wight", 15, 40),1693 createEvent(1, "1 mage", 15, 25),1694 createEvent(1, "1 shield guardian", 10, 50),1695 createEvent(1, "1 gladiator", 5, 15),1696 createEvent(1, "1 revenant", 15, 50),1697 createEvent(1, "2d4 gargoyles", 15, 75),1698 createEvent(1, "1d4 doppelgangers", 10, 20),1699 createEvent(1, "1 oni", 15, 75),1700 createEvent(1, "1 invisible stalker", 15, 20),1701 createEvent(1, "1d3+1 phase spiders", 15, 15),1702 createEvent(1, "1 assassin", 10, 5)1703 ],1704 urban2:[1705 createEvent(2, "1d10 kenku", 10, 20),1706 createEvent(2, "2d6 giant centipedes", 5, 10),1707 createEvent(2, "2d8 skeletons", 15, 5),1708 createEvent(2, "1d6 swarms of bats and 1d6 swarms of rats", 10, 15),1709 createEvent(2, "3d6 winged kobolds", 15, 40),1710 createEvent(3, "2d4 specters", 5, 10),1711 createEvent(3, "1d4 wights", 5, 5),1712 createEvent(3, "4d4 acolytes on draft horses", 5, 50),1713 createEvent(3, "3d6 giant centipedes", 10, 15),1714 createEvent(3, "A talkative urchin, badgering passersby to serve as their guide through the community for a price of 1 sp", 5, 15),1715 createEvent(3, "1d10 spies", 15, 5),1716 createEvent(3, "3d6 crocodiles", 15, 5),1717 createEvent(3, "1d6+2 swarms of insects", 5, 5),1718 createEvent(3, "2d4 smoke mephits", 10, 10),1719 createEvent(3, "A noble shouts!", 15, 10),1720 createEvent(3, "1 succubus or 1 incubus", 5, 10),1721 createEvent(3, "1d10 half-ogres", 5, 5),1722 createEvent(3, "2d10 giant wasps", 15, 25),1723 createEvent(2, "4d10 zombies", 15, 15),1724 createEvent(2, "1d4 knights on warhorses", 15, 50),1725 createEvent(2, "1d4+1 water weirds", 10, 25),1726 createEvent(2, "1d8+1 mimics", 15, 5),1727 createEvent(2, "2d8 giant spiders", 10, 20),1728 createEvent(2, "3d6 shadows", 10, 75),1729 createEvent(4, "An actor leans out from a second-story window to call to passersby, announcing a show", 15, 10),1730 createEvent(2, "1 bandit captain with 3d8 bandits", 10, 50),1731 createEvent(2, "1d10 will-o'-wisps", 10, 25),1732 createEvent(2, "2d4 priests", 10, 20),1733 createEvent(3, "3d6 yuan-ti purebloods", 5, 40),1734 createEvent(2, "2d10 thugs", 15, 75),1735 createEvent(4, "A fortune-teller reads cards for those who pay a price of 1 sp", 15, 5),1736 createEvent(1, "1d3 gladiators", 15, 10),1737 createEvent(1, "1d4+1 couatls", 5, 25),1738 createEvent(1, "1d8 ghosts", 10, 20),1739 createEvent(1, "2d4 doppelgangers", 10, 10),1740 createEvent(1, "1d6+2 phase spiders", 10, 25),1741 createEvent(1, "2d4 veterans", 10, 40),1742 createEvent(1, "1d8 ghasts with 2d6 ghouls", 15, 25),1743 createEvent(1, "3d6 gargoyles", 10, 5),1744 createEvent(1, "2d10 cult fanatics", 5, 15),1745 createEvent(1, "3d6 wererats", 15, 25),1746 createEvent(1, "1 assassin", 5, 40),1747 createEvent(1, "1d3 invisible stalkers", 5, 20),1748 createEvent(1, "1 gray slaad", 5, 50),1749 createEvent(1, "1 young silver dragon", 15, 15),1750 createEvent(1, "1d4 cambions or 1d4 revenants", 10, 25),1751 createEvent(1, "3d6 wights", 5, 40),1752 createEvent(1, "1 archmage", 15, 10),1753 createEvent(1, "2d4 vampire spawn or 1d4 oni", 10, 5),1754 createEvent(1, "1 mage with 1 shield guardian", 15, 75),1755 createEvent(1, "1 rakshasa or 1 vampire", 10, 40)1756 ],1757 urban3:[1758 createEvent(1, "1 mimic", 5, 15),1759 createEvent(4, "1 bandit captain with 5d10 bandits, all on riding horses", 5, 50),1760 createEvent(5, "1d10 knights on warhorses (one knight is a doppelganger)", 10, 40),1761 createEvent(3, "1d8 succubi or 1d8 incubi", 10, 50),1762 createEvent(3, "3d6 cult fanatics", 10, 75),1763 createEvent(3, "1d10 wights", 10, 5),1764 createEvent(3, "3d6 wererats", 15, 75),1765 createEvent(3, "A distant boom followed by a plume of smoke rising from the other side of the community", 5, 40),1766 createEvent(3, "1d8+1 ghosts", 5, 50),1767 createEvent(3, "2d10 gargoyles", 15, 10),1768 createEvent(3, "1d6+2 water weirds", 10, 10),1769 createEvent(3, "1d4+4 will-o'-wisps", 15, 50),1770 createEvent(3, "Street performers putting on a puppet show, involving two puppets beating each other with sticks to the amusement of the gathered crowd", 10, 10),1771 createEvent(3, "2d4 couatls", 5, 25),1772 createEvent(3, "2d8 ghasts", 10, 50),1773 createEvent(5, "1d8+1 veterans", 15, 40),1774 createEvent(4, "3d4 priests", 10, 40),1775 createEvent(3, "2d4 cambions", 10, 10),1776 createEvent(3, "1d10 revenants", 5, 15),1777 createEvent(4, "2d4 phase spiders", 15, 15),1778 createEvent(4, "A scruffy commoner that ducks into an alley to make a purchase from a suspicious looking figure", 10, 10),1779 createEvent(3, "1d8 invisible stalkers", 15, 5),1780 createEvent(3, "1d8+1 gladiators", 10, 25),1781 createEvent(5, "Two farmers trading blows over the price of potatoes (50% chance for one farmer to be a retired assassin)", 15, 75),1782 createEvent(2, "1d4 young silver dragons", 15, 15),1783 createEvent(2, "1d4 assassins", 10, 15),1784 createEvent(2, "1d8 oni", 5, 20),1785 createEvent(2, "1d4 mages with 1d4 shield guardians", 5, 10),1786 createEvent(2, "1d10 vampire spawn", 15, 5),1787 createEvent(2, "1 adult silver dragon", 5, 75),1788 createEvent(2, "1d4 gray slaadi", 5, 50),1789 createEvent(2, "1 spellcaster vampire or 1 warrior vampire", 15, 20),1790 createEvent(1, "1 rakshasa", 15, 50),1791 createEvent(1, "1 vampire", 5, 10),1792 createEvent(1, "1 ancient silver dragon", 5, 5),1793 createEvent(1, "1 archmage speeding down the street on a riding horse, blasting 1d4 guards with spells", 10, 75)1794 ],1795 urban4:[1796 createEvent(5, "1d10 invisible stalkers", 10, 20),1797 createEvent(5, "1d10 revenants", 5, 25),1798 createEvent(4, "1d6+2 gladiators", 5, 25),1799 createEvent(4, "2d4 cambions", 10, 10),1800 createEvent(4, "2d6 succubi or 2d6 incubi", 10, 25),1801 createEvent(3, "A witch (archmage) who zooms overhead on a broom of flying", 5, 25),1802 createEvent(5, "1d4 gray slaadi", 10, 75),1803 createEvent(5, "2d8 couatls", 10, 5),1804 createEvent(5, "A distraught parent who rushes up to people, begging for help for a child who fell into the sewer", 10, 50),1805 createEvent(5, "1d3 young silver dragons", 5, 25),1806 createEvent(5, "3d6 ghosts", 15, 20),1807 createEvent(5, "1 adult silver dragon", 15, 25),1808 createEvent(5, "1d4 mages with 1d4 shield guardians", 15, 50),1809 createEvent(5, "An aggressive merchant who hawks wares to passersby, claiming to be the purveyor of the finest silks in all the land", 5, 15),1810 createEvent(5, "1 ancient silver dragon", 10, 75),1811 createEvent(5, "3d6 vampire spawn", 5, 20),1812 createEvent(5, "A patrol of 2d10 guards marching up the street, searching for someone or something", 10, 40),1813 createEvent(5, "1d10 assassins", 5, 75),1814 createEvent(5, "1d4+1 gray slaadi", 10, 5),1815 createEvent(3, "1d10 oni", 10, 25),1816 createEvent(3, "1 spellcaster vampire or 1 warrior vampire", 10, 15),1817 createEvent(1, "1d4 archmages", 5, 5),1818 createEvent(1, "1d3 rakshasas", 15, 50),1819 createEvent(1, "1d4 vampires", 10, 20),1820 createEvent(1, "1 tarrasque", 15, 75)1821 ]1822 };1823 let levels = {1824 "1-4":[1],1825 "5-10":[2],1826 "11-16":[3],1827 "17-20":[4]1828 };1829 let location = {1830 arctic: [1831 {range: [1], zone: "A glacial valley. The area is associated with elemental magic"},1832 {range: [2], zone: "A glacier . sleet is falling"},1833 {range: [3], zone: "A covered tunnel entrance surrounded by cotton grass. there are fragments of obsidian"},1834 {range: [4], zone: "An area of sedge. The area is cursed ground"},...
Focus-test.internal.js
Source:Focus-test.internal.js
...14let FocusWithinResponder;15let useFocusListener;16let useFocusWithinListener;17const createEvent = (type, data) => {18 const event = document.createEvent('CustomEvent');19 event.initCustomEvent(type, true, true);20 if (data != null) {21 Object.entries(data).forEach(([key, value]) => {22 event[key] = value;23 });24 }25 return event;26};27const createKeyboardEvent = (type, data) => {28 return new KeyboardEvent(type, {29 bubbles: true,30 cancelable: true,31 ...data,32 });33};34const modulesInit = () => {35 ReactFeatureFlags = require('shared/ReactFeatureFlags');36 ReactFeatureFlags.enableFlareAPI = true;37 React = require('react');38 ReactDOM = require('react-dom');39 FocusResponder = require('react-events/focus').FocusResponder;40 FocusWithinResponder = require('react-events/focus').FocusWithinResponder;41 useFocusListener = require('react-events/focus').useFocusListener;42 useFocusWithinListener = require('react-events/focus').useFocusWithinListener;43};44describe('Focus event responder', () => {45 let container;46 beforeEach(() => {47 jest.resetModules();48 modulesInit();49 container = document.createElement('div');50 document.body.appendChild(container);51 });52 afterEach(() => {53 ReactDOM.render(null, container);54 document.body.removeChild(container);55 container = null;56 });57 describe('disabled', () => {58 let onBlur, onFocus, ref;59 beforeEach(() => {60 onBlur = jest.fn();61 onFocus = jest.fn();62 ref = React.createRef();63 const Component = () => {64 useFocusListener({65 onBlur,66 onFocus,67 });68 return (69 <div ref={ref} responders={<FocusResponder disabled={true} />} />70 );71 };72 ReactDOM.render(<Component />, container);73 });74 it('prevents custom events being dispatched', () => {75 ref.current.dispatchEvent(createEvent('focus'));76 ref.current.dispatchEvent(createEvent('blur'));77 expect(onFocus).not.toBeCalled();78 expect(onBlur).not.toBeCalled();79 });80 });81 describe('onBlur', () => {82 let onBlur, ref;83 beforeEach(() => {84 onBlur = jest.fn();85 ref = React.createRef();86 const Component = () => {87 useFocusListener({88 onBlur,89 });90 return <div ref={ref} responders={<FocusResponder />} />;91 };92 ReactDOM.render(<Component />, container);93 });94 it('is called after "blur" event', () => {95 ref.current.dispatchEvent(createEvent('focus'));96 ref.current.dispatchEvent(createEvent('blur'));97 expect(onBlur).toHaveBeenCalledTimes(1);98 });99 });100 describe('onFocus', () => {101 let onFocus, ref, innerRef;102 const componentInit = () => {103 onFocus = jest.fn();104 ref = React.createRef();105 innerRef = React.createRef();106 const Component = () => {107 useFocusListener({108 onFocus,109 });110 return (111 <div ref={ref} responders={<FocusResponder />}>112 <a ref={innerRef} />113 </div>114 );115 };116 ReactDOM.render(<Component />, container);117 };118 beforeEach(componentInit);119 it('is called after "focus" event', () => {120 ref.current.dispatchEvent(createEvent('focus'));121 expect(onFocus).toHaveBeenCalledTimes(1);122 });123 it('is not called if descendants of target receive focus', () => {124 const target = innerRef.current;125 target.dispatchEvent(createEvent('focus'));126 expect(onFocus).not.toBeCalled();127 });128 it('is called with the correct pointerType using pointer events', () => {129 // Pointer mouse130 ref.current.dispatchEvent(131 createEvent('pointerdown', {132 pointerType: 'mouse',133 }),134 );135 ref.current.dispatchEvent(createEvent('focus'));136 expect(onFocus).toHaveBeenCalledTimes(1);137 expect(onFocus).toHaveBeenCalledWith(138 expect.objectContaining({pointerType: 'mouse'}),139 );140 ref.current.dispatchEvent(createEvent('blur'));141 // Pointer touch142 ref.current.dispatchEvent(143 createEvent('pointerdown', {144 pointerType: 'touch',145 }),146 );147 ref.current.dispatchEvent(createEvent('focus'));148 expect(onFocus).toHaveBeenCalledTimes(2);149 expect(onFocus).toHaveBeenCalledWith(150 expect.objectContaining({pointerType: 'touch'}),151 );152 ref.current.dispatchEvent(createEvent('blur'));153 // Pointer pen154 ref.current.dispatchEvent(155 createEvent('pointerdown', {156 pointerType: 'pen',157 }),158 );159 ref.current.dispatchEvent(createEvent('focus'));160 expect(onFocus).toHaveBeenCalledTimes(3);161 expect(onFocus).toHaveBeenCalledWith(162 expect.objectContaining({pointerType: 'pen'}),163 );164 });165 it('is called with the correct pointerType without pointer events', () => {166 // Mouse167 ref.current.dispatchEvent(createEvent('mousedown'));168 ref.current.dispatchEvent(createEvent('focus'));169 expect(onFocus).toHaveBeenCalledTimes(1);170 expect(onFocus).toHaveBeenCalledWith(171 expect.objectContaining({pointerType: 'mouse'}),172 );173 ref.current.dispatchEvent(createEvent('blur'));174 // Touch175 ref.current.dispatchEvent(createEvent('touchstart'));176 ref.current.dispatchEvent(createEvent('focus'));177 expect(onFocus).toHaveBeenCalledTimes(2);178 expect(onFocus).toHaveBeenCalledWith(179 expect.objectContaining({pointerType: 'touch'}),180 );181 });182 it('is called with the correct pointerType using a keyboard', () => {183 // Keyboard tab184 ref.current.dispatchEvent(185 createEvent('keydown', {186 key: 'Tab',187 }),188 );189 ref.current.dispatchEvent(createEvent('focus'));190 expect(onFocus).toHaveBeenCalledTimes(1);191 expect(onFocus).toHaveBeenCalledWith(192 expect.objectContaining({pointerType: 'keyboard'}),193 );194 });195 it('is called with the correct pointerType using Tab+altKey on Mac', () => {196 jest.resetModules();197 const platformGetter = jest.spyOn(global.navigator, 'platform', 'get');198 platformGetter.mockReturnValue('MacIntel');199 modulesInit();200 componentInit();201 ref.current.dispatchEvent(202 createEvent('keydown', {203 key: 'Tab',204 altKey: true,205 }),206 );207 ref.current.dispatchEvent(createEvent('focus'));208 expect(onFocus).toHaveBeenCalledTimes(1);209 expect(onFocus).toHaveBeenCalledWith(210 expect.objectContaining({211 pointerType: 'keyboard',212 }),213 );214 platformGetter.mockClear();215 });216 });217 describe('onFocusChange', () => {218 let onFocusChange, ref, innerRef;219 beforeEach(() => {220 onFocusChange = jest.fn();221 ref = React.createRef();222 innerRef = React.createRef();223 const Component = () => {224 useFocusListener({225 onFocusChange,226 });227 return (228 <div ref={ref} responders={<FocusResponder />}>229 <div ref={innerRef} />230 </div>231 );232 };233 ReactDOM.render(<Component />, container);234 });235 it('is called after "blur" and "focus" events', () => {236 ref.current.dispatchEvent(createEvent('focus'));237 expect(onFocusChange).toHaveBeenCalledTimes(1);238 expect(onFocusChange).toHaveBeenCalledWith(true);239 ref.current.dispatchEvent(createEvent('blur'));240 expect(onFocusChange).toHaveBeenCalledTimes(2);241 expect(onFocusChange).toHaveBeenCalledWith(false);242 });243 it('is not called after "blur" and "focus" events on descendants', () => {244 innerRef.current.dispatchEvent(createEvent('focus'));245 expect(onFocusChange).toHaveBeenCalledTimes(0);246 innerRef.current.dispatchEvent(createEvent('blur'));247 expect(onFocusChange).toHaveBeenCalledTimes(0);248 });249 });250 describe('onFocusVisibleChange', () => {251 let onFocusVisibleChange, ref, innerRef;252 beforeEach(() => {253 onFocusVisibleChange = jest.fn();254 ref = React.createRef();255 innerRef = React.createRef();256 const Component = () => {257 useFocusListener({258 onFocusVisibleChange,259 });260 return (261 <div ref={ref} responders={<FocusResponder />}>262 <div ref={innerRef} />263 </div>264 );265 };266 ReactDOM.render(<Component />, container);267 });268 it('is called after "focus" and "blur" if keyboard navigation is active', () => {269 // use keyboard first270 container.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));271 ref.current.dispatchEvent(createEvent('focus'));272 expect(onFocusVisibleChange).toHaveBeenCalledTimes(1);273 expect(onFocusVisibleChange).toHaveBeenCalledWith(true);274 ref.current.dispatchEvent(275 createEvent('blur', {relatedTarget: container}),276 );277 expect(onFocusVisibleChange).toHaveBeenCalledTimes(2);278 expect(onFocusVisibleChange).toHaveBeenCalledWith(false);279 });280 it('is called if non-keyboard event is dispatched on target previously focused with keyboard', () => {281 // use keyboard first282 container.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));283 ref.current.dispatchEvent(createEvent('focus'));284 expect(onFocusVisibleChange).toHaveBeenCalledTimes(1);285 expect(onFocusVisibleChange).toHaveBeenCalledWith(true);286 // then use pointer on the target, focus should no longer be visible287 ref.current.dispatchEvent(createEvent('pointerdown'));288 expect(onFocusVisibleChange).toHaveBeenCalledTimes(2);289 expect(onFocusVisibleChange).toHaveBeenCalledWith(false);290 // onFocusVisibleChange should not be called again291 ref.current.dispatchEvent(292 createEvent('blur', {relatedTarget: container}),293 );294 expect(onFocusVisibleChange).toHaveBeenCalledTimes(2);295 });296 it('is not called after "focus" and "blur" events without keyboard', () => {297 ref.current.dispatchEvent(createEvent('pointerdown'));298 ref.current.dispatchEvent(createEvent('focus'));299 container.dispatchEvent(createEvent('pointerdown'));300 ref.current.dispatchEvent(301 createEvent('blur', {relatedTarget: container}),302 );303 expect(onFocusVisibleChange).toHaveBeenCalledTimes(0);304 });305 it('is not called after "blur" and "focus" events on descendants', () => {306 container.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));307 innerRef.current.dispatchEvent(createEvent('focus'));308 expect(onFocusVisibleChange).toHaveBeenCalledTimes(0);309 innerRef.current.dispatchEvent(310 createEvent('blur', {relatedTarget: container}),311 );312 expect(onFocusVisibleChange).toHaveBeenCalledTimes(0);313 });314 });315 describe('nested Focus components', () => {316 it('do not propagate events by default', () => {317 const events = [];318 const innerRef = React.createRef();319 const outerRef = React.createRef();320 const createEventHandler = msg => () => {321 events.push(msg);322 };323 const Inner = () => {324 useFocusListener({325 onBlur: createEventHandler('inner: onBlur'),326 onFocus: createEventHandler('inner: onFocus'),327 onFocusChange: createEventHandler('inner: onFocusChange'),328 });329 return <div ref={innerRef} responders={<FocusResponder />} />;330 };331 const Outer = () => {332 useFocusListener({333 onBlur: createEventHandler('outer: onBlur'),334 onFocus: createEventHandler('outer: onFocus'),335 onFocusChange: createEventHandler('outer: onFocusChange'),336 });337 return (338 <div ref={outerRef} responders={<FocusResponder />}>339 <Inner />340 </div>341 );342 };343 ReactDOM.render(<Outer />, container);344 outerRef.current.dispatchEvent(createEvent('focus'));345 outerRef.current.dispatchEvent(createEvent('blur'));346 innerRef.current.dispatchEvent(createEvent('focus'));347 innerRef.current.dispatchEvent(createEvent('blur'));348 expect(events).toEqual([349 'outer: onFocus',350 'outer: onFocusChange',351 'outer: onBlur',352 'outer: onFocusChange',353 'inner: onFocus',354 'inner: onFocusChange',355 'inner: onBlur',356 'inner: onFocusChange',357 ]);358 });359 });360 it('expect displayName to show up for event component', () => {361 expect(FocusResponder.displayName).toBe('Focus');362 });363});364describe('FocusWithin event responder', () => {365 let container;366 beforeEach(() => {367 jest.resetModules();368 modulesInit();369 container = document.createElement('div');370 document.body.appendChild(container);371 });372 afterEach(() => {373 ReactDOM.render(null, container);374 document.body.removeChild(container);375 container = null;376 });377 describe('disabled', () => {378 let onFocusWithinChange, onFocusWithinVisibleChange, ref;379 beforeEach(() => {380 onFocusWithinChange = jest.fn();381 onFocusWithinVisibleChange = jest.fn();382 ref = React.createRef();383 const Component = () => {384 useFocusWithinListener({385 onFocusWithinChange,386 onFocusWithinVisibleChange,387 });388 return (389 <div390 ref={ref}391 responders={<FocusWithinResponder disabled={true} />}392 />393 );394 };395 ReactDOM.render(<Component />, container);396 });397 it('prevents custom events being dispatched', () => {398 ref.current.dispatchEvent(createEvent('focus'));399 ref.current.dispatchEvent(createEvent('blur'));400 expect(onFocusWithinChange).not.toBeCalled();401 expect(onFocusWithinVisibleChange).not.toBeCalled();402 });403 });404 describe('onFocusWithinChange', () => {405 let onFocusWithinChange, ref, innerRef, innerRef2;406 beforeEach(() => {407 onFocusWithinChange = jest.fn();408 ref = React.createRef();409 innerRef = React.createRef();410 innerRef2 = React.createRef();411 const Component = () => {412 useFocusWithinListener({413 onFocusWithinChange,414 });415 return (416 <div ref={ref} responders={<FocusWithinResponder />}>417 <div ref={innerRef} />418 <div ref={innerRef2} />419 </div>420 );421 };422 ReactDOM.render(<Component />, container);423 });424 it('is called after "blur" and "focus" events on focus target', () => {425 ref.current.dispatchEvent(createEvent('focus'));426 expect(onFocusWithinChange).toHaveBeenCalledTimes(1);427 expect(onFocusWithinChange).toHaveBeenCalledWith(true);428 ref.current.dispatchEvent(429 createEvent('blur', {relatedTarget: container}),430 );431 expect(onFocusWithinChange).toHaveBeenCalledTimes(2);432 expect(onFocusWithinChange).toHaveBeenCalledWith(false);433 });434 it('is called after "blur" and "focus" events on descendants', () => {435 innerRef.current.dispatchEvent(createEvent('focus'));436 expect(onFocusWithinChange).toHaveBeenCalledTimes(1);437 expect(onFocusWithinChange).toHaveBeenCalledWith(true);438 innerRef.current.dispatchEvent(439 createEvent('blur', {relatedTarget: container}),440 );441 expect(onFocusWithinChange).toHaveBeenCalledTimes(2);442 expect(onFocusWithinChange).toHaveBeenCalledWith(false);443 });444 it('is only called once when focus moves within and outside the subtree', () => {445 // focus shifts into subtree446 innerRef.current.dispatchEvent(createEvent('focus'));447 expect(onFocusWithinChange).toHaveBeenCalledTimes(1);448 expect(onFocusWithinChange).toHaveBeenCalledWith(true);449 // focus moves around subtree450 innerRef.current.dispatchEvent(451 createEvent('blur', {relatedTarget: innerRef2.current}),452 );453 innerRef2.current.dispatchEvent(createEvent('focus'));454 innerRef2.current.dispatchEvent(455 createEvent('blur', {relatedTarget: ref.current}),456 );457 ref.current.dispatchEvent(createEvent('focus'));458 ref.current.dispatchEvent(459 createEvent('blur', {relatedTarget: innerRef.current}),460 );461 expect(onFocusWithinChange).toHaveBeenCalledTimes(1);462 // focus shifts outside subtree463 innerRef.current.dispatchEvent(464 createEvent('blur', {relatedTarget: container}),465 );466 expect(onFocusWithinChange).toHaveBeenCalledTimes(2);467 expect(onFocusWithinChange).toHaveBeenCalledWith(false);468 });469 });470 describe('onFocusWithinVisibleChange', () => {471 let onFocusWithinVisibleChange, ref, innerRef, innerRef2;472 beforeEach(() => {473 onFocusWithinVisibleChange = jest.fn();474 ref = React.createRef();475 innerRef = React.createRef();476 innerRef2 = React.createRef();477 const Component = () => {478 useFocusWithinListener({479 onFocusWithinVisibleChange,480 });481 return (482 <div ref={ref} responders={<FocusWithinResponder />}>483 <div ref={innerRef} />484 <div ref={innerRef2} />485 </div>486 );487 };488 ReactDOM.render(<Component />, container);489 });490 it('is called after "focus" and "blur" on focus target if keyboard was used', () => {491 // use keyboard first492 container.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));493 ref.current.dispatchEvent(createEvent('focus'));494 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(1);495 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(true);496 ref.current.dispatchEvent(497 createEvent('blur', {relatedTarget: container}),498 );499 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(2);500 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(false);501 });502 it('is called after "focus" and "blur" on descendants if keyboard was used', () => {503 // use keyboard first504 container.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));505 innerRef.current.dispatchEvent(createEvent('focus'));506 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(1);507 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(true);508 innerRef.current.dispatchEvent(509 createEvent('blur', {relatedTarget: container}),510 );511 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(2);512 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(false);513 });514 it('is called if non-keyboard event is dispatched on target previously focused with keyboard', () => {515 // use keyboard first516 ref.current.dispatchEvent(createEvent('focus'));517 ref.current.dispatchEvent(createKeyboardEvent('keydown', {key: 'Tab'}));518 ref.current.dispatchEvent(519 createEvent('blur', {relatedTarget: innerRef.current}),520 );521 innerRef.current.dispatchEvent(createEvent('focus'));522 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(1);523 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(true);524 // then use pointer on the next target, focus should no longer be visible525 innerRef2.current.dispatchEvent(createEvent('pointerdown'));526 innerRef.current.dispatchEvent(527 createEvent('blur', {relatedTarget: innerRef2.current}),528 );529 innerRef2.current.dispatchEvent(createEvent('focus'));530 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(2);531 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(false);532 // then use keyboard again533 innerRef2.current.dispatchEvent(534 createKeyboardEvent('keydown', {key: 'Tab', shiftKey: true}),535 );536 innerRef2.current.dispatchEvent(537 createEvent('blur', {relatedTarget: innerRef.current}),538 );539 innerRef.current.dispatchEvent(createEvent('focus'));540 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(3);541 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(true);542 // then use pointer on the target, focus should no longer be visible543 innerRef.current.dispatchEvent(createEvent('pointerdown'));544 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(4);545 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(false);546 // onFocusVisibleChange should not be called again547 innerRef.current.dispatchEvent(548 createEvent('blur', {relatedTarget: container}),549 );550 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(4);551 });552 it('is not called after "focus" and "blur" events without keyboard', () => {553 innerRef.current.dispatchEvent(createEvent('pointerdown'));554 innerRef.current.dispatchEvent(createEvent('focus'));555 container.dispatchEvent(createEvent('pointerdown'));556 innerRef.current.dispatchEvent(557 createEvent('blur', {relatedTarget: container}),558 );559 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(0);560 });561 it('is only called once when focus moves within and outside the subtree', () => {562 // focus shifts into subtree563 innerRef.current.dispatchEvent(createEvent('focus'));564 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(1);565 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(true);566 // focus moves around subtree567 innerRef.current.dispatchEvent(568 createEvent('blur', {relatedTarget: innerRef2.current}),569 );570 innerRef2.current.dispatchEvent(createEvent('focus'));571 innerRef2.current.dispatchEvent(572 createEvent('blur', {relatedTarget: ref.current}),573 );574 ref.current.dispatchEvent(createEvent('focus'));575 ref.current.dispatchEvent(576 createEvent('blur', {relatedTarget: innerRef.current}),577 );578 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(1);579 // focus shifts outside subtree580 innerRef.current.dispatchEvent(581 createEvent('blur', {relatedTarget: container}),582 );583 expect(onFocusWithinVisibleChange).toHaveBeenCalledTimes(2);584 expect(onFocusWithinVisibleChange).toHaveBeenCalledWith(false);585 });586 });587 it('expect displayName to show up for event component', () => {588 expect(FocusWithinResponder.displayName).toBe('FocusWithin');589 });...
extendable-message-event-constructor-worker.js
Source:extendable-message-event-constructor-worker.js
2const TEST_OBJECT = { wanwan: 123 };3const CHANNEL1 = new MessageChannel();4const CHANNEL2 = new MessageChannel();5const PORTS = [CHANNEL1.port1, CHANNEL1.port2, CHANNEL2.port1];6function createEvent(initializer) {7 if (initializer === undefined)8 return new ExtendableMessageEvent('type');9 return new ExtendableMessageEvent('type', initializer);10}11// These test cases are mostly copied from the following file in the Chromium12// project (as of commit 848ad70823991e0f12b437d789943a4ab24d65bb):13// third_party/WebKit/LayoutTests/fast/events/constructors/message-event-constructor.html14test(function() {15 assert_false(createEvent().bubbles);16 assert_false(createEvent().cancelable);17 assert_equals(createEvent().data, null);18 assert_equals(createEvent().origin, '');19 assert_equals(createEvent().lastEventId, '');20 assert_equals(createEvent().source, null);21 assert_array_equals(createEvent().ports, []);22}, 'no initializer specified');23test(function() {24 assert_false(createEvent({ bubbles: false }).bubbles);25 assert_true(createEvent({ bubbles: true }).bubbles);26}, '`bubbles` is specified');27test(function() {28 assert_false(createEvent({ cancelable: false }).cancelable);29 assert_true(createEvent({ cancelable: true }).cancelable);30}, '`cancelable` is specified');31test(function() {32 assert_equals(createEvent({ data: TEST_OBJECT }).data, TEST_OBJECT);33 assert_equals(createEvent({ data: undefined }).data, null);34 assert_equals(createEvent({ data: null }).data, null);35 assert_equals(createEvent({ data: false }).data, false);36 assert_equals(createEvent({ data: true }).data, true);37 assert_equals(createEvent({ data: '' }).data, '');38 assert_equals(createEvent({ data: 'chocolate' }).data, 'chocolate');39 assert_equals(createEvent({ data: 12345 }).data, 12345);40 assert_equals(createEvent({ data: 18446744073709551615 }).data,41 18446744073709552000);42 assert_equals(createEvent({ data: NaN }).data, NaN);43 // Note that valueOf() is not called, when the left hand side is44 // evaluated.45 assert_false(46 createEvent({ data: {47 valueOf: function() { return TEST_OBJECT; } } }).data ==48 TEST_OBJECT);49 assert_equals(createEvent({ get data(){ return 123; } }).data, 123);50 assert_throws({ name: 'Error' }, function() {51 createEvent({ get data() { throw { name: 'Error' }; } }); });52}, '`data` is specified');53test(function() {54 assert_equals(createEvent({ origin: 'melancholy' }).origin, 'melancholy');55 assert_equals(createEvent({ origin: '' }).origin, '');56 assert_equals(createEvent({ origin: null }).origin, 'null');57 assert_equals(createEvent({ origin: false }).origin, 'false');58 assert_equals(createEvent({ origin: true }).origin, 'true');59 assert_equals(createEvent({ origin: 12345 }).origin, '12345');60 assert_equals(61 createEvent({ origin: 18446744073709551615 }).origin,62 '18446744073709552000');63 assert_equals(createEvent({ origin: NaN }).origin, 'NaN');64 assert_equals(createEvent({ origin: [] }).origin, '');65 assert_equals(createEvent({ origin: [1, 2, 3] }).origin, '1,2,3');66 assert_equals(67 createEvent({ origin: { melancholy: 12345 } }).origin,68 '[object Object]');69 // Note that valueOf() is not called, when the left hand side is70 // evaluated.71 assert_equals(72 createEvent({ origin: {73 valueOf: function() { return 'melancholy'; } } }).origin,74 '[object Object]');75 assert_equals(76 createEvent({ get origin() { return 123; } }).origin, '123');77 assert_throws({ name: 'Error' }, function() {78 createEvent({ get origin() { throw { name: 'Error' }; } }); });79}, '`origin` is specified');80test(function() {81 assert_equals(82 createEvent({ lastEventId: 'melancholy' }).lastEventId, 'melancholy');83 assert_equals(createEvent({ lastEventId: '' }).lastEventId, '');84 assert_equals(createEvent({ lastEventId: null }).lastEventId, 'null');85 assert_equals(createEvent({ lastEventId: false }).lastEventId, 'false');86 assert_equals(createEvent({ lastEventId: true }).lastEventId, 'true');87 assert_equals(createEvent({ lastEventId: 12345 }).lastEventId, '12345');88 assert_equals(89 createEvent({ lastEventId: 18446744073709551615 }).lastEventId,90 '18446744073709552000');91 assert_equals(createEvent({ lastEventId: NaN }).lastEventId, 'NaN');92 assert_equals(createEvent({ lastEventId: [] }).lastEventId, '');93 assert_equals(94 createEvent({ lastEventId: [1, 2, 3] }).lastEventId, '1,2,3');95 assert_equals(96 createEvent({ lastEventId: { melancholy: 12345 } }).lastEventId,97 '[object Object]');98 // Note that valueOf() is not called, when the left hand side is99 // evaluated.100 assert_equals(101 createEvent({ lastEventId: {102 valueOf: function() { return 'melancholy'; } } }).lastEventId,103 '[object Object]');104 assert_equals(105 createEvent({ get lastEventId() { return 123; } }).lastEventId,106 '123');107 assert_throws({ name: 'Error' }, function() {108 createEvent({ get lastEventId() { throw { name: 'Error' }; } }); });109}, '`lastEventId` is specified');110test(function() {111 assert_equals(createEvent({ source: CHANNEL1.port1 }).source, CHANNEL1.port1);112 assert_equals(113 createEvent({ source: self.registration.active }).source,114 self.registration.active);115 assert_equals(116 createEvent({ source: CHANNEL1.port1 }).source, CHANNEL1.port1);117 assert_throws(118 { name: 'TypeError' }, function() { createEvent({ source: this }); },119 'source should be Client or ServiceWorker or MessagePort');120}, '`source` is specified');121test(function() {122 // Valid message ports.123 var passed_ports = createEvent({ ports: PORTS}).ports;124 assert_equals(passed_ports[0], CHANNEL1.port1);125 assert_equals(passed_ports[1], CHANNEL1.port2);126 assert_equals(passed_ports[2], CHANNEL2.port1);127 assert_array_equals(createEvent({ ports: [] }).ports, []);128 assert_array_equals(createEvent({ ports: undefined }).ports, []);129 // Invalid message ports.130 assert_throws({ name: 'TypeError' },131 function() { createEvent({ ports: [1, 2, 3] }); });132 assert_throws({ name: 'TypeError' },133 function() { createEvent({ ports: TEST_OBJECT }); });134 assert_throws({ name: 'TypeError' },135 function() { createEvent({ ports: null }); });136 assert_throws({ name: 'TypeError' },137 function() { createEvent({ ports: this }); });138 assert_throws({ name: 'TypeError' },139 function() { createEvent({ ports: false }); });140 assert_throws({ name: 'TypeError' },141 function() { createEvent({ ports: true }); });142 assert_throws({ name: 'TypeError' },143 function() { createEvent({ ports: '' }); });144 assert_throws({ name: 'TypeError' },145 function() { createEvent({ ports: 'chocolate' }); });146 assert_throws({ name: 'TypeError' },147 function() { createEvent({ ports: 12345 }); });148 assert_throws({ name: 'TypeError' },149 function() { createEvent({ ports: 18446744073709551615 }); });150 assert_throws({ name: 'TypeError' },151 function() { createEvent({ ports: NaN }); });152 assert_throws({ name: 'TypeError' },153 function() { createEvent({ get ports() { return 123; } }); });154 assert_throws({ name: 'Error' }, function() {155 createEvent({ get ports() { throw { name: 'Error' }; } }); });156 // Note that valueOf() is not called, when the left hand side is157 // evaluated.158 var valueOf = function() { return PORTS; };159 assert_throws({ name: 'TypeError' }, function() {160 createEvent({ ports: { valueOf: valueOf } }); });161}, '`ports` is specified');162test(function() {163 var initializers = {164 bubbles: true,165 cancelable: true,166 data: TEST_OBJECT,167 origin: 'wonderful',168 lastEventId: 'excellent',169 source: CHANNEL1.port1,170 ports: PORTS171 };172 assert_equals(createEvent(initializers).bubbles, true);173 assert_equals(createEvent(initializers).cancelable, true);174 assert_equals(createEvent(initializers).data, TEST_OBJECT);175 assert_equals(createEvent(initializers).origin, 'wonderful');176 assert_equals(createEvent(initializers).lastEventId, 'excellent');177 assert_equals(createEvent(initializers).source, CHANNEL1.port1);178 assert_equals(createEvent(initializers).ports[0], PORTS[0]);179 assert_equals(createEvent(initializers).ports[1], PORTS[1]);180 assert_equals(createEvent(initializers).ports[2], PORTS[2]);...
Using AI Code Generation
1const { chromium } = require('playwright');2const { createEvent } = require('@playwright/test/lib/server/events');3(async () => {4 const browser = await chromium.launch();5 const page = await browser.newPage();6 await page.setContent(`<div></div>`);7 await page.evaluate(createEvent, 'click', 'div', { clientX: 10, clientY: 10 });8 await browser.close();9})();10const { chromium } = require('playwright');11const { createEvent } = require('@playwright/test/lib/server/events');12test('should click on a div', async ({ page }) => {13 await page.setContent(`<div></div>`);14 await page.evaluate(createEvent, 'click', 'div', { clientX: 10, clientY: 10 });15});16import { chromium } from 'playwright';17import { createEvent } from '@playwright/test/lib/server/events';18test('should click on a div', async ({ page }) => {19 await page.setContent(`<div></div>`);20 await page.evaluate(createEvent, 'click', 'div', { clientX: 10, clientY: 10 });21});22const { chromium } = require('playwright');23const { createEvent } = require('@playwright/test/lib/server/events');24test('should click on a div', async ({ page }) => {25 await page.setContent(`<div></div>`);26 await page.evaluate(createEvent, 'click', 'div', { clientX: 10, clientY: 10 });27});28import { chromium } from 'playwright';29import { createEvent } from '@playwright/test/lib/server/events';30test('should click on a div', async ({ page }) => {31 await page.setContent(`<div></div>`);32 await page.evaluate(createEvent, 'click', 'div', { clientX: 10, clientY: 10 });33});
Using AI Code Generation
1const { createEvent } = require('playwright-core/lib/server/frames');2const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });3console.log(event);4const { createEvent } = require('playwright-core/lib/server/frames');5const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });6console.log(event);7const { createEvent } = require('playwright-core/lib/server/frames');8const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });9console.log(event);10const { createEvent } = require('playwright-core/lib/server/frames');11const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });12console.log(event);13const { createEvent } = require('playwright-core/lib/server/frames');14const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });15console.log(event);16const { createEvent } = require('playwright-core/lib/server/frames');17const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });18console.log(event);19const { createEvent } = require('playwright-core/lib/server/frames');20const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });21console.log(event);22const { createEvent } = require('playwright-core/lib/server/frames');23const event = createEvent('mousedown', { x: 10, y: 10, button: 'left', clickCount: 1 });24console.log(event);
Using AI Code Generation
1const { createEvent } = require('playwright/lib/server/events');2const event = createEvent('frameAttached', {3});4console.log(event);5{ method: 'frameAttached',6 { frameId: 'frameId',7 stack: undefined } }8const playwright = require('playwright');9(async () => {10 const browser = await playwright.chromium.launch();11 const context = await browser.newContext();12 const page = await context.newPage();13 const event = playwright.createEvent('frameAttached', {14 });
Using AI Code Generation
1const { createEvent } = require('playwright/lib/internal/frames');2const event = createEvent('click', { x: 100, y: 100 });3const { createEvent } = require('playwright/lib/internal/frames');4const event = createEvent('click', { x: 100, y: 100 });5await page.dispatchEvent('selector', event);6Your name to display (optional):7Your name to display (optional):8const { createEvent } = require('playwright/lib/internal/frames');9const event = createEvent('click', { x: 100, y: 100 });10Your name to display (optional):
Using AI Code Generation
1const { createEvent } = require('playwright/lib/server/events');2const event = createEvent('MyEvent', { myProperty: 'myValue' });3console.log(event);4const { createEvent } = require('playwright/lib/server/events');5const event = createEvent('MyEvent', { myProperty: 'myValue' });6console.log(event);7const { createEvent } = require('playwright/lib/server/events');8const event = createEvent('MyEvent', { myProperty: 'myValue' });9console.log(event);10const { createEvent } = require('playwright/lib/server/events');11const event = createEvent('MyEvent', { myProperty: 'myValue' });12console.log(event);13const { createEvent } = require('playwright/lib/server/events');14const event = createEvent('MyEvent', { myProperty: 'myValue' });15console.log(event);16const { createEvent } = require('playwright/lib/server/events');17const event = createEvent('MyEvent', { myProperty: 'myValue' });18console.log(event);19const { createEvent } = require('playwright/lib/server/events');20const event = createEvent('MyEvent', { myProperty: 'myValue' });21console.log(event);22const { createEvent } = require('playwright/lib/server/events');23const event = createEvent('MyEvent', { myProperty: 'myValue' });24console.log(event);25const { createEvent } = require('playwright/lib/server/events');26const event = createEvent('MyEvent', { myProperty: 'myValue' });27console.log(event);28const {
Using AI Code Generation
1const {createEvent} = require('@playwright/test');2const event = createEvent('myCustomEvent', {3});4document.dispatchEvent(event);5document.addEventListener('myCustomEvent', (e) => {6 console.log('Event dispatched');7});8document.removeEventListener('myCustomEvent', (e) => {9 console.log('Event dispatched');10});11module.exports = {12 use: {13 viewport: { width: 1280, height: 720 },14 launchOptions: {15 },16 contextOptions: {17 viewport: { width: 1280, height: 720 },18 {19 },20 },21 },22};23const { test, expect } = require('@playwright/test');24test('My test', async ({ page }) => {25 await page.click('input[name="q"]');26 await page.fill('input[name="q"]', 'Playwright');27 await page.press('input[name="q"]', 'Enter');28 await page.waitForSelector('text=Playwright is a Node.js library to automate Chromium, Firefox and WebKit with a single API');29 await page.click('text=Playwright is a Node.js library to automate Chromium, Firefox and WebKit with a single API');30 await page.waitForSelector('text=Playwright is a Node.js library to automate Chromium, Firefox and WebKit with a single API');31 expect(await page
Using AI Code Generation
1const { createEvent } = require('playwright-core/lib/server/events');2const event = createEvent('customEvent', {3});4const { dispatchEvent } = require('playwright-core/lib/server/events');5dispatchEvent(event);6const { subscribeEvent } = require('playwright-core/lib/server/events');7subscribeEvent('customEvent', (event) => {8 console.log(event.message);9});
LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.
Get 100 minutes of automation test minutes FREE!!