~ Dungeon Script: Hive Cruor ~ ~ generating the level map all levels use the same map style, so this works for all levels ~ if $GENERATION = 'Yes' dungeon_set_wall 'Metal wall' dungeon_set_floor 'Metal floor' dungeon_set_connections 'Elevator' 'Elevator' dungeon_set_obstacles 'Barbed wire' 'Barricade' dungeon_set_pools 'Chemical sludge' dungeon_set_gate_level 0 dungeon_set_environment 'Smog' if $LEVEL = 0 dungeon_set_environment 'Ash wastes' end_if dungeon_generate end_if ~ NPC (re)spawning level specific, uniques are only spawned during generation, the other NPCs respawn ~ if $LEVEL = 14 if $GENERATION = 'Yes' spawn_npc 'Deco' end_if randomiser_add 'RANDOM_NPC' else_if $LEVEL = 13 randomiser_add 'RANDOM_NPC' else_if $LEVEL = 12 if $GENERATION = 'Yes' spawn_npc 'Schweitzer' end_if randomiser_add 'RANDOM_NPC' else_if $LEVEL = 11 if $GENERATION = 'Yes' spawn_npc 'Igor' end_if randomiser_add 'Igur' else_if $LEVEL = 10 if $GENERATION = 'Yes' spawn_npc 'King Pest' end_if randomiser_add 'Corpse fly' randomiser_add 'Pestling' else_if $LEVEL = 9 if $GENERATION = 'Yes' spawn_npc 'Fat Vince' end_if randomiser_add 'Hive lord' randomiser_add 'Corpse beetle' else_if $LEVEL = 8 if $GENERATION = 'Yes' spawn_npc 'Duchess Golon' end_if randomiser_add 'Serpent cultist' randomiser_add 'Serpent slayer' else_if $LEVEL = 7 if $GENERATION = 'Yes' spawn_npc 'Gregor' end_if randomiser_add 'Mutant rebel' randomiser_add 'Abomination' else_if $LEVEL = 6 if $GENERATION = 'Yes' spawn_npc 'Black Death' end_if randomiser_add 'Ratkin warrior' randomiser_add 'Ratkin assassin' else_if $LEVEL = 5 if $GENERATION = 'Yes' spawn_npc 'Dracula' end_if randomiser_add 'Blood drinker' randomiser_add 'Feral dog' else_if $LEVEL = 4 randomiser_add 'Nimrod' randomiser_add 'Nimrod brute' else_if $LEVEL = 3 if $GENERATION = 'Yes' spawn_npc 'Balthazar' end_if randomiser_add 'Fury' randomiser_add 'Spite' else_if $LEVEL = 2 if $GENERATION = 'Yes' spawn_npc 'Mephisto' end_if randomiser_add 'Devourer' else_if $LEVEL = 1 randomiser_add 'Atad' else_if $LEVEL = 0 if $GENERATION = 'Yes' spawn_npc 'Doombreed' end_if randomiser_add 'Devourer' randomiser_add 'Devourer mystic' end_if ~ spawn random NPCs until the number of characters on the current level equals $n_characters_per_level ~ store $n_characters_per_level 12 area_n_characters $n_characters loop if $n_characters >= $n_characters_per_level break end_if randomiser $npc spawn_npc $npc expr $n_characters $n_characters 1 + end_loop