From 02a174b3ca8ba74e035b79ba8ca9de83f312445a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 23 Mar 2019 16:26:53 +0100 Subject: [PATCH] item/monster/wall/land types done with X-macros; flags given too --- classes.cpp | 1254 +------------------------------------------------- classes.h | 277 +++++------ flags.cpp | 669 ++++++--------------------- game.cpp | 47 +- graph.cpp | 32 +- landgen.cpp | 2 + landlock.cpp | 149 +----- 7 files changed, 299 insertions(+), 2131 deletions(-) diff --git a/classes.cpp b/classes.cpp index 7ae0f8c7..8d4b092b 100644 --- a/classes.cpp +++ b/classes.cpp @@ -411,406 +411,8 @@ const char *ruindesc = "Raiders cannot be harmed with mundane weapons, but each color has its movement restrictions."; monstertype minf[motypes] = { - { 0, 0, "no monster" , NULL}, - { 'Y', 0x4040FF, "Yeti" , - "A big and quite intelligent monster living in the Icy Land." - }, - { 'W', 0xD08040, "Icewolf" , - "A nasty predator from the Icy Land. Contrary to other monsters, " - "it tracks its prey by their heat." - }, - { 'W', 0xD08040, "Icewolf" , ""}, - { 'R', 0xFF8000, "Ranger" , - "Rangers take care of the magic mirrors in the Land of Mirrors. " - "They know that rogues like to break these mirrors... so " - "they will attack you!" - }, - { 'T', 0xD0D0D0, "Rock Troll", trollhelp}, - { 'G', 0x20D020, "Goblin", - "A nasty creature native to the Living Caves. They don't like you " - "for some reason." - }, - { 'S', 0xE0E040, "Sand Worm", wormdes }, - { 's', 0x808000, "Sand Worm Tail", wormdes }, - { 'S', 0x808000, "Sand Worm W", wormdes }, - { 'H', 0x80FF00, "Hedgehog Warrior", - "These warriors of the Forest wield exotic weapons called hedgehog blades. " - "These blades protect them from a frontal attack, but they still can be 'stabbed' " - "easily by moving from one place next to them to another." - }, - { 'M', 0x806050, "Desert Man", - "A tribe of men native to the Desert. They have even tamed the huge Sandworms, who won't attack them."}, - { 'C', 0x00FFFF, "Ivy Root", ivydes}, - { 'C', 0xFFFF00, "Active Ivy", ivydes}, - { 'C', 0x40FF00, "Ivy Branch", ivydes}, - { 'C', 0x006030, "Dormant Ivy", ivydes}, - { 'C', 0x804000, "Dead Ivy", ivydes}, - { 'C', 0x800000, "Dead Ivy", ivydes}, - { 'M', 0x804000, "Giant Ape", - "This giant ape thinks that you are an enemy."}, - { 'B', 0x909000, "Slime Beast", slimehelp}, - { '@', 0xFF80FF, "Mimic", - "A magical being which copies your movements. " - "You feel that it would be much more useful in an Euclidean space." - }, - { '@', 0xFF8080, "Mirage (REMOVED)", - "A magical being which copies your movements. " - }, - { '@', 0x509050, "Golem", - "You can summon these friendly constructs with a magical process." - }, - { '@', 0x509050, "Golem", - "You can summon these friendly constructs with a magical process." - }, - { 'E', 0xD09050, "Eagle", - "A majestic bird, who is able to fly very fast." - }, - { 'S', 0xFF8080, "Seep", - "A monster who is able to live inside the living cave wall." - }, - { 'Z', 0x804000, "Zombie", - "A typical Graveyard monster." - }, - { 'G', 0xFFFFFF, "Ghost", - "A typical monster from the Graveyard, who moves through walls.\n\n" - "There are also wandering Ghosts. They will appear " - "if you do not explore any new places for a long time (about 100 turns). " - "They can appear anywhere in the game." - }, - { 'N', 0x404040, "Necromancer", - "Necromancers can raise ghosts and zombies from fresh graves." - }, - { 'S', 0x404040, "Shadow", - "A creepy monster who follows you everywhere in the Graveyard." - }, - { 'T', 0x40E040, "Tentacle", tentdes }, - { 't', 0x008000, "Tentacle Tail", tentdes }, - { 'T', 0x008000, "Tentacle W", tentdes }, - { 'z', 0xC00000, "Tentacle (withdrawing)", tentdes }, - { 'P', 0xFF8000, "Cultist", - "People worshipping Cthulhu. They are very dangerous." - }, - { 'P', 0xFFFF00, "Fire Cultist", - "People worshipping Cthulhu. This one is especially dangerous, " - "as he is armed with a weapon which launches fire from afar." - }, - { 'D', 0xFF0000, "Greater Demon", gdemonhelp}, - { 'D', 0x800000, "Greater Demon", gdemonhelp}, - { 'd', 0xFF2020, "Lesser Demon", ldemonhelp}, - { 'd', 0x802020, "Lesser Demon", ldemonhelp}, - { 'S', 0x2070C0, "Ice Shark", - "This dangerous predator has killed many people, and has been sent to Cocytus." - }, - { 'W', 0xFFFFFF, "Running Dog", - "This white dog is able to run all the time. It is the only creature " - "able to survive and breed in the Land of Eternal Motion." - }, - { 'S', 0xC00040, "Demon Shark", - "Demons of Hell do not drown when they fall into the lake in Cocytus. " - "They turn into demonic sharks, enveloped in a cloud of steam." - }, - { 'S', 0xC00040, "Fire Fairy", - "These fairies would rather burn the forest, than let you get some Fern Flowers. " - "The forest is infinite, after all...\n\n" - "Fire Fairies transform into fires when they die." - }, - { 'C', 0x4000C0, "Crystal Sage", - "This being radiates an aura of wisdom. " - "It is made of a beautiful crystal, you would love to take it home. " - "But how is it going to defend itself? Better not to think of it, " - "thinking causes your brain to go hot...\n\n" - "Crystal Sages melt at -30 °C, and they can rise the temperature around you from afar." - }, - { 'P', 0x4040C0, "Pikeman", - "When Pikemen move, they attack all cells which are now adjacent to them. " - "Luckily, they can be killed in the same way.\n\n" - "They never move if this would attack their friends." - }, - { 'F', 0xC04040, "Flail Guard", - "This guard of the Emerald Mine is wielding a huge flail. " - "You cannot attack him directly, as the flail would still hit you then. " - "Luckily, you have learned a trick: if you step away from him, " - "he will hit himself with the flail!" - }, - { 'M', 0x404040, "Miner", - "Miners have special tools for dealing with the Living Cave. " - "When they die, these tools activate, destroying the living cave " - "around them." - }, - { 'V', 0x421C52, "Vine Beast", - "A beast made of vines!\n\n" - "Vine Beasts turn into vines when they die." - }, - { 'V', 0xFFC0C0, "Vine Spirit", - "A spirit living in the vines!\n\n" - "Vine Spirits destroy the vines when they die." - }, - { 'T', 0x803030, "Dark Troll", - "A Troll without the power of Life." - }, - { 'E', 0xFFFF40, "Earth Elemental", - "A rare unliving construct from the Dead Caves. " - "It instantly destroys cave walls next to its path, and also leaves " - "an impassable wall behind it. You suppose that this impassable wall helps it to " - "escape from some threats. You hope you won't meet these threats..." - }, - { 'B', 0xC04040, "Red Hyperbug", hivehelp}, - { 'B', 0x40C040, "Green Hyperbug", hivehelp}, - { 'B', 0x4040C0, "Blue Hyperbug", hivehelp}, - { 'W', 0x404040, "Witch Apprentice", - "A Witch without any special powers. But watch out! She will " - "pick up any basic Orbs on her path, and use their powers." - }, - { 'W', 0xFF4040, "Speed Witch", - "A Witch with a Speed spell. She moves twice as fast as you. Unless you " - "have an Orb of Speed too, of course!" - }, - { 'W', 0xFFFFFF, "Flash Witch", - "A Witch with a Flash spell. Very dangerous!\n\n" - "Luckily, she never uses the spell if it would kill her friends. " - "She could destroy an Evil Golem, though." - }, - { 'W', 0xFF8000, "Fire Witch", - "A Witch with a Fire spell. She will leave a trail of fire behind her." - }, - { 'W', 0x8080FF, "Winter Witch", - "A Witch with a Winter spell. She is able to move through fire." - }, - { 'W', 0x808080, "Aether Witch", - "A Witch with an Aether spell. She is able to move through fire and walls." - }, - { '@', 0x905050, "Evil Golem", - "Somebody has summoned these evil constructs with a magical process." - }, - { '@', 0x8080FF, "Knight", camelothelp }, - { 'P', 0xD10000, "Cult Leader", - "These Cultists can push the statues, just like you." - }, - { 'B', 0x909000, "Slime Beast", slimehelp}, - { '@', 0x8080FF, "Knight", camelothelp }, // knight moved - { '@', 0x8B4513, "Illusion", - "Illusions are targeted " - "by most monsters, just like yourself, Thumpers, and your friends." - }, - { 'P', 0xD00000, "Pirate", - "Just a typical hyperbolic pirate." }, - { 'S', 0x8080C0, "Shark", "Just a nasty shark."}, - { 'P', 0x0000FF, "Parrot", "Parrots feel safe in the forests of Caribbean, so they " - "never leave them. But they will help the Pirates by attacking the intruders."}, - { 'S', 0xE09000, "Rock Snake", redsnakedes }, - { 's', 0xE09000, "Rock Snake Tail", redsnakedes }, - { 'T', 0xC02020, "Red Troll", "A kind of Troll native to the Red Rock Valley."}, - { 'B', 0xA00000, "Bomberbird", - "Dark red birds who have created the minefield.\n\n" - "They create a mine on the spot where they are killed, provided " - "that the terrain is suitable. Also note that mines are triggered " - "by dead birds falling on them." - }, - { 'A', 0xFFFFFF, "Albatross", - "Those large seabirds attack you for some reason. At least they are not " - "as fast as Eagles..." - }, - { 'B', 0x40C000, "Tame Bomberbird", tamebomberdesc}, - { 'B', 0x40C000, "Tame Bomberbird", tamebomberdesc}, // bomberbird moved - { 'G', 0xFF0000, "Palace Guard", - "You have to hit Palace Guards several times to kill them. After each hit, they " - "are pushed away and stunned for some time." - }, - { 'G', 0xC06000, "Fat Guard", "Fat guards are too heavy to be pushed away by your hits."}, - { 'G', 0xFFFFFF, "Skeleton", - "Skeletons work similar to Palace Guards, but they won't die no matter how many " - "times you hit them. Well, you have to be more creative...\n\n" - "Skeletons attacked outside of their native land, Palace, are stunned for a longer time." - }, - { 'G', 0xC000C0, "Vizier", - "Viziers are neither pushed away nor stunned. However, you attack them automatically when " - "escaping from them."}, - { 'V', 0xC0C0C0, "Viking", "Mighty warriors from the Fjord, who can use boats."}, - { 'T', 0x00FFFF, "Fjord Troll", - "Fjord Trolls leave a wall when they die, causing the living fjord to rise around it. " - "Contrary to Rock Trolls, items around are not destroyed." - }, - { 'E', 0x0000FF, "Water Elemental", - "Wherever this powerful being goes, the living fjord " - "sinks below water, non-magical boats are destroyed, and fires are extinguished.\n\n" - "As a special case, you can attack the Water Elemental from the water, without drowning immediately." - }, - { 'M', 0xD0D0D0, "Mouse", princessdesc}, - { 'M', 0xD0D0D0, "Mouse", princessdesc}, - { 'P', 0xFF80FF, "Prince", princessdesc}, - { 'P', 0xFF80FF, "Princess", princessdesc}, - { 'P', 0xFF80FF, "Prince", princessdesc}, - { 'P', 0xFF80FF, "Princess", princessdesc}, - { 'F', 0xD03000, "Familiar", "A simple servant of the master of the Ivory Tower."}, - { 'B', 0x707070, "Gargoyle", gargdesc}, - { 'E', 0xFF0000, "Fire Elemental", - "This monster leaves a trail of fire behind."}, - { 'E', 0xC0C0FF, "Air Elemental", "An Air Elemental looks like a live tornado. Once you are three (or less) cells from it, " - "it is impossible to move closer, due to strong winds. You can stand and wait, though. " - "This also affects most monsters."}, - { 'D', 0xC06000, "Striped Dog", "A predator native to the Zebra."}, - { 'G', 0xFFFFFF, "Tentacle+Ghost", tentdes }, - { 'B', 0x8080C0, "Metal Beast", elecdesc }, - { 'B', 0xC060C0, "Rich Metal Beast", elecdesc }, - { 'O', 0xA06020, "Outlaw", wildwestdesc }, - { 'C', 0xC0C060, "Mutant Ivy", overdesc }, - { 'T', 0x0080FF, "Storm Troll", elecdesc }, - { 'T', 0x00C080, "Forest Troll", - "Forest Trolls create an impassable wall when they die." - }, - { 'F', 0xC35817, "Giant Fox", - "What is freedom for you? A situation when you can walk wherever you want? " - "Or a situation when you do not have to work, since you have as much tasty food " - "as you want?\n\n" - "Well, this creature has chosen the second option. It won't be happy " - "if you destroy its prison.\n" - }, - { 'C', 0x8080FF, "Wind Crow", - "A large bird who likes strong winds. Just as you, it can fly quickly in the wind." - }, - { 'G', 0xC0FFC0, "Friendly Ghost", - "Friendly ghosts are friendly beings who can go through any obstacles. However, " - "unlike most friends, they tend to fly away from you." - }, - { 'R', 0x906030, "Ratling", - "These warped humanoids are skilled warriors and sailors, and they " - "feel at home at the Warped Coast. Their battle experience has taught them " - "that enemies who wait without moving or attacking anything are the most deadly. " - "If they see such an enemy, they become extremely suspicious, and they also wait." - }, - { 'F', 0xC00000, "False Princess", GENDERSWITCH }, - { 'R', 0x500050, "Rose Lady", GENDERSWITCH }, - { 'R', 0xF0A0D0, "Rose Beauty", GENDERSWITCH }, - { 'R', 0x806040, "Ratling Avenger", - "So, you have killed a Ratling on the unwarped sea? You will be punished for this! " - "Luckily, if you run away from the Warped Sea quickly, the Ratling Avengers will lose track of you." - }, - { 'T', 0x487830, "Tortoise", tortoisedesc}, - { 'D', 0xC03000, "Dragon", dragondesc}, - { 'd', 0xC03000, "Dragon", dragondesc}, - { 'F', 0x909090, "Gadfly", "Annoying insects. They can awaken Sleeping Bulls."}, - { 'Y', 0xFF8000, "Yendorian Researcher", - "These people study gravity and infinite trees. " - "They have no special features, other than wearing a strange hat." - }, - { 'K', 0xA8A8A8, "Sparrowhawk", - "A bird who hunts in the treetops of Yendorian Forest." - }, - { 'K', 0xD0A0A0, "Kraken", krakendesc}, - { 'K', 0xC07070, "Kraken Tentacle", krakendesc}, - { 'D', 0xF09090, "Draugr", - "Animated corpses of ancient Viking warriors. They are immune to mundane weapons, " - "but they can be destroyed by your Orb of the Sword." - }, - { 'C', 0xC08000, "Friendly Ivy", naturedesc }, - { 'V', 0xC000C0, "Vampire Bat", - "Vampire Bats don't attack normally, but they drain your magical powers if " - "they are at distance at most 2 from you." - }, - { 'B', 0x404040, "Bat", - "Someone has told you that one can get battle experience safely by " - "killing tons of essentially harmless creatures, such as Bats. But " - "does this make any sense?...\n\n" - "It does not. Bats cannot hurt you, but may block your movement, or " - "toggle switches if they fall on them." }, - { 'R', 0x8080C0, "Reptile", reptiledesc }, - { 'B', 0x606020, "Herd Bull", - "Herds of these Bulls are running long distances for some reason. They become Raging Bulls if something stops them." }, - { 'B', 0xA03000, "Raging Bull", - "Raging Bulls charge in a straight line: on heptagons, when they can choose one of two possible directions, " - "they choose one closer to your current location. In the case of a tie, the cell where more neighbors is " - "closer to your current location is chosen; if still a tie, past locations are considered. " - "They can attack you in any direction, and monsters on their way are attacked even if friendly. " - "When they crash into something, the obstacle is usually destroyed, and they are stunned for three turns, after " - "which they charge at you again (in any direction). " - "Raging Bulls cannot be killed or stunned conventionally." - }, - { 'B', 0xB07000, "Sleeping Bull", - "Sleeping bulls wake up when you get into distance of two cells from them." - }, - { 'S', 0xFFD500, "Butterfly", bulldashdesc}, - { 'N', 0xFFFF80, "Narcissist", - "This person loves to look at their own reflection in the mirror. " - "He believes himself to be one of the most important creatures in this world, " - "and hates those who do not admire him." - }, - { 'M', 0xFFC0FF, "Mirror Spirit", - "A long time ago a mighty warrior was guarding the mirrors from being broken. " - "While this warrior is no longer alive, his reflections have gained life of " - "their own, and will punish the intruders.\n\n" - "If you attack a Mirror Spirit physically, it is delayed, but not destroyed -- " - "more reflections will come out of the mirror. Use Mimics to destroy them." - }, - { 'W', 0x202020, "Hunting Dog", huntingdesc}, - { 'T', 0xE2725B, "Terracotta Warrior", terradesc}, - { 'J', 0x50A030, "Jiangshi", - "You think this was one of the people who have constructed the Terracotta Warriors and the arrow traps. " - "They have been locked inside, so that they will never divulge the secrets of the mausoleum. They would like to return their homes and families, though." - }, - { 'B', 0xA00000, "Void Beast", - "Are creatures of Void actual monsters, or just monster-shaped holes in the air?\n\nVoid Beasts move simply by letting the air move into their current location -- " - "the hole will move to the place where the air came from! Void Beasts are great at moving against the wind, but they have problems " - "moving with the wind."}, - { 'W', 0xA00000, "Lava Wolf", - "While Ice Wolves love heat, their instincts usually will not let them leave the Icy Lands -- " - "they are afraid that they will be unable to get back home, and that they will lose track of their prey. " - "However, they find the Volcanic Wasteland so hot and attractive that they abandon their natural instincts... " - "and try to track their prey using their other senses and intelligence." - }, - { 'W', 0x202020, "Hunting Dog (guarding)", huntingdesc}, - { 'G', 0xC0C0FF, "Ice Golem", - "The Ice Golems are powered by intense magical coldness. When destroyed in the Blizzard or another icy land, they become " - "ice walls, and freeze the land around them."}, - { 'B', 0xC0C0FF, "Sand Bird", NODESC}, - { 'S', 0xA00000, "Salamander", - "Salamanders are tough lizard-like creatures. Their tough skin protects them " - "from both physical attacks and heat. Salamanders " - "are stunned for a longer time if you push them into lava, fire, or a solid obstacle."}, - { 'W', 0x202020, "Hunting Dog (regrouping)", - "When your plan has clearly failed, it is better to abandon it and go to a safe place, to have a chance of succeeding next time. This dog clearly knows this."}, - { 'B', 0xC00000, "North Pole", NODESCYET}, - { 'B', 0x0000C0, "South Pole", NODESCYET}, - { 'P', 0xC03000, "Red Raider", "Red Raiders travel in pairs. They have promised to always watch another one's back. They are able to destroy walls on their way."}, - { 'H', 0xC0C0C0, "Gray Raider", "Gray Raiders never step on gray cells."}, - { 'A', 0x80B080, "Green Raider", "Green Raiders never step from one green cell to another."}, - { 'M', 0x904000, "Brown Raider", "Brown Raiders never move adjacent to an item."}, - { 'C', 0x0060E0, "Blue Raider", "Blue Raiders have a powerful attack which takes two turns to complete, and also makes the Blue Raider stunned " - "for a long time. This attack can destroy other Raiders if it hits them."}, - { '@', 0xC00000, "Red Jelly", jellydesc}, - { '@', 0x0000C0, "Blue Jelly", jellydesc}, - { 'B', 0xE07000, "Bronze Beast", - "A large bug native to the Brown Islands. Cannot be killed easily due to their tough armor; still, they can be killed by pushing them into water or from great heights. " - "Bronze Beasts are very bad at descending slopes -- it takes them extra time to get down, and they are stunned for a longer time if you push them down." - }, - { 'B', 0xE07060, "Acid Gull", - "Where did this strange bird come from?...\n\n" - "Acid Gulls dissolve the land on which they fall when they die. " - }, - { 'W', 0xA04060, "Mutant", - "These guys look a bit strange, but they have no special properties." - }, - { 'W', 0x707080, "Falling Dog", - "Distant relatives of the Running Dogs."}, - { 'B', 0xC0C040, "Western Hawk", - "Some readers misinterpreted the early maps of Free Fall, thinking that it is a land to the west from some wall. " - "The name Western Hawks remained." }, - - // shmup specials - { '@', 0xC0C0C0, "Rogue", "In the Shoot'em Up mode, you are armed with thrown Knives."}, - { '*', 0xC0C0C0, "Knife", "A simple, but effective, missile, used by rogues."}, - { '*', 0xFF0000, "Flail", "This attack is likely to hit the attacker."}, - { '*', 0xFFFF00, "Fireball", "This magical missile burns whatever it hits."}, - { '*', 0xFFFF00, "Tongue", "Some monsters have long tongues, which allow them to attack enemies in nearby cells."}, - { '*', 0xFFFFFF, "Airball", "This magical missile pushes back whatever it hits."}, - { '*', 0x0060E0, "Blueball", "A powerful missile from a Blue Raider."}, - // technical - { '?', 0x00C000, "dead bug", NODESC}, - { '?', 0xFFFF00, "electric discharge", elecdesc}, // appears as 'killed by electric discharge' - { '?', 0xE06000, "dead bird", NODESC}, - { '?', 0xE06000, "Energy Sword", NODESC}, - { '!', 0xFF0000, "Warning", warningdesc}, - { '!', 0xFF0000, "arrow trap", arrowtrapdesc}, - { '*', 0, "vertex", "A vertex from rogueviz."} + #define MONSTER(a,b,c,d,e,f,g,h) {a,b,c,e,g,h}, + #include "content.cpp" }; genderswitch_t genderswitch[NUM_GS] = { @@ -832,860 +434,20 @@ genderswitch_t genderswitch[NUM_GS] = { // --- items --- itemtype iinf[ittypes] = { - { 0, 0, "no item", NULL}, - { '*', 0xFFFFFF, "Ice Diamond", - "Cold white gems, found in the Icy Land." - }, - { '$', 0xFFD700, "Gold", - "An expensive metal from the Living Caves. For some reason " - "gold prevents the living walls from growing close to it." - }, - { ';', 0xFF4000, "Spice", - "A rare and expensive substance found in the Desert. " - "It is believed to extend life and raise special psychic powers." - }, - { '*', 0xC00000, "Ruby", - "A beautiful gem from the Jungle." - }, - { '!', 0xFFFF00, "Elixir of Life", - "A wonderful beverage, apparently obtained by mixing red and blue slime. You definitely feel more " - "healthy after drinking it, but you still feel that one hit of a monster is enough to kill you."}, - { '%', 0xFF00FF, "Shard", - "A piece of a magic mirror, or a mirage cloud, that can be used for magical purposes. Only mirrors and clouds " - "in the Land of Mirrors leave these."}, - { '/', 0xFF8000, "Necromancer's Totem", - "These sinister totems contain valuable gems."}, - { '%', 0x00D000, "Demon Daisy", - "These star-shaped flowers native to Hell are a valuable alchemical component."}, - { '/', 0x00FF00, "Statue of Cthulhu", - "This statue is made of materials which cannot be found in your world."}, - { '*', 0xFF8000, "Phoenix Feather", - "One of few things that does not cause the floor in the Land of Eternal Motion to collapse. Obviously they are quite valuable." - }, - { '*', 0x8080FF, "Ice Sapphire", - "Cold blue gems, found in the Cocytus." - }, - { '*', 0xEEFF20, "Hyperstone", - "These bright yellow gems can be found only by those who have mastered the Crossroads." - }, - { '[', 0x8080FF, "Key", - "That's all you need to unlock the Orb of Yendor! Well... as long as you are able to return to the Orb that this key unlocks...\n\n" - "Each key unlocks only the Orb of Yendor which led you to it." - }, - { 'o', 0x306030, "Dead Orb", - "These orbs can be found in the Graveyard. You think that they were once powerful magical orbs, but by now, their " - "power is long gone. No way to use them, you could as well simply drop them...\n\n" - }, - { 'o', 0xFF20FF, "Orb of Yendor", - "This wonderful Orb can only be collected by those who have truly mastered this hyperbolic universe, " - "as you need the right key to unlock it. Luckily, your psychic abilities will let you know " - "where the key is after you touch the Orb." }, - { 'o', 0xFFFF00, "Orb of Storms", - "This orb can be used to invoke the lightning spell, which causes lightning bolts to shoot from you in all directions."}, - { 'o', 0xFFFFFF, "Orb of Flash", - "This orb can be used to invoke a flash spell, which destroys almost everything in radius of 2."}, - { 'o', 0x8080FF, "Orb of Winter", - "This orb can be used to invoke a wall of ice. It also protects you from fires."}, - { 'o', 0xFF6060, "Orb of Speed", - "This orb can be used to move faster for some time."}, - { 'o', 0x90B090, "Orb of Life", - "This orb can be used to summon friendly golems. It is used instantly when you pick it up."}, - { 'o', 0x60D760, "Orb of Shielding", - "This orb can protect you from damage."}, - { 'o', 0x606060, "Orb of Earth", - "This orb lets you go through living walls. It also has powers in some of the other lands."}, - { 'o', 0x20FFFF, "Orb of Teleport", - "This orb lets you instantly move to another location on the map. Just click a location which " - "is not next to you to teleport there. " - }, - { 'o', 0xA0FF40, "Orb of Safety", - "This orb lets you instantly move to a safe faraway location. Knowing the nature of this strange world, you doubt " - "that you will ever find the way back...\n\n" - "Your game will be saved if you quit the game while the Orb of Safety is still powered.\n\n" - "Technical note: as it is virtually impossible to return, this Orb recycles memory used for the world so far (even if you do not use it to save the game). " - }, - { 'o', 0x40C000, "Orb of Thorns", - "This orb allows attacking Hedgehog Warriors directly, as well as stabbing other monsters.\n" - }, - { '%', 0x0000FF, "Fern Flower", - "This flower brings fortune to the person who finds it.\n" - }, - { '!', 0x900000, "Wine", - "Wine grown under hyperbolic sun would be extremely prized in your home location." - }, - { 'o', 0x706070, "Orb of Aether", - "This orb allows one to pass through all kinds of walls and chasms." - }, - { '$', 0xFFFFC0, "Silver", - "A precious metal from the Dead Caves." - }, - { 'o', 0x005050, "Orb of the Mind", - "This orb allows you to instantly kill a non-adjacent enemy by clicking it. " - "Each use drains 30 charges." - }, - { '!', 0xE2B227, "Royal Jelly", - "This is what Hyperbug Queens eat. Very tasty and healthy." - }, - { '*', 0x60C060, "Emerald", - "A precious green gem from the Emerald Mines." - }, - { 'o', 0x421C52, "Orb of Invisibility", - "When you have this Orb, most monsters won't see you, unless " - "you are standing still, attacking, or picking up items." - }, - { '*', 0xFFFF00, "Powerstone", - "A Stone from the Land of Power. You are not sure what it is exactly, but " - "as the Powerstones are kept in crystal cabinets, they are surely valuable." - }, - { 'o', 0xFF4000, "Orb of Fire", - "When you have this Orb, you will leave a trail of fire behind you." - }, - { '!', 0xFFFF00, "Holy Grail", camelothelp }, - { '?', 0x00FF00, "Grimoire", - "The Grimoires contain many secrets of the Great Old Ones. " - "Each new inner circle in the Temple of Cthulhu contains new Grimoires, with new secrets. " - "You hope to read them when you return home, and to learn many things. " - "The knowledge is valuable to you, but it is rather pointless to try to get " - "several copies of the same Grimoire..." - }, - { 'o', 0xFF8000, "Orb of the Dragon", - "This Orb allows you to throw fire, just like the Fire Cultists.\n\n" - "Each fire drains 5 charges. You are not allowed to throw fire into adjacent cells." - }, - { 'o', 0x8B4513, "Orb of Trickery", - "This Orb allows you to create illusions of yourself. Illusions are targeted " - "by most monsters, just like yourself, Thumpers, and your friends.\n\n" - "Each illusion takes 5 charges to create, and one extra charge " - "per turn. You can also click your illusion to take it away, restoring 4 charges.\n\n" - "If you have both Orb of Teleport and Orb of Trickery, Illusion is cast " - "first -- you can then teleport on your Illusion to switch places with it." - }, - { 'x', 0xFF0000, "Pirate Treasure", "Ye wonder where did th' Pirates find all these riches..."}, - { '?', 0xFFFFFF, "Compass", - "The hyperbolic pirates have no use for treasure maps. However, they have found " - "out that a compass points to the center of the island. So they just go as " - "far towards the center as they can, and hide their treasure there." - }, - { '*', 0xFF8080, "Red Gem", "A gem from the Red Rock Valley."}, - { 'o', 0x6060FF, "Orb of Time", - "Normally, the power of most Orbs slowly fades away, even when " - "you are not actively using them. This Orb prevents this.\n\n" - - "When you have the Orb of Time, Orbs which are not active won't lose their power. " - "Orbs are considered active if they have a continuous power which has actually " - "affected something in the last turn.\n\n" - - "Orbs of Shielding remain active after being activated (even if you are no longer " - "attacked), and Orbs of Time have a bigger cap inside their native Caribbean than " - "outside." - }, - { 'o', 0x40C0C0, "Orb of Space", - "This Orb is able to bring faraway items to your location, even if there are " - "monsters or barriers on the way. The cost of " - "bringing an item (in charges) equals the square of its distance to you. Contrary " - "to some other Orbs, usage is not allowed if you have not enough power left.", - }, - { '!', 0xFF8080, "Bomberbird Egg", - "Bomberbird eggs are big and tasty, and thus valuable. " - "They can hatch when left alone for some time (but this will never happen " - "if you are watching)." - }, - { '*', 0xFFBF00, "Amber", - "When the tide is away, beautiful ambers can be found on the hyperbolic beaches. " - "Perhaps there used to be a forest here?" - }, - { '$', 0xFFFFFF, "Pearl", - "You do not know exactly why, but there are valuable pearls on many boats " - "in the whirlpool." - }, - { 'o', 0x306000, "Orb of Friendship", - "This Orb summons a friendly Bomberbird." - }, - { 'o', 0x000060, "Orb of Water", - "This Orb allows your boat to go against the current, " - "and also to go into the land, creating water on the way." - }, - { 'o', 0xC0C0FF, "Orb of Air", - "This Orb allows you to blow your enemies away.\n\n" - "Click a monster to blow it one cell away. It cannot be used against mimics, ghosts, sharks and other monsters restricted to a specific terrain, and multi-tile monsters." - }, - { '?', 0x802000, "Hypersian Rug", - "Nice, a hyperbolic rug! It will not fit very well on your flat Euclidean floor, but who cares?"}, - { 'o', 0x60A060, "Orb of the Frog", - "This Orb lets you jump to a place which is two cell away from you, in a single turn. " - "You can jump over water, chasms and fire, but not over walls."}, - { '*', 0x800000, "Garnet", "Vikings believe that garnets improve their strength."}, - { 'o', 0x0070C0, "Orb of the Fish", - "This Orb lets you dive into the water. While diving, you are able to see and collect underwater treasures, " - "while being invisible to monsters yourself. You are afraid of jumping into the water straight from a boat, so usually you won't do it." - }, - { 'o', 0xC00000, "Orb of Discord", - "Causes most monsters to attack other monsters, not only you and your friends."}, - { 'P', 0x00FF00, "SAVE", princessdesc}, - { 'o', 0xFF208F, "Orb of Love", - "Love takes time, but it heals all wounds, and transcends time and space.\n\n" - "The Orb of Love is worth 30$$$, if you end the game with it.\n" - }, - { '/', 0xFFFFE0, "Ivory Figurine", - "A beautiful figurine, made of ivory. Figurines close to the base of the Tower " - "tend do disappear after you have collected many of them." - }, - { '*', 0x606060, "Onyx", "A black gem with white stripes. It is beautiful."}, - { '%', 0xFF8000, "Fire Shard", elemdesc}, - { '%', 0x8080C0, "Air Shard", elemdesc}, - { '%', 0x80C080, "Earth Shard", elemdesc}, - { '%', 0x0000C0, "Water Shard", elemdesc}, - { '*', 0xF0F0F0, "Elemental Gem", elemdesc}, - { 'o', 0x309060, "Orb of Summoning", - "This orb allows you to summon monsters. Usually, they are either Elementals or " - "native creatures. While the monsters do not like being summoned, and will " - "attack you once they recover from summoning sickness, such summoning " - "often has its uses." - }, - { 'o', 0x306090, "Orb of Matter", - "This Orb allows to temporarily create impassable matter, either to block paths or " - "to build bridges across chasms and waters."}, - { '*', 0xF0F000, "Bounty", wildwestdesc}, - { '[', 0xC0C0C0, "Revolver", wildwestdesc}, - { '*', 0xF0F080, "Fulgurite", elecdesc}, - { '%', 0xFFFFFF, "Mutant Sapling", overdesc}, - { 'o', 0xA08000, "Orb of Stunning", - "This Orb allows you to target monsters to stun them. " - "10 charges are used to stun for 5 turns. Does not " - "work against multi-tile monsters."}, - { 'o', 0xC00000, "Orb of Luck", - "This Orb allows you to find new lands more easily. " - "Lands where you have already collected less treasure, " - "and especially the Crossroads, are more likely to " - "spawn while you have this. Additionally, Orbs of Safety " - "are more likely to spawn in the Whirlpool." - }, - { '%', 0xD03030, "Mutant Fruit", cleardesc}, - { 'o', 0xC00000, "Orb of Freedom", - "This orb is activated if you are unable to escape (radius 4) " - "without making illegal moves or " - "going through cells which are currently adjacent to enemy monsters. " - "Most game over situations are covered by this, but generally, " - "this orb is oversensitive...\n\n" - "When activated, it creates a Flash effect of radius 5." - }, - { '%', 0x606060, "Black Lotus", - "This beautiful flower is greatly prized by wizards, as it allows them to cast powerful magical spells " - "without preparation.\n" - }, - { 'o', 0x505050, "Orb of Undeath", - "Monsters slain by you in melee are turned into friendly ghosts, " - "Does not affect plants and friends." - }, - { '*', 0x8080FF, "White Dove Feather", - "This feather is truly beautiful and strong." - }, - { 'o', 0xC00060, "Orb of Empathy", - "This Orb lets your allies to share your Orb powers.\n\n" - "The following Orbs are affected:" - }, - { '>', 0x0000FF, "strong wind", - "In the Windy Plains, you can let the wind carry you, " - "causing you to move two cells with the wind in a single turn. " - "This cannot be done if you are standing at distance at most 2 " - "from the Air Elemental, or if any of the three cells on the way " - "has two wind directions.\n\n" - "Press 't' or click the destination to activate." - }, - { 'x', 0xFF00FF, "buggy item", - "Please report this as a bug." - }, - { 'x', 0xFFFF00, "buggy item", - "Please report this as a bug." - }, - { '%', 0x744c7c / 4 + 0x800000, "Thornless Rose", - "A big, beautiful, magical flower." - }, - { '*', 0xFF40A0, "Coral", - "Corals have a somewhat hyperbolic structure even in your home world, " - "but natural corals from the Warped Sea have truly beautiful shapes. " - "Ratlings know the value of corals, and thus keep them in boats for safety." - }, - { 'o', 0x764e7c*2, "Orb of Beauty", - "This Orb makes you stunningly beautiful. " - "Monsters which come next to you will be stunned for one turn. " - "Multi-tile monsters are not affected. Additionally, it makes you immune to " - "beauty." - }, - { 'o', 0xFFFF80, "Orb of the Warp", - "This Orb creates a warped zone of radius 5 around you, " - "and also allows you to move diagonally in warped zones." - }, - { 'o', 0xFFFF80, "Orb of Energy", - "This Orb halves the power usage of orbs which cost some " - "charges with each activation. It even affects the " - "one-shot orbs such as Flash or Teleport. If such an activation " - "normally costs x charges, it costs only x/2 (rounded up) " - "if you have an Orb of Energy." - }, - { 't', 0x487830, "Baby Tortoise", tortoisedesc}, - { 'o', 0x487830, "Orb of the Shell", - "This Orb protects you from physical attacks. " - "It lasts for more turns than the Orb of Shielding, but " - "10 charges are lost whenever you are attacked. " - "It also does not protect you from fires, scents, and being eaten." - }, - - { '!', 0xc00000, "Apple", "A fruit from the Yendorian Forest."}, - { '!', 0xFF6000, "Dragon Scale", - "Dragon Scales are a prized material for armors. " - "They are also prized by collectors, who would like to boast " - "about how they have killed a Dragon.\n\n" - "Dragon Scales disappear after 500 turns." - }, - { 'o', 0x900000, "Orb of Domination", - "This Orb lets you ride Dragons and other worm-like creatures. " - "Simply move onto such a creature to ride them; while riding, you are protected from dangerous terrains " - "and partially from attacks (they cause you to lose half of your Domination power), " - "but you cannot collect items.\n\n" - /*When only one charge is left, " - "you have to dismount this turn -- be very careful to make this possible, " - "as your mount could attack you immediately!\n\n" */ - "While riding, " - "click on a location to order your mount to move or attack there.", - }, - { 'o', 0xFFFF80, "Orb of the Sword", - "This Orb gives you a weapon made of pure magical energy. You do not hold " - "it, it simply floats in the air next to you. When you go, the energy sword moves " - "with you, pointing at the same relative angle it pointed before -- you cannot " - "move or rotate it otherwise. Most monsters can be killed by moving the sword into them, " - "and won't move into the spot with the sword." - }, - { 'x', 0x4040FF, "Sunken Treasure", - "Cargo of a ship which was once destroyed by a Kraken." }, - { 'o', 0xFF8040, "Orb of the Sword II", - "An alternative version of Orb of the Sword. If you have both of them, " - "you have two energy swords, facing in opposite directions." - }, - { '*', 0xFFFF80, "Ancient Jewelry", - "Precious belongings of ancient Viking heroes. Your Orb of the Sword can be " - "used to dig these treasures out of the barrows." - }, - { '!', 0xFFD700, "Golden Egg", - "Trolls of Trollheim are descendants of a bridge Troll, who collected " - "payments from people crossing the bridge. One of them paid with " - "golden eggs. The bridge Troll found the eggs beautiful, but he quickly lost them. " - "Golden eggs are still revered by Trolls, and you can find them in their " - "caves." - }, - { '!', 0xFF0000, "Warning", warningdesc - }, - { 'o', 0x808080, "Orb of the Stone", - "Trolls turn into stone walls when they die. When you have this Orb, " - "this happens to every monster you defeat. Statues created from this Orb " - "have slightly different properties than Trolls who petrify naturally." - }, - { 'o', 0xC08000, "Orb of Nature", naturedesc }, - { '%', 0x800080, "Treat", halloweendesc }, - { '%', 0x30A030, "Slime Mold", - "A very interesting species of slime mold." - }, - { '*', 0xFF00FF, "Amethyst", "A beatiful purple gem from the Lost Mountain." }, - { 'o', 0xC00040, "Orb of Recall", - "When the charges on this Orb expire, " - "you will be automatically returned to the place where you have found it. " - "Extra Orbs of Recall delay this without changing the recall location. " - "Pick up an Orb of Safety causes an immediate recall."}, - { ']', 0x8080FF, "Dodecahedron", - "These dodecahedra made of a mysterious material are the Reptiles' favorite toy." - }, - { 'o', 0x8080FF, "Orb of Vaulting", - "This Orb allows you to jump over an adjacent monster, killing or stunning it. " - "You can only vault in a roughly straight line. " - "Target a cell on the other side to use it." - }, - { '$', 0x80FF80, "Green Grass", prairiedesc }, - { 'o', 0xC09090, "Orb of Horns", - "After you move while having this Orb, you immediately attack the next cell in the straight line " - "(or two cells, when moving on a heptagon). This attack is slightly stronger than your normal " - "attack: it can stun some of the monsters which cannot be killed or stunned normally." - }, - { 'o', 0xA05020, "Orb of the Bull", - "You get the powers of Shield, Horns, and Thorns after you move two moves in a straight line " - "with this Orb." }, - { '$', 0xC060C0, "Spinel", bulldashdesc }, - { 'o', 0xC0C0FF, "Orb of the Mirror", - "Use Orb of the Mirror to gain copies of one of your Orbs; " - "mirroring weaker Orbs usually yields more copies. " - "It can only be used once per Orb type, " - "and only when you are next to a mirror.", - }, - { 'O', 0xF0F0F0, "your orbs", - "Click this to see your orbs."}, - { '%', 0xE0E000, "Lava Lily", - "This plant, able to survive in the extreme conditions of the Volcanic Wasteland, " - "is a valuable alchemical ingredient." - }, - { '*', 0x40E0D0, "Turquoise", - "Hunters believe that wearing a Turquoise amulet will improve their accuracy. " - "This one has been lost, but the hunting dogs are guarding it until the owner returns."}, - { '*', 0x009090, "Forgotten Relic", blizzarddesc}, - { '(', 0xFFE080, "Ancient Weapon", - "This ancient weapon is beautifully encrusted with precious gems, but you prefer your own -- it is much lighter."}, - { 'o', 0x307080, "Orb of Slashing", - "Whenever you attack with this Orb, you also hit the monsters adjacent both to you and the monster you originally attacked."}, - { 'o', 0x30A080, "Orb of the Triangle", - "Whenever you attack with this Orb, you also hit the monsters adjacent to you which are neither adjacent nor opposite to the monster " - "you originally attacked."}, - { 'o', 0x30D080, "Orb of Ferocity", - "Whenever you attack with this Orb, you also hit the monsters adjacent to you and opposite to the monster you originally attacked."}, - { 'o', 0xD08030, "Orb of Lava", - "This Orb summons a minor volcanic activity around you. " - "All the heptagonal cells adjacent to enemies in distance at most 5 to you " - "will be set on fire. Does not affect the cell you are on, and enemies resistant to fire."}, - { 'o', 0x3080D0, "Orb of Change", - "This ranged Orb will transform the target monster into one without any special powers. It also stuns them for one turn. " - "Does not affect multi-tile monsters."}, - { '!', 0x80FF00, "Glowing Crystal", crystaldesc}, - { '!', 0x80FF80, "Snake Oil", "Made of actual snakes!"}, - { '!', 0x80FF80, "Sea Glass", NODESCYET}, - { '*', 0xBBCC99, "Chrysoberyl", "Fragment of the past glory."}, -// { '*', 0xD0D8ED, "Chalcedony", NODESCYET}, - { '*', 0x80FF80, "Monopole", NODESCYET}, - { '!', 0xFF00FF, "Tasty Jelly", "A tasty byproduct of the Jelly Revolution."}, - { 'o', 0x80FF80, "Orb of Phasing", - "This orb lets you pass through walls (one cell wide), and also through monsters, as long as they will not attack you in transit."}, - { 'o', 0xFFFF80, "Orb of Magnetism", NODESCYET}, - { 'o', 0x202020, "Orb of Slaying", - "This Orb lets you defeat Raiders and other tough single-cell monsters in melee." - }, - { '*', 0xFFA860, "Tiger's Eye", - "A brown gem." - }, - { '$', 0xF0C0C0, "Meteorite", - "These rocks falling from the sky have been captured to fall forever in the artificial gravity. Meteorite iron is believed to be a valuable material for magical weapons."}, - { '*', 0x30FF30, "Torbernite", - "Crystals emiting magical radiation."}, - - { 'o', 0x703800, "Orb of Intensity", - "When you have this, initial and maximal charge amounts of all Orbs are increased by 20%." - }, - { 'o', 0x80D080, "Orb of Gravity", - "This Orb lets you magically control gravity around you. In lands with unusual gravity, the options are: usual gravity (no change, except that it may disrupt birds), " - "anti-gravity (causes the direction of gravity to be reversed), levitation (you can move in directions which are neither up nor down, " - "or between cells if one of them has a wall in a 'neutral' direction). In lands with standard gravity, levitation lets creatures to avoid traps, chasms, " - "and water, while anti-gravity makes it possible to move only when next to a wall (movement between cells without adjacent walls is not allowed). " - "For each move, the gravity is based on what you do, and all enemies in the effective range are affected (for example, if you move next to a wall in a non-gravity land, " - "anti-gravity kicks in and monsters will not be able to move in open space)." - }, - { 'o', 0xD08080, "Orb of Choice", - "Did you know that it is possible to break a magical sphere into finitely many parts, and then, out of the parts obtained, to make two magical spheres, just like the original? " - "Hyperbolic geometry makes this even easier!\n\n" - "When you pick up another Orb, it will not disappear from the ground -- Orb of Choice will be drained instead." - }, - - // { '*', 0x26619C, "Lapis Lazuli", NODESCYET}, + #define ITEM(a,b,c,d,e,f,g,h,i) {a,b,c,e,f,h,i}, + #include "content.cpp" }; // --- wall types --- walltype winf[walltypes] = { - { '.', 0xFF00FF, "no wall", NULL}, - { '#', 0x8080FF, "ice wall", - "Ice Walls melt after some time has passed." - }, - { '#', 0xC06000, "great wall", barrierhelp}, - { '+', 0x900030, "red slime", slimehelp }, - { '+', 0x300090, "blue slime", slimehelp }, - { '#', 0xA0D0A0, "living wall", cavehelp}, - { '.', 0x306060, "living floor",cavehelp}, - { '#', 0xD03030, "dead rock troll", trollhelp}, - { '#', 0xCDA98F, "sand dune", - "A natural terrain feature of the Desert." - }, - { '%', 0xC0C0FF, "Magic Mirror", - "You can go inside the Magic Mirror, and produce some mirror images to help you." - }, - { '%', 0xFFC0C0, "Cloud of Mirage", - "Tiny droplets of magical water. You see images of yourself inside them. " - "Go inside the cloud, to make these images help you."}, - { '^', 0x8D694F, "Thumper", thumpdesc}, - { '^', 0x804000, "Fire", - "This cell is on fire. Most beings and items cannot survive." - }, - { '+', 0xC0C0C0, "ancient grave", - "An ancient grave." - }, - { '+', 0xD0D080, "fresh grave", - "A fresh grave. Necromancers like those." - }, - { '#', 0x00FFFF, "column", - "A piece of architecture typical to R'Lyeh." - }, - { '=', 0xFFFF00, "lake of sulphur", lakeDesc }, - { '=', 0xFFFF00, "lake of sulphur", lakeDesc }, - { '=', 0x000080, "lake", - "An impassable lake in Cocytus." - }, - { '_', 0x000080, "frozen lake", cocytushelp }, - { '>', 0x101010, "chasm", - "It was a floor... until something walked on it." - }, - { '>', 0x101010, "chasmD", - "It was a floor... until something walked on it." - }, - { '#', 0x60C000, "big tree", foresthelp}, - { '#', 0x006000, "tree", foresthelp}, - { '#', 0x421C52*2, "vine", vinehelp}, - { ':', 0x006000, "vine", hvinehelp}, - { ';', 0x006000, "vine", hvinehelp}, - { '^', 0x804000, "partial fire", "This cell is partially on fire."}, - { '#', 0xA07070, "dead wall", deadcavehelp}, - { '.', 0x401010, "dead floor",deadcavehelp}, - { '.', 0x905050, "rubble", "Dead floor, with some rubble."}, - { '#', 0xD0D010, "weird rock", - "A weirdly colored rock. Hyperentomologists claim that the " - "Hyperbug armies use these rocks to navigate back home after a victorious battle." - }, - { '#', 0x8080C0, "crystal cabinet", - "Witches use these crystal cabinets to protect Powerstones, as well as the more " - "expensive Orbs. They are partially protected from thieves: they are too strong " - "to be smashed by conventional attacks, and if you try to steal the item " - "using an Orb of Aether, your Aether power will be completely drained." - }, - { '#', 0xC0C0C0, "wall of Camelot", camelothelp }, - { '+', 0xA06000, "Round Table", camelothelp }, - { '=', 0x0000A0, "moat of Camelot", camelothelp}, - { '+', 0x606060, "big statue of Cthulhu", - "These statues of Cthulhu are too large to carry, and they don't look too " - "valuable anyway. Most monsters will never go through them... they probably have " - "their reasons. But you can go! When you move into the cell containing " - "a statue, you push the statue to the cell you left.\n" - }, - { '=', 0x0000A0, "sea", caribbeanhelp}, - { '+', 0x0000A0, "boat", - "Hyperbolic pirates do not need huge ships, since so many lands to conquest " - "are so close. These small boats are enough for them.\n\n" - "Boats allow you to go through water. If you are in a boat, you can move into " - "a water cell (and the boat will come with you)." - }, - { '.', 0x00FF00, "island", cislandhelp}, - { '.', 0x80C060, "island", cislandhelp}, - { '#', 0x006000, "tree", - "The forests of Caribbean are too dense to be traversed by humans, " - "and they are hard to burn. Many colorful parrots can be found there." - }, - { ',', 0x800000, "rock I", redrockhelp}, - { ':', 0xC00000, "rock II", redrockhelp}, - { ';', 0xFF0000, "rock III", redrockhelp}, - { '.', 0xD0D0D0, "minefield", minedesc}, - { '.', 0xD0D0D0, "minefield", minedesc}, - { '.', 0x909090, "cell without mine", minedesc}, - { '+', 0x808000, "stranded boat", - "This boat cannot go through the sand. But if you sit inside and " - "wait for the tide, you will be able to use it to travel through the Ocean." - }, - { '#', 0xFFD500, "palace wall", palacedesc }, - { '+', 0xFFFFFF, "closed gate", gatedesc }, - { '-', 0x404040, "open gate", gatedesc }, - { '_', 0xC00000, "closing plate", gatedesc }, - { '_', 0x00C050, "opening plate", gatedesc }, - { '_', 0x202020, "trapdoor", "This floor will fall after someone goes there. Go quickly!" }, - { '+', 0xFF0000, "giant rug", - "This is the biggest Hypersian Rug you have ever seen! " - "Unfortunately, it is too large to take it as a trophy." }, - { '#', 0xfffff0, "platform", "You can stand here."}, - { '#', 0x909090, "stone gargoyle", gargdesc}, - { '.', 0xB0B0B0, "stone gargoyle floor", gargdesc}, - { '.', 0x909090, "rubble", "Some rubble."}, - { '+', 0x804000, "ladder", - "You can use this ladder to climb the Tower." - }, - { '#', 0xC0C0C0, "limestone wall", "Simply a wall. Mostly."}, - { '^', 0x804000, "Bonfire", - "A heap of wood that can be used to start a fire. Everything is already here, you just need to touch it to fire it." - }, - { '^', 0x8D694F, "Thumper", - "A device that attracts sandworms and other enemies. You need to activate it."}, - { '^', 0x804000, "Eternal Fire", - "This fire never burns out." - }, - { '.', 0x909090, "stone gargoyle bridge", gargdesc}, - { '#', 0x309060, "temporary wall", twdesc}, - { '.', 0x309060, "temporary floor", twdesc}, - { '.', 0x309060, "temporary bridge", twdesc}, - { '#', 0x3030FF, "charged wall", elecdesc}, - { '#', 0xFF3030, "grounded wall", elecdesc}, - { '#', 0xA0A060, "sandstone wall", elecdesc}, - { '#', 0x704000, "saloon wall", wildwestdesc}, - { '#', 0x90C0C0, "metal wall", elecdesc}, - { '#', 0x607030, "dead troll", trollhelpX}, - { '+', 0xC0C0FF, "fan", winddesc}, - { '?', 0xFF00FF, "", NODESC}, - { '?', 0xFF00FF, "", NODESC}, - { '?', 0xFF00FF, "", NODESC}, - { '+', 0x00F000, "green slime", NODESC}, - { '+', 0xF0F000, "yellow slime", NODESC}, - { '#', 0x764e7c, "rosebush", roselanddesc}, - { '#', 0xC0C000, "warp gate", - "This gate separates the warped area from the normal land."}, - { '+', 0x804000, "trunk", "The skeleton of a tree."}, - { '-', 0x402000, "solid branch", "Branches here could bear your weight easily."}, - { ':', 0x804000, "weak branch", - "Branches here will bear you weight, but if you use them to move (not fall) to an unstable place, they will break."}, - { '+', 0x60C060, "canopy", - "Only thin twigs and leaves here. They may bear fruits, but for you, these cells count " - "as unstable." - }, - { '#', 0xD0C060, "barrow wall", "This wall is quite strong. You will need another way in."}, - { '#', 0x90A060, "barrow", "Your Orb of the Sword can be used to dig here."}, - { '#', 0xE0E0E0, "stone statue", "A petrified creature."}, - { '.', 0xE8E8E8, "tower of Camelot", camelothelp}, - { '-', 0x402000, "big bush", - "You can hold this bush to climb the Lost Mountain. " - "Bushes block the movement of birds." - }, - { ':', 0x804000, "small bush", - "You can hold this bush to climb the Lost Mountain, " - "but it is not very strong -- it will get destroyed " - "if you climb from it into an unstable location. " - "Bushes block the movement of birds."}, - { '.', 0xFFFF00, "Reptile floor", reptiledesc}, - { '.', 0xFFFF00, "Reptile bridge", reptiledesc}, - { '.', 0xFFFF00, "invisible floor", NODESCYET}, - { '#', 0xC0C0FF, "mirror wall", mirroreddesc}, - { '.', 0xE0E0E0, "stepping stones", "A petrified creature."}, - { '#', 0x309060, "temporary wall", twdesc}, - { 'S', 0xB0B0B0, "warrior statue", terradesc}, - { '=', 0xB0B0B0, "bubbling slime", NODESC}, - { '^', 0xD00000, "arrow trap", arrowtrapdesc}, - { '=', 0xE2E2E2, "mercury river", "A river of mercury."}, - { '&', 0xD00000, "lava", lavadesc}, - { '=', 0x804000, "dock", "A dock."}, - { '^', 0xFF8000, "burning dock", "A burning dock."}, - { '#', 0xE04030, "ruin wall", ruindesc}, - { '#', 0xA04060, "Brownian generator", NODESC}, - { '^', 0xC05000, "fire trap", - "This trap will explode when stepped on, setting all the adjacent cells on fire. However, this happens on the next turn, " - "so you can safely escape if you are fast enough."}, - { '^', 0xFD692F, "Explosive Barrel", - "These barrels can be pushed, and they will explode if next to a fire, or under some attacks." - }, - { '#', 0xC0C0C0, "editable statue", - "A statue." - }, + #define WALL(a,b,c,d,e,f,g,h,i) {a,b,c,e,g,h,i}, + #include "content.cpp" }; -// --- land types --- - const landtype linf[landtypes] = { - { 0xFF00FF, "???" , ""}, - { 0xC06000, "Great Wall" , ""}, - { 0xFF0000, "Crossroads" , - "This land is a quick gateway to other lands. It is very easy to find other lands " - "from the Crossroads. Which means that you find monsters from most other lands here!\n\n" - "As long as you have found enough treasure in their native lands, you can " - "find magical items in the Crossroads. Mirror Land brings mirrors and clouds, " - "and other land types bring magical orbs.\n\n" - "A special treasure, Hyperstone, can be found on the Crossroads, but only " - "after you have found 10 of every other treasure." - }, - { 0xCDA98F, "Desert", - "A hot land, full of sand dunes, mysterious Spice, and huge and dangerous sand worms." - }, - { 0x8080FF, "Icy Land", - "A very cold land, full of ice walls. Your mere presence will cause these ice walls to " - "melt, even if you don't want it." - }, - { 0x306060, "Living Cave", cavehelp}, - { 0x00C000, "Jungle", - "A land filled with huge ivy plants and dangerous animals." - }, - { 0x900090, "Alchemist Lab", slimehelp}, - { 0x704070, "Hall of Mirrors", - "A strange land filled with mirrors. " - "Break magic mirrors and mirage clouds to " - "gain treasures and helpful Mimics." - }, - { 0x404070, "Graveyard", - "All the monsters you kill are carried to this strange land, and buried. " - "Careless Rogues are also carried here..." - }, - { 0x00FF00, "R'Lyeh", - "An ancient sunken city which can be reached only when the stars are right.\n\n" - "You can find Temples of Cthulhu in R'Lyeh once you collect five Statues of Cthulhu." - }, - { 0xC00000, "Hell", - "A land filled with demons and molten sulphur. Abandon all hope ye who enter here!" - }, - { 0x00FF00, "Cocytus", - cocytushelp - }, - { 0xFFFF00, "Land of Eternal Motion", - "A land where you cannot stop, because every piece of floor is extremely unstable. Only monsters who " - "can run forever are able to survive there, and only phoenix feathers are so light that they do not disturb " - "the floor.\n" - }, - { 0x008000, "Dry Forest", foresthelp}, - { 0x60C060, "Emerald Mine", - "Evil people are mining for emeralds in this living cave. " - "It does not grow naturally, but it is dug out in a regular " - "pattern, which is optimal according to the evil engineers." - }, - { 0x421C52, "Vineyard", vinehelp}, - { 0x104040, "Dead Cave", deadcavehelp}, - { 0x705020, "Hive", hivehelp}, - { 0xFFFF00, "Land of Power", - "The Land of Power is filled with everburning fire, magical Orbs, and guarded by " - "witches and golems. There are basic orbs lying everywhere, and more prized ones " - "are kept in crystal cabinets.\n\n" - "Witches are allowed to use all the powers of the " - "basic orbs against intruders. These powers never expire, but a Witch " - "can use only one power at a time (not counting Orbs of Life).\n\n" - "Witches and Golems don't pursue you into other Lands. Also, most Orb powers " - "are drained when you leave the Land of Power." - }, - { 0xD0D0D0, "Camelot", camelothelp }, - { 0xD000D0, "Temple of Cthulhu", templehelp }, - { 0xFF8000, "Crossroads II", - "An alternate layout of the Crossroads. It is more dense and more regular, " - "although you won't find the castle of Camelot here." - }, - { 0x0000FF, "Caribbean", caribbeanhelp}, - { 0x400000, "Red Rock Valley", redrockhelp }, - { 0xD0D0D0, "Minefield", minedesc}, - { 0x2020FF, "Ocean", - "You can collect some valuable Ambers on the coast, but beware the tides!\n\n" - "You can also take one of the boats and venture into the Ocean, " - "to find other coasts, dangerous whirlpools, and islands inhabited by Pirates." - }, - { 0x0000C0, "Whirlpool", - "Many lost boats are spinning in this whirlpool. Some of them contain treasures " - "and Pirates.\n\n" - "Unmanned boats will go one cell clockwise in each turn. Sharks and manned boats " - "are only allowed to go with the current, that is, towards the center, or clockwise." - }, - { 0xFFD500, "Palace", palacedesc }, - { 0xC0C000, "Living Fjord", - "A coastal area, from where you can get both to the inland worlds and to the Ocean. " - "Each turn, each cell will become water or earth, based on the majority of cells around it. " - "Contrary to the Living Caves, this process is not affected by most items and monsters, " - "but elementals, dead Trolls, and cells outside of the Living Fjord have " - "a very powerful effect." - }, - { 0xFFFFE0, "Ivory Tower", "Powerful wizards claimed this part of the world, to perform their magical " - "experiments in peace and solitude. They have changed the direction of gravity, " - "to make it even harder for intruders to reach them.\n\n" - "Gravity works as follows: cells are unstable if they are empty, and there is " - "no cell immediately below them which contains a wall. It is impossible to move " - "from one unstable cell to another, except if moving down."}, - { 0x606060, "Zebra", "Everything in this Land has black and white stripes."}, - { 0xC08080, "Plane of Fire", elemdesc}, - { 0x808080, "Plane of Air", elemdesc}, - { 0x80C080, "Plane of Earth", elemdesc}, - { 0x8080C0, "Plane of Water", elemdesc}, - { 0x4040FF, "Crossroads III", - "An alternate layout of the Crossroads. Great Walls cross here at right angles." - }, - { 0x4040C0, "Sea Border", "Border between seas."}, - { 0x4040C0, "Elemental Planes", elemdesc}, - { 0xE08020, "Canvas", "A fake Land with colored floors."}, - { 0x00C000, "Palace Quest", princessdesc}, // this is fake - { 0xD0D060, "Wild West", wildwestdesc}, - { 0x80A080, "Land of Storms", elecdesc}, - { 0x20A050, "Overgrown Woods", overdesc}, - { 0x20D050, "Clearing", cleardesc}, - { 0x303030, "Haunted Woods", hauntdesc}, - { 0x303030, "Haunted Woods", hauntdesc}, - { 0x303030, "Haunted Woods", hauntdesc}, - { 0xC0C0FF, "Windy Plains", winddesc}, - { 0x764e7c*2, "Rose Garden", roselanddesc}, - { 0xFFD580, "Warped Coast", warplanddesc}, - { 0xFFD580, "Warped Sea", warplanddesc}, - { 0xC08080, "Crossroads IV", - "An alternate layout of the Crossroads, without walls." - }, - { 0xFFD580, "Yendorian Forest", - "This forest was planted by one of the wizards from the Ivory Tower " - "to conduct experiments with gravity." - }, - { 0x487830, "Galápagos", tortoisedesc}, - { 0xD04000, "Dragon Chasms", dragondesc}, - { 0xD04000, "Kraken Depths", - "A long time ago, this was a trade route. But then, Krakens have risen out of the " - "depths. Many trading ships sank here. Legend says that you can uncover the secret " - "of a magical weapon spell somewhere in the depths...\n\n" - - "You can find Sunken Treasures here, but they won't appear until you have killed " - "a Kraken. You will also need Orb of the Fish to get the treasures, luckily you can " - "steal one from the Viking treasure hunters." - }, - { 0x804020, "Burial Grounds", - "Ancient Viking heroes were buried here. Their graves have barrows raised over " - "them, and are guarded by Draugar, animated corpses who are immune to mundane weapons. " - "You will need to use a magical weapon spell to defeat them, and to rob the " - "ancient jewelry buried in the graves." - }, - { 0x90A548, "Trollheim", - "Many clans of Trolls spend their lives in this kingdom. You can find many " - "statues of Trolls here. You suppose that they are not actually statues, but simply " - "elderly Trolls, who have petrified upon death. Or maybe you have killed " - "these Trolls yourself?" - }, - { 0xFF7518, "Halloween", halloweendesc}, - { 0x605040, "Dungeon", - "The result of a collaboration of the Great Vizier and the Wizard of the Ivory Tower." - }, - { 0x603000, "Lost Mountain", - "Gravitational anomalies in the Jungle create mountains " - "overgrown with ivies and bushes. " - "Will you dare to climb the ivies to get the amethysts hidden above?\n\n" - "Cells adjacent to Ivies count as stable (but Ivies " - "cannot climb themselves or other Ivies)."}, - { 0xFFFF00, "Reptiles", reptiledesc}, - { 0x0000D0, "Prairie", prairiedesc}, - { 0x800080, "Bull Dash", bulldashdesc}, - { 0xC000C0, "Crossroads V", "Extremely narrow Crossroads layout.\n"}, - { 0xC0C0C0, "Cellular Automaton", cadesc}, - { 0xC0C0FF, "Mirror Wall", mirroreddesc}, - { 0xC8C8FF, "Reflection", mirroreddesc}, - { 0xC0C0FF, "Reflection", mirroreddesc}, - { 0xC8C8FF, "Reflection", mirroreddesc}, - { 0xC8C8FF, "Mirror Land", - "A strange land which contains mirrors and mirages, protected by Mirror Rangers."}, - { 0xA06000, "Volcanic Wasteland", lavadesc}, - { 0x8080FF, "Blizzard", blizzarddesc}, - { 0x207068, "Hunting Ground", huntingdesc}, - { 0xE2725B, "Terracotta Army", terraldesc}, - { 0xE2725B, "Terracotta Army", terraldesc}, - { 0x80FF00, "Crystal World", crystaldesc}, - { 0x306030, "Snake Nest", NODESCYET}, - { 0x80FF00, "Docks", NODESCYET}, - { 0x306030, "Ruined City", ruindesc}, - { 0x306030, "Magnetosphere", NODESCYET}, - { 0x306030, "Jelly Kingdom", jellydesc}, - { 0xFF00FF, "Lost Memory", - "Because of the properties of hyperbolic geometry, it is extremely unlikely to randomly " - "get back to a faraway place you have been to. However, you have managed to get there " - "somehow. In the meantime, its memory has been cleared, since the 'remove faraway cells from the memory'" - " option was on." - }, - { 0x804000, "Brown Island", - "The Brown Islands have been generated by ancient underground creatures, who moved randomly and raised lands in their path... " - "adults spawned larvae in each move, which also moved randomly and also raised lands in their path, and eventually became adults and spawned their own larvae. " - "The creatures spawned exponentially, but the space they lived in still grew faster, so there was enough space for the whole spawn...\n\n" - "That was a long time ago. Now, the mountainous Brown Islands are inhabited by strange monsters. Good luck adventuring!\n\n" - "Parts of the Brown Islands have different elevations, from 0 to 3. It is impossible to gain two or more levels, " - "or to lose three levels, in a single move, (attacks are possible at any " - "difference, though). Killed Bronze Beasts rise the land by one level." - }, - { 0x211F6F, "Free Fall", - "What on one side looks to be a normal (well, infinite) horizontal wall, on to the other side turns out to be the vertical wall" - " of an infinitely high tower. Jump from the window, and let the magical gravity carry you..." - }, - { 0x30FF30, "Irradiated Field", - "These fields are ravaged with many kinds of magical radiation, which not only make the ground glow nicely in various colors, " - "but also cause the inhabitants to protect the treasures of their land in various ways. In some areas of the Irradiated Fields, " - "you will meet powerful enemies; in other areas, you will find arrow traps, fire traps, or pools, which can kill you if you are " - "careless, or help you if you know how to use them to your advantage. Will you walk through the Irradiated Fields randomly, or " - "try to find areas where treasures are common but nasty monsters are not, and keep to them? It is your choice!\n\n" - } + #define LAND(a,b,c,d,e,f,g) {a,b,d,e,g}, + #include "content.cpp" }; vector land_tac = { diff --git a/classes.h b/classes.h index 2e641dbf..c9f48064 100644 --- a/classes.h +++ b/classes.h @@ -10,72 +10,68 @@ static inline void set_flag(flagtype& f, flagtype which, bool b) { else f &= ~which; } -static const int motypes = 167; +static const flagtype MF_NOGHOST = Flag(0); +static const flagtype MF_RAIDER = Flag(1); +static const flagtype MF_PRINCESS = Flag(2); +static const flagtype MF_MIMIC = Flag(3); +static const flagtype MF_GOK = Flag(4); +static const flagtype MF_NONLIVING = Flag(5); +static const flagtype MF_METAL = Flag(6); +static const flagtype MF_STUNNABLE = Flag(7); +static const flagtype MF_HP = Flag(8); +static const flagtype MF_MOUNTABLE = Flag(9); +static const flagtype MF_FRIENDLY = Flag(10); +static const flagtype MF_PLAYER = Flag(11); +static const flagtype MF_BUG = Flag(12); +static const flagtype MF_IVY = Flag(13); +static const flagtype MF_PART = Flag(14); +static const flagtype MF_MUTANTIVY = Flag(15); +static const flagtype MF_ANYIVY = Flag(16); +static const flagtype MF_BULLET = Flag(17); +static const flagtype MF_DEMON = Flag(18); +static const flagtype MF_WORM = Flag(19); +static const flagtype MF_WITCH = Flag(20); +static const flagtype MF_BIRD = Flag(21); +static const flagtype MF_SLOWMOVER = Flag(22); +static const flagtype MF_MAGNETIC = Flag(23); +static const flagtype MF_SWITCH = Flag(24); +static const flagtype MF_GHOST = Flag(25); +static const flagtype MF_SHARK = Flag(26); +static const flagtype MF_SLIME = Flag(27); +static const flagtype MF_DRAGON = Flag(28); +static const flagtype MF_KRAKEN = Flag(29); +static const flagtype MF_NOBLOW = Flag(30); +static const flagtype MF_MULTITILE = Flag(31); +static const flagtype MF_LEADER = Flag(32); +static const flagtype MF_FLYING = Flag(33); +static const flagtype MF_ATTACK_THRU_VINE = Flag(34); +static const flagtype MF_ATTACK_NONADJACENT = Flag(35); +static const flagtype MF_NOHIGHLIGHT = Flag(36); +static const flagtype MF_INACTIVE = Flag(37); +static const flagtype MF_UNARMED = Flag(38); +static const flagtype MF_IGNORE_PLATE = Flag(39); +static const flagtype MF_BULL = Flag(40); +static const flagtype MF_TROLL = Flag(41); +static const flagtype MF_IGNORE_SMELL = Flag(42); +static const flagtype MF_RATLING = Flag(43); +static const flagtype MF_POWER = Flag(44); +static const flagtype MF_GHOSTMOVER = Flag(45); + +enum eMonster { + #define MONSTER(a,b,c,d,e,f,g,h) d, + #include "content.cpp" + motypes + }; struct monstertype { char glyph; color_t color; const char *name; + flagtype flags; + enum eMonster mgroup; const char *help; }; -enum eMonster { - moNone, - moYeti, moWolf, moWolfMoved, - moRanger, - moTroll, moGoblin, - moWorm, moWormtail, moWormwait, moHedge, - moDesertman, - moIvyRoot, moIvyHead, moIvyBranch, moIvyWait, moIvyNext, moIvyDead, - moMonkey, - moSlime, - moMimic, moREMOVED, moGolem, moGolemMoved, - moEagle, moSeep, - moZombie, moGhost, moNecromancer, moShadow, - moTentacle, moTentacletail, moTentaclewait, moTentacleEscaping, - moCultist, moPyroCultist, - moGreater, moGreaterM, moLesser, moLesserM, - moShark, moRunDog, moGreaterShark, moFireFairy, - moCrystalSage, moLancer, moFlailer, moMiner, - moVineBeast, moVineSpirit, moDarkTroll, moEarthElemental, - moBug0, moBug1, moBug2, - moWitch, moWitchSpeed, moWitchFlash, moWitchFire, moWitchWinter, moWitchGhost, - moEvilGolem, moKnight, moCultistLeader, moSlimeNextTurn, moKnightMoved, - moIllusion, - moPirate, moCShark, moParrot, - moHexSnake, moHexSnakeTail, moRedTroll, moBomberbird, moAlbatross, - moTameBomberbird, moTameBomberbirdMoved, - moPalace, moFatGuard, moSkeleton, moVizier, - moViking, moFjordTroll, moWaterElemental, - moMouse, moMouseMoved, - moPrincess, moPrincessMoved, - moPrincessArmed, moPrincessArmedMoved, - moFamiliar, moGargoyle, moFireElemental, moAirElemental, - moOrangeDog, moTentacleGhost, - moMetalBeast, moMetalBeast2, moOutlaw, moMutant, - moStormTroll, moForestTroll, - moRedFox, moWindCrow, moFriendlyGhost, moRatling, moFalsePrincess, moRoseLady, - moRoseBeauty, moRatlingAvenger, - moTortoise, moDragonHead, moDragonTail, - moGadfly, moResearcher, moSparrowhawk, - moKrakenH, moKrakenT, moDraugr, moFriendlyIvy, - moVampire, moBat, moReptile, - moHerdBull, moRagingBull, moSleepBull, - moButterfly, moNarciss, moMirrorSpirit, - moHunterDog, moTerraWarrior, moJiangshi, moVoidBeast, moLavaWolf, moHunterGuard, - moIceGolem, moSandBird, moSalamander, moHunterChanging, - moNorthPole, moSouthPole, - moPair, moHexDemon, moAltDemon, moMonk, moCrusher, - moSwitch1, moSwitch2, - moBrownBug, moAcidBird, moVariantWarrior, - moFallingDog, moWestHawk, - // shmup specials - moPlayer, moBullet, moFlailBullet, moFireball, moTongue, moAirball, moCrushball, - // temporary - moDeadBug, moLightningBolt, moDeadBird, moEnergySword, moWarning, moArrowTrap, - moRogueviz - }; - struct genderswitch_t { int gender; eMonster m; @@ -85,130 +81,103 @@ struct genderswitch_t { #define NUM_GS 6 -static const int ittypes = 136; +enum eOrbshape { osNone, osLove, osRanged, osOffensive, osFriend, osUtility, osDirectional, osWarping }; + +static const flagtype ZERO = 0; + +static const flagtype IF_SHARD = Flag(0); +static const flagtype IF_FIREPROOF = Flag(1); +static const flagtype IF_PROTECTION = Flag(2); +static const flagtype IF_EMPATHY = Flag(3); +static const flagtype IF_RANGED = Flag(4); +static const flagtype IF_SHMUPLIFE = Flag(5); struct itemtype { char glyph; color_t color; const char *name; + int itemclass; + flagtype flags; + eOrbshape orbshape; const char *help; }; enum eItem { - itNone, itDiamond, itGold, itSpice, itRuby, itElixir, itShard, itBone, itHell, itStatue, - itFeather, itSapphire, itHyperstone, itKey, - itGreenStone, itOrbYendor, - itOrbLightning, itOrbFlash, itOrbWinter, itOrbSpeed, itOrbLife, itOrbShield, itOrbDigging, - itOrbTeleport, itOrbSafety, - itOrbThorns, itFernFlower, - itWine, itOrbAether, itSilver, itOrbPsi, - itRoyalJelly, itEmerald, itOrbInvis, itPower, itOrbFire, - itHolyGrail, itGrimoire, - itOrbDragon, itOrbIllusion, - itPirate, itCompass, - itRedGem, itOrbTime, itOrbSpace, - itBombEgg, itCoast, itWhirlpool, - itOrbFriend, itOrbWater, itOrbAir, - itPalace, itOrbFrog, - itFjord, itOrbFish, - itOrbDiscord, - itSavedPrincess, itOrbLove, - itIvory, itZebra, - itFireShard, itAirShard, itEarthShard, itWaterShard, - itElemental, itOrbSummon, itOrbMatter, - itBounty, itRevolver, itFulgurite, itMutant, - itOrbStunning, itOrbLuck, - itMutant2, itOrbFreedom, itLotus, itOrbUndeath, - itWindstone, itOrbEmpathy, itStrongWind, itBuggy, itBuggy2, - itRose, itCoral, itOrbBeauty, itOrb37, itOrbEnergy, - itBabyTortoise, itOrbShell, itApple, itDragon, itOrbDomination, - itOrbSword, itKraken, itOrbSword2, itBarrow, - itTrollEgg, itWarning, itOrbStone, itOrbNature, itTreat, - itSlime, itAmethyst, itOrbRecall, itDodeca, itOrbDash, itGreenGrass, itOrbHorns, - itOrbBull, itBull, itOrbMirror, - itInventory, - itLavaLily, itHunting, itBlizzard, itTerra, - itOrbSide1, itOrbSide2, itOrbSide3, - itOrbLava, itOrbMorph, itGlowCrystal, itSnake, - itDock, itRuins, itMagnet, itSwitch, - itOrbPhasing, itOrbMagnetism, itOrbSlaying, - itBrownian, itWest, itVarTreasure, - itOrbIntensity, itOrbGravity, itOrbChoice + #define ITEM(a,b,c,d,e,f,g,h,i) d, + #include "content.cpp" + ittypes }; -static const int walltypes = 112; +enum eSlimegroup { sgNone, sgCave, sgWater, sgFloorA, sgFloorB, sgVine, sgTree }; + +static const flagtype WF_WATER = Flag(0); +static const flagtype WF_BOAT = Flag(1); +static const flagtype WF_CHASM = Flag(2); +static const flagtype WF_NOFLIGHT = Flag(3); +static const flagtype WF_FIRE = Flag(4); +static const flagtype WF_THUMPER = Flag(5); +static const flagtype WF_ACTIVABLE = Flag(6); +static const flagtype WF_ALCHEMY = Flag(7); +static const flagtype WF_RED = Flag(8); +static const flagtype WF_WALL = Flag(9); +static const flagtype WF_PUSHABLE = Flag(10); +static const flagtype WF_CONE = Flag(11); +static const flagtype WF_STDTREE = Flag(12); +static const flagtype WF_GRAVE = Flag(13); +static const flagtype WF_REPTILE = Flag(14); +static const flagtype WF_HEATCOLOR = Flag(15); +static const flagtype WF_HIGHWALL = Flag(16); +static const flagtype WF_THORNY = Flag(17); +static const flagtype WF_TIMEOUT = Flag(18); +static const flagtype WF_CISLAND = Flag(19); +static const flagtype WF_SULPHURIC = Flag(20); +static const flagtype WF_HALFVINE = Flag(21); struct walltype { char glyph; color_t color; const char *name; + flagtype flags; + int snakelevel; + eSlimegroup sg; const char *help; }; -enum eWall { waNone, waIcewall, waBarrier, waFloorA, waFloorB, waCavewall, waCavefloor, waDeadTroll, waDune, - waMirror, waCloud, waThumperOff, waFire, waAncientGrave, waFreshGrave, waColumn, waSulphurC, waSulphur, - waLake, waFrozenLake, waChasm, waChasmD, waBigTree, waSmallTree, - waVinePlant, waVineHalfA, waVineHalfB, waPartialFire, - waDeadwall, waDeadfloor, waDeadfloor2, waWaxWall, waGlass, waCamelot, waRoundTable, - waCamelotMoat, - waBigStatue, - waSea, waBoat, waCIsland, waCIsland2, waCTree, - waRed1, waRed2, waRed3, - waMineUnknown, waMineMine, waMineOpen, - waStrandedBoat, - waPalace, waClosedGate, waOpenGate, waClosePlate, waOpenPlate, waTrapdoor, - waGiantRug, - waPlatform, waGargoyle, waGargoyleFloor, waRubble, waLadder, waStone, - waBonfireOff, waThumperOn, waEternalFire, - waGargoyleBridge, - waTempWall, waTempFloor, waTempBridge, - waCharged, waGrounded, waSandstone, waSaloon, waMetal, - waDeadTroll2, waFan, - waTemporary, waEarthD, waElementalTmp, waElementalD, - waSlime1, waSlime2, waRose, waWarpGate, - waTrunk, waSolidBranch, waWeakBranch, waCanopy, - waBarrowWall, waBarrowDig, - waPetrified, waTower, - waBigBush, waSmallBush, - waReptile, waReptileBridge, - waInvisibleFloor, - waMirrorWall, - waPetrifiedBridge, - waTempBridgeBlocked, - waTerraWarrior, waBubble, - waArrowTrap, waMercury, waMagma, - waDock, waBurningDock, waRuinWall, waBrownian, - waFireTrap, waExplosiveBarrel, waEditStatue +enum eWall { + #define WALL(a,b,c,d,e,f,g,h,i) d, + #include "content.cpp" + walltypes }; -static const int landtypes = 87; +static const flagtype LF_GENERATE_ALL = Flag(0); +static const flagtype LF_ICY = Flag(1); +static const flagtype LF_GRAVITY = Flag(2); +static const flagtype LF_EQUI = Flag(3); +static const flagtype LF_WARPED = Flag(4); +static const flagtype LF_CYCLIC = Flag(5); +static const flagtype LF_TECHNICAL = Flag(6); +static const flagtype LF_MIRROR = Flag(7); +static const flagtype LF_SEA = Flag(8); +static const flagtype LF_COASTAL = Flag(9); +static const flagtype LF_PURESEA = Flag(10); +static const flagtype LF_ELEMENTAL = Flag(11); +static const flagtype LF_HAUNTED = Flag(12); +static const flagtype LF_TROLL = Flag(13); +static const flagtype LF_INMIRROR = Flag(14); +static const flagtype LF_INMIRRORORWALL = Flag(15); struct landtype { color_t color; const char *name; + flagtype flags; + eItem treasure; const char *help; }; -enum eLand { laNone, laBarrier, laCrossroads, laDesert, laIce, laCaves, laJungle, laAlchemist, laMirror, laGraveyard, - laRlyeh, laHell, laCocytus, laMotion, laDryForest, laEmerald, laWineyard, laDeadCaves, - laHive, laPower, laCamelot, laTemple, - laCrossroads2, laCaribbean, laRedRock, laMinefield, laOcean, laWhirlpool, - laPalace, laLivefjord, - laIvoryTower, laZebra, laEFire, laEAir, laEEarth, laEWater, laCrossroads3, - laOceanWall, laElementalWall, - laCanvas, laPrincessQuest, - laWildWest, laStorms, laOvergrown, laClearing, - laHaunted, laHauntedWall, laHauntedBorder, - laWhirlwind, laRose, laWarpCoast, laWarpSea, laCrossroads4, - laEndorian, laTortoise, laDragon, - laKraken, laBurial, laTrollheim, - laHalloween, laDungeon, laMountain, laReptile, - laPrairie, laBull, laCrossroads5, laCA, - laMirrorWall, laMirrored, laMirrorWall2, laMirrored2, - laMirrorOld, - laVolcano, laBlizzard, laHunting, laTerracotta, laMercuryRiver, - laDual, laSnakeNest, laDocks, laRuins, laMagnetic, - laSwitch, laMemory, laBrownian, laWestWall, laVariant +enum eLand { + #define LAND(a,b,c,d,e,f,g) c, + #include "content.cpp" + landtypes }; enum eGeometry { diff --git a/flags.cpp b/flags.cpp index fec6e844..d4658858 100644 --- a/flags.cpp +++ b/flags.cpp @@ -3,147 +3,150 @@ // Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details + +/* +rewritten +*/ + +// itemclass +// slimegroup (wall) + +/* + it == itOrbLove ? shLoveRing : + isRangedOrb(it) ? shTargetRing : + isOffensiveOrb(it) ? shSawRing : + isFriendOrb(it) ? shPeaceRing : + isUtilityOrb(it) ? shGearRing : + isDirectionalOrb(it) ? shSpearRing : + among(it, itOrb37, itOrbGravity) ? shHeptaRing : + shRing; +*/ + namespace hr { -bool isIcyLand(eLand l) { - return l == laIce || l == laCocytus || l == laBlizzard; - } +const flagtype& classflag(eItem it) { return iinf[it].flags; } +const flagtype& classflag(eWall w) { return winf[w].flags; } +const flagtype& classflag(eMonster m) { return minf[m].flags; } +const flagtype& classflag(eLand l) { return linf[l].flags; } -bool isIcyLand(cell *c) { - return isIcyLand(c->land); - } +#define ANYFLAGCHECK(name, cond, field, enum) bool name(enum w) { flagtype flag = classflag(w); return cond; } bool name(cell *c) { return name(c->field); } -bool isGravityLand(eLand l) { - return among(l, laIvoryTower, laEndorian, laMountain, laDungeon, laWestWall); - } +#define MONFLAGCHECK(name, cond) ANYFLAGCHECK(name, cond, monst, eMonster) +#define WALLFLAGCHECK(name, cond) ANYFLAGCHECK(name, cond, wall, eWall) +#define ITEMFLAGCHECK(name, cond) ANYFLAGCHECK(name, cond, item, eItem) +#define LANDFLAGCHECK(name, cond) ANYFLAGCHECK(name, cond, land, eLand) -bool isEquidLand(eLand l) { - return isHaunted(l) || among(l, laIvoryTower, laEndorian, laDungeon, laOcean, laWestWall); - } +WALLFLAGCHECK(isWatery, flag & WF_WATER) +WALLFLAGCHECK(isBoat, flag & WF_BOAT) +WALLFLAGCHECK(isChasmy, flag & WF_CHASM) +WALLFLAGCHECK(isWateryOrBoat, flag & (WF_WATER | WF_BOAT)) +WALLFLAGCHECK(isNoFlight, flag & WF_NOFLIGHT) +WALLFLAGCHECK(isFire, flag & WF_FIRE) +WALLFLAGCHECK(isThumper, flag & WF_THUMPER) +WALLFLAGCHECK(isActivable, flag & WF_ACTIVABLE) +WALLFLAGCHECK(hasTimeout, flag & WF_TIMEOUT) +WALLFLAGCHECK(isOnCIsland, flag & WF_CISLAND) +WALLFLAGCHECK(cellHalfvine, flag & WF_HALFVINE) +WALLFLAGCHECK(isAlch, flag & WF_ALCHEMY) +WALLFLAGCHECK(isAlchAny, flag & WF_ALCHEMY) +WALLFLAGCHECK(realred, flag & WF_RED) +WALLFLAGCHECK(isWall, flag & WF_WALL) +WALLFLAGCHECK(isPushable, flag & WF_PUSHABLE) +WALLFLAGCHECK(conegraphtype, flag & WF_CONE) +WALLFLAGCHECK(isStandardTree, flag & WF_STDTREE) +WALLFLAGCHECK(isGrave, flag & WF_GRAVE) +WALLFLAGCHECK(isReptile, flag & WF_REPTILE) +WALLFLAGCHECK(useHeatColoring, flag & WF_HEATCOLOR) + +LANDFLAGCHECK(generateAll, flag & LF_GENERATE_ALL) +LANDFLAGCHECK(isIcyLand, flag & LF_ICY) +LANDFLAGCHECK(isGravityLand, flag & LF_GRAVITY) +LANDFLAGCHECK(isEquidLand, flag & LF_EQUI) +LANDFLAGCHECK(isWarped, flag & LF_WARPED) +LANDFLAGCHECK(isCyclic, flag & LF_CYCLIC) +LANDFLAGCHECK(isTechnicalLand, flag & LF_TECHNICAL) +LANDFLAGCHECK(is_mirrorland, flag & LF_MIRROR) +LANDFLAGCHECK(isSealand, flag & LF_SEA) +LANDFLAGCHECK(isCoastal, flag & LF_COASTAL) +LANDFLAGCHECK(isPureSealand, flag & LF_PURESEA) +LANDFLAGCHECK(isElemental, flag & LF_ELEMENTAL) +LANDFLAGCHECK(isHaunted, flag & LF_HAUNTED) +LANDFLAGCHECK(isTrollLand, flag & LF_TROLL) +LANDFLAGCHECK(inmirror, flag & LF_INMIRROR) +LANDFLAGCHECK(inmirrororwall, flag & LF_INMIRRORORWALL) + +MONFLAGCHECK(isGhostable, !(flag & MF_NOGHOST)) +MONFLAGCHECK(isRaider, flag & MF_RAIDER) +MONFLAGCHECK(isMimic, flag & MF_MIMIC) +MONFLAGCHECK(isPrincess, flag & MF_PRINCESS) +MONFLAGCHECK(isGolemOrKnight, flag & MF_GOK) +MONFLAGCHECK(isNonliving, flag & MF_NONLIVING) +MONFLAGCHECK(isMetalBeast, flag & MF_METAL) +MONFLAGCHECK(isStunnable, flag & MF_STUNNABLE) +MONFLAGCHECK(hasHitpoints, flag & MF_HP) +MONFLAGCHECK(isMountable, flag & MF_MOUNTABLE) +MONFLAGCHECK(isFriendlyType, flag & MF_FRIENDLY) +MONFLAGCHECK(isFriendlyOrPlayer, flag & (MF_FRIENDLY | MF_PLAYER)) +MONFLAGCHECK(isBug, flag & MF_BUG) +MONFLAGCHECK(isIvy, flag & MF_IVY) +MONFLAGCHECK(isMonsterPart, flag & MF_PART) +MONFLAGCHECK(isMutantIvy, flag & MF_MUTANTIVY) +MONFLAGCHECK(isAnyIvy, flag & MF_ANYIVY) +MONFLAGCHECK(isBulletType, flag & MF_BULLET) +MONFLAGCHECK(isDemon, flag & MF_DEMON) +MONFLAGCHECK(isWorm, flag & MF_WORM) +MONFLAGCHECK(isWitch, flag & MF_WITCH) +MONFLAGCHECK(isAngryBird, (flag & MF_BIRD) && !(flag & MF_FRIENDLY)) +MONFLAGCHECK(isBird, flag & MF_BIRD) +MONFLAGCHECK(slowMover, flag & MF_SLOWMOVER) +MONFLAGCHECK(isMagneticPole, flag & MF_MAGNETIC) +MONFLAGCHECK(isSwitch, flag & MF_SWITCH) +MONFLAGCHECK(isGhost, flag & MF_GHOST) +MONFLAGCHECK(isShark, flag & MF_SHARK) +MONFLAGCHECK(isSlimeMover, flag & MF_SLIME) +MONFLAGCHECK(isDragon, flag & MF_DRAGON) +MONFLAGCHECK(isKraken, flag & MF_KRAKEN) +MONFLAGCHECK(isBlowableMonster, !(flag & MF_NOBLOW)) +MONFLAGCHECK(isMultitile, flag & MF_MULTITILE) +MONFLAGCHECK(isLeader, flag & MF_LEADER) +MONFLAGCHECK(isFlyingType, flag & MF_FLYING) +MONFLAGCHECK(attackThruVine, flag & MF_ATTACK_THRU_VINE) +MONFLAGCHECK(attackNonAdjacent, flag & MF_ATTACK_NONADJACENT) +MONFLAGCHECK(noHighlight, flag & MF_NOHIGHLIGHT) +MONFLAGCHECK(isInactiveEnemyType, flag & MF_INACTIVE) +MONFLAGCHECK(isUnarmed, flag & MF_UNARMED) +MONFLAGCHECK(ignoresPlatesType, flag & MF_IGNORE_PLATE) +MONFLAGCHECK(isBull, flag & MF_BULL) +MONFLAGCHECK(isTroll, flag & MF_TROLL) +MONFLAGCHECK(ignoresSmellType, flag & MF_IGNORE_SMELL) +MONFLAGCHECK(isRatling, flag & MF_RATLING) +MONFLAGCHECK(isGhostMover, flag & MF_GHOSTMOVER) +MONFLAGCHECK(isPowerMonster, flag & MF_POWER) + +ITEMFLAGCHECK(isElementalShard, flag & IF_SHARD) +ITEMFLAGCHECK(itemBurns, !(flag & IF_FIREPROOF)) +ITEMFLAGCHECK(isProtectionOrb, flag & IF_PROTECTION) +ITEMFLAGCHECK(isEmpathyOrb, flag & IF_EMPATHY) +ITEMFLAGCHECK(isRangedOrb, flag & IF_RANGED) + +eMonster movegroup(eMonster m); // watery -bool isWatery(cell *c) { - return c->wall == waCamelotMoat || c->wall == waSea || c->wall == waLake; - } - -bool isBoat(cell *c) { - return among(c->wall, waBoat, waStrandedBoat); - } - -bool isChasmy(cell *c) { - return c->wall == waChasm || c->wall == waSulphur || c->wall == waSulphurC || c->wall == waBubble || - c->wall == waMercury; - } - -bool isWateryOrBoat(cell *c) { - return isWatery(c) || c->wall == waBoat; - } - -bool isNoFlight(cell *c) { - return - c->wall == waBoat || c->wall == waVineHalfA || c->wall == waVineHalfB || - c->wall == waStrandedBoat || c->wall == waTrunk || - c->wall == waBigBush || c->wall == waSmallBush; - } - bool boatStrandable(cell *c) { return c->wall == waNone && (c->land == laLivefjord || c->land == laOcean); } // monster/wall types -bool isFire(cell *w) { - return w->wall == waFire || w->wall == waPartialFire || w->wall == waEternalFire || w->wall == waBurningDock; - } - bool isFireOrMagma(cell *w) { return isFire(w) || w->wall == waMagma; } -bool isThumper(eWall w) { - return w == waThumperOff || w == waThumperOn; - } - -bool isThumper(cell *c) { - return isThumper(c->wall); - } - -bool isActivable(cell *c) { - return c->wall == waThumperOff || c->wall == waBonfireOff; - } - -bool hasTimeout(cell *c) { - return c->wall == waThumperOn || c->wall == waFire || c->wall == waPartialFire || - c->wall == waTempWall || c->wall == waTempFloor || c->wall == waTempBridge || - c->wall == waTempBridgeBlocked || c->wall == waBurningDock; - } - -bool isMimic(eMonster m) { - return m == moMimic; - } - int mirrorcolor(bool mirrored) { return winf[mirrored ? waMirror : waCloud].color; } -bool isMimic(cell *c) { - return isMimic(c->monst); - } - -bool isPrincess(eMonster m) { - return - m == moPrincess || m == moPrincessMoved || - m == moPrincessArmed || m == moPrincessArmedMoved; - } - -bool isGolemOrKnight(eMonster m) { - return - m == moGolem || m == moGolemMoved || - m == moKnight || m == moKnightMoved || - m == moTameBomberbird || m == moTameBomberbirdMoved || - m == moMouse || m == moMouseMoved || - m == moFriendlyGhost || - isPrincess(m); - } - -bool isGolemOrKnight(cell *c) { return isGolemOrKnight(c->monst); } - -bool isNonliving(eMonster m) { - return - m == moMimic || m == moGolem || m == moGolemMoved || - m == moZombie || m == moGhost || m == moShadow || m == moSkeleton || - m == moEvilGolem || m == moIllusion || m == moEarthElemental || - m == moWaterElemental || m == moDraugr || m == moTerraWarrior || - m == moIceGolem || m == moVoidBeast || m == moJiangshi; - } - -bool isMetalBeast(eMonster m) { - return m == moMetalBeast || m == moMetalBeast2; - } - -bool isStunnable(eMonster m) { - return - isMetalBeast(m) || isDragon(m) || isPrincess(m) || - among(m, moPalace, moFatGuard, moSkeleton, moTortoise, moReptile, moTerraWarrior, moSalamander, moVizier, moBrownBug); - } - -bool hasHitpoints(eMonster m) { - return m == moPalace || m == moFatGuard || m == moVizier || isPrincess(m) || m == moTerraWarrior; - } - -bool isMountable(eMonster m) { - return isWorm(m) && m != moTentacleGhost; - } - -bool isFriendly(eMonster m) { - return isMimic(m) || isGolemOrKnight(m) || m == moIllusion || m == moFriendlyIvy; - } - -bool isFriendlyOrPlayer(eMonster m) { - return isFriendly(m) || m == moPlayer; - } - bool isMounted(cell *c) { if(c && c->monst && c->monst != moTentacleGhost && isMountable(c->monst)) { for(int i=0; imonst); } -bool isBug(eMonster m) { - return m >= moBug0 && m < moBug0+BUGCOLORS; - } - -bool isBug(cell *c) { - return isBug(c->monst); - } - bool isFriendlyOrBug(cell *c) { // or killable discord! // do not attack the stunned Princess if(isPrincess(c->monst) && c->stuntime) return false; return isFriendly(c) || isBug(c) || (c->monst && markOrb(itOrbDiscord) && !c->stuntime); } -bool isIvy(eMonster m) { - return m == moIvyRoot || m == moIvyHead || m == moIvyBranch || m == moIvyWait || - m == moIvyNext || m == moIvyDead; - } - -bool isIvy(cell *c) { - return isIvy(c->monst); - } - -bool isMonsterPart(eMonster m) { - return m == moMutant || (isIvy(m) && m != moIvyRoot) || - m == moDragonTail || m == moKrakenT; - } - -bool isMutantIvy(eMonster m) { - return m == moMutant; - } - -bool isAnyIvy(eMonster m) { - return isIvy(m) || isMutantIvy(m) || m == moFriendlyIvy; - } - -bool isBulletType(eMonster m) { - return - m == moBullet || m == moFlailBullet || m == moFireball || - m == moTongue || m == moAirball || m == moArrowTrap; - } - -bool isMutantIvy(cell *c) { return isMutantIvy(c->monst); } - -bool isDemon(eMonster m) { - return m == moLesser || m == moLesserM || m == moGreater || m == moGreaterM; - } - -bool isDemon(cell *c) { - return isDemon(c->monst); - } - -bool isWorm(eMonster m) { - return m == moWorm || m == moWormtail || m == moWormwait || - m == moTentacle || m == moTentacletail || m == moTentaclewait || - m == moTentacleEscaping || m == moTentacleGhost || - m == moHexSnake || m == moHexSnakeTail || - m == moDragonHead || m == moDragonTail; - } - -bool isWorm(cell *c) { - return isWorm(c->monst); - } - -bool isWitch(eMonster m) { - // evil golems don't count - return m >= moWitch && m < moWitch+NUMWITCH-1; - } - -bool isOnCIsland(cell *c) { - return (c->wall == waCIsland || c->wall == waCTree || c->wall == waCIsland2); - } - -bool isGhostable(eMonster m) { - return m && !isFriendly(m) && !isIvy(m) && !isMultitile(m) && !isMutantIvy(m); - } - bool cellUnstable(cell *c) { return (c->land == laMotion && c->wall == waNone) || c->wall == waTrapdoor; } @@ -247,19 +183,6 @@ bool cellUnstableOrChasm(cell *c) { c->wall == waChasm || c->wall == waTrapdoor; } -bool cellHalfvine(cell *c) { - return c->wall == waVineHalfA || c->wall == waVineHalfB; - } - -bool isWarped(eLand l) { - return l == laWarpCoast || l == laWarpSea; - } - -bool isElementalShard(eItem i) { - return - i == itFireShard || i == itAirShard || i == itEarthShard || i == itWaterShard; - } - eMonster elementalOf(eLand l) { if(l == laEFire) return moFireElemental; if(l == laEWater) return moWaterElemental; @@ -272,219 +195,21 @@ eItem localshardof(eLand l) { return eItem(itFireShard + (l - laEFire)); } -int itemclass(eItem i) { - if(i == 0) return -1; - if(i < itKey || i == itFernFlower || - i == itWine || i == itSilver || i == itEmerald || i == itRoyalJelly || i == itPower || - i == itGrimoire || i == itPirate || i == itRedGem || i == itBombEgg || - i == itCoast || i == itWhirlpool || i == itPalace || i == itFjord || - i == itElemental || i == itZebra || i == itIvory || - i == itBounty || i == itFulgurite || i == itMutant || i == itLotus || i == itMutant2 || - i == itWindstone || i == itCoral || i == itRose || - i == itBabyTortoise || i == itDragon || i == itApple || - i == itKraken || i == itBarrow || i == itTrollEgg || i == itTreat || - i == itSlime || i == itAmethyst || i == itDodeca || - i == itGreenGrass || i == itBull || - i == itLavaLily || i == itHunting || - i == itBlizzard || i == itTerra || i == itGlowCrystal || i == itSnake || - i == itDock || i == itRuins || i == itSwitch || i == itMagnet || - among(i, itWest, itVarTreasure, itBrownian) - ) - return IC_TREASURE; - if(i == itSavedPrincess || i == itStrongWind || i == itWarning || i == itBuggy || i == itBuggy2) - return IC_NAI; - if(i == itKey || i == itOrbYendor || i == itGreenStone || i == itHolyGrail || i == itCompass || - isElementalShard(i) || i == itRevolver || i == itInventory) - return IC_OTHER; - return IC_ORB; - } - -bool isAlch(eWall w) { - return w == waFloorA || w == waFloorB; - } - -/* bool isAlch2(eWall w, bool bubbletoo) { - return w == waSlime1 || w == waSlime2 || (bubbletoo && w == waBubble); - } */ - -/* bool isAlch2(cell *c, bool bubbletoo) { - return isAlch2(c->wall, bubbletoo); - } */ - -bool isAlch(cell *c) { return isAlch(c->wall); } - -bool isAlchAny(eWall w) { - return w == waFloorA || w == waFloorB; - } - -bool isAlchAny(cell *c) { return isAlchAny(c->wall); } - -bool realred(eWall w) { - return w == waRed1 || w == waRed2 || w == waRed3; - } - -int snakelevel(eWall w) { - if(w == waRed1 || w == waDeadfloor2 || w == waRubble || w == waGargoyleFloor || - w == waGargoyleBridge || w == waTempFloor || w == waTempBridge || w == waRoundTable || - w == waPetrifiedBridge || w == waMagma) - return 1; - if(w == waRed2) return 2; - if(w == waRed3) return 3; - if(w == waTower) return 3; - return 0; - } - int snakelevel(cell *c) { #if CAP_COMPLEX2 if(c->land == laBrownian && among(c->wall, waNone, waMineMine, waFire)) return min(c->landparam / brownian::level, 3); #endif - return snakelevel(c->wall); - } - -bool isWall(cell *w) { - if(w->wall == waNone || isAlchAny(w) || - w->wall == waCavefloor || w->wall == waFrozenLake || w->wall == waVineHalfA || - w->wall == waVineHalfB || w->wall == waDeadfloor || w->wall == waDeadfloor2 || - w->wall == waRubble || w->wall == waGargoyleFloor || w->wall == waGargoyleBridge || - w->wall == waTempFloor || w->wall == waTempBridge || w->wall == waPetrifiedBridge || - w->wall == waBoat || w->wall == waCIsland || w->wall == waCIsland2 || - w->wall == waRed1 || w->wall == waRed2 || w->wall == waRed3 || - w->wall == waMineUnknown || w->wall == waMineMine || w->wall == waMineOpen || - w->wall == waStrandedBoat || w->wall == waOpenGate || w->wall == waClosePlate || - w->wall == waOpenPlate || w->wall == waTrapdoor || w->wall == waGiantRug || - w->wall == waLadder || w->wall == waTrunk || w->wall == waSolidBranch || - w->wall == waWeakBranch || w->wall == waCanopy || w->wall == waTower || - w->wall == waSmallBush || w->wall == waBigBush || - w->wall == waReptile || w->wall == waReptileBridge || w->wall == waInvisibleFloor || - w->wall == waSlime1 || w->wall == waSlime2 || w->wall == waArrowTrap || w->wall == waMagma || - w->wall == waDock || w->wall == waFireTrap) - return false; - if(isWatery(w) || isChasmy(w) || isFire(w)) return false; - return true; - } - -bool isPushable(eWall w) { - return w == waThumperOn || w == waExplosiveBarrel; - } - -bool isAngryBird(eMonster m) { - return m == moEagle || m == moAlbatross || m == moBomberbird || m == moGargoyle || - m == moWindCrow || m == moSparrowhawk || - m == moVampire || m == moBat || m == moButterfly || m == moGadfly || - m == moAcidBird || m == moWestHawk; - } - -bool isBird(eMonster m) { - return isAngryBird(m) || m == moTameBomberbird || m == moTameBomberbirdMoved; - } - -bool slowMover(eMonster m) { - return - m == moLesser || m == moGreater || isMetalBeast(m) || - m == moTortoise || m == moDraugr; - } - -bool isMagneticPole(eMonster m) { - return m == moNorthPole || m == moSouthPole; - } - -bool normalMover(eMonster m) { - return - m == moYeti || m == moRanger || m == moGoblin || m == moTroll || m == moDesertman || - m == moMonkey || m == moZombie || m == moNecromancer || m == moCultist || - m == moRunDog || m == moPyroCultist || - m == moFireFairy || m == moCrystalSage || m == moHedge || - m == moVineBeast || m == moLancer || m == moFlailer || - m == moMiner || m == moDarkTroll || - (playerInPower() && ( - (isWitch(m) && m != moWitchGhost && m != moWitchWinter) || m == moEvilGolem - )) || - m == moRedTroll || - m == moPalace || m == moFatGuard || m == moSkeleton || m == moVizier || - m == moFjordTroll || m == moStormTroll || m == moForestTroll || - m == moFamiliar || - m == moFireElemental || m == moOrangeDog || - m == moOutlaw || m == moRedFox || m == moFalsePrincess || m == moRoseLady || - m == moRoseBeauty || m == moWolf || - m == moResearcher || m == moRagingBull || - m == moNarciss || m == moMirrorSpirit || - m == moHunterDog || m == moTerraWarrior || m == moJiangshi || - m == moLavaWolf || m == moSalamander || - m == moHunterGuard || m == moHunterChanging || - m == moIceGolem || - m == moSwitch1 || m == moSwitch2 || m == moCrusher || m == moPair || - m == moBrownBug || m == moVariantWarrior || m == moFallingDog || - isMagneticPole(m) || - slowMover(m); - } - -bool isSwitch(eMonster m) { - return m == moSwitch1 || m == moSwitch2; + return winf[c->wall].snakelevel; } // from-to -bool isGhost(eMonster m) { - return m == moGhost || m == moTentacleGhost || m == moFriendlyGhost; - } - -bool isGhostMover(eMonster m) { - return m == moGhost || m == moGreaterShark || m == moTentacleGhost || - (playerInPower() && (m == moWitchGhost || m == moWitchWinter)); - } - -bool isShark(eMonster m) { - return m == moShark || m == moCShark || m == moGreaterShark; - } - -bool isSlimeMover(eMonster m) { - return - m == moSlime || m == moSeep || m == moVineSpirit || m == moParrot; - } - -bool isDragon(eMonster m) { return m == moDragonHead || m == moDragonTail; } - -bool isKraken(eMonster m) { return m == moKrakenH || m == moKrakenT; } - -bool isBlowableMonster(eMonster m) { - return m && !( - isWorm(m) || isIvy(m) || isMutantIvy(m) || isSlimeMover(m) || - m == moGhost || m == moGreaterShark || - m == moWaterElemental || m == moWitchGhost || isMimic(m) || - isKraken(m) - ); - } - -bool isMultitile(eMonster m) { - return isWorm(m) || isIvy(m) || isMutantIvy(m) || isKraken(m); - } - -bool isSlimeMover(cell *c) { - return isSlimeMover(c->monst); - } - -int slimegroup(cell *c) { - if(c->wall == waCavewall || c->wall == waDeadwall) - return 1; - if(isWatery(c)) - return 2; - if(c->wall == waFloorA) - return 3; - if(c->wall == waFloorB) - return 4; - if(c->wall == waVinePlant || cellHalfvine(c)) - return 5; - if(c->wall == waCTree) - return 6; - return 0; - } - -bool isLeader(eMonster m) { - return m == moPirate || m == moCultistLeader || m == moViking || m == moRatling || m == moRatlingAvenger; +eSlimegroup slimegroup(cell *c) { + return winf[c->wall].sg; } bool isFlying(eMonster m) { - return isBird(m) || isGhost(m) || m == moAirElemental || isDragon(m) || checkOrb(m, itOrbAether); + return isFlyingType(m) || checkOrb(m, itOrbAether); } bool survivesChasm(eMonster m) { @@ -492,33 +217,11 @@ bool survivesChasm(eMonster m) { } bool ignoresPlates(eMonster m) { - return m == moMouse || isFlying(m) || m == moIllusion; - } - -bool itemBurns(eItem it) { - return it && it != itOrbDragon && it != itOrbFire && it != itDragon && it != itOrbWinter && it != itOrbLava && it != itTreat && it != itLavaLily; - } - -bool attackThruVine(eMonster m) { - return m == moGhost || m == moVineSpirit || m == moFriendlyGhost || m == moTentacleGhost; - } - -bool attackNonAdjacent(eMonster m) { - return m == moGhost || m == moFriendlyGhost || m == moTentacleGhost; - } - -bool noHighlight(eMonster m) { - return - (m == moIvyWait || m == moIvyNext || m == moIvyDead); + return ignoresPlatesType(m) || isFlying(m); } bool isInactiveEnemy(cell *w, eMonster forwho) { - if(w->monst == moWormtail || w->monst == moWormwait || w->monst == moTentacletail || w->monst == moTentaclewait || w->monst == moHexSnakeTail) - return true; - if(w->monst == moLesserM || w->monst == moGreaterM) - return true; - if(w->monst == moIvyRoot || w->monst == moIvyWait || w->monst == moIvyNext || w->monst == moIvyDead) - return true; + if(isInactiveEnemyType(w->monst)) return true; if(w->monst && ((forwho == moPlayer) ? realstuntime(w) : realstuntime(w) > 1) && !isFriendly(w)) return true; return false; @@ -535,12 +238,6 @@ bool isActiveEnemy(cell *w, eMonster forwho) { return true; } -bool isUnarmed(eMonster m) { - return - m == moMouse || m == moMouseMoved || m == moPrincess || m == moPrincessMoved || - m == moCrystalSage || m == moVampire || m == moBat; - } - bool isArmedEnemy(cell *w, eMonster forwho) { return w->monst != moCrystalSage && w->monst != moCrusher && isActiveEnemy(w, forwho); } @@ -549,21 +246,11 @@ bool isHive(eLand l) { return l == laHive; } -bool isIcyWall(cell *c) { - return c->wall == waNone || c->wall == waIcewall || c->wall == waFrozenLake || c->wall == waLake; - } - bool eternalFire(cell *c) { return c->land == laDryForest || (c->land == laPower && !smallbounded) || c->land == laMinefield || c->land == laEFire || c->land == laElementalWall; } -bool isCyclic(eLand l) { - return - l == laWhirlpool || l == laTemple || l == laCamelot || l == laClearing || - l == laMountain; - } - bool haveRangedOrb() { return items[itOrbPsi] || items[itOrbDragon] || items[itOrbTeleport] || @@ -574,56 +261,10 @@ bool haveRangedOrb() { items[itOrbMorph] || items[itOrbPhasing]; } -bool isOffensiveOrb(eItem it) { - return it == itOrbLightning || it == itOrbFlash || it == itOrbThorns || - it == itOrbDragon || it == itOrbStunning || - it == itOrbFreedom || it == itOrbPsi || - it == itOrbSide1 || it == itOrbSide2 || it == itOrbSide3 || - it == itOrbSlaying; - } - -bool isRangedOrb(eItem i) { - return i == itOrbPsi || i == itOrbDragon || i == itOrbTeleport || i == itOrbIllusion || - i == itOrbSpace || i == itOrbAir || i == itOrbFrog || - i == itOrbSummon || i == itOrbMatter || i == itRevolver || i == itOrbStunning || - i == itOrbDomination || i == itOrbNature || i == itOrbDash || i == itOrbMorph; - } - -bool isProtectionOrb(eItem i) { - return i == itOrbWinter || i == itOrbShield || i == itOrbInvis || i == itOrbShell; - } - -bool isEmpathyOrb(eItem i) { - return - i == itOrbFire || i == itOrbDigging || i == itOrbWinter || - i == itOrbUndeath || i == itOrbSpeed || i == itOrbShield || - i == itOrbAether || i == itOrbInvis || i == itOrbThorns || - i == itOrbWater || i == itOrbStone || - i == itOrbSide1 || i == itOrbSide2 || i == itOrbSide3 || - i == itOrbSlaying || i == itOrbFish; - } - -bool isUtilityOrb(eItem i) { - return i == itOrbSpeed || i == itOrbDigging || - i == itOrbSafety || i == itOrbTeleport || i == itOrbAether || - i == itOrbTime || i == itOrbSpace || - i == itOrbSummon || i == itOrbLuck || i == itOrbEnergy || - i == itOrbLava; - } - -bool isDirectionalOrb(eItem i) { - return i == itOrbHorns || i == itOrbBull || i == itOrbSword || i == itOrbSword2; - } - bool isRevivalOrb(eItem i) { return i == itOrbLife || i == itOrbFriend || i == itOrbUndeath; } -bool isFriendOrb(eItem i) { - return i == itOrbLife || i == itOrbFriend || i == itOrbDiscord || i == itOrbLove || - i == itOrbEmpathy || i == itOrbUndeath; - } - bool isFriendlyGhost(eMonster m) { return m == moFriendlyGhost || (markEmpathy(itOrbAether) && isFriendly(m)); } @@ -691,20 +332,6 @@ bool ignoresSmell(eMonster m) { m == moRoseLady || checkOrb(m, itOrbBeauty) || checkOrb(m, itOrbAether) || checkOrb(m, itOrbShield); } -bool isTroll(eMonster m) { - return - m == moTroll || m == moRedTroll || m == moDarkTroll || - m == moForestTroll || m == moStormTroll || m == moFjordTroll; - } - -bool isGrave(eWall w) { - return w == waFreshGrave || w == waAncientGrave; - } - -bool isStandardTree(cell *c) { - return c->wall == waBigTree || c->wall == waSmallTree; - } - bool highwall(cell *c) { if(c->wall == waGlass) return false; if(wmescher && wmspatial && c->wall == waBarrier && c->land == laOceanWall) @@ -726,15 +353,8 @@ int chasmgraph(cell *c) { } bool conegraph(cell *c) { - return wmescher && wmspatial && (c->wall == waDune || c->wall == waBigTree || c->wall == waSmallTree || c->wall == waCTree || (c->wall == waBarrier && c->land == laOceanWall)); - } - -bool isReptile(eWall w) { - return w == waReptile || w == waReptileBridge; - } - -bool isBull(eMonster m) { - return m == moRagingBull || m == moHerdBull || m == moSleepBull; + return wmescher && wmspatial && conegraphtype(c); + (c->wall == waDune || c->wall == waBigTree || c->wall == waSmallTree || c->wall == waCTree || (c->wall == waBarrier && c->land == laOceanWall)); } bool hornStuns(cell *c) { @@ -747,26 +367,5 @@ bool hornStuns(cell *c) { attackJustStuns(c, AF_NORMAL, moNone); } -// generate all the world first in the quotient geometry -bool generateAll(eLand l) { - return - l == laIce || l == laDryForest || l == laCocytus || l == laLivefjord || - l == laCaves || l == laCA; - } - -bool isRaider(eMonster m) { - return m == moPair || m == moMonk || m == moCrusher || m == moAltDemon || m == moHexDemon; - } - -bool isTechnicalLand(eLand l) { - return l == laNone || l == laOceanWall || l == laBarrier || l == laCanvas || - l == laHauntedWall || l == laHauntedBorder || l == laCA || - l == laMirrorWall || l == laMirrored || l == laMirrored2 || - l == laMirrorWall2 || l == laMercuryRiver || l == laMemory; - } - -bool is_mirrorland(cell *c) { - return among(c->land, laMirror, laMirrorOld); - } } diff --git a/game.cpp b/game.cpp index ca245448..55ad465f 100644 --- a/game.cpp +++ b/game.cpp @@ -456,10 +456,6 @@ eGravity get_move_gravity(cell *c, cell *c2) { } -bool isWarped(cell *c) { - return isWarped(c->land) || (!inmirrororwall(c->land) && (items[itOrb37] && c->cpdist <= 4)); - } - bool nonAdjacent(cell *c, cell *c2) { if(isWarped(c) && isWarped(c2) && warptype(c) == warptype(c2)) { /* int i = neighborId(c, c2); @@ -892,7 +888,7 @@ bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) { if(m == moPair) return !(w && from && againstPair(from, w, m)) && passable(w, from, extra); if(m == passive_switch) return false; - if(normalMover(m) || isBug(m) || isDemon(m) || m == moHerdBull || m == moMimic) { + if(minf[m].mgroup == moYeti || isBug(m) || isDemon(m) || m == moHerdBull || m == moMimic) { if((isWitch(m) || m == moEvilGolem) && w->land != laPower && w->land != laHalloween) return false; return passable(w, from, extra); @@ -972,37 +968,7 @@ bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) { return false; } -eMonster movegroup(eMonster m) { - if(isWitch(m) || m == moEvilGolem) { - if(m == moWitchGhost) return moWitchGhost; - if(m == moWitchWinter) return moWitchWinter; - return moWitch; - } - // if(isMagneticPole(m)) return m; - if(normalMover(m)) return moYeti; - if(m == moShark || m == moCShark) return moShark; - if(isSlimeMover(m)) return moSlime; - if(m == moEarthElemental) return moEarthElemental; - if(isLeader(m)) return moPirate; - if(m == moButterfly) return moButterfly; - if(isAngryBird(m)) return moEagle; - if(isBird(m)) return moTameBomberbird; - if(m == moReptile) return moReptile; - if(m == moGhost) return moGhost; - if(m == moFriendlyGhost) return moFriendlyGhost; - if(m == moGreaterShark) return moGreaterShark; - if(m == moWolf) return moWolf; - if(isDemon(m)) return moLesser; - if(isDragon(m)) return moDragonHead; - if(isBug(m)) return m; - if(m == moWaterElemental) return moWaterElemental; - if(m == moAirElemental) return moAirElemental; - if(isBull(m)) return moRagingBull; - if(m == moVoidBeast) return moVoidBeast; - if(m == moAltDemon || m == moHexDemon || m == moMonk) - return m; - return moNone; - } +eMonster movegroup(eMonster m) { return minf[m].mgroup; } void useup(cell *c) { c->wparam--; @@ -2078,10 +2044,6 @@ void minerEffect(cell *c) { if(c->wall != ow && ow) drawParticles(c, winf[ow].color, 16); } -bool isRatling(eMonster m) { - return m == moRatling || m == moRatlingAvenger; - } - void killMutantIvy(cell *c, eMonster who) { if(checkOrb(who, itOrbStone)) petrify(c, waPetrified, moMutant); removeIvy(c); @@ -4248,6 +4210,7 @@ bool quantum; cell *moveNormal(cell *c, flagtype mf) { eMonster m = c->monst; + if(isPowerMonster(m) && !playerInPower()) return NULL; int d; @@ -6034,7 +5997,7 @@ void moverefresh(bool turn = true) { void consMove(cell *c, eMonster param) { eMonster m = c->monst; - if(!normalMover(m)) return; + if(movegroup(m) != moYeti) return; if(m == moWitchSpeed) havewhat |= HF_FAST; bool slow = slowMover(m); @@ -6073,7 +6036,7 @@ void moveNormals(eMonster param) { for(int d=0; d<=MAX_EDGE; d++) for(int i=0; imonst)) { + if(minf[c->monst].mgroup == moYeti) { moveNormal(c, MF_PATHDIST); } } diff --git a/graph.cpp b/graph.cpp index 4b4391cb..6020e051 100644 --- a/graph.cpp +++ b/graph.cpp @@ -665,6 +665,24 @@ color_t kind_outline(eItem it) { return OUTLINE_OTHER; } +transmatrix face_the_player(transmatrix V) { + if(DIM == 2) return V; + return rgpushxto0(tC0(V)); + } + +hpcshape& orbshape(eOrbshape s) { + switch(s) { + case osLove: return shLoveRing; + case osRanged: return shTargetRing; + case osOffensive: return shSawRing; + case osFriend: return shPeaceRing; + case osUtility: return shGearRing; + case osDirectional: return shSpearRing; + case osWarping: return shHeptaRing; + default: return shRing; + } + } + bool drawItemType(eItem it, cell *c, const transmatrix& V, color_t icol, int pticks, bool hidden) { #if !CAP_SHAPES return it; @@ -847,16 +865,8 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, color_t icol, int pti queuepolyat(Vit * spinptick(1500), shFishTail, col, PPR::ITEM_BELOW); queuepolyat(Vit, shDisk, darkena(icol1, 0, inice ? 0x80 : hidden ? 0x20 : 0xC0), prio); - hpcshape& sh = - it == itOrbLove ? shLoveRing : - isRangedOrb(it) ? shTargetRing : - isOffensiveOrb(it) ? shSawRing : - isFriendOrb(it) ? shPeaceRing : - isUtilityOrb(it) ? shGearRing : - isDirectionalOrb(it) ? shSpearRing : - among(it, itOrb37, itOrbGravity) ? shHeptaRing : - shRing; - queuepolyat(Vit * spinptick(1500), sh, col, prio); + + queuepolyat(Vit * spinptick(1500), orbshape(iinf[it].orbshape), col, prio); } else if(it) return true; @@ -3213,7 +3223,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) { } case laIce: case laCocytus: case laBlizzard: - if(isIcyWall(c)) { + if(useHeatColoring(c)) { float h = HEAT(c); eLand l = c->land; diff --git a/landgen.cpp b/landgen.cpp index d3b6c6b2..d55af628 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2376,6 +2376,8 @@ void giantLandSwitch(cell *c, int d, cell *from) { #endif c->monst = moGhost; break; + + case landtypes: break; } } diff --git a/landlock.cpp b/landlock.cpp index e27f81a2..575877f3 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -236,114 +236,13 @@ int isNative(eLand l, eMonster m) { case laMagnetic: return isMagneticPole(m) ? 2 : 0; + + case landtypes: return 0; } return false; } -eItem treasureType(eLand l) { - switch(l) { - case laBrownian: - return itBrownian; - - case laIce: return itDiamond; - case laJungle: return itRuby; - case laCaves: return itGold; - case laDesert: return itSpice; - - case laAlchemist: return itElixir; - - case laMirror: case laMirrored: case laMirrorWall: case laMirrorWall2: case laMirrored2: - case laMirrorOld: - return itShard; - - case laMotion: return itFeather; - - case laGraveyard: return itBone; - case laRlyeh: return itStatue; - case laDryForest: return itFernFlower; - - case laHell: return itHell; - case laCocytus: return itSapphire; - case laCrossroads: return itHyperstone; - case laCrossroads2: return itHyperstone; - case laCrossroads3: return itHyperstone; - case laCrossroads4: return itHyperstone; - case laCrossroads5: return itHyperstone; - - case laNone: return itNone; - case laBarrier: return itNone; - case laOceanWall: return itNone; - case laCanvas: return itNone; - case laMemory: return itNone; - - case laEmerald: return itEmerald; - case laWineyard: return itWine; - case laHive: return itRoyalJelly; - case laDeadCaves: return itSilver; - case laPower: return itPower; - case laCamelot: return itHolyGrail; - case laTemple: return itGrimoire; - - case laCaribbean: return itPirate; - case laRedRock: return itRedGem; - - case laMinefield: return itBombEgg; - case laOcean: return itCoast; - case laWhirlpool: return itWhirlpool; - case laPalace: return itPalace; - case laLivefjord: return itFjord; - - case laIvoryTower: return itIvory; - case laZebra: return itZebra; - - case laEAir: case laEEarth: case laEWater: case laEFire: - case laElementalWall: return itElemental; - - case laPrincessQuest: return itSavedPrincess; - - case laStorms: return itFulgurite; - case laOvergrown: return itMutant; - case laWildWest: return itBounty; - case laHalloween: return itTreat; - case laClearing: return itMutant2; - case laHaunted: case laHauntedWall: case laHauntedBorder: return itLotus; - case laWhirlwind: return itWindstone; - - case laRose: return itRose; - case laWarpCoast: case laWarpSea: return itCoral; - - case laDragon: return itDragon; - case laEndorian: return itApple; - case laTortoise: return itBabyTortoise; - - case laTrollheim: return itTrollEgg; - case laKraken: return itKraken; - case laBurial: return itBarrow; - - case laDungeon: return itSlime; - case laMountain: return itAmethyst; - case laReptile: return itDodeca; - - case laBull: return itBull; - case laPrairie: return itGreenGrass; - - case laVolcano: return itLavaLily; - case laTerracotta: case laMercuryRiver: return itTerra; - case laBlizzard: return itBlizzard; - case laHunting: return itHunting; - case laDual: return itGlowCrystal; - case laSnakeNest: return itSnake; - case laDocks: return itDock; - case laRuins: return itRuins; - case laSwitch: return itSwitch; - case laMagnetic: return itMagnet; - case laVariant: return itVarTreasure; - case laWestWall: return itWest; - - case laCA: return itNone; - } - return itNone; - } +eItem treasureType(eLand l) { return linf[l].treasure; } eItem treasureTypeUnlock(eLand l, eItem u) { if(u != itOrbLove && l == laPrincessQuest) @@ -356,38 +255,11 @@ eLand landof(eItem it) { return laNone; } -bool isSealand(eLand l) { - return l == laOcean || l == laCaribbean || l == laWhirlpool || l == laLivefjord || - l == laOceanWall || l == laWarpSea || l == laKraken || l == laDocks; - } - -bool isCoastal(eLand l) { - return l == laWarpSea || l == laWarpCoast || l == laLivefjord || l == laOcean; - } - -bool isPureSealand(eLand l) { - return l == laCaribbean || l == laKraken || l == laBrownian; - } - -bool isElemental(eLand l) { - return l == laEAir || l == laEWater || l == laEEarth || l == laEFire || - l == laElementalWall; - } - -bool isHaunted(eLand l) { - return l == laHaunted || l == laHauntedBorder || l == laHauntedWall; - } - int landMultiplier(eLand l) { if(l == laCamelot || l == laPrincessQuest) return 10; return 1; } -bool isTrollLand(eLand l) { - return l == laCaves || l == laStorms || l == laOvergrown || - l == laDeadCaves || l == laLivefjord || l == laRedRock; - } - bool isCrossroads(eLand l) { return l == laCrossroads || l == laCrossroads2 || l == laCrossroads3 || l == laCrossroads4 || l == laCrossroads5; @@ -397,18 +269,6 @@ bool bearsCamelot(eLand l) { return isCrossroads(l) && l != laCrossroads2 && l != laCrossroads5; } -bool inmirror(eLand l) { - return l == laMirrored || l == laMirrorWall2 || l == laMirrored2; - } - -bool inmirrororwall(eLand l) { - return l == laMirrored || l == laMirrorWall2 || l == laMirrored2 || l == laMirrorWall; - } - -bool inmirror(cell *c) { - return inmirror(c->land); - } - bool inmirror(const cellwalker& cw) { return inmirror(cw.at->land); } @@ -601,6 +461,9 @@ bool landUnlocked(eLand l) { case laMagnetic: return false; // not implemented + + case landtypes: + return false; } return false; }