{ lastGod = nil excludedClasses = {"Ice Elementalist", "Fire Elementalist", "Air Elementalist", "Earth Elementalist", "Necromancer", "Venom Mage", "Conjurer", "Hedge Wizard"} excludedGods = {"Jiyva", "Wu Jian", "Ru", "Vehumet", "Trog", "Ashenzari", "Gozag", "Kikubaaqudgha", "Xom"} function ready() local class = you.class() local god = you.god() if you.turns() == 0 then you.train_skill("Evocations", 2) local isExcluded = false for _, excludedGod in ipairs(excludedGods) do if god == excludedGod then isExcluded = true break end end for _, sampleClass in ipairs(excludedClasses) do if (class == sampleClass) and not isExcluded then isExcluded = true crawl.mpr("«Not training Invocations»") break end end if not (you.species() == "Demigod" or isExcluded) then you.train_skill("Invocations", 2) end if startingGod == "Kikubaaqudgha" then you.train_skill("Necromancy", 2) end if next(you.spells()) == nil then you.train_skill("Fighting", 2) else you.train_skill("Spellcasting", 2) end else if god ~= lastGod then for _, sampleClass in ipairs(excludedClasses) do if class == sampleClass then crawl.mpr("«You were not training Invocations»") break end end end end lastGod = god deliberateTraining() monitor_gold_goal() end skillTargetPairs = { ["Fighting"] = 0, ["Spellcasting"] = 0, ["Maces & Flails"] = 0, ["Conjurations"] = 0, ["Axes"] = 0, ["Hexes"] = 0, ["Polearms"] = 0, ["Summonings"] = 0, ["Staves"] = 0, ["Necromancy"] = 0, ["Unarmed Combat"] = 0, ["Translocations"] = 0, ["Throwing"] = 0, ["Transmutations"] = 0, ["Fire Magic"] = 0, ["Short Blades"] = 0, ["Ice Magic"] = 0, ["Long Blades"] = 0, ["Air Magic"] = 0, ["Ranged Weapons"] = 0, ["Earth Magic"] = 0, ["Poison Magic"] = 0, ["Armour"] = 0, ["Dodging"] = 0, ["Invocations"] = 0, ["Shields"] = 0, ["Evocations"] = 0, ["Stealth"] = 0, ["Shapeshifting"] = 0 } function deliberateTraining() local shouldShowSkillsMenu = false for skill, _ in next, skillTargetPairs do local target = you.get_training_target(skill) local current = you.skill(skill) if (type(target) == "number") and (target > 0) and (type(current) == "number") and (current < target) and (target > skillTargetPairs[skill]) then crawl.mpr("«watching skill " .. skill .. "»") skillTargetPairs[skill] = target end if (type(current) == "number") and (skillTargetPairs[skill] > 0) and (current >= skillTargetPairs[skill]) then skillTargetPairs[skill] = nil shouldShowSkillsMenu = true end end if shouldShowSkillsMenu then crawl.sendkeys("m") end end gold_goal_cost=nil gold_goal_note=nil function monitor_gold_goal() if type(gold_goal_cost) == "number" then if you.gold() >= gold_goal_cost then local msg = "«Goal reached» at " .. gold_goal_cost if type(gold_goal_note) ~= "nil" then msg = msg .. " " .. gold_goal_note end crawl.mpr(msg) crawl.more() gold_goal_cost=nil gold_goal_note=nil end end end function gold_goal() crawl.flush_input() local msg = nil if type(gold_goal_cost) ~= "nil" then msg = "" .. gold_goal_cost .. "gold " end if type(gold_goal_note) ~= "nil" then msg = msg .. gold_goal_note end if type(msg) ~= "nil" then crawl.mpr(msg) end -- crawl.yesno("Set gold goal?", true, "N") crawl.mpr("savings goal?") local goal = crawl.c_input_line() local gint = tonumber(goal) if type(gint) ~= "nil" then gold_goal_cost = gint crawl.mpr("Savings goal note?") gold_goal_note = crawl.c_input_line() end end } ##### Crawl Init file ############################################### language = pt note_hp_percent = 5 show_more = false force_more_message += Your.*disappears in a puff of smoke. message_colour ^= yellow:Your.*disappears in a puff of smoke. message_colour ^= yellow: You finish channelling.* force_more_message += You miscast.* message_colour ^= yellow: You miscast.* force_more_message += .* seems less confused. message_colour ^= darkgrey:You start (searching|resting) message_colour ^= darkgrey:Done searching message_colour ^= darkgrey:(HP|Magic) restored monster_list_colour += trivial:darkgrey, easy:lightgrey, tough:yellow, nasty:lightred, unusual:lightmagenta tile_show_threat_levels = tough, nasty, unusual macros += M \{^g} ===gold_goal # For descriptions of all options, as well as some more in-depth information # on setting them, consult the file # options_guide.txt # in your /docs directory. If you can't find it, the file is also available # online at: # https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt # # Crawl uses the first file of the following list as its option file: # * init.txt in the -rcdir directory (if specified) # * .crawlrc in the -rcdir directory (if specified) # * init.txt (in the Crawl directory) # * ~/.crawl/init.txt (Unix only) # * ~/.crawlrc (Unix only) # * ~/init.txt (Unix only) # * settings/init.txt (in the Crawl directory) ##### Some basic explanation of option syntax ####################### # Lines beginning with '#' are comments. The basic syntax is: # # field = value or field.subfield = value # # Only one specification is allowed per line. # # The terms are typically case-insensitive except in the fairly obvious # cases (the character's name and specifying files or directories when # on a system that has case-sensitive filenames). # # White space is stripped from the beginning and end of the line, as # well as immediately before and after the '='. If the option allows # multiple comma/semicolon-separated terms (such as # autopickup_exceptions), all whitespace around the separator is also # trimmed. All other whitespace is left intact. # # There are three broad types of Crawl options: true/false values (booleans), # arbitrary values, and lists of values. The first two types use only the # simple =, with later options - which includes your options that are different # from the defaults - overriding earlier ones. List options allow using +=, ^=, # -=, and = to append, prepend, remove, and reset, respectively. Usually you will # want to use += to add to a list option. Lastly, there is := which you can use # to create an alias, like so: # ae := autopickup_exceptions # From there on, 'ae' will be treated as if it you typed autopickup_exceptions, # so you can save time typing it. # ##### Other files ################################################### # You can include other files from your options file using the 'include' # option. Crawl will treat it as if you copied the whole text of that file # into your options file in that spot. You can uncomment some of the following # lines by removing the beginning '#' to include some of the other files in # this folder. # Some useful, more advanced options, implemented in LUA. # include = advanced_optioneering.txt # Alternative vi bindings for Dvorak users. # include = dvorak_command_keys.txt # Alternative vi bindings for Colemak users. # include = colemak_command_keys.txt # Alternative vi bindings for Neo users. # include = neo_command_keys.txt # Override the vi movement keys with a non-command. # include = no_vi_command_keys.txt # Turn the shift-vi keys into safe move, instead of run. # include = safe_move_shift.txt ##### Ancient versions ############################################## # If you're used to the interface of ancient versions of Crawl, you may # get back parts of it by uncommenting the following options: # include = 034_command_keys.txt # And to revert monster glyph and colouring changes: # include = 052_monster_glyphs.txt # include = 060_monster_glyphs.txt # include = 071_monster_glyphs.txt # include = 080_monster_glyphs.txt # include = 0.9_monster_glyphs.txt # include = 0.12_monster_glyphs.txt # include = 0.13_monster_glyphs.txt # include = 0.14_monster_glyphs.txt