sCthangband Based on Cthangband 4.1.0b and Zangband 2.1.0e Changes are added to the top of this file, so for a chronological order read from the bottom up. sCthangband 1.0.3 changes: Allow the map to be nearly as large as the main window, and the top line as long as space allows in many cases. Update the display as the screen is resized in a few cases. Make "use" print a list of cantrips for a charm rather than giving an error. If no missile weapon is equipped, the missile damage given on the character information screen is that of the first missile in the player's inventory enscribed with @ff, 0 if there are none. Replace the main-*.c files with versions based on those in Angband 3.0.0. Make the level generation loop a bit more efficient. Unify the initial help files, so that help.hlp is used on every system. Use a VARIABLE_ARRAYS macro to indicate whether it is safe to define an array the size of which is set at runtime. Use this in many places if it is, falling back to C_NEW() and C_FREE() otherwise. Fix a bug which prevented the "use racial/other powers" command from working (thanks to James Gordon for pointing it out). Fix a bug which caused objects to be incorrectly described as being bad for spellcasting/mindcraft. Fix a bug whereby objects were incorrectly marked as encumbering spells/mindcraft in identify_fully_aux(). Always display the last message before leaving the level. Change k_ptr->d_char for flavoured items to ' ', so that they always use the flavour version of everything. Comment out unused features to prevent them from appearing in the preferences. Turn a couple of the long sections in play_game() into separate functions. Move the exit point in generate_cave() to the end of the loop. Also move the "give up on autoscum" check to the end of the generation loop, and move a few more things outside the loop. Fix a bug whereby items which affect strength didn't indicate an effect on how many blows the player had. Restore the commented sections of makefile.org I'd deleted. Make "make -f makefile.org clean" ignore any missing files. Add a (possibly working) makefile.cyg. Replace main.c and main-gcu.c with Angband 3.0.0 versions. Make the command line option loop a little clearer. Replace various main-*.c files with Angband 3.0.0 versions (untested). Use rtoa for everything in birth_choice(), so that the race choice is A-Z,0-3 everywhere. Remove all temporary buffers except "silly_name" from monster_desc(). Fix a potentially fatal bug whereby the size of the object_desc() buffer wasn't fixed, and so the attempt to trim it to a length of ONAME_MAX could affect an arbitrary piece of memory. Replace the format() calls in object_desc() with a couple of local strings. Make object_desc() use a lower case "t" in "the". Fix a missing break; statement that caused a bug when the autosave options were used. Make the input to quark_str() unsigned, as its input (almost?) invariably is. Optimise the "find useful ammunition" loop a bit. Remove the (now unused) strfmt function. Fix a mysterious bug whereby the boundary walls couldn't be targetted. Force the number of an entry in visual preferences to take up as much space as the last valid number. Reduce the number of macros and the amount of special case code from the visual preferences. Fix several other bugs and clean up various pieces of code. sCthangband 1.0.2 changes: Call debug commands from process_command(). Provide context-sensitive help for debug commands. Fix a bug whereby the races represented by numbers could not be selected, and the range given didn't match the displayed range. Change numerous arrays which had a size determined at run-time because of z_info into dynamic ones, or ones which have a constant size. sCthangband 1.0.1 changes: Remove the level feelings delay (although the original behaviour exists as an option), as it can make the difference between being given a level feeling before you clear a level and getting one afterwards. Separate the magic device skill from the pseudoid one. The latter is now trained by pseudo-identifying items as something other than average, and randomly gives strong and weak pseudo-id at skill levels between 20 and 60. In addition, pseudo-id frequency increases with every point of skill gained rather than every other one. Create a "hit" command which does nothing else. Make actions which took either 50 or 100 energy take either half as much or as much as walking a step so that rods can be somewhat useful later on. Increase the energy per turn from 100 to 1000, thereby decreasing the number of blows per turn a player with 8 blows per turn has from 8 1/3 to exactly 8. Rename mages as wizards, as I've read stories involving wizards... Make the quit command messages a bit more in-theme. Compare the stat effects of an item with those of the currently equipped item in the same slot when examined with 'I'. Use the a_info and e_info prices for objects even if they have some random abilities. Add documentation for commands, options and some prompts. Create a window flag to show help on a command, option or prompt. Create a z_info.txt file to set the maximum number of objects and monsters, the maximum lengths of their names, the maximum sizes of the other arrays derived from files in lib/edit and the length of the autoroller delay at runtime. Reset all keymaps with C:---reset---. Only give stat/ability bonuses in the names of objects if there is exactly one. Only use the randart valuation mechanism for calculating the value of the random features of an item which has random flags rather than all of them. Saved stats are now used as the defaults for the autoroller. Display maximum and current chi total in the character screen, make the other displays more compact. Use the average discount when piles are combined. Make the knowledge screens a bit more colourful, with a picture for each entry and a darker colour for dead uniques. As this uses the show_file function copied from ToME, it shares the bug whereby a monster represented by ] cannot have its true colour. Create an auto_more option to cause --more-- prompts to be cleared immediately. Create a macro_edit option to allow the use of number keys to edit strings to be turned on or off with a keypress. If this is on, TAB causes the prompt to switch between edit mode and insert mode. If it is off, numbers entered via macros are counted as edit commands, and ones entered directly as numbers to be inserted. Remove bypass_prompt (off), and allow "p\n" to select the default spirit. Remove disturb_other (off), as the inscription equivalent is easy to use. Remove hp_alert (on), as setting the level to 0% works as well. Update z-virt.c and mai*-x11.c to 3.0.0 version. I haven't changed the others as I haven't tried to get big screen to work with the main map yet. Unset cheat_item at birth. Make inscribe_depth apply to every object which is created if set. Create a "dimension door" function to handle every attempt to do this. Make identify_fully_aux() use a single array containing both the info[] and info_a[] fields. Use an empty element to indicate the end of the used array. Remove the redundant f? variables. Rearrange init?.c to be more like Angband 3.0.0, except that there is only one local header which is wiped after each file is parsed, the pointer used in most of the parsing functions is passed through init_info_txt() rather than being declared static, and the fake arrays (including a fake info array provided to allow the size of the info array to be determined as it is parsed) remain for most of initialisation. The game ignores the last few elements of m_list[], k_info[], etc., in a save file rather than refusing to load it. It prints a message as it does so so that the player can abort if removing an item was a mistake. Remove the redundant object_absorb_2() function. Use a function to determine the keymap in use, and one to determine which keymap to use rather than looking them up in the code. Turn makefile.org into the makefile I normally use. Make the overhead map use as much of the current term as is possible. Make mystic_armour_aux and ma_heavy_armor() local to calc_bonuses(). Replace tmpnam() with mkstemp() where available. Tidy up the printing of inscriptions on an object a bit, only briefly using the format buffer for temporary storage rather than creating several large strings which are usually unused. Remove the call to snprintf() from it. Make monster_desc() respect MNAME_MAX. Rename o_ptr as o1_ptr in object_desc(), in preparation for moving most of the attempts to examine the object to an object generated from it by object_info_known(). I haven't started to do so yet, however. Unsetting flow_by_sound disables flow_by_smell. Place option_force[] in tables.c instead of cmd4.c. Make ? give help on a selected option (in a hackish way - I intend to make this sort of thing work by changing the current window display). Move cheat options into option_info to unify the handling functions. Remove a few potentially harmful user-initiated buffer overruns. Create a rand_range_test() function to decide where a constant was in relation to a random range. Give an informative message when a pref file loads/doesn't load. Put most of load_all_pref_files() in user.prf, and make this safe to do before rp_ptr and cp_ptr have been initialised. Objects now lose the IDENT_SENSE_POWER flag as they become better identified, and *identified* items cannot be called "powerful". Make quark_str(0) return "", as this is often a good thing. Make item_activation() return an error message rather than a null pointer if no activation is found, remove the attempts to use this function as a guide to whether an object has an activation as identify_fully_aux() attempts to read any null pointer it gets. I don't know how an object got a null activation at present. Prevent black reavers from disturbing the player simply by moving if disturb_move is unset. This was particularly odd as this disturbance doesn't occur once the reaver does come into view. Respect SF_SKILL_BASE on saving as well as loading. Provide a SF_SAVE_MAXSKILL flag to determine whether the total number of skills should be saved. Note that the last skill is forgotten if this decreases. Make the help for show_details accurate. Remove HIDE_TYPES from some objects and ego items, and all artefacts. Put the inner workings of display_player_skills() in a separate function for clarity. Create separate functions to calculate the energy taken by mindcraft and shamanism. Remove the do_cmd_stay() call from do_cmd_invoke(). Separate the handling of spoil_stat from identify_fully_get(). Make it read a few more values from update_stuff() rather than trying to calculate them itself. Stop spoil_value from giving the real value of an object which has not been *identified* yet. Fix the "hidden message" problem from being introduced to a spirit. Fix a bug whereby the first object in a shop's inventory was not checked for stacking with an object the player was trying to sell. Change the description of classes of monster to account for the changes in what symbol is used for each monster. Change Term_save() so that several images can be saved from a term at once. This does mean that failing to load a term, or loading it twice, can cause problems. The return code from Term_load() is not handled, although the program should do something if the window has changed size since it was saved. Fix a bug whereby identified katanas were still called "Samurai Swords". I hadn't realised how simple it was... Provide a ^U (^Z with roguelike keyset) function which carries out the unified object action whether or not unify_commands is set. Change the "Enter shop" key to ^E so that it can have a macro assigned to it without disruption. Remove the time/date display from do_cmd_version(). As they were based on a macro, rebuilding this file every time was becoming annoying, and not rebuilding it made it inaccurate. Stop window_stuff() from being called in the middle of a macro. ... Changes between Cthangband 4.1.0 and sCthangband 1.0.1 will be added in due course. ... Cthangband 4.1.0 (the first under the maintainership of David Thornley) * Any character starting with Shaman skill gets one free spirit bound. * Any character with hermetic magic skills will get one free spellbook to start. * Pets will not be targetted by the "*" key. * There are new base skill levels, essentially the level learnable at 0', and these are subtracted from the skill learnable at the current dungeon level; for example, it is possible to raise Toughness above 3% at 50'. * Raising Martial Arts skill now does not depend soley on Close Combat skill. * Certain changes have been made to allow the roguelike keyset to work better. * Characters with sufficiently high missile skill get extra shots, depending on weapon type. The most shots are available with a bow, next a sling, next a crossbow. * There is now a visual cue, in the "depth" area, as to whether you are in a dungeon or tower. * Corrected bug whereby characters with Mindcrafting of 80% or better did not get ESP. * A character trying to cast a cantrip from a charm unsuccessfully may get no effect, rather than destruction of the charm, at very low skill levels. * Additional documentation has been added. Most of the differences between Vanilla Angband and Cthangband are now in the "Help" files. (Thanks to Kieron Dunbar for the following ideas, and, sometimes, code.) * The display has been changed to show spirits and how annoyed they are. * *Identified* weapons show what skill they need. * The restriction on a 6% failure rate to learn magical skills has been replaced by a restriction that character skill must be no more than 50% greater than the minimum skill for that spell, mindcrafting power, cantrip, or spirit favor. * Minimum annoyance for spirit favors has been raised to 2, so a spirit will not immediately become placated for the next turn. Cthangband 4.0.1 * Wizard Mode moved to 'Cheat Options' page. * 'graf-new' flag removed since we only have Adam Bolt tiles these days. * Paths are now lit like floors. * Startup options have their own option page, to reduce the number of questions the player is asked when creating a new character. * Dungeons (but not towers) display offset depth, rather than true depth. * Player ghosts now use graphics if possible. * 'Dungeons' may now be towers (tiny levels heading upwards) as well as caves (larger levels heading downwards). * 5 new dungeons added. * Dungeons now have a 'bias' towards a certain type of creature. * Charm destruction and identify staff bugs fixed (thanks to Greg Wooledge). * Bug in spell energy calculation fixed. * Skills can only be improved if you are not bored (i.e. there is a minimum depth requirement based on your current skill value.) * Hedge magic is now easier to learn. * Skills are now slightly randomised on character generation. * Fixed bug with 100% Toughness reducing your hitpoints. * Spirits now have elvish/hobbitish names, rather than Cthuloid. * Character dump now dumps last 10 messages (so you can see how stupidly you died). * Problem with 'missing' options fixed. * 'Wizard Mode' flag is cleared with cheat flags on character creation. * Extra cheat option - 'cheat_skll' to view skill checks. * Toughness is only increased when you lose more than 1/20th of your current hit points in a single hit. * Magic skills only improve if there was a 10% failure chance (or greater) for the spell/favour/power/cantrip. * No experience is gained on the surface, only in dungeons * Attacks only improve your attack skill (and/or martial arts) if you have less than 75% chance to hit. * Attacks with mutations (Horns, Tail etc.) give experience to your 'close combat' skill, not your weapon skill. Cthangband 4.0.0 * Windows version has updated menus and faster repaints and can now use monospaced system fonts as well as bitmap fonts. (From Tim Baker's version of Kamband.) * Player breath weapons (from dragon plate or mutations) and 'wands of dragon breath' now use cone shaped attacks. * Bug in 'unified commands' fixed so that objects on the floor no longer get prompted for twice. * Angels (and their uniques) have been removed and replaced with extra Cthuloid entities. * Implemented Drangband style player ghosts. * Corrected 'time of day' algorithm and added time display. * Added Eric Bock's code to combine similar messages in message recall. * Monster breaths are now cone shaped, rather than ball shaped (from Zangband) * Speed system cleaned up (a lot) with regard to spellcasting. * 'help.hlp' is now system specific ('help-dos.hlp' etc.) so that it can point to a different set of files for the different interfaces and systems. * Windows version asks for a savefile name when starting a new file, rather than automatically naming it after the character that is generated. * 'New Game' and 'Load Game' on Windows interface changed to 'New Savefile' and 'Load Savefile' as some people were confused and thought that they needed to use the 'New Game' command after they had died. * 'Help' menu on Windows interface updated. * Hedge magic added as a third type of magic. * Shamanism added as a second type of magic. * Mindcrafting no longer uses 'Mana' but uses 'Chi' instead. * Levels and classes removed and replaced with a skill system. * Missing directories are re-created on Windows version. * Added Zangband's view centring code. * Reorganised and cleaned up 'options'. * Added (and modified) ???'s point based stat generation code. Cthangband 3.1.2 * Fixed bug with Corporeal Books not stacking properly. * Most object commands (e.g. 'q'uaff, 'z'ap, 'E'at, 'b'rowse, etc.) have been unified into a single 'u'se command that will do whatever is most appropriate for the item * Added 6 'Pouch' equipment slots that can each hold a scroll, potion or wand. Items readied in a pouch only take 1/10th of the time to use that normal items do. * Message about 'Library' when trying to gain spells changed to 'Bookstore' as it was confusing people. * Most (but not quite all) documentation files updated. * Stats over 18/100 are no longer displayed as 'silly' percentages. * Class 'sub-names' (used in documentation) are now used in game as well. * Vault code updated to properly handle large array of vaults. * Chopping down of trees and bushes is now included in 'repeat obvious commands'. * Characters who can't learn spells are no longer asked to study in the library. * Roads added between towns and forest made denser. * Chris Weisiger's 'v_info.txt' file updated to the new version. * Cleaned up lots of dead code in Load/Save routines. * Fixed bug in home which gave the wrong inventory after resting for the night. Cthangband 3.1.1 * Chaos Patrons now have more descriptive names on the 'C'haracter display, and have been changed from the 'Warhammer' Chaos Gods to the 'Glorantha' Chaos Gods. * Adam Bolt's Graphics for bolt and ball spells are now used. * Eric Bock's bias remover for the RNG added. * Chris Weisiger's new 'v_info.txt' file used. * 'Mutations' renamed 'Chaos Features' to make them more in-genre. * 'Wizard Help' command ('A','?' in Wizard Mode) added to list wizard commands. * 'Debug' mode and 'Wizard' mode combined to make things simpler. Wizard commands are now accessed through 'A' in wizard mode. * Hack added to 'fix' savefiles saved from versions with guardian bug by resurrecting dead uniques so that they can re-used as guardians. * Guardians now drop their normal treasure as well as extra guardian treasure. * Last vestiges of hangs from invalid guardian placement now removed (hopefully...) * Uniques that appear as guardians now have their escorts with them. * The Inn will now sell scrolls of "Satisfy Hunger". * Examining store books now tells you what's in them. * Wilderness now uses the same lighting model as the town. * Secret doors may now be locked or jammed once found. * Huge code clean-up should make porting easier. * Wilderness map is now coloured. * 3x and 2x experience for first kills downgraded to 2x and 1.5x. * Chaos-Mage class added. * Windows version no longer looks for the unused '8x8.bmp' file. * Druid class added (a specialist nature priest). * Removed sound/midi options from main options menu as they did nothing anyway. * Fixed bug in 'Mutate Body' spell so it no longer always gives the same mutation. Cthangband 3.1.0 * Priests and Rangers no longer get Sorcery as it is to 'magey' for them. * Water now behaves properly (you can see over it and cast spells over it). * Occasional crashes when moving diagonally off edge of wilderness grids fixed. * The 'Monk' class has become the 'Mystic' class, and is now based on corporeal magic. * A new realm ('Corporeal') has been added. All the spells are self- affecting. It has a reasonably large overlap with Life (for the healing spells) and Planar (for the movement spells). It has sensing spells *very* early. * Characters will no longer start in the town of Nir. * The 'M' key displays a proper wilderness map with town and dungeon locations. * Allies (formerly called 'Pets') can move from level to level with the player. * Characters are now given randomly generated names when created. * Vampires no longer start on the stairs (no longer necessary now they start at night). * Experience for creatures now varies depending on how many you have killed. * Ironman option added. * Long Stairs is now a standard option, rather than a character generation option. * New speed system implemented. * Shops now have a unique set of owners each, rather than a selection per shop type. * Dungeon name printed with level feeling. * Quest info moved from 'Q' to 'F' with level feeling. * Option for always having small levels added. * Fixed bug in home that turned it into an inn after resting for the night. * Breeder dying code removed (but generation limit left in). Cthangband 3.0.1 * Keys 'O' and ''' mapped to racial power and time respectively in Rogue- like mode. * Robert Ruehlman's 'Equippy Chars' code added. * Monsters can now cross bush tiles. * Jeff Duprey's extra 52 mutations added. * Keldon Jones' patch to automatically update '.raw' files added. * Trees, bushes and water now handle tunneling correctly. * 'Quick Start' option generates an entire character with a single keypress. * Windows version can cope without its '.ini' file. * Robert Reuhlman's improved pet AI added. * Preserve mode now preserves artifacts left in dungeon when Ritual goes off. * Changing the character name no longer creates a new savefile. * Menu structure for Windows version rearranged. * Source code fixed to make Windows version compile properly and use Adam Bolt graphics. * It is now possible to rest for the night (or day) at your home. * Undead races now start the game at night. * Dungeon names displayed on wilderness grids to make dungeons easier to find. * Bug in display code preventing unidentified potions/scrolls being shown properly in text mode fixed. Cthangband 3.0.0 * Finding secret doors earns 1xp, like picking locks. * Wilderness areas with dungeons have tougher monsters to make it easier to find the dungeon entrances. * 15 different dungeons added, each with their own Guardians. * Wilderness levels added. * Extra functions added to most shops. * Pawnbroker, Inn and Hall of Records added to town. * QUESTOR and FORCE_LEVEL flags for monsters replaced with GUARDIAN and ALWAYS_GUARDIAN as part of clean-up of quest code. * Many more cosmetic changes to artifact names and most text files to keep them in genre. * Breeders can now only breed to 10 generations. * Breeders can no longer be Quest monsters. * Tim Baker's Easy-Angband code added. * Robert Reuhlman's quest generation algorithm used to tone down the level of quest monsters. * Fixed 'Infinite Paralysis' problem with floating eyes - They will now do at least 1pt of damage with each hit. * Store Owners' Purses have been altered (generally but not always an increase). * DOS version now has Adam Bolt graphics for different race/classes of the player. * Bug in Pattern Vault fixed - it now cannot teleport you below a quest level. * Breeders now have 1 in 5 chance of dying off instead of reproducing, so they don't get out of hand quite so much. * Level feelings are now only given after 2500 turns (about 250 moves) instead of immediately on entering a level, but there is no longer a prerequisite of staying on the previous level for a period of time. * Hit-Point rolls changed to give fixed totals at 50th level, making 'Life Rating' redundant. Cthangband 2.1.0 (12/7/98) * Huge amounts of cosmetic changes to remove Zelazny stuff and replace it with Lovecraftian. * Warrior-Mages can now choose Sorcery. * Monster-Health bar now gives status of monster as text. * Heino Vander Sanden's quest code ported from Quangband with minor changes. * Out of genre 'Rockets' replaced with 'Shard balls'. * Most 'silly' monsters removed or replaced. * Multi-stair option for quick level ascending/descending. * 'How many?' question for multiple objects now defaults to all rather than 1 (except for buying things). * Adam Bolt's graphics used for DOS version. * Lots of redundant code removed.