All ideas tagged "monster internals"

#4367

 · 
vanilla

When you perform a controlled polymorph, you are only able to turn into monsters which have HD equal to or lower than your level. If you are using a mask, or if you are polymorphing randomly, it treats you as being 10 levels higher than your actual one.

Lycanthropic and vampire shapeshifting polymorphs are exempt from this restriction.

Keep a counter on each shopkeeper representing the number of times a pet has picked up a shop-owned item in their shop (or a shop-owned item inside containers they are carrying). Every time this increments, use it as an increasing chance that the shopkeeper will become aggressive towards pets picking up their wares, with messages like “Kabalebo shouts “Hey! Drop that!” at Fluffy. Fluffy drops [item].” Once they are past that point, you can’t use pets to take their items anymore.

The point on the counter at which the shopkeeper stops playing nice should be roughly some fraction of the area of the shop, to strike a balance between large shopkeepers being more lenient and not allowing you to clean out all the tiny shops in Minetown. A rumor could be added for this: “They say that mom-and-pop stores have lower tolerance for thieves.”

Unspecified whether the counter should increment when a non-pet picks up an item in the shop. Probably not, since this is a fairly rare case.

#4105

 · 
vanilla

Add a frustration counter to certain boss monsters, which increments every time they want to close to melee distance with you but are unable to. Once this gets sufficiently high, they become capable of dispatching or shoving aside monsters (even if they aren’t normally) and breaking boulders to get to you. Different bosses have different thresholds for when this happens.

This prevents you from trivially using a boulder fort to shut down bosses like Master Kaen while you slowly whittle them away with ranged attacks, but allows you to employ strategies like that for a limited period of time.

#4103

 · 
vanilla

Monsters that hatch from eggs should be specially flagged as being ineligible to death-drop items, since the only explanation would be that the item was with them in the egg, which makes no sense.

#4093

 · 
vanilla

Add a bit to the monst struct that tracks whether the monster is hiding on the ceiling or not. (Only valid for things like wumpuses, piercers, and perhaps bats but not actually since bats don’t roost on the ceiling when inactive.)

Then, when polymorphed into a wumpus or piercer, you can use < when not on stairs to climb onto the ceiling and > to climb back onto the floor, but only when adjacent to a wall.

#3962

 · 
vanilla

Monsters have different degrees of intelligence, which changes their strategy for doing certain actions like fleeing (do they flee intelligently like monkeys do, or in a random direction?) and using items (a dumb monster might try to read a scroll of fire and burn itself to death). At any rate, more intelligent than the current definition of “having hands and neither mindless nor animal”.

Very intelligent monsters calculate whether it is more advantageous in terms of damaging the enemy versus taking damage themselves to pursue a target in melee, keep a safe distance and attack from range, or flee. Complex solutions would involve the monster storing lots of data about which attacks it has seen its opponents perform; however, this might get memory-intensive and expand save files quite a bit. A possible algorithm that relies only on game state and is based on FIQhack’s dragon AI algorithm is as follows:

   If able to attack at range (spit/breathe/shoot missiles/use items/etc):
     If the target is in range but not adjacent:
       Attack at range.
     Else if the target is adjacent, and is at least as fast as the monster:
       Attack in melee, or use ranged attacks point blank.
     Otherwise:
       Try to move somewhere aligned with the target, as far away as possible while still being in range.
   Else if the monster is unable to attack at range but will be able to soon (dragon):
     Stay out of line with the target.
   Otherwise:
      Close to melee range.

There should be a way to tell what the acquired resistances of a monster are. This could be by zapping a wand of probing at it, by breaking a potion of enlightenment on it, feedback gained from a stethoscope, or (less likely) a new spell exclusively for pet diagnostics.

Note that it may not be considered “fair” for any of these methods to work on pets, but not work to tell the player’s resistances when they do it to themselves.

#3584

 · 
vanilla

A “lignivorous” flag that can be specified on a monster species. Lignivorous monsters can eat wooden objects and doors like metallivores can eat metal objects.

#3200

 · 
vanilla

Add a flag for monsters indicating “has seen/encountered the player yet”, which is set to true when first coming in line of sight of the player or being next to them. This is used to possibly change their initial peaceful/hostile state when they see you; for instance, if you’re an orc polymorphed into an elf, any orcs that generated peaceful will turn hostile when they sight you for the first time, and vice versa for elves that generated hostile.

#3076

 · 
vanilla

Warning levels should either be set directly in the permonst struct or be mapped from a monster’s difficulty somehow, instead of being based on the monster’s level; it’s rather silly when a monster gets drained a level and decreases in warning intensity, when it likely hasn’t lost any offensive capability.

#2992

 · 
vanilla

Faction system, which lays the groundwork for more complex monster interaction rules:

  • Every monster stores an integer which represents its faction ID.
    • Faction ID 0 is used for the player and tame monsters; others are sequentially assigned as needed.
    • Other groups of shared faction IDs would be things such as “all gnomes in the mines”, “all dwarves in the mines”, “all orcs in Orcish Town”, etc.
    • If a group of monsters spawns, they all share a faction ID.
  • There is a data structure which stores a list of two faction IDs and an associated rule (fight, peace, etc)
  • Monsters of the same faction don’t attack each other, unless possibly they grudge one another.
  • Monsters of different factions interact as normal, unless the data structure specifies that their behavior should be overridden.
  • When a monster in a faction is attacked by something it didn’t previously want to attack, the data structure is added to with a (attacker faction, defender faction, “hostile”) piece of data. E.g. if a kobold throws a dart and hits an orc in a group, all the orcs now hate that kobold.
    • Possibly, if only some monsters see the act of aggression, they split off into a new faction (which is aggressive, while the old one remains non-aggressive), and the data structure is set so that when any monster in the old faction sees a monster in the new faction, it automatically changes to the new faction.
  • Monsters that read cursed genocide or create monster could then have the summoned monsters’ faction be hostile to the summoner, for symmetry with players.

#2991

 · 
SpliceHack EvilHack

Shambling horrors gain their own mextra struct which contains details of their statblock, rather than overwriting the shambling horror’s own statblock in the mons[] array. This allows horrors from a bones file to retain the characteristics they had in the bones game, alongside horrors from the current game that have different characteristics.

It may be possible to look up the attacks and abilities of a given shambler on the map by farlook.

#2965

 · 
vanilla

Add another variable to the eshk shopkeeper struct, which tracks how much they dislike you. If you break their door or rob them, they’ll continue to dislike you even after you compensate them. A shopkeeper who dislikes you strongly will inflate their prices. It may be possible to get them to stop disliking you by buying lots of things from them, but probably not.

#2906

 · 
vanilla

Track the amount of Luck increase you have had from a unicorn. If you steal gems from such a unicorn or kill a unicorn you have gotten Luck from, immediately revert that Luck increase.

#2862

 · 
vanilla

Cut down on the list of inediate monsters by defining some of them to be either herbivorous or carnivorous (note that the game uses carnivorous to mean “can eat meat” rather than “only eats meat”).

Herbivores:

  • Killer bee and queen bee
  • All types of nymph

Carnivores:

  • Salamanders
  • Kops
  • Imps, homunculi, tengu, and leprechaun

#2861

 · 
vanilla

Make gelatinous cubes and quivering blobs amorphous, allowing them to pass through terrain like iron bars (however, gelatinous cubes should probably be blocked from squeezing underneath doors).

Make magic cancellation not work with a fixed rate versus all types of attacks it works on throughout the entire game. Instead, scale a monster’s ability to penetrate your magic cancellation based on its level, base level, maximum HP, or hit dice.

Hit dice and base level are nice if it’s desirable for all monsters of the same species to have the same MC penetration, but hit dice and maximum HP are a little weird since they aren’t meant as offensive stats. Maximum HP and actual monster level are nice because they can be discovered with a stethoscope.

#2791

 · 
vanilla

When amorphous creatures pass through iron bars, they leave any items they are carrying embedded in the bars. Possibly, small items (as determined by weight) may still able to pass through, subject to a random chance.

#2790

 · 
vanilla

Firefly, an a monster that is a light source, but a variable one. It ranges from being totally unlit to emitting light in a radius of 3 for a brief time. Is poisonous to eat, and with very low nutrition; has a mild bite attack. Tends to spawn in dark areas.

Internally, the deciding factor when a firefly should light up should probably use its mspec_used variable, which enables them to light up again when it hits 0. Also, cancelling a firefly should prevent it from lighting.

#2682

 · 
vanilla

Monsters summoned by an aligned caster (meaning a caster with a well-defined alignment: aligned priests, angelic minions) will also be minions of that god. Minions additionally get some extra benefits in exchange for directly serving a god, among which is periodically getting their HP topped up every now and again.

#2660

 · 
UnNetHack EvilHack

Rather than slowly increasing the natural monster generation rate over time, gradually increase other monster stats that are less obvious, such as HP maximum, computed level, or attack power. Though this approach has been criticized for hiding the increase in difficulty from the player, whereas generating more monsters is obvious.

#2637

 · 
EvilHack

Berserking monsters must be below a certain fraction of their maximum HP in order to act berserk, rather than just being constantly berserk. The fraction (or just a threshold) is deterministically computed based on the monster ID.

#2393

 · 
vanilla

Add the turn a pet was created into the edog struct, so the game can measure how long and loyal of a relationship you have with it. Pets that stay tame for a long time get some combat buffs such as a damage boost or more hit points. They are also more likely to come back tame if killed and resurrected.

Note that if a pet is momentarily untamed and then retamed, it resets the “turn it became a pet” counter.

#2372

 · 
vanilla

Add a new damage type AD_CHOK, for specific suffocation attacks (so that rope golems’ AT_HUGS AD_PHYS combination doesn’t have to be interpreted as choking).

#2371

 · 
vanilla

Nagas should only be MZ_LARGE, not MZ_HUGE.

#2359

 · 
vanilla

Whenever a follower monster follows you between levels, print an appropriate message, such as “The wraith pursues you down the stairs.” and “You are surrounded by a shimmering sphere! The Wizard of Yendor grabs your arm as you vanish!”

#2219

 · 
vanilla

Magical taming is easier to do on coaligned monsters and harder on crossaligned monsters.

#1829

 · 
vanilla

Rock moles and other item-eating monsters drop any gold or gems they have eaten (digesting them can’t be a fast process), or they destroy 10% of all gold they eat and have a 10% chance of destroying any other items they eat; otherwise those items will be placed in the mole’s inventory.

#1793

 · 
vanilla

A monster flag that designates that its inventory is actually the contents of its stomach and is therefore not stealable, nor usable by the monster. Gelatinous cubes, rock moles, and purple worms should get this flag. (Also some other proposed “eater” monsters, like the bookworm.)

If a monster (like a purple worm) eats another monster, that monster’s inventory should be added into the eater’s stomach.

#1783

 · 
vanilla

Instead of actually becoming any random monster, chameleons choose any random monster type to display as, but their attacks and stats remain those of a chameleon.

#1781

 · 
vanilla

Some monsters, a subset of item-using monsters, can’t read scrolls even though they can use all other items. Trolls and some orcs would be in this set (possibly even allow some members of a species to read and some not to, based on their internal monster ID.)

#1753

 · 
vanilla

It should be possible to have monsters that are sessile but still get “movement points” to make active attacks. Lichens and spotted jellies are two good examples of monsters that could be like that.

#1720

 · 
vanilla

Monsters lacking hands can only carry up to a certain weight maximum which depends on their size. The player, if polymorphed, gets this as carrying capacity.

#1712

 · 
vanilla

Ghosts cannot be touched with most items, or the player’s body, similar to shades (probably blessed + silver objects would suffice; though silver does not sear them like it does shades). They don’t need to have an amazing AC anymore because of this.

#1711

 · 
vanilla

Make killer bees’ evasiveness so high that a player should still be missing them a lot even in the late game. To compensate for this, reduce their HD to 1. However, area of effect attacks always tend to hit monsters regardless of evasiveness, so are still useful against them.

#1700

 · 
vanilla

New monster behavior flag M2_CLIMB or M3_CLIMB: added to monsters that are natural climbers (spiders, ants, most Y) and with effects like being able to get out of a pit in one turn, or who can climb up ladders without having hands.

#1694

 · 
vanilla

Dragons’ alignments are adjusted so that the values actually matter (at the least, yellow should be very lawful, gray should be pure neutral, and black should be very chaotic), and are not specified as M2_HOSTILE anymore so that they can rarely be generated peaceful. Perhaps more interestingly, their difficulties should be varied.

#1692

 · 
vanilla

When chameleons polymorph, they retain their same number of hit dice and hitpoints. So while you may be facing a minotaur or an arch-lich, it’s a very fragile one.

#1644

 · 
vanilla

Bookworm, a w monster that eats books (they end up in its stomach/inventory and aren’t destroyed, though they may lose a read charge). Levels up, gaining power and speed, for each book it eats (higher level books give it more power), eventually gaining more attacks. Possibly can also eat scrolls. Initializes as having already eaten a few books.

#1633

 · 
vanilla

Arch-foocubi which do the same seduction as regular foocubi, but the random number they choose has a higher average than a foocubus’ 1-35, so the chance of a bad effect is greater and it’s less effective to boost your own stats. Perhaps rnd(35) + 25. They are also more grabby than regular foocubi, and will steal jewelry if you have insufficient gold.

#1621

 · 
vanilla

Rat king (a randomly generated monster, not the SLASH’EM unique Rat King), based on the real-life rat king. It is a r, not much faster than a rock mole, but has several bite attacks (possibly scaling the amount by monster level). Each bite has a small chance of conferring disease. Its level corresponds to the number of entangled rats, so a slashing attack could sometimes cut off one rat, which then appears on the floor as a new rat, and makes the rat king lose a level.

#1585

 · 
vanilla

Gelatinous cubes automatically engulf items thrown at them rather than the items falling to the floor.

Improvements to secret doors:

  • When the player discovers a secret door, monsters still don’t know about it unless they see it open.
  • Monsters know about some secret doors and passages in their native area, and will use them as if they were normal doors/floor. If the player sees a monster traveling through one (defined as being able to see the actual square of the door), it becomes unhidden. The proposed implementation for this is to have some monster types (the Wizard, angels, etc) have full knowledge of all secret doors everywhere, and all other monsters have a bit that represents whether they know about secret doors, which sometimes gets set when they are generated and always gets set when they see some other monster use a secret door. A cruder implementation is just to convert the secret feature into a normal one when used by a monster.
  • There are fewer or no hidden doors between the upstairs and downstairs on a Dungeons of Doom level.
  • Less of a Dungeons of Doom level’s loot appears on a direct or near-direct path between staircases, and more of the loot appears in rooms hidden behind secret doors.
  • Remove secret passages from the game; they don’t add much of relevance and it’s harder to find ways to make them relevant.

#1255

 · 
vanilla

If you attack a monster while standing on Elbereth, all monsters in line of sight stop respecting Elbereth.

#1078

 · 
vanilla

Swarm monsters which are invulnerable to weapon attacks (or else take extremely reduced damage from weapon attacks, making weapons a last resort) and instead must be hit with area-of-effect attacks. Given the relatively low availability of area-of-effect attacks, the swarm should go down in one or two hits from one.

#941

 · 
vanilla

Give some monsters the M2_SWIM ability: rats, possibly dogs, possibly horses.

Fix race base monster weights: human weights should be dropped from 1450 to 1000, elves should be dropped to 500, dwarves should weigh a bit more than elves, orcs should be between dwarves and humans, gnomes should be lightest.

You can convince peaceful intelligent monsters to join your cause (taming them) by chatting with them. The outcome depends on several factors: your respective alignments (lawfuls have a very hard time recruiting chaotic monsters), respective levels, respective races, your Charisma (which should be a large factor), and possibly others. Failing might turn the monster hostile, or do nothing. You only get one attempt per monster; if they don’t want to join you, trying again will never work. More complex behavior could possibly be implemented with the monster demanding something from you or making you do something before they will follow you. E.g. “I’ll only join you for 100 zorkmids,” or “Bring me the helms of three goblins to prove your worth!”

Internally, this would probably work by having a new flag “recruitable” on a monster, which is only set to true when a monster generates as peaceful (and is not set at all for certain monster types like shopkeepers and priests). Chatting first checks this flag: a taming attempt is only made if it is true, and it is set to false regardless of the taming outcome. Some peaceful monsters of a recruitable species could also generate with the recruitable flag as false.

To avoid this conflicting with existing #chat, there are a few options:

  • Recruitment attempts only happen when you use the m movement prefix before chatting. This has the disadvantage of not being very discoverable.
  • Chatting to recruitable monsters could bring up a menu of possible things to discuss with them, one of which is recruiting and another of which is regular chatting. This has the advantage of being extended to other possible interactions in the future.
  • After the regular chat interaction occurs, you are asked if you would like to try recruiting them. There could be an option that disables this prompt.

#814

 · 
vanilla GruntHack EvilHack

Mind flayers have to grapple your head before they can successfully suck your brain (like in D&D), forcing them to spend a turn doing this. If you have a greased helm, this gives you at least one extra turn to act since they will not be able to grapple your head until the grease dissolves.

This would probably best be implemented by giving them a sticky grab or bear hug attack and ignoring the existence of their tentacle attack if they aren’t already grappling you (or you are being held by another enemy and thus can’t avoid them). Either way, checking u.ustuck is the key.

Possibly, they need to spend another attack getting your helm off, which will unequip it, though this will get weird if your helm is cursed. A cursed helm shouldn’t offer total protection against them. Possibly, they should be able to remove a cursed helm (like nymphs and foocubi do) despite its curse; this could be handwaved as them using their psionic powers to do it.

In variants that implement zombies eating your brain, it should work on basically this same system, where the zombie needs to hold onto you before it can eat your brain (and which also works that way in D&D).

#789

 · 
vanilla

Incorporeal monsters should be immune to mind flaying (and probably most physical) attacks, except attacks from angels.

#689

 · 
vanilla

Instead of a mslow flag in the monst struct, use a signed char called “speedbon” which represents the amount of speed offset that the monster should have from its normal speed. This allows for more nuanced speed mechanics, like zapping a wand of speed monster or slow monster multiple times and having the effects stack.

#687

 · 
vanilla

Disenchanters can eat magical items for food like incantifiers do (i.e. draining the magic out of the item, leaving it as uncharged/cancelled/+0 or turning it into a mundane counterpart). This works for disenchanter pets, and for players polymorphed into them. Not specified whether this should give the player intrinsics.

Possibly, add a ‘magivore’ monster flag to represent monsters that can do this, though if only disenchanters are capable of doing this then it may not be needed.

Add a “summoned” bitfield to struct monst, which is used to identify monsters that have been created through magical means. Should be a bitfield rather than a flag so that it can track different details of how it was summoned (from trap/wand/etc, by player or by something else; it probably doesn’t warrant a mextra struct). Summoned monsters can have various anti-farming nerfs applied to them: no training skills, no corpses, no deathdrops, no starting inventory, no experience, etc. Possibly, summoned monsters also disappear after a few hundred turns.

Scale monsters’ hit dice bonuses based on their size. In order to reduce the high amount of variance monster HP currently has, monster HP is now computed by this formula: (HD)d4 + HD\*2\*(size), where size is 0 for MZ_TINY, 1 for MZ_SMALL, and so on.

#637

 · 
vanilla

Monster flag M3_TELWITHU. Monsters with this flag (examples: quantum mechanics, some devils) will follow you when you teleport horizontally.

#591

 · 
vanilla

Every spellcaster should have its own list of spells it can cast. (Archons and possibly nalfeshnees should be casting clerically aligned spells rather than mage spells.)

#490

 · 
vanilla

When a monster kills a monster that it grudges, it gets some bonus like a small HP boost or a level up.

#347

 · 
vanilla

Monsters should not be able to unlock, open, and move into the space of a door all in one turn, or move and eat in one turn.

#64

 · 
vanilla

Monsters get bonus AC against attacks coming from allies (hostile versus hostile, or pet versus pet).

#54

 · 
vanilla

Give monsters their own XP counters, because the system of “all kills by a monster count as equal experience” is weird.