Fix typo in monspeak.txt (slinkies).
Fixed hippogriff plural.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7709 c06c8d41-db1a-0410-9941-cceddc491573
HXIETRYLTZYNJR4QHS5ZN4ZZR76SLRIXTEJQQJGI33XMXHO6MNBAC 2G3DJ33FMKOTNOLH3X5C3NOZSV3PHL5PJTY4CEHAGDKIYAQXFQEAC LSI55NUVW3PC33MGHLN3BGJ5KL7SJTBWT4JEOTZ7ZGRS2SK4ON7AC BMIHNM6LWQPA4J4MT3RX6K3DRNGTN2N4OWC24ZMAZZY2K63TVOBAC DTZBHEI47CBXQLHHPXO422IE2UBAKMY3SL74OXNF7VQXZPYBZEXAC NDKM3IKI5HBPRYWFTFMLNKGE6ROAGGIZADTUVMAHQGMVQ5TLK3VQC JYEEOUYQ7ZPKOGWUV7VCORBVSOLF2UCBFBH3TR75RGOSS6PNKYUAC JJULXW764V5C2HJKZNWQAEWB6QM5YZADD7ZCE35LYTBFEM6PMYCAC 3DQXSE4YGFBBDUWK4YEOFWW4UPWILWELFSLP37SL6BERGAZJC5YAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC TAHSTXR7ROOMDFUSBUU4ZAIEWQLAS5CIRCTARLD4Q2BGNLSL7E5QC PEZFWKRHDHV4UJTPK5XJZ3CGTZ3LPTDYSPTYBENLQ7VRSP7YFSIQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC UEI5JAVCMN7Y2SACTEZPZSNFJWOJTC55G24Q6LKQCT4XNDH5ZQIAC GQL5SIGBHLU3FMCE54XVGLRY5AZHRM6DUEB722REA2DPLGJSN6EQC 23I5KJ245D43B6QYWS4TDQYJO2W2PKTDCLFBWPVAFDWS6L7NMGKQC ASLW3Z5PAVZSWJEMMMVZT226P44EKSAD47QS72JIFJESAI3RPN3AC MFONX2CQ4V7HA5NSD6P5NDDBXYDSKIOCYUKR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3FPQGJPJF3IAV6QV5A63FPG4SU2VRFV47QC RS24ZF3Y47QA2534EHQWZ35O2CI4JUOIVHUPRANCCNLVINSCYFXQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC e.marker([[O = lua:one_way_stair { desc = "A glowing drain",dst = "sewer",dstorigin = "in the sewers",overmap = "glowing drain",floor = "stone_arch" }]])
local timeout_turns = crawl.random_range(1500, 2000)local messager =timed_msg {visible = true,-- $F{xxx} will be substituted with the 'entity' property of the timed-- marker, or with the desc property (if entity is not set).messages = time_messages(timeout_turns,"$F{The} is slowly rusting away.","$F{The} is rusting away.","$F{The} is quickly rusting away.","$F{The} is falling apart.")}e.lua_marker('O',timed_marker {desc = "glowing drain",entity = 'drain',dst = "sewer",dstorigin = "in the sewers",overmap = "glowing drain",turns = timeout_turns,floor = "stone_arch",msg = messager })
# Use the following line in destination maps after all SUBST's have taken place# : sewer_colours(_G)# Note that the function also defines < to be the exit portal.{{
-- Use the following line in destination maps after all SUBSTs-- : sewer_colours(_G)-- Note that the function also defines < to be the exit portal.
: messager = bell_clock_msg { initmsg="You hear a distant snort." }
{{local messager =timed_msg {initmsg = { "You hear a distant snort.","Behold! There is an entrance to a minotaur's labyrinth ".. "on this level. Find the entrance quickly before ".. "the gate is sealed!" },finalmsg = "You hear the last, dying ticks of the clock.",verb = 'ticking',noisemaker = 'an ancient clock'}}}
local function free_space_threshold(max)local function is_free_space(p)return dgn.grid(p.x, p.y) == dgn.fnum("floor") and#dgn.items_at(p.x, p.y) <= maxendreturn is_free_spaceend
function TimedMessaging.new(pars)pars = pars or { }local m = TimedMessaging._new()m.noisemaker = pars.noisemakerm.verb = pars.verbm.finalmsg = pars.finalmsgm.ranges = pars.rangesm.initmsg = pars.initmsg or ''return mend
if not nocheck thenif not m.messages thenassert(m.noisemaker, "No noisemaker specified")assert(m.verb, "No verb specified")end
function TimedMessaging:init(tmarker, cm, verbose)local lab = dgn.grid(cm:pos()) == dgn.feature_number('enter_labyrinth')if not self.noisemaker thenself.noisemaker = lab and "an ancient clock" or "a massive bell"
if m.visible and not m.messages thenerror("No messages set for timer messager")end
if not self.finalmsg thenself.finalmsg = lab and "last, dying ticks of the clock"or "last, dying notes of the bell"
function TimedMessaging:channel()if not self.sound_channel thenself.sound_channel =crawl.msgch_num(self.visible and 'default' or 'sound')
if verbose and #self.initmsg > 0 and you.hear_pos(cm:pos()) thencrawl.mpr(self.initmsg, "sound")if lab thencrawl.mpr("Behold! There is an entrance to a minotaur's labyrinth on this level. Find the entrance quickly before it seals the gate!","sound")elsecrawl.mpr("An interdimensional caravan has stopped on this level and set up a bazaar. Hurry and find its entrance before they move on!", "sound")
if verbose and self.initmsg thenself:emit_message(cm, self.initmsg)endendfunction TimedMessaging:perceptible(cm)if not cm thenreturn trueendif self.visible thenreturn you.see_grid(cm:pos())elsereturn you.hear_pos(cm:pos())endendfunction TimedMessaging:emit_message(cm, msg)if not msg or not self:perceptible(cm) thenreturnendif type(msg) == 'table' thenutil.foreach(msg,function (m)self:emit_message(cm, m)end)elseif #msg < 1 thenreturn
function TimedMessaging:say_message(dur)self.sound_channel = self.sound_channel or crawl.msgch_num('sound')if dur <= 0 thencrawl.mpr("You hear the " .. self.finalmsg .. ".", self.sound_channel)
function TimedMessaging:proc_ranges(ranges, dur, fn)if not ranges then
local tm = TimedMessaging._new()tm.check = file.unmarshall_number(th)tm.noisemaker = file.unmarshall_string(th)tm.verb = file.unmarshall_string(th)tm.initmsg = file.unmarshall_string(th)tm.finalmsg = file.unmarshall_string(th)tm.ranges = lmark.unmarshall_table(th)return tm
return TimedMessaging:new(lmark.unmarshall_table(th))endfunction timed_msg(pars)return TimedMessaging:new(pars)
function bell_clock_msg(pars)return TimedMessaging.new(pars)
-- Accepts pairs of turns and messages used for a timer. For instance-- timer_interval_messages(500, 'You feel vaguely uneasy.',-- 250, 'You feel extremely uneasy.',-- 100, 'You feel a primal terror.')-- Will produce the first message when the timer has > 500 turns, the-- second message when the timer has <= 500 turns and >250 turns, and so on.-- Note that any given interval message will be repeated, usually every 50-- or 25 turns.function timer_interval_messages(...)local breakpoints = util.partition({ ... }, 2)-- Expand turn breakpoints into tenths of a turn.util.foreach(breakpoints,function (brk)brk[1] = brk[1] * 10end)return breakpoints
-- Accepts timer messages as with timer_interval_messages, but with no-- explicit intervals. Instead, the total turn count is divided by the-- number of messages to determine intervals.function time_messages(total_turns, ...)local messages = { ... }local n = #messages-- Each interval is 1.2 * the previous (lower) interval.local inflate = 1.2local function power_sum(n)local sum = 1for i = 1, n - 1 dosum = sum + inflate ^ iendreturn sumendlocal base_interval = total_turns / power_sum(n)local res = { }for i = 1, n - 1 dolocal pow = n - itotal_turns = total_turns - base_interval * inflate ^ powtable.insert(res, { math.floor(10 * total_turns), messages[i] } )endtable.insert(res, { 0, messages[n] })return resend
local messager = bell_clock_msg { initmsg="You hear coins being counted." }
local messager =timed_msg {initmsg = { "You hear coins being counted.","An interdimensional caravan has stopped on this level ".. "and set up a bazaar. Hurry and find its entrance before ".. "they move on!" },finalmsg = "You hear the last, dying notes of the bell.",verb = 'tolling',noisemaker = 'a massive bell'}