Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'myvanilla/master' into 9.0-savebreaking
This is an enormous merge, but that's to be expected when it covers 1 year and 8 months of vanilla development. Enjoy reading 3000 words of conflict notes from the almost 1200 conflicts which took nearly a week to resolve: COMPLYING WITH UPSTREAM REFORMATS/RENAMES/REFACTORS - Added NONNULL* declarations to xNetHack-specific functions in extern.h as appropriate. Some of the functions did actually check for nulls and produced an impossible; turns out gcc will actually catch potential uses of null in there AND will error if an argument specified as non-null is checked for null within the function, so I removed those checks and impossibles. - Moved hash functions from hacklib.c to rnd.c because coord_hash relies on nethack globals that have been stripped from hacklib . - Moved current_holidays() to calendar.c. - Converted xNetHack array[rn2(SIZE(array))] to vanilla's ROLL_FROM(array). Replaced a rnd_name macro defined by xNetHack for the same purpose. Left some that are unchanged in vanilla or which have a slightly different calculation such as rn2(SIZE(array) - 1) in place. - Formatted monsters.h changes in tune with the guidelines mentioned in 627b40f. - Discarded xNetHack additions to the controllable verbosity system, since this apparently got entirely reverted upstream and no longer exists. If it gets added back at some point and I need to reimplement it I will be very cross. - Updated vanilla's big comment grid documenting room flags in rm.h, but if this causes merge conflicts in the future I will probably just ditch it... - Moved DUMPHTML handling in config.h so that if DUMPHTML is defined at compile time but DUMPLOG isn't, DUMPLOG_CORE code will still be compiled in (which DUMPHTML relies on). - Added vanilla's odd FALLTHROUGH before a /* FALLTHRU */ comment where observed, but didn't do it comprehensively. - Inserted xNetHack timeouts MOLDY_CORPSE and FERMENT into timer_is_obj; the commit that introduced that macro is older than the last merge, so perhaps this was an oversight. - Changed g[a-z] instance_globals to sv[a-z] instance_globals_saved whenever appropriate. - Added and removed monsters as necessary from the "all other cases" giant switch statement in makemon(). - Renamed saved globals in xNetHack code to sv[a-z] as opposed to g[a-z] unsaved globals. NEW ADDITIONS TO THE ENDS OF ARRAYS/ENUMS/ETC - bigrm-12 "Tea Party" leapfrogs over bigrm-13 "The Great Bridge" to become bigrm-14 since vanilla added its own bigrm-12. - Bump PARANOID_THROW, TER_VISIT, WITHERING & DOOMED, etc to the end of their lists rather than sandwiching them between vanilla values, so that the vanilla values remain the same in both versions. COLLIDING ENGRAVING DISPLAY IMPLEMENTATIONS - - Moved engraving_to_glyph into a function. - Deleted secret corridors' eligiblity to show engravings. Vanilla appears to have dropped that. FEATURES WHERE THE UPSTREAM IMPLEMENTATION WAS TAKEN OR XNETHACK CHANGES WERE DISCARDED - Took vanilla's implementation of petless conduct (in which the pet counter is incremented in initedog() and there is only one place that it needs to be decremented because it wasn't a "real" pet). - Discarded xNetHack-specific HI_BOSS in favor of vanilla's HI_OVERLORD. - It looks like vanilla commit 4927b2c (putting shop overview names into the shclass struct) basically reimplemented xNetHack commit 313d59b, so take their implementation. - Discard xNetHack logic around strong gear for lawful minions (only difference should be that the weapon will no longer have a chance of generating at very high enchantment and keeping it; now it's just vanilla's +0 to +3 for swords and +3 to +6 for maces). - Took vanilla's teledest implementation, which has better checks on the teledest coordinate. - Took vanilla's (qt's) implementation of NO_PART for bodypart math. - Took vanilla's teleport exclusion zones in the hellfill prefabs that contain some interior region that's blocked off somehow. - Kept vanilla's changes to relative object probabilities, notably with spellbooks (which the DevTeam is treating as if every object class still has to add its probabilities up to 1000, which it doesn't). - Took, for now, vanilla's enumeration of "all other" monster species in make_corpse (only compiled when NH_DEVEL_STATUS isn't "released"); but if this proves to be a headache-inducing source of merge conflicts, I may delete it. - Took vanilla's implementation of blessed destroy armor scroll allowing you to choose the piece to destroy. - Took saving grace without changes. - Took vanilla's 3-stages-of-cracking system for glass armor. As of this commit, it applies only to armor, and glass weapons (and any other object classes) will still shatter completely the first time they take damage, but erodeproofing them still protects them. The game now uses vanilla's term "tempered" to denote some erodeproof glass object, except it still uses "indestructible" to refer to erodeproofed glass rings and wands which could also break from shock damage. - Took vanilla's implementations of paranoid swim and paranoid trap. (This means if you do NOT have paranoid trap set, you will NOT be prompted to confirm before moving into a trap, and if you have it set but do not have paranoid confirm set, you will accept moving into it by pressing 'y'). - Took vanilla's implementation of force-fighting a web. - Discarded xNetHack's "You find many hidden bugs on the floor" case for engraving with a wand of secret door detection, since it now always identifies itself. - Adopted vanilla's code for handling searing damage from equipment on the left and right hands separately when a martial arts user gets a double attack, instead of just assuming searing damage would always be applied on every hit. - Restored vanilla's behavior of not considering two objects mergable with different known, bknown or rknown - provided you are both a non-priest (for bknown) and are either blind or hallucinating, meaning most of the time, they are still mergable. - Largely took the sacrifice gifting rebalance as-is; a few small notes: - Odds of a gift are 1/(6*gifts^2) instead of 1/(6*gifts*artifacts_existing). - Mirror Brand and the Apple of Discord need new +x and minimum sacrifice difficulty stats for the artifact rebalance made in vanilla. For now these are both zeroes; a follow-up commit will provide actual values. For Quest artifacts, the numbers are irrelevant, so I used the 0, 12 numbers for quest artifacts added in xNetHack, same as all the other quest artifacts. - Took vanilla's implementation of shop annotations, deleting xNetHack function get_shtype() in the process. - Took vanilla's code for suppressing the Quest leader summon message when the leader is dead (as opposed to xNetHack's slightly less accurate implementation of when you personally killed them). - Took vanilla's code for item destruction, which was based on xNetHack code anyway and had only minor differences, mostly improvements. - Took vanilla's implementation of looking up an object in inventory and discarded xNetHack's. FEATURES WHERE THE XNETHACK IMPLEMENTATION WAS KEPT OR UPSTREAM CHANGES WERE DISCARDED - Barbed devils kept both their passive barb attack from xNetHack and their active sticky attack from vanilla (which replaced one of their claw attacks; they still only make 3 active attacks). - Kept vrocks as orange, not green, though as of this commit their tile recoloration from vanilla to a greener demon has stayed. - Discarded ice devil's slowing touch from vanilla. In xNetHack their cold sting already did this if you don't have cold resistance. - Kept xNetHack secret door odds rather than vanilla's "none on first 2 levels, flat 1/8 beyond that". The xNetHack formula already has none on the first few levels and scales up gradually. - Discarded various additions for the Rogue level such as traptype_roguelvl(). - Kept xNetHack's implementation of "concealed hiders don't venture out often"; vanilla's happens before the m_move adjacent-finding code, which means monsters hiding in large grassy areas would move extremely slowly. - Stripped the can_unlock and can_open arguments from postmov(), since they are used in mon_open_door, not here. - Discarded NO_HIDING_UNDER_STATUES. The bug that led to its creation is already fixed upstream - monsters won't hide under statue trap statues because the space has a trap on it. - Didn't take vanilla's "small bonus" for wielding a quarterstaff while spellcasting; this already confers a gear bonus in xNetHack. - No updates to patchlevel since this is merged into the 9.0 savebreaking branch. EDITLEVEL is still 0. FEATURES WHERE UPSTREAM AND XNETHACK IMPLEMENTATIONS WERE MERGED - Vanilla added 4 guaranteed food rations to the Mon-strt level, whereas xNetHack added a chest with 5 random (not guaranteed vegetarian) comestibles. I moved the food rations into that chest and removed the 5 comestibles. It feels appropriate for the monks to only have bland food instead of an interesting variety. Also, fixed the location of the spinach tin to be next to the Grand Master, as it is in vanilla. - Paupers keep race-based skill cap minimums, since these are natural affinities and not anything to do with background or training. (The hero doesn't actually start with any skill in them anyway.) - Moved some code (regarding traps) from vanilla's implementation of can_hide_under_obj to xNetHack-native concealed_spot(), because vanilla assumes the only things that can hide monsters are objects, which is not true in xNetHack. - Changed inventory weight format from "{xyz}" to vanilla's wizweight format of "(xyz aum)". If the extra 4 characters prove to make messages too long, this could be reverted, or have invweight turned into a compound option to select between styles. (Unlike in vanilla, non-wizards can still see object weights). - Incorporated vanilla's code for protection from item destruction being percentage-based on worn gear (90% for dwarvish cloaks versus fire and cold), but maintained the principles from xNetHack commit e340c90 of keeping the protection symmetric for monsters and extrinsics being 100% protective. - Took vanilla's unification of mulch logic in should_mulch_missile, but applied xNetHack-specific skill-based logic that favors the player. (Monsters' 2/3 chance of breaking ammo is now 1/4, and is subject to the same enchantment-based and BUC-based saving throws to save or destroy it as the player gets.) Noticed a double implementation of "Flint and hard gems get an extra chance not to break because they don't easily break" and removed the extra one. - Took vanilla's implementation of dipping in sinks, which allows washing hands and wetting objects in addition to identifying potions. It adds special effects for a few potions that weren't implemented in xNetHack, but I kept the xNetHack part where potions which unambiguously identify themselves by their effects on the sink get auto-identified rather than offering the player an opportunity to call them. - Took vanilla's 30+d15 turns of invisibility from zapping self with a wand as opposed to xNetHack's 50+d50, but kept the xNetHack amount of d(spe*250) turns when breaking the wand. - Discarded much of the vanilla code for a vampire reforming on a door and smashing it, specifically the part about triggering its trap which assumed the only door trap blows the door up. They will still smash doors, and they will still cause ones trapped with a fiery explosion to blow up, but they won't trigger other types of traps. - Discarded xNetHack macro is_hard() in favor of vanilla's hard_helmet(), but moved the checks for other material helms that only exist in xNetHack (wood, bone, and stone) into that function. FEATURES NOT ACTUALLY MERGED YET WHICH WILL GET A FOLLOW-UP COMMIT - Artifact gift values for xNetHack-added artifacts as mentioned above. - As of this commit, Dispater fiend adversity will usually completely shut down HP recovery, since the formula for HP recovery changed upstream. - As of this commit, the xNetHack "garden" themed room coexists with paxed's "garden" themed room fill (which can appear in various room shapes). Other themed rooms still exist and haven't been checked for duplicates. They will probably be properly merged in a follow-up commit. - Kept both vanilla's bone devil skeleton gating and xNetHack's bone devil skeleton summoning for now. - As of this commit, both xNetHack fall damage from falling into open air and vanilla fall damage for falling down trapdoors (but which I believe also applies to falling into air) coexist. - Erinyes are still guaranteed in some Gehennom special levels, which coexists with the new erinys revamp where they can be summoned to punish bad behavior. For now I kept their xNetHack statblock: G_NOGEN instead of G_SGROUP | 2, flying by default, green not red, always hostile. - Temporarily left keeps_distance in mondata.h despite nhmall cleaning out the macros which took a struct monst * into mon.h. This will be fixed in a follow-up commit. NEW IMPLEMENTATIONS IN THIS MERGE COMMIT - Changed the code for vapors from the various potions of healing to call healup() instead of relying on janky switch case fallthru logic. - Split part of ring_from_sink into a new function, find_sink_ring, which only returns the ring without making it come to the surface. This is so that pouring object detection down the sink can tell whether there's a ring there. - Inserted a default case to some switch statements handling monsters that now get tripped up on -Werror=switch. - Added some prototypes for html dumplog functions that never had them.
- Loading branch information