clean_ruleset() add_atp_ruleset [[ # $Id: tome-automat.atm 671 2011-07-08 01:31:26Z dsb $ # Example ATP automatizer rules file for use with the Autoparse project # (). To use this # file, you will need either Autoparse's replacement 'auto.lua' file or the # 'autoparse.pl' conversion script, both available at the above # link. # Changes: # # 2011-07-07: # Tweak the preceding to include Demonshields. # # 2011-07-06: # Destroy {good} shields if we're not wielding a shield but are wielding # a two-handed weapon and pushing the correspond weapon sub-mastery # skill. # # 2011-06-19: # If Demonology skill is nonzero, destroy {good} swords if we're wielding # a {good} Demonblade, {good} helms if we're wearing a {good} Demonhorn, # and {good} shields if we're wearing a {good} Demonshield. # # 2011-06-11: # Destroy corpses if something in our inventory or equipment is inscribed # with 'AO:corpse', even if we have a skill that would otherwise prevent # it. [This supercedes the Antimagic hack from 2004-04-09 below.] # # 2008-12-14: # If Demonology skill is zero, include Demonshields and Demonhorns in the # {good} armor types to be destroyed when Dodging or Bearform-combat # skill is sufficiently high. # # 2008-08-02: # - Destroy {average} ammo if we're wielding an instrument. # - Destroy non-{cursed} Amulets and Rings of Searching and Infravision # if Alchemy skill is zero. # - Destroy Rings of Woe as junk. # # 2008-05-04: # Destroy {good} gloves, boots and shields if Bearform-combat is 30 or # higher, on the premise that we'll be in bear form most of the time and # can't wield them. # # 2008-01-24: # - Destroy {good} weapons if they don't match our Weaponmastery sub- # mastery and we're wielding a {good} weapon that does. # - Inscribe Scrolls of Identify. # # 2007-09-30: # Don't destroy Wands or Staffs of Haste or Heal Monster if Monster-lore # skill is 12 or higher (since they're useful on companions). # # 2007-01-26: # Tweaked the "bad pseudo-ID" rule, removing some rings and amulets that # can't pseudo-id bad and adding some that can. # # 2007-01-25: # - Destroy {good} armor if Dodging skill is 30 or higher. # - Destroy {good} ammo if we're wielding an {excellent} or better # boomerang. # # 2007-01-24: # Fix the 'destroy {good} weapons if we're wielding an {excellent} # weapon' rule to include {excellent} wielded Demonblades. # # 2007-01-01: # - "Wrap" in Lua infrastructure so that the file can be used directly by # the game as an automatizer file, via the replacement 'auto.lua' file # mentioned above. # - The 'tome-autoinv' patch mentioned below is no longer necessary if # you're using the replacement 'auto.lua' file. # # 2006-06-01: # Catch both spellings of Scroll of Curse Arm{or,our}. # # 2006-05-27: # Much changelog information lost to inadvertent file clobber! The rules # themselves, fortunately, could be reconstructed from automat.atm. # Summary of changes: # - Destroy {good} weapons if we're wielding better, or if we're using # Barehand-combat or Bearform combat. # - Destroy {good} launchers and boomerangs if we're wielding better, # or if we have skill for something else, or if we're using Music. # - Destroy {good} ammo that doesn't match our wielded launcher. # - Destroy sticks if we have Antimagic skill. # - Don't destroy {average} or {good} demongear if Demonology skill is # nonzero. # Many of these new rules require the 'tome-autoinv' patch mentioned # below. # # 2005-06-04: # The exception for Filthy Rags when Artifact Creation is present was in # the wrong rule. Now fixed. # # 2005-04-21: # Auto-pickup boulders inscribed with '=g' if Boulder-throwing skill is # nonzero. # # 2005-04-12: # Don't destroy boulders if Boulder-throwing skill is nonzero (without # this, they're destroyed as TV_JUNK under the "ammo fodder" rule). # # 2005-04-07: # Don't destroy {average} gloves if Alchemy skill is nonzero. # # 2005-02-27: # Scrolls of Summon Monster are apparently renamed to Scrolls of Summon # Monsters in 2.3.x; we retain both names for maximum applicabilty. # # 2004-12-05: # Don't destroy Scrolls of Trap/Door Destruction if Antimagic skill is # non-zero (can't use Rods of Disarming) and less than 35 (don't have # Antimagic destroy-traps power yet). # # 2004-09-05: # Use the new 'module' command to place rules in module "all" (ie. the # default ToME module and any other module). # # 2004-05-09: # Tweaks to the inscribing rules: # - Inscribe Brass Lanterns longer than the first clvl # - Inscribe Phase Door and Satisfy Hunger scrolls. # # 2004-04-09: # Require no Antimagic skill together with Summoning skill to refrain # from destroying corpses. [Yes, it is possible to get Summoning from # Fumblefingers when you have Antimagic skill; my Unbeliever can't auto- # destroy corpses without this exception.] # # 2004-04-08: # Added rule to destroy bottles unless we're carrying some. Requires the # 'tome-autoinv' patch, available at # # # 2004-03-16: # Don't destroy {average} Dark Swords if Antimagic skill is nonzero. # # 2004-01-28: # - Change all Alchemy >= 25 conditions to Artifact Creation. # - Don't destroy average diggers except for shovels and picks (and don't # destroy picks if we have Artifact Creation). # # 2003-12-22: # Inscribe instrument with !d!k!v!s for Bards. # # 2003-10-23: # - Tweaks to the inscribing rules: # + Inscribe WoR scrolls and oil longer than the first clvl. # + Inscribe all runes with !d!k!v!s for Runecrafters. # - Destroy a few more parchments. # # 2003-09-27: # Require the Artifact Creation ability rather than Alchemy skill >= 25 # to refrain from destroying corpses. # # 2003-09-14: # Add preliminary inscribing rules. # # 2003-08-23: # Don't destroy {average} Mimicry cloaks if we have Mimicry skill. # # 2003-08-18: # - Auto-pickup relics from the relic quests. # - Don't destroy Scrolls or Staffs of Darkness if we're a Vampire. # # 2003-06-17: # - The 'inscribed' clause is in the official release as of ToME 2.2.0; # modified comments accordingly. [More specifically, the patch # mentioned below is no longer required, as it is included in the 2.2.0 # release]. # - Added Geomancers to the list of classes that shouldn't destroy # {average} Mage Staffs. # # 2003-06-07: # Changed the "pick up ammo" rule to key off inscription. Requires the # 'tome-autoinsc' patch, available at # # # 2003-06-04: # - Adjust the rules for destroying certain {average} items: # + Destroy ammo if Archery skill is zero (presumably we're not using # ammo at all) or 30 or higher (by which time we should have an ample # supply of enchanted ammo). # + Destroy Mage Staffs unless we're of a spellcasting class (we select # by class here rather than skill on the assumption that, for # instance, a Swordmaster that took a few points of Runecraft or # Conveyance from Mr. F. Fingers isn't going to be interested in Mage # Staffs). # - Necromancy doesn't use corpses until level 5. # # 2003-02-23: # - Don't destroy some bad-pseudo-ID things if Alchemists can use them. # - Corpse-preservation skill alone is not a reason to refrain from # destroying corpses. # - Catch a few more of the silly or useless parchments. module "all"; # Destroy stuff that pseudo-ID's bad (except for some stuff that Alchemists # might be able to use anyway). rule "bad pseudo-ID" destroy if (tval = TV_ARROW, TV_SHOT, TV_BOLT, TV_DAEMON_BOOK, TV_BOOMERANG, TV_TRAPKIT, TV_CLOAK, TV_SWORD, TV_AXE, TV_HAFTED, TV_POLEARM, TV_BOW, TV_DIGGING, TV_BOOTS, TV_GLOVES, TV_CROWN, TV_HELM, TV_SHIELD, TV_HARD_ARMOR, TV_MSTAFF or (tval = TV_SOFT_ARMOR and not (ability = "Artifact Creation" and name = "Filthy Rag")) or (not ability = "Artifact Creation" and name = "Amulet of Wisdom", "Ring of Extra Attacks", "Ring of Acid", "Ring of Lightning", "Ring of Speed", "Ring of Strength", "Ring of Intelligence", "Ring of Dexterity", "Ring of Constitution") or name = "Amulet of Infravision", "Amulet of Charisma", "Amulet of Searching", "Amulet of Brilliance", "Amulet of Devotion", "Amulet of Weaponmastery", "Amulet of Trickery", "Amulet of the Serpents", "Ring of Ice", "Ring of Flames", "Ring of Protection", "Ring of Searching", "Ring of Slaying", "Ring of Damage", "Ring of Accuracy" ) and status = "terrible", "very bad", "bad"; # Destroy some stuff that pseudo-ID's average, starting at level 12, except # for things that have special utility in certain cases: Mage Staffs for # spellcasters, Mimicry cloaks for Mimics, Dark Swords for Unbelievers, # demongear for Demonologists, gloves for Alchemists, plus material # components for adding various flags to Alchemy-created artifacts. rule "avg pseudo-ID" destroy if ((tval = TV_ARROW, TV_SHOT, TV_BOLT and not skill "Archery" = 1-29) or (tval = TV_MSTAFF and not class = Mage, Sorceror, Elementalist, Warper, Runecrafter, Thaumaturgist, Geomancer ) or (tval = TV_CLOAK and not ((sval = 100 or contain = "Cloak of Mimicry") and skill "Mimicry" = 1-50) ) or (tval = TV_SWORD and not (name = "Dark Sword" and skill "Antimagic" = 1-50) and not (name = "Blade of Chaos" and ability = "Artifact Creation") ) or (tval = TV_DIGGING and (name = "Shovel" or (name = "Pick" and not ability = "Artifact Creation")) ) or (tval = TV_DAEMON_BOOK and not skill "Demonology" = 1-50) or (tval = TV_BOOMERANG, TV_TRAPKIT, TV_AXE, TV_HAFTED, TV_POLEARM, TV_BOW, TV_BOOTS, TV_CROWN, TV_HELM, TV_SHIELD, TV_SOFT_ARMOR, TV_HARD_ARMOR and not (ability = "Artifact Creation" and name = "Filthy Rag", "Whip", "Large Metal Shield", "Pair of Soft Leather Boots" ) ) or (tval = TV_GLOVES and not (name = "Set of Leather Gloves" and skill "Alchemy" = 1-50) ) ) and status = "average" and level = 12-50; # Destroy {good} weapons and Mage Staffs if we're wielding an identified # weapon or Mage Staff that's {excellent} or better (or {good} if it # matches our Weaponmastery submastery and the weapon to be destroyed # doesn't), or if Barehand-combat or Bearform-combat skill is 30 or higher. # Exceptions: don't destroy {good} demongear if Demonology skill is # nonzero. rule "good weapons" destroy if (tval = TV_SWORD, TV_AXE, TV_HAFTED, TV_POLEARM, TV_MSTAFF or (tval = TV_DAEMON_BOOK and sval = SV_DEMONBLADE and not skill "Demonology" = 1-50)) and status = "good" and (state = identified or skill "Combat" = 11-50) and (equipment ((tval = TV_SWORD, TV_AXE, TV_HAFTED, TV_POLEARM, TV_MSTAFF or (tval = TV_DAEMON_BOOK and sval = SV_DEMONBLADE)) and state = identified and status = "very good", "special") or (skill "Sword-mastery" = 1-50 and not (tval = TV_SWORD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONBLADE)) and equipment ((tval = TV_SWORD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONBLADE)) and status = "good")) or (skill "Demonology" = 1-50 and tval = TV_SWORD and equipment (tval = TV_DAEMON_BOOK and sval = SV_DEMONBLADE and status = "good")) or (skill "Axe-mastery" = 1-50 and not tval = TV_AXE and equipment (tval = TV_AXE and status = "good")) or (skill "Hafted-mastery" = 1-50 and not tval = TV_HAFTED and equipment (tval = TV_HAFTED and status = "good")) or (skill "Polearm-mastery" = 1-50 and not tval = TV_POLEARM and equipment (tval = TV_POLEARM and status = "good")) or skill "Barehand-combat" = 30-50 or skill "Bearform-combat" = 30-50); # Destroy {good} armor if we're wielding identified {excellent} or better # armor in the same slot, or if Dodging skill is 30 or higher, or if # Bearform-cobat skill is 30 or higher and the armor is of a type that # can't be worn while in bear form. Exceptions: don't destroy {good} # demongear if Demonology skill is nonzero; treat Elven Cloaks, Shadow # Cloaks and Dragon Scale Mail as excellent for the purpose of this rule. rule "good armor" destroy if status = "good" and (state = identified or skill "Combat" = 11-50) and ((tval = TV_BOOTS and equipment (tval = TV_BOOTS and state = identified and status = "very good", "special") ) or (tval = TV_GLOVES and equipment (tval = TV_GLOVES and state = identified and status = "very good", "special") ) or ((tval = TV_HELM, TV_CROWN or (tval = TV_DAEMON_BOOK and sval = SV_DEMONHORN and not skill "Demonology" = 1-50)) and equipment ((tval = TV_HELM, TV_CROWN or (tval = TV_DAEMON_BOOK and sval = SV_DEMONHORN)) and state = identified and status = "very good", "special") ) or (tval = TV_HELM, TV_CROWN and skill "Demonology" = 1-50 and equipment (tval = TV_DAEMON_BOOK and sval = SV_DEMONHORN and status = "good")) or ((tval = TV_SHIELD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD and not skill "Demonology" = 1-50)) and equipment ((tval = TV_SHIELD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD)) and state = identified and status = "very good", "special") ) or (tval = TV_SHIELD and skill "Demonology" = 1-50 and equipment (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD and status = "good")) or (tval = TV_CLOAK and not name = "Elven Cloak", "Shadow Cloak" and not ((sval = 100 or contain = "Cloak of Mimicry") and skill "Mimicry" = 1-50) and equipment (tval = TV_CLOAK and state = identified and (status = "very good", "special" or name = "Elven Cloak", "Shadow Cloak")) ) or (tval = TV_SOFT_ARMOR, TV_HARD_ARMOR and equipment ((tval = TV_SOFT_ARMOR, TV_HARD_ARMOR and state = identified and status = "very good", "special") or tval = TV_DRAG_ARMOR) ) or ((tval = TV_BOOTS, TV_GLOVES, TV_HELM, TV_CROWN, TV_SHIELD, TV_CLOAK, TV_SOFT_ARMOR, TV_HARD_ARMOR or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD-SV_DEMONHORN and not skill "Demonology" = 1-50)) and skill "Dodging" = 30-50 ) or ((tval = TV_BOOTS, TV_GLOVES, TV_SHIELD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD and not skill "Demonology" = 1-50)) and skill "Bearform-combat" = 30-50 ) ); # Destroy {good} shields if we're not wearing a shield but we're wielding a # two-handed or one/two-handed weapon with a corresponding {wpntype}-mastery # skill of 25 or above, on the theory that we're eschewing shields to get # maximum damage from our weapon. We don't do this for Mage Staffs, since # (a) there is no corresponding -mastery skill for it and (b) most wielders # of a Mage Staff aren't hitting anything with it anyway. rule "shld vs 2H weap" destroy if (tval = TV_SHIELD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD)) and not equipment (tval = TV_SHIELD or (tval = TV_DAEMON_BOOK and sval = SV_DEMONSHIELD)) and status = "good" and (state = identified or skill "Combat" = 11-50) and ((skill "Sword-mastery" = 25-50 and equipment (tval = TV_SWORD and contain = "Bastard Sword", "Two-Handed Sword", "Executioner's Sword", "Katana", "Zweihander", "Claymore", "Espadon", "Great Scimitar" ) ) or (skill "Hafted-mastery" = 25-50 and equipment (tval = TV_HAFTED and contain = "Ball-and-Chain", "Flail", "Fauchard", "Two-Handed Flail", "Mace", "Guisarme", "Quarterstaff", "War Hammer", "Lead-Filled-Mace", "Heavy Lance", "Mace of Disruption", "Lucerne Hammer", "Mighty Hammer" ) ) or (skill "Polearm-mastery" = 25-50 and equipment (tval = TV_POLEARM and contain = "Beaked Axe", "Glaive", "Halberd", "Awl-Pike", "Pike", "Trident", "Lance", "Lochaber Axe", "Battle Axe", "Scythe", "Scythe of Slicing", "Flamberge" ) ) or (skill "Axe-mastery" = 25-50 and equipment (tval = TV_AXE and contain = "Great Axe", "Broad Axe", "Hatchet" ) ) ); # Destroy {average} or {good} ammo if we're wielding a launcher for a # different type of ammo, an {excellent} or better boomerang, or an # instrument, at the same level at which we start destroying {average} # stuff in general. rule "off-type ammo" destroy if ((tval = TV_ARROW and equipment (tval = TV_BOW and sval = SV_SLING, SV_LIGHT_XBOW-SV_HEAVY_XBOW) ) or (tval = TV_SHOT and equipment (tval = TV_BOW and sval = SV_SHORT_BOW-SV_HEAVY_XBOW) ) or (tval = TV_BOLT and equipment (tval = TV_BOW and sval = SV_SLING-SV_LONG_BOW) ) or (tval = TV_ARROW, TV_SHOT, TV_BOLT and equipment (tval = TV_INSTRUMENT or (tval = TV_BOOMERANG and state = identified and status = "very good", "special")) ) ) and (status = "average" or (status = "good" and (skill "Combat" = 11-50 or state = identified)) ) and level = 12-50; # Destroy {good} launchers if we're wielding an identified {excellent} or # better launcher of the same type; destroy {good} boomerangs if we're # wielding an identified {excellent} or better boomerang or launcher of any # type. rule "good launchers" destroy if status = "good" and (state = identified or skill "Combat" = 11-50) and ((tval = TV_BOW and ((sval = SV_SLING and equipment (tval = TV_BOW and sval = SV_SLING and state = identified and status = "very good", "special") ) or (sval = SV_SHORT_BOW-SV_LONG_BOW and equipment (tval = TV_BOW and sval = SV_SHORT_BOW-SV_LONG_BOW and state = identified and status = "very good", "special") ) or (sval = SV_LIGHT_XBOW-SV_HEAVY_XBOW and equipment (tval = TV_BOW and sval = SV_LIGHT_XBOW-SV_HEAVY_XBOW and state = identified and status = "very good", "special") ) ) ) or (tval = TV_BOOMERANG and equipment (tval = TV_BOW, TV_BOOMERANG and state = identified and status = "very good", "special")) ); # Destroy {good} launchers if we have skill for another type of launcher or # for boomerangs; destroy {good} boomerangs if we have skill for any type # of launcher. rule "off-type launcher" destroy if ((tval = TV_BOW and ((skill "Sling-mastery" = 1-50 and sval = SV_SHORT_BOW-SV_HEAVY_XBOW) or (skill "Bow-mastery" = 1-50 and sval = SV_SLING, SV_LIGHT_XBOW-SV_HEAVY_XBOW) or (skill "Crossbow-mastery" = 1-50 and sval = SV_SLING-SV_LONG_BOW) or skill "Boomerang-mastery" = 1-50) ) or (tval = TV_BOOMERANG and (skill "Sling-mastery" = 1-50 or skill "Bow-mastery" = 1-50 or skill "Crossbow-mastery" = 1-50) ) ) and (state = identified or skill "Combat" = 11-50) and status = "good" and level = 12-50; # Destroy {good} launchers, ammo and boomerangs if Music skill is 25 or higher # and we're wielding an instrument. rule "non-musical stuff" destroy if tval = TV_BOW, TV_ARROW, TV_SHOT, TV_BOLT, TV_BOOMERANG and skill "Music" = 25-50 and equipment (tval = TV_INSTRUMENT) and (state = identified or skill "Combat" = 11-50) and status = "good"; # Destroy empty and ruined chests. rule "empty chests" destroy if tval = TV_CHEST and (status = "empty" or sval = 0); # Destroy corpses, unless we have a skill or ability that can use them. If # we do have an appropriate skill, destroy them anyway if anything in our # equipment or inventory is inscribed with a special tag. rule "corpses" destroy if tval = TV_CORPSE and (equipment (inscribed = "AO:corpse") or inventory (inscribed = "AO:corpse") or not (skill "Necromancy" = 5-50 or skill "Summoning" = 1-50 or skill "Possession" = 1-50 or ability = "Artifact Creation")); # Destroy runes if we're not a Runecrafter. rule "runes" destroy if tval = TV_RUNE1, TV_RUNE2 and not skill "Runecraft" = 1-50; # Destroy essences if we're not an Alchemist. rule "essences" destroy if tval = TV_BATERIE and not skill "Alchemy" = 1-50; # Destroy traps unless we have the Trapping ability. rule "traps" destroy if tval = TV_TRAPKIT and not ability = "Trapping"; # Destroy identified wands, staffs, rods and rod tips if Antimagic skill is # nonzero. We'd like to destroy them unidentified, but the automatizer # doesn't currently support that. rule "sticks" destroy if tval = TV_STAFF, TV_WAND, TV_ROD, TV_ROD_MAIN and state = identified, unidentified and skill "Antimagic" = 1-50; # Destroy empty bottles unless we're carrying some (presumably leeching # fountains) or we're an Alchemist. rule "bottles" destroy if name = "Empty Bottle" and not (skill "Alchemy" = 1-50 or inventory (name = "Empty Bottle")); # Some junk from which essences can be extracted, or to which essences can # be added, or which are otherwise of use to Alchemists; destroy them if # we're not an Alchemist. rule "alchemy fodder" destroy if not skill "Alchemy" = 1-50 and (((name = "Scroll of Darkness", "Staff of Darkness") and not subrace = "Vampire") or (name = "Scroll of Trap/Door Destruction" and not skill "Antimagic" = 1-34) or ((name = "Wand of Heal Monster", "Wand of Haste Monster", "Staff of Haste Monsters") and not skill "Monster-lore" = 12-50) or name = "Mushroom of Weakness", "Mushroom of Stupidity", "Mushroom of Naivety", "Mushroom of Sickness", "Mushroom of Blindness", "Mushroom of Paranoia", "Mushroom of Poison", "Mushroom of Confusion", "Mushroom of Unhealth", "Mushroom of Disease", "Mushroom of Paralysis", "Mushroom of Hallucination", "Mushroom of Disease", "Mushroom of Paralysis", "Amulet of Adornment", "Amulet of Teleportation", "Potion of Corruption", "Potion of Death", "Potion of Ruination", "Potion of Slime Mold Juice", "Potion of Water", "Potion of Blindness", "Potion of Sleep", "Potion of Booze", "Potion of Slowness", "Potion of Salt Water", "Potion of Clumsiness", "Potion of Apple Juice", "Potion of Abomination", "Potion of Weakness", "Potion of Lose Memories", "Potion of Sickliness", "Potion of Ugliness", "Potion of Stupidity", "Potion of Naivety", "Potion of Poison", "Potion of Infra-vision", "Potion of Invisibility", "Scroll of Rumour", "Scroll of Rumor", "Scroll of Treasure Detection", "Scroll of Object Detection", "Scroll of Blessing", "Scroll of Trap Creation", "Scroll of Holy Chant", "Scroll of Door/Stair Location", "Scroll of Monster Confusion", "Scroll of Trap Detection", "Scroll of Holy Prayer", "Scroll of Magic Mapping", "Ring of Stupidity", "Ring of Weakness", "Ring of Teleportation", "Ring of Searching", "Wand of Nothing", "Staff of Nothing", "Ring of Nothing", "Amulet of Searching", "Amulet of Infravision", "Amulet of Nothing", "Rod Tip of Nothing", "Scroll of Nothing", "Iron Spike"); # Some junk from which ammo can be made; destroy them unless we have the # ability to make ammo from them. rule "ammo fodder" destroy if tval = TV_JUNK, TV_SKELETON and not ((skill "Archery" = 10-50 and ability = "Ammo creation") or (tval = TV_JUNK and sval = 1 # SV_BOULDER and skill "Boulder-throwing" = 1-50)); # Absolute junk, of no use to any character at all. rule "junk" destroy if tval = TV_EGG or (tval = TV_PARCHEMENT and contain = "Monstrous Compendium", "Deep Thoughts", "The One Ring", "Artifact Lore") or name = "Scroll of Summon Monster", "Scroll of Summon Monsters", "Scroll of Summon Undead", "Scroll of Aggravate Monster", "Scroll of Curse Weapon", "Scroll of Curse Armour", "Scroll of Curse Armor", "Ring of Aggravate Monster", "Ring of Woe"; # Pick up ammo inscribed with '=g'. This requires ToME 2.2.0 or higher. rule "pick up ammo" pickup if (tval = TV_ARROW, TV_BOLT, TV_SHOT or (tval = TV_JUNK and sval = 1 # SV_BOULDER and skill "Boulder-throwing" = 1-50)) and inscribed = "=g"; # Pick up relics. Saves a step, and helps if the relic gets buried under a # pile of other objects. rule "pick up relic" pickup if contain = "Piece of the Relic of"; # Assorted inscription rules, to auto-inscribe various pieces of starting # equipment for new characters. Note that these will not trigger # automatically at the start of the game or when you purchase an item from # a store; you can trigger them manually by going to the 'm' menu and # immediately canceling out with . The exact inscriptions herein are # the author's preferences, of course, and should be adjusted to suit your # playing style. rule "inscribe oil" inscribe "@F1!d!k!v!s" if level = 1-10 and name = "Flask of oil"; rule "inscribe lantern" inscribe "@w9@t9!d!k!v!s" if level = 1-6 and name = "Brass Lantern"; rule "inscribe rations" inscribe "@E1!d!k!v!s" if level = 1-1 and name = "Ration of Food"; rule "inscribe WoR" inscribe "@r2!*" if level = 1-10 and name = "Scroll of Word of Recall"; rule "inscribe PhDr" inscribe "@r1!*" if level = 1-10 and name = "Scroll of Phase Door"; rule "inscribe SatH" inscribe "@r3!*" if level = 1-10 and name = "Scroll of Satisfy Hunger"; rule "inscribe ID" inscribe "@r9!d!k!v!s" if level = 1-10 and name = "Scroll of Identify"; rule "inscribe harp" inscribe "@w1@b1!d!k!v!s" if level = 1-1 and name = "Harp"; rule "inscribe book" inscribe "!d!k!v!s" if level = 1-1 and name = "Book of Beginner Cantrips"; rule "inscribe runes" inscribe "!d!k!v!s" if class = Runecrafter and tval = TV_RUNE1, TV_RUNE2; rule "inscribe instr" inscribe "!d!k!v!s" if class = Bard and tval = TV_INSTRUMENT; ]]