Removed references to base.lua from init.txt, and the other lua files.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1623 c06c8d41-db1a-0410-9941-cceddc491573
5RRCORYDFW2N2YPUM4PDYZGI6RY7YWVMGWTY5ZIDVO6JRD5R5GAQC
HNXKX6ZDQJV33E7UKZOLBYWJMRZ4QLEMXVXJZNRCTOIG2KVRTIEAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
UL7XFKMUX3WIU4O2LZANK4ECJ654UZPDBFGNXUEYZYOLKBYBCG6AC
AVSMB4Y6F6ZMMNNPOAQQZ34OWC6N5JOURTEWFTUKDWMIIMLWWJUAC
UF4ODJOCV3ZL7DXRLLOFVWHUKKJX34FO4ZM6VJAWEJ3QVP3XZ2AAC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
---------------------------------------------------------------------------
-- trapwalk.lua: (requires base.lua)
-- (Thanks to JPEG <erinacea@hotmail.de> for this script.)
--
-- Allows travel to cross traps provided you have sufficient HP to survive the
-- trap.
--
-- To use this, add this line to your init.txt:
-- lua_file = lua/trapwalk.lua
-- and add
-- trapwalk_safe_hp = dart:15, needle:25, spear:50
-- or similar to your init.txt.
--
-- What it does:
--
-- * Normally autotravel automatically avoids all traps
-- * This script allows you to customize at which hp what type of trap is
-- regarded as safe for autotravel
--
-- IMPORTANT: trapwalk options must be defined *after* sourcing trapwalk.lua.
---------------------------------------------------------------------------
-- Travel will cross certain traps if you have more than safe_hp hp.
function ch_cross_trap(trap)
if not options.trapwalk_safe_hp then
return false
end
local opt = options.trapwalk_safe_hp
local hpstr
_, _, hpstr = string.find(opt, trap .. "%s*:%s*(%d+)")
if not hpstr then
return false
end
local safe_hp = tonumber(hpstr)
local hp = you.hp()
-- finally compare current hp with safe limit
return hp >= safe_hp
end
---------------------------------------------------------------------------
-- trapwalk.lua:
-- (Thanks to JPEG <erinacea@hotmail.de> for this script.)
--
-- Allows travel to cross traps provided you have sufficient HP to survive the
-- trap.
--
-- To use this, add this line to your init.txt:
-- lua_file = lua/trapwalk.lua
-- and add
-- trapwalk_safe_hp = dart:15, needle:25, spear:50
-- or similar to your init.txt.
--
-- What it does:
--
-- * Normally autotravel automatically avoids all traps
-- * This script allows you to customize at which hp what type of trap is
-- regarded as safe for autotravel
--
-- IMPORTANT: trapwalk options must be defined *after* sourcing trapwalk.lua.
---------------------------------------------------------------------------
-- Travel will cross certain traps if you have more than safe_hp hp.
function ch_cross_trap(trap)
if not options.trapwalk_safe_hp then
return false
end
local opt = options.trapwalk_safe_hp
local hpstr
_, _, hpstr = string.find(opt, trap .. "%s*:%s*(%d+)")
if not hpstr then
return false
end
local safe_hp = tonumber(hpstr)
local hp = you.hp()
-- finally compare current hp with safe limit
return hp >= safe_hp
end
-- base.lua:
-- Base Lua definitions that other Lua scripts rely on.
-- NOTE: Other Lua scripts may demonstrate buggy behaviour if you do
-- not source this file. If you're using no Lua scripts at all, you
-- needn't source base.lua.
--
-- To use this, add this line to your init.txt:
-- lua_file = lua/base.lua
-- userbase.lua:
-- Base Lua definitions that other Lua scripts rely on (auto-loaded).