An interesting side effect of the monsndx change that wasn't expected
was a series of warnings on a switch statement in makemon.c. The compiler
is now able to evaluate the switch coverage at compile time.
While the number of warnings was daunting, the fix was simple.
makemon.c: In function ‘is_home_elemental’:
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_ANT’ not handled in switch
[-Wswitch]
34 | switch (monsndx(ptr)) {
| ^~~~~~
makemon.c:34:9: warning: enumeration value ‘PM_KILLER_BEE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SOLDIER_ANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FIRE_ANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_BEETLE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_QUEEN_BEE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ACID_BLOB’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_QUIVERING_BLOB’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GELATINOUS_CUBE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CHICKATRICE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_COCKATRICE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PYROLISK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_JACKAL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FOX’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_COYOTE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WEREJACKAL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LITTLE_DOG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DINGO’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DOG’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LARGE_DOG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WOLF’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WEREWOLF’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WINTER_WOLF_CUB’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WARG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WINTER_WOLF’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HELL_HOUND_PUP’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HELL_HOUND’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GAS_SPORE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FLOATING_EYE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FREEZING_SPHERE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FLAMING_SPHERE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHOCKING_SPHERE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KITTEN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HOUSECAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_JAGUAR’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LYNX’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PANTHER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LARGE_CAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TIGER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DISPLACER_BEAST’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREMLIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GARGOYLE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WINGED_GARGOYLE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HOBBIT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DWARF’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BUGBEAR’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DWARF_LEADER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DWARF_RULER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MIND_FLAYER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTER_MIND_FLAYER’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MANES’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HOMUNCULUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_IMP’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LEMURE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_QUASIT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TENGU’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLUE_JELLY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SPOTTED_JELLY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OCHRE_JELLY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LARGE_KOBOLD’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_LEADER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_SHAMAN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LEPRECHAUN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SMALL_MIMIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LARGE_MIMIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_MIMIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WOOD_NYMPH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATER_NYMPH’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MOUNTAIN_NYMPH’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GOBLIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HOBGOBLIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORC’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HILL_ORC’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MORDOR_ORC’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_URUK_HAI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORC_SHAMAN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORC_CAPTAIN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROCK_PIERCER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_IRON_PIERCER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GLASS_PIERCER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROTHE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MUMAK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LEOCROTTA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WUMPUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TITANOTHERE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BALUCHITHERIUM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTODON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SEWER_RAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_RAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RABID_RAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WERERAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROCK_MOLE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WOODCHUCK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CAVE_SPIDER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CENTIPEDE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_SPIDER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SCORPION’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LURKER_ABOVE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TRAPPER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PONY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WHITE_UNICORN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GRAY_UNICORN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_UNICORN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HORSE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WARHORSE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FOG_CLOUD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DUST_VORTEX’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ICE_VORTEX’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ENERGY_VORTEX’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STEAM_VORTEX’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FIRE_VORTEX’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_LONG_WORM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_PURPLE_WORM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LONG_WORM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PURPLE_WORM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GRID_BUG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_XAN’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_LIGHT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_LIGHT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ZRUTY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_COUATL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ALEAX’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ANGEL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KI_RIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ARCHON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BAT’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_BAT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RAVEN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE_BAT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PLAINS_CENTAUR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FOREST_CENTAUR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MOUNTAIN_CENTAUR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_GRAY_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_GOLD_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_SILVER_DRAGON’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_RED_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_WHITE_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_ORANGE_DRAGON’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_BLACK_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_BLUE_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_GREEN_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_YELLOW_DRAGON’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GRAY_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GOLD_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SILVER_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RED_DRAGON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WHITE_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORANGE_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLUE_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREEN_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STALKER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LICHEN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BROWN_MOLD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_YELLOW_MOLD’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREEN_MOLD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RED_MOLD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHRIEKER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VIOLET_FUNGUS’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOME’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOME_LEADER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOMISH_WIZARD’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOME_RULER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STONE_GIANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HILL_GIANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FIRE_GIANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FROST_GIANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ETTIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STORM_GIANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TITAN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MINOTAUR’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_JABBERWOCK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KEYSTONE_KOP’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOP_SERGEANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOP_LIEUTENANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOP_KAPTAIN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LICH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DEMILICH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTER_LICH’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ARCH_LICH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOME_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORC_MUMMY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DWARF_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELF_MUMMY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ETTIN_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_MUMMY’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RED_NAGA_HATCHLING’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_NAGA_HATCHLING’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GOLDEN_NAGA_HATCHLING’ not
handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GUARDIAN_NAGA_HATCHLING’ not
handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RED_NAGA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_NAGA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GOLDEN_NAGA’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GUARDIAN_NAGA’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OGRE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OGRE_LEADER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OGRE_TYRANT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GRAY_OOZE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BROWN_PUDDING’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREEN_SLIME’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BLACK_PUDDING’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_QUANTUM_MECHANIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GENETIC_ENGINEER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RUST_MONSTER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DISENCHANTER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GARTER_SNAKE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SNAKE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATER_MOCCASIN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PYTHON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PIT_VIPER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_COBRA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TROLL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ICE_TROLL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROCK_TROLL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATER_TROLL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OLOG_HAI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_UMBER_HULK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VAMPIRE_LEADER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VLAD_THE_IMPALER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BARROW_WIGHT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WRAITH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NAZGUL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_XORN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MONKEY’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_APE’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_OWLBEAR’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_YETI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CARNIVOROUS_APE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SASQUATCH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KOBOLD_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GNOME_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORC_ZOMBIE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DWARF_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELF_ZOMBIE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ETTIN_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GHOUL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_ZOMBIE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SKELETON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STRAW_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PAPER_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROPE_GOLEM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GOLD_GOLEM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LEATHER_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WOOD_GOLEM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FLESH_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CLAY_GOLEM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STONE_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GLASS_GOLEM’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_IRON_GOLEM’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WERERAT’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WEREJACKAL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUMAN_WEREWOLF’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELF’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WOODLAND_ELF’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREEN_ELF’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GREY_ELF’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELF_NOBLE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELVEN_MONARCH’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DOPPELGANGER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHOPKEEPER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GUARD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PRISONER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORACLE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ALIGNED_CLERIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HIGH_CLERIC’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SOLDIER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SERGEANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NURSE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LIEUTENANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CAPTAIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATCHMAN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATCH_CAPTAIN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MEDUSA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WIZARD_OF_YENDOR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CROESUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GHOST’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHADE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WATER_DEMON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_AMOROUS_DEMON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HORNED_DEVIL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ERINYS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BARBED_DEVIL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MARILITH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VROCK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HEZROU’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BONE_DEVIL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ICE_DEVIL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NALFESHNEE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PIT_FIEND’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SANDESTIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BALROG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_JUIBLEX’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_YEENOGHU’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORCUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GERYON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DISPATER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BAALZEBUB’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ASMODEUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DEMOGORGON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DEATH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PESTILENCE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_FAMINE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MAIL_DAEMON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DJINNI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_JELLYFISH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PIRANHA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHARK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GIANT_EEL’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ELECTRIC_EEL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KRAKEN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NEWT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GECKO’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_IGUANA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BABY_CROCODILE’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LIZARD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CHAMELEON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CROCODILE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SALAMANDER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LONG_WORM_TAIL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ARCHEOLOGIST’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_BARBARIAN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CAVE_DWELLER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HEALER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KNIGHT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MONK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CLERIC’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_RANGER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROGUE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SAMURAI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TOURIST’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_VALKYRIE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WIZARD’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LORD_CARNARVON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PELIAS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SHAMAN_KARNOV’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HIPPOCRATES’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_KING_ARTHUR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GRAND_MASTER’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ARCH_PRIEST’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ORION’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTER_OF_THIEVES’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LORD_SATO’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_TWOFLOWER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NORN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NEFERET_THE_GREEN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MINION_OF_HUHETOTL’ not handled
in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_THOTH_AMON’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CHROMATIC_DRAGON’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CYCLOPS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_IXOTH’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTER_KAEN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NALZOK’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_SCORPIUS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_MASTER_ASSASSIN’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ASHIKAGA_TAKAUJI’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_LORD_SURTUR’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_DARK_ONE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_STUDENT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_CHIEFTAIN’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NEANDERTHAL’ not handled in
switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ATTENDANT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_PAGE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ABBOT’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ACOLYTE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_HUNTER’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_THUG’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_NINJA’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_ROSHI’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_GUIDE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_WARRIOR’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘PM_APPRENTICE’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘NUMMONS’ not handled in switch
[-Wswitch]
makemon.c:34:9: warning: enumeration value ‘NON_PM’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘LOW_PM’ not handled in switch [-Wswitch]
makemon.c:34:9: warning: enumeration value ‘SPECIAL_PM’ not handled in switch
[-Wswitch]
I used ^G to create a monster and specified "invisible owlbear". I
then got "An owlbear appears next to you." Except it didn't; it was
invisible and I lacked see-invisible. I imagine that newsym() was
called for the new-yet-invisible monster, but that remained buffered
and was gone overridden by the time pending map update got flushed
at some point after the monster was made invisible.
Add a new makemon() flag to turn a newly created monster invisible
during its creation, before "monster appears" message is delivered.
Since that message will now be suppressed in this situation, use the
cursor-flash hack that indicates where the new, unseen monster got
placed. Creating "1000 invisible <mon>" is something you probably
won't do twice.
Reported by Umbire: if a statue of a hider-under was activated by
a statue trap, it would hide underneath its own statue. Also, the
hero saw a snake hide under unseen submerged kelp.
Both of those things were exposed by new "you see <monster> hide"
message rather than caused by it. It also led to the [re-]discovery
that an existing monster hiding under a statue that was a not-yet-
triggered trap prevented the trap from producing a monster.
This redoes yesterday's can't-hide-under-statue change: hiders can
hide under statues again, but they can't hide under anything at trap
locations. [Pits containing one or more objects are an exception,
although it seems silly that a hero is prevented from falling into
one by the presence of a tiny creepy-crawly hiding under a ring or
dart in there.] So, hider-underers won't be able to interfere with
statue traps by being present at the trap location. [Trappers and
lurkers-above probably need a similar restriction; I didn't look.
They avoid trap spots rather than get lured to such by objects.]
It also prevents newly created hider-underers from becoming hidden
as part of the their creation (except when that creation is part
of level creation) whether their creation uses up an object (statue
activation, egg hatching) or there are simply other items present.
That will prevent statue of a hider producing a monster that hides
under the activated statue (which was happening due to the sequence
create monster, transfer any statue contents to monster inventory,
destroy statue).
The can't-hide-under-statues code has been repurposed to prevent
hiding under gold pieces unless there are at least 10 (arbitrary
threshold) of those or they're in a pile with some other object(s).
Sea monsters hide in water regardless of the presence of objects.
Prevent other swimmers from hiding under objects at water locations.
Such creatures don't have gills and shouldn't be able to stay
submerged in hiding for an arbitrary length of time. [No exception
is made for non-breathers. The overlap between swimmers and hider-
underers is limited to small snakes, even though it is feasible for
a creature wearing an amulet of magical breathing to polymorph into
one. Heros don't spend enough time underwater to worry about snakes
hiding under kelp or thrown junk.]
Lastly, alter the "suddenly, you notice a <monster>" message if
monster-vs-monster activity causes one you've just seen going into
hiding comes back out again without any intervening messages. [I'm
not sure whether something similar is needed for the "Wait. There's
something there" message in the you-vs-monster case.]
Fixes#1062
Instead of a 5% chance for crystal plate mail or crystal helmet to
break each time it's subjected to breakage, switch to a 10% chance
but the damage is treated as erosion rather than break/don't-break.
'crystal foo' will need to go through four stages of damage before
breaking: cracked crystal foo, very cracked crystal foo, thoroughly
cracked crystal foo, then gone. Crackproof handling is included,
described as tempered crystal foo.
It mostly still applies to throwing and kicking the item. Having
some hits trigger damage might be worthwhile but isn't implemented.
Object creation within lua code probably needs to be updated, and
when the Mitre of Holiness is created in the priest/priestess quest
it should start out as tempered (erodeproof). Perhaps it ought to
be erodeproof regardless of where/how it's created.
Reported directly to devteam: a fake player monster was petrified
and when creating its statue yielded "Calculating weight of 0 gold
pieces?".
Fake player monsters on the Astral Plane level were being created
with rn2(1000) gold pieces so had a 1 in 1000 chance of that being 0.
Gold gets created with a non-zero amount but the routine that gives
it to a monster sets the amount to the requested value. That didn't
update the weight so didn't notice the 0. Putting it into a container
(the statue) did recalculate the weight and did notice.
There was a choice between forcing a non-zero amount or allowing 0
and bypassing its creation and placement in monster's inventory.
I went with the latter.
The consolidation of global variables from scattered source
files into decl.c and declared in decl.h was begun in 3.7.0.
Their placement in common files was done for centralized
initialization and potential re-initialization during a
"play again" scenario.
It wasn't really necessary for all of them to be housed in a
single huge structure to meet the "play again" requirement,
and the single huge structure has been a little unwieldy when
it comes to maintenance.
Following this commit, instead of one single extremely large structure
named 'g' to house all of the relocated global variables, they
are distributed into several ga through gz.
To make things easy for the developer, each variable is placed
into the struct corresponding to the starting letter of the variable.
That way, no lookup is required in order to know which struct houses
a particular variable, it is a simple match to the starting letter
for all the centralized global variables.
A global variable named 'amulets', would be found in ga.
ga.amulets
^ ^
A global varable named 'move', would be found in gm.
gm.moves
^ ^
A global variable named 'val_for_n_or_more' would be found in gv.
gv.val_for_n_or_more
^ ^
A global variable named 'youmonst' would be found in gy.
gy.youmonst
^ ^
Require a free hand when tipping a container into another container.
Presumeably you need to open the destination container and possibly
keep holding it open.
If you try to tip a carried container into an unknown bag of tricks,
apply the bag (once) instead of performing the tip. (To 'open' the
destination as above.) Possibly slightly confusing if bag is empty.
When tipping a container, always ask for the destination instead of
doing that only when carrying other containers. Confirming floor
as destination can be annoying but having to do that sometimes and
skipping that sometimes is aggravating because it is error prone.
And floor is preselected so can be chosen with space or return.
(I wanted to change the selector letter for floor from '-' to '.'
and then keep '-' as an unseen group accelerator, but the latter
doesn't work for PICK_ONE so I've left '-' as-is.)
Don't display "monsters appear" after tipping a bag of tricks.
Monster creation gives feedback these days. (Comparable to recent
"summon nasties" fix.)
The pull request included some changes that were neither accidental nor
unintentional, so only a subset of the changes from pull request #869
submitted by klorpa were manually applied.
behaviour -> behavior
speach -> speech
knowlege -> knowledge
incrments -> increments
stethscope -> stethoscope
staiway -> stairway
arifact -> artifact
extracing -> extracting
The uses of "iff" were left alone.
Close#869
If the first monster on the migrating_mons list couldn't arrive and
was put back on the list to try again later, 'later' would happen
immediately and the program looped forever trying and failing to
bring that monster to the level.
Defer repeat attempts at migration until losedogs() has been through
the whole migrating_mons list. mon_arrive() now populates a new
list called failed_arrivals and losedog() moves its contents, if any,
to migrating_mons prior to returning.
One of the drivers of this change was that screen coordinates require a
type that can hold values greater than 127. Parameters to the window
port routines require a large type in order to be able to have values
a fair bit larger than COLNO and ROWNO passed to them, particularly for
their use to the right of the map window.
This splits the uses of xchar into 3 different situations, and adjusts
their type and size:
xchar
|
-----------------------
| | |
coordxy xint16 xint8
coordxy: Actual x or y coordinates for various things (moved to 16-bits).
xint16: Same data size as coordxy, but for non-coordinate use (16-bits).
xint8: There are only a few use cases initially, where it was very
plain to see that the variable could remain as 8-bits, rather
than be bumped to 16-bits. There are probably more such cases
that could be changed after additional review.
Note: This first changed all xchar variables to coordxy. Some were
reviewed and got changed to xint16 or xint8 when it became apparent that
their usage was not for coordinates.
This increments EDITLEVEL in patchlevel.h
From a followup comment to a reddit post: a vampire who has gained
levels loses them when reverting to base form. This fixes the case
where it grows into a vampire lord; change the base form from plain
vampire to lord when that happens.
It does not fix the case where shapechanging to fog or bat or wolf
and then back to base form yields a new vampire or vampire lord
instead of the one that built itself up. Mainly affects pet vampires
since wild oees don't tend to grow very much.
Reverse the sense of dochugw()'s new 'X' argument. Use True for the
usual case and False for the special case rather than the other way
around.
Call the special case variant when a monster teleports so that hero
stops occupation if the monster jumps to a position where it becomes
a threat.
Fix the problem reported by entrez of a zombie corpse reviving and
crawling out of the ground while the hero was busy doing something
(searching, digging, &c) and having the hero fail to react and just
keep doing whatever the thing was because the zombie was already
inside the range where a monster changes from no-threat to threat.
Done in the monster creation routine so any new monster (including
one revived from a corpse) that is visible,&c will cause the hero's
action to be interrupted. Teleport arrival probably needs this too.
Only interrupts an occupation, not other voluntary multi-turn
actitivy such as running or traveling. That would be trivial to
change ['if (g.occupation...' to 'if ((g.occupation || multi > 0)...']
but I'm not sure whether it ought to be extended to that.
Reported by entrez. Don't make 50% of neuter monsters be flagged as
female. It doesn't matter for live monsters but gets inherited by
their corpses, where female and non-female corpses stack separately.
monster and Elbereth unless there's no other choice.
Suggested by NetSysFire, don't create new monsters on top of scrolls
of scare monster. Not mentioned in the suggestion: unless they are
a type of monster that isn't affected by such scrolls. This extends
it to teleport destination too.
Avoid placing a monster on a scroll of scare monster or on engraved
Elbereth if there are other locations available. Only performed for
callers of goodpos() who explicitly request it, which at the moment
are makemon(), rloc(), and enexto().
Also, propagate 'mmflags_nht' to a bunch of places that were left
using long or unsigned for makemon() and goodpos() flags. I didn't
attempt to be systematic about that though.
Implements #717
Redo the recent artifact creation stuff by replacing several nearly
identical routines with one more general one. Also adds a tracking
bit for one or two more creation methods. That changed artiexist[]
from an array of structs holding 8 or less bits to one holding 9, so
bump EDITLEVEL in case the total size changed.
get lawful artifacts
Reported by vultur-cadens, Angels can be given Sunsword or Demonbane
for starting equipment even when they aren't lawful so won't attempt
to use those.
This should fix it but it's a pain to test.
Closes#691
Lay groundwork for generating a log event when finding an artifact
on the floor or carried by a monster. This part should not produce
any change in behavior.
Move g.artidisco[] and g.artiexist[] out of the instance_globals
struct back to local within artifact.c. They are both initialized
at the start of a game (and only used in that file) so don't need
to be part of any bulk reinitialization if restart-instead-of-exit
ever gets implemented.
Convert artiexist[] from an array of booleans to an array of structs
containing a pair of bitfields. artiexist[].exists is a direct
replacement for the boolean; artiexist[].found is new but not put to
any significant use yet. If will be used to suppress the future
found-an-artifact event for cases where a more specific event (like
crowning or divine gift as #offer reward) is already produced.
Remove g.via_naming altogether and add an extra argument to oname()
calls to replace it.
Add an extra argument to artifact_exists() calls.
For ^G, throttle the monster creation feedback. Don't say "suddenly"
and don't exclaim the message, just say "<Mon> appears." Also, use
Norep() so creating lots of similar monsters at once only gives a few
messages (just one unless varied by "next to you" vs "nearby" vs no
qualifier for farther away). And for mimics created as objects or
furniture, report the sudden appearance of new object or furniture.
Always give a message when creating a detected monster
during gameplay (as opposed to during level creation).
To prevent the message, use the MM_NOMSG flag for makemon.
Most places already handled their own messaging, but there
were some, such as bag of tricks, create monster magic
and random monsters created during gameplay that didn't.
If persistent inventory is displayed and contains an entry for a leash
attached to a pet and the pet's type or name changes, the perm_invent
window didn't get updated to reflect the new leash information:
x - leash (attached to <mon>)
Report was for polymorph but applied to growing into bigger form and
to being (re-/un-)christened as well.
Reported by eakaye. Selection of equipment when creating a soldier
or watchperson can pick a polearm, but random selection among those
had a chance to choose dwarvish mattock which doesn't use polearms
skill and isn't appropriate for a human soldier or watchperson.
Not mentioned, but lance was in the same boat.
Change the selection to only pick something which uses polearms
skill, then make that moot by moving lance and dwarvish mattock out
of the midst of the polearms so that they're no longer candidates
for special case rejection.
A couple of other things which might have had a similar issue were
already ok. Giving a polearm when creating a troll selects between
a few choices rather than among all the polearms. And wishing for
"polearm" only considers items which use polearms skill.
While changing objects.h to reorder the two non-polearms, I removed
a bunch of tabs that were present in the scroll definitions.
EDITLEVEL is incremented due to objects[] reordering, so existing
save and bones files will be invalidated.
Fixes#623
for helm of opposite alignment.
Discovered and described by vultur-cadens.
The #adjust command can be used to split an object stack and if the
shop price of the two halves are different, the new stack will have
its obj->o_id modified to make the prices the same. That could be
used to tip off the player as to what the low bits of the next o_id
will be. Since no time passes, no intervening activity such as
random creation of a new monster can take place, so the player could
wish for something that depends on o_id with some degree of control.
Matters mainly for helms of opposite alignment intended to be used
by neutral characters since the player isn't supposed to be able to
control that. (Other items like T-shirt slogan text and candy bar
wrapper text had a similar issue but controlling those wouldn't have
had any tangible difference on play.)
The issue writeup suggested allowing the player to specify a helm's
alignment during a wish. That would defeat the purpose of having
o_id affect the helm's behavior in an arbitrary but repeatable way
so is rejected.
I implemented this fix before seeing a followup comment that suggests
using a more sophisticated decision than 'obj->o_id % N' for the
arbitrary effect. This just increments context.ident for the next
obj->o_id or mon->m_id by 1 or 2 instead of always by 1 and should
be adequate. It also has the side-effect that two consecutive wishes
for helm of opposite alignment won't necessary give one for each of
the two possible 'polarities', even with no intervening activity by
monsters, reinforcing the lack of player control.
Minor bonus fix: it moves the incrementing check for wrap-to-0 into
a single place instead of replicating that half a dozen times. Ones
that should have been there for shop billing and for objects loaded
from bones files were missing.
Fixes#596
Adds the following lua functions:
- nh.pushkey("x")
Pushes a key into the command queue. Support is spotty,
currently only the keys handled in rhack.
- nh.doturn()
Runs one turn of main loop, or if optional boolean param
is true, until g.multi == 0
- nh.monster_generation(false)
Disable monster generation, and kill off all monsters.
Adds a testmove.lua script to test hero movement. Currently
covers only hjklyubn and HJKLYUBN.
Shop population code set the mimic shape to strange object
without checking for protection from shape changers.
Let set_mimic_sym (via makemon) handle it correctly instead.