Compare commits

..

31 Commits

Author SHA1 Message Date
2507a3f218 Final tutorial improvements 2024-02-14 18:17:19 -08:00
89dcee996f Add better cover 2024-02-14 18:03:31 -08:00
55eb61825e Add a tips page 2024-02-14 17:51:57 -08:00
184ce112bd Fix a crash 2024-02-14 17:32:27 -08:00
c2a978e315 Grabbed cards float 2024-02-14 16:29:49 -08:00
93161c6465 Stacked moves 2024-02-14 15:55:00 -08:00
7f87814d35 Remove unused code 2024-02-14 14:10:19 -08:00
a7697fa1b2 Don't undo during restart animation 2024-02-13 19:15:19 -08:00
0912e90510 Change undo behavior
- Undo while holding a card drops it
- Undo can be redone
2024-02-13 19:09:35 -08:00
119155a903 Update rood 2024-02-12 17:50:38 -08:00
e3bc5a0dc6 Add content warning 2024-02-12 16:34:26 -08:00
dd46a76f54 Improve pickup/drop 2024-02-12 15:03:55 -08:00
ff1c59adf3 Add image to cart 2024-02-11 21:54:32 -08:00
2085ba5a63 Complete the rood 2024-02-11 21:53:19 -08:00
4747e297b4 Add sounds 2024-02-11 20:54:01 -08:00
bb2cfdd6af Add QOL features 2024-02-11 20:40:30 -08:00
3b9c61329b Add music manager 2024-02-11 20:18:01 -08:00
da41929613 Add some music 2024-02-11 20:12:49 -08:00
2cca0cd857 Don't show a menu on restart 2024-02-11 18:04:51 -08:00
6949abc2fb Final win screen! 2024-02-11 17:58:34 -08:00
4a61d8afd3 Archaeology feature 2024-02-11 17:28:41 -08:00
21d0ed432d Get rid of old unneeded file 2024-02-11 16:48:22 -08:00
172fd30ad0 Tiling menu 2024-02-11 16:48:11 -08:00
f30b7d6023 Misc bugfixes 2024-02-11 15:58:40 -08:00
343e4a2ea9 Cart data reset, excavate button 2024-02-11 15:51:56 -08:00
c4b11071e5 Add menu 2024-02-11 14:59:20 -08:00
cdaedc8be3 Improve a line of liturgy 2024-02-11 13:52:34 -08:00
1f8a937107 Add liturgy 2024-02-11 13:44:45 -08:00
a06ea160b2 Track whether the player hsa completed the tutorial 2024-02-10 22:19:54 -08:00
d7d91dd3a7 Restart menu 2024-02-10 22:01:05 -08:00
8b23695945 Restart level animation 2024-02-10 21:41:48 -08:00
28 changed files with 1391 additions and 222 deletions

View File

@ -9,6 +9,7 @@ function board:init(w)
self.checkpoint=nil self.checkpoint=nil
self.slots={} self.slots={}
self.wells={} self.wells={}
self.restart_progress=0
-- board slots -- board slots
-- ...n_slots: normal -- ...n_slots: normal
@ -38,16 +39,31 @@ function board:init(w)
if (not lst) return new.rank==0 if (not lst) return new.rank==0
return new.rank==lst.rank+1 return new.rank==lst.rank+1
end)) end))
self.wells[#self.wells].obscured_by_last_well=true
-- n_suits+2: arcana descending -- n_suits+2: arcana descending
add(self.wells,well:new(self.ruleset,function(lst,new) add(self.wells,well:new(self.ruleset,function(lst,new)
if (new.suit!='a') return if (new.suit!='a') return
if (not lst) return new.rank==self.ruleset.n_arcana-1 if (not lst) return new.rank==self.ruleset.n_arcana-1
return new.rank==lst.rank-1 return new.rank==lst.rank-1
end)) end))
self.wells[#self.wells].obscured_by_last_well=true
-- top arcana
add(self.wells,well:new(self.ruleset,function(lst,new)
local w1=self.wells[self.ruleset.n_suits+1]
local w2=self.wells[self.ruleset.n_suits+2]
if (#w1.contents + #w2.contents != self.ruleset.n_arcana-1) return
return new.suit=='a'
end))
self:deal(w.seed or seeds:choose(self.ruleset.pool)) self:deal(w.seed or seeds:choose(self.ruleset.pool))
end end
function board:get_endgame_card()
local last_arcana=self.wells[#self.wells]:peek()
if (last_arcana) return last_arcana
return self.last_card or 1
end
function board:deal(seed) function board:deal(seed)
local deal=deal(self.ruleset,seed) local deal=deal(self.ruleset,seed)
local n_usable_slots=self.ruleset.n_slots - 1 local n_usable_slots=self.ruleset.n_slots - 1
@ -68,10 +84,21 @@ function board:deal(seed)
end end
end end
function board:set_restart_progress(progress)
self.restart_progress=progress
end
function board:get_completion_level()
return self.ruleset.completion_level
end
function board:undo() function board:undo()
if (not self.watcher:intercept("undo")) return if (not self.checkpoint) return
if (self.checkpoint) self.checkpoint:apply(self) if (not self.watcher:intercept("undo")) sounds:dire() return
self.checkpoint=nil sounds:menu()
local current_checkpoint=checkpoint:new(self,self.checkpoint.card)
self.checkpoint:apply(self)
self.checkpoint=current_checkpoint
end end
function board:on_idle() function board:on_idle()
@ -98,11 +125,13 @@ function board:find_automove()
for s=1,#self.slots do for s=1,#self.slots do
local top=self.slots[s]:peek() local top=self.slots[s]:peek()
if top then if top then
for w=1,#self.wells do for w=#self.wells,1,-1 do
if w<=self.ruleset.n_suits and self.slots[self.ruleset.n_slots+1]:peek()!=nil then if w<=self.ruleset.n_suits and self.slots[self.ruleset.n_slots+1]:peek()!=nil then
-- the top wells are blocked -- the top wells are blocked
elseif self.wells[w]:would_accept(top) then elseif self.wells[w]:would_accept(top) then
self.cursor:drop_grab_silent()
self:animate_and_move_to_well(s,w) self:animate_and_move_to_well(s,w)
self.last_card=top
return true return true
end end
@ -122,32 +151,40 @@ function board:update()
if (not was_idle and is_idle) then if (not was_idle and is_idle) then
self:on_idle() self:on_idle()
end end
if (is_idle) self.cursor:update()
end end
function board:draw() function board:draw()
local extra_slot_full=self.slots[self.ruleset.n_slots+1]:peek()!=nil local extra_slot_full=self.slots[self.ruleset.n_slots+1]:peek()!=nil
local last_well_full=self.wells[#self.wells]:peek()!=nil
for w_ix=1,#self.wells do for w_ix=1,#self.wells do
local w=self.wells[w_ix] local w=self.wells[w_ix]
local l=self.ruleset.layouts:well(w_ix) local l=self.ruleset.layouts:well(w_ix)
local shadowed=nil local shadowed=nil
if w.obscured_by_last_well and last_well_full then
shadowed=true
end
if w.obscured_by_extra_slot and extra_slot_full then if w.obscured_by_extra_slot and extra_slot_full then
shadowed=true shadowed=true
end end
for i=1,#w.contents do for i=1,#w.contents do
local x,y=l:place_card(i) local x,y=l:place_card(i)
self.ruleset.deck:draw_card(x,y,w.contents[i],{shadowed=shadowed}) self.ruleset.deck:draw_card(x,y,w.contents[i],{rotate=l.rotated,shadowed=shadowed})
end end
end end
local grabs={}
for s_ix in all(self.cursor.grabbed_slots) do
grabs[s_ix]=(grabs[s_ix] or 0)+1
end
local function forall_slots(cb) local function forall_slots(cb)
for s_ix=1,#self.slots do for s_ix=1,#self.slots do
local s=self.slots[s_ix] local s=self.slots[s_ix]
local l=self.ruleset.layouts:slot(s_ix) local l=self.ruleset.layouts:slot(s_ix)
local n=#s.contents local n=#s.contents-(grabs[s_ix] or 0)
if (self.cursor.grabbed==s_ix) n-=1
cb(x,y,s_ix,s,l,n) cb(x,y,s_ix,s,l,n)
end end
@ -177,6 +214,8 @@ function board:draw()
end end
end) end)
end end
democrap:distort_screen(self.restart_progress)
end end
slot=klass() slot=klass()
@ -198,8 +237,8 @@ end
function slot:add(card) function slot:add(card)
add(self.contents,card) add(self.contents,card)
end end
function slot:peek() function slot:peek(depth)
return self.contents[#self.contents] return self.contents[#self.contents-(depth or 0)]
end end
function slot:pop() function slot:pop()
return deli(self.contents,#self.contents) return deli(self.contents,#self.contents)
@ -225,3 +264,6 @@ end
function well:clear() function well:clear()
self.contents={} self.contents={}
end end
function well:peek()
return self.contents[#self.contents]
end

View File

@ -55,7 +55,7 @@ function board:_animate_move_card(card,on_end,start_x,start_y,compute_end)
if (frame==0) end_x,end_y=compute_end() if (frame==0) end_x,end_y=compute_end()
frame+=1 frame+=1
progress=frame/7 progress=frame/7
if (progress>=1.0) on_end() return false if (progress>=1.0) sounds:deal_card() on_end() return false
return true return true
end end
function anim_obj:draw() function anim_obj:draw()

View File

@ -36,4 +36,5 @@ function checkpoint:apply(board)
add(board.wells[w].contents,i) add(board.wells[w].contents,i)
end end
end end
board.cursor:drop_grab()
end end

67
completion_tracker.lua Normal file
View File

@ -0,0 +1,67 @@
completion_tracker={}
add(modules,completion_tracker)
function completion_tracker:init()
cartdata("pyrex_fortunesfoundation_1")
end
function completion_tracker:reset()
for i=0,63 do
if (i!=59) dset(i,0) -- don't clear music pref flag
end
end
function completion_tracker:get_metascore()
local b0=dget"60"
local b1=dget"61"
local b2=dget"62"
local b3=dget"63"
return (b0<<8)+b1+(b2>>8)+(b3>>16)
end
function completion_tracker:incr_metascore()
local ms=self:get_metascore()
ms+=0x0.0001
dset(60,(ms>>8)&0xff)
dset(61,(ms)&0xff)
dset(62,(ms<<8)&0xff)
dset(63,(ms<<16)&0xff)
end
function completion_tracker:get_completion_level()
return dget(0)
end
function completion_tracker:advance_completion_level(clevel)
dset(0,max(dget(0), clevel))
end
function completion_tracker:get_music_preference()
return dget(59)==0
end
function completion_tracker:set_music_preference()
if (dget(59)==0) dset(59,1) return
dset(59,0)
end
-- TODO: Bitfield instead
function completion_tracker:mark_seen(text_id)
local ix,bit=self:_unpack_text_id(text_id)
dset(ix,dget(ix)|bit)
end
function completion_tracker:was_seen(text_id)
local ix,bit=self:_unpack_text_id(text_id)
return dget(ix)&bit !=0
end
function completion_tracker:_unpack_text_id(text_id)
assert(text_id>0)
assert(text_id<120) -- max 120 texts for now
-- using bytes 1 through 15
local ix,bit=1+text_id\8,text_id%8
assert(ix<16)
return ix,1<<bit
end
function completion_tracker:should_show_tutorial()
return self:get_completion_level() < tutorial.completion_stage
end

BIN
cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -10,16 +10,18 @@ function cursor:init(board)
self.board=board self.board=board
self.hover_x=self.ruleset.n_slots\2 self.hover_x=self.ruleset.n_slots\2
self.hover_y=1 self.hover_y=1
self.grabbed=nil self.saved_hover_x_y=nil
self.grabbed_slots={}
end end
function cursor:acceptance_state() function cursor:acceptance_state()
if self.grabbed then
local hover=self:hover_slot() local hover=self:hover_slot()
if hover==self.grabbed then local slot=self:grabbed_slot()
if slot then
if hover==slot then
return acceptance_state.no_move return acceptance_state.no_move
end end
local source=self.board.slots[self.grabbed] local source=self.board.slots[slot]
local target=self.board.slots[self:hover_slot()] local target=self.board.slots[self:hover_slot()]
local card=source:peek() local card=source:peek()
if target:would_accept(card) then if target:would_accept(card) then
@ -28,40 +30,115 @@ function cursor:acceptance_state()
return acceptance_state.would_not_accept return acceptance_state.would_not_accept
end end
else else
return acceptance_state.not_grabbed if (self.board.slots[hover]:peek()) return acceptance_state.not_grabbed
return acceptance_state.would_not_accept
end end
end end
function cursor:save_hover()
self.saved_hover_x_y={self.hover_x,self.hover_y}
end
--[[
function cursor:restore_hover()
self.wants_to_restore_hover=true
end
]]
--[[
function cursor:actually_restore_hover()
if (not self.saved_hover_x_y) return
-- self.wants_to_restore_hover=false
-- try restoring hover x
local old_hover_x,old_hover_y=self.hover_x,self.hover_y
self.hover_x,self.hover_y=unpack(self.saved_hover_x_y)
-- try very hard to be in a valid spot
for i in all{
function() self.hover_x,self.hover_y=old_hover_x,old_hover_y end,
function() self:move_x(-1) end,
function() self:move_y(1) end,
function() self:move_x(-1) end,
function() self:move_y(-1) end
} do
if (self:acceptance_state()!=acceptance_state.would_not_accept) return
i()
end
end
]]--
function cursor:toggle_grab() function cursor:toggle_grab()
local acc,src,tar=self:acceptance_state() local acc,src,tar=self:acceptance_state()
local slot=self:hover_slot() local slot=self:hover_slot()
if acc==acceptance_state.not_grabbed then if acc==acceptance_state.not_grabbed then
if (not self.board.watcher:intercept("grab",slot)) return if (not self.board.watcher:intercept("grab",slot)) sounds:dire() return
if (self.board.slots[slot]:peek()) self.grabbed=slot if (self.board.slots[slot]:peek()) self.grabbed_slots={slot}
self:save_hover()
sounds:menu()
elseif acc==acceptance_state.would_accept then elseif acc==acceptance_state.would_accept then
if (not self.board.watcher:intercept("drop",slot)) return if (not self.board.watcher:intercept("drop",slot)) sounds:dire() return
self.board:pre_move(src:peek()) self.board:pre_move(src:peek())
while self:acceptance_state() == acceptance_state.would_accept do
local card=src:pop() local card=src:pop()
tar:add(card) tar:add(card)
self.grabbed=nil deli(self.grabbed_slots)
self.board:on_move(card) end
self.grabbed_slots={}
self.board:on_move()
-- if (#self.grabbed_slots == 0) self:restore_hover()
sounds:menu()
elseif acc==acceptance_state.no_move or acc==acceptance_state.would_not_accept then elseif acc==acceptance_state.no_move or acc==acceptance_state.would_not_accept then
if (not self.board.watcher:intercept("cancel")) return self:drop_grab()
self.grabbed=nil
else else
assert(false,"invalid acceptance state") assert(false,"invalid acceptance state")
end end
end end
function cursor:incr_grab()
local slot=self:hover_slot()
if (slot!=self:grabbed_slot()) return
if (not self.board.watcher:intercept("incr_grab",slot)) sounds:dire() return
local new_card = self.board.slots[slot]:peek(#self.grabbed_slots)
if (not new_card) return
local old_card = self.board.slots[slot]:peek(#self.grabbed_slots-1)
if (not self:_can_incr_grab(old_card,new_card)) return
add(self.grabbed_slots,slot)
sounds:menu()
end
function cursor:drop_grab_silent()
self.grabbed_slots={}
end
function cursor:drop_grab()
if (not self.board.watcher:intercept("cancel")) sounds:dire() return
self.grabbed_slots={}
-- self:restore_hover()
sounds:menu()
end
function cursor:update()
-- if (self.wants_to_restore_hover) self:actually_restore_hover()
end
function cursor:move_x(dx) function cursor:move_x(dx)
if (self.hover_y==0) return if (self.hover_y==0) return
if (dx==0) return
local orig_x=self.hover_x
while true do
self.hover_x+=dx self.hover_x+=dx
self.hover_x%=self.ruleset.n_slots -- TODO: Don't hard-code self.hover_x%=self.ruleset.n_slots
if (self.hover_x==orig_x) return
if (self:acceptance_state()!=acceptance_state.would_not_accept) return true
end
return
end end
function cursor:move_y(dy) function cursor:move_y(dy)
local old_y=self.hover_y
if (self.hover_y==0 and dy==1) self.hover_y=1 if (self.hover_y==0 and dy==1) self.hover_y=1
if (self.hover_y==1 and dy==-1) self.hover_y=0 if (self.hover_y==1 and dy==-1 and #self.grabbed_slots<2) self.hover_y=0
if (self:acceptance_state()==acceptance_state.would_not_accept) if (not self:move_x(-1)) self.hover_y=old_y
end end
function cursor:hover_slot() function cursor:hover_slot()
@ -69,34 +146,42 @@ function cursor:hover_slot()
return self.hover_x+1 return self.hover_x+1
end end
function cursor:grabbed_slot()
return self.grabbed_slots[#self.grabbed_slots]
end
function cursor:grabbed_card() function cursor:grabbed_card()
if self.grabbed then local grabbed_slot=self:grabbed_slot()
local slot=self.board.slots[self.grabbed] if grabbed_slot then
return slot:peek() return self.board.slots[grabbed_slot]:peek()
end end
return nil
end end
function cursor:draw_at(l,i) function cursor:draw_at(l,i)
local card=self:grabbed_card() local slot=self:grabbed_slot()
local acc=self:acceptance_state()
local dx,dy=0,0 if not slot then
if card and acc!=acceptance_state.would_accept and acc!=acceptance_state.no_move then
dx=flr(sin(time()/2)*2+0.5)
dy=flr(sin(time()/4)+0.5+1)
end
if card then
i+=1
local x,y=l:place_card(i)
local card_fg=self.ruleset.deck:draw_card(x+dx,y+dy,card,{rotate=l.rotated})
local fg=card_fg
if (acc==acceptance_state.would_accept) fg=9
draw_layout_hint(l,i,fg,false,dx,dy)
else
local filled=false local filled=false
if (i<1) i=1 filled=true if (i<1) i=1 filled=true
draw_layout_hint(l,i,9,filled,dx,dy) draw_layout_hint(l,i,12,filled)
return
end
local not_moving=self:acceptance_state()==acceptance_state.no_move
for i2=1,#self.grabbed_slots do
local ix=i2-1
if (not_moving) ix=#self.grabbed_slots-i2
local card=self.board.slots[slot]:peek(ix)
local x,y=l:place_card(i+i2+1)
local card_fg=self.ruleset.deck:draw_card(x,y,card,{rotate=l.rotated})
local fg=card_fg
if (i2==1) draw_layout_hint(l,i+i2+1,9,false)
end end
end end
function cursor:_can_incr_grab(c0,c1)
c0=self.board.ruleset.deck.cards[c0]
c1=self.board.ruleset.deck.cards[c1]
if (c0.suit!=c1.suit) return false
return c0.rank==c1.rank+1 or c1.rank==c0.rank+1
end

35
democrap.lua Normal file
View File

@ -0,0 +1,35 @@
democrap={
patterns={
0b1111111111111111,
0b1111111111111111,
0b1111111111111111,
0b1111111111111111,
0b1111111111111111,
0b1111111111111111,
0b1111111111111111,
0b1111111111111100,
0b1111111111110000,
0b1111110011110000,
0b1111000011110000,
0b1111000011000000,
0b1111000000000000,
0b1100000000000000,
0b0000000000000000
}
}
function democrap:distort_screen(progress)
if (progress <= 0) return
progress=min(progress,1)
for src=0x6004,0x7fc4,64 do
dst=src+sin(t()+src/0x800)*(4*progress)+0.5
memcpy(dst,src,56)
end
local ps=democrap.patterns
local p=ps[1+flr(progress*#ps)] or ps[#ps]
fillp(p)
local old=@0x5333
poke(0x5f33,1)
rectfill(0,0,127,127,13)
poke(0x5f33,old)
fillp()
end

View File

@ -2,7 +2,6 @@
modules={} modules={}
function _init() function _init()
-- printh("restarting")
_doall("init") _doall("init")
end end
@ -33,43 +32,10 @@ function klass()
return k return k
end end
function alives(tbl) function gsv(s)
local tbl2={}
for i in all(tbl) do
if (not i.dead) add(tbl2,i)
end
return tbl2
end
function trunc4(x)
if (x < 0) return -trunc4(-x)
return x\0.25/4
end
function stepstep(by,x0,x1,f)
local x=x0
if (x==x1) return
if x0>x1 then
return stepstep(by,-x0,-x1,function(x) return f(-x) end)
end
x=x\by*by
while true do
x+=by
if (x>=x1) f(x1) break
if (not f(x)) break
end
end
function lerp(x,x0,x1)
return x0+x*(x1-x0)
end
function csv(s)
local ret=split(s,"\n") local ret=split(s,"\n")
for i,v in ipairs(ret) do for i,v in ipairs(ret) do
ret[i] = type(v) == "string" and split(v) or {v} end ret[i] = type(v) == "string" and split(v,"`") or {v} end
return ret return ret
end end

View File

@ -1,8 +1,6 @@
function draw_layout_hint(l,i,fg,filled,dx,dy) function draw_layout_hint(l,i,fg,filled,tut_border)
-- layout, index -- layout, index
local x,y=l:place_card(i) local x,y=l:place_card(i)
x+=dx
y+=dy
if (l.obscured) filled=false if (l.obscured) filled=false
if filled then if filled then
@ -12,10 +10,28 @@ function draw_layout_hint(l,i,fg,filled,dx,dy)
rectfill(x,y,x+8,y+15,fg) rectfill(x,y,x+8,y+15,fg)
end end
else else
if tut_border then
local exclude=1+flr(time()*3)%3
pal(1,14)
pal(2,14)
pal(3,14)
palt(13,true)
pal(exclude,13)
if l.rotated then
spr(32,x-5,y+5,3,2)
else
-- rect(x-3,y-3,x+11,y+18,13)
spr(14,x-2,y-2,2,3)
end
pal()
palt()
return
end
if l.rotated then if l.rotated then
rect(x-4,y+6,x+13,y+16,fg) rect(x-4,y+6,x+13,y+16,fg)
else else
rect(x-1,y-1,x+9,y+16,fg) rect(x-1,y-1,x+9,y+16,fg)
end end
end end
end end

151
liturgy.lua Normal file
View File

@ -0,0 +1,151 @@
liturgy={
holy_book=gsv[[rood 1`1,2,3
rood 2`4,5,6,7
rood 3`8,9,10
rood 4`11,12,13
rood 5`14,15,16,17,18
rood 6`19,20
rood 7`21,22,23
rood 8`24,25,26]],
sacred_text_lines=gsv
[[1`one meerkat, one day
1`stood on two legs. it said:
1`'come into this thicket.
1` i have a bright wreath.
1` my laurel is vibrant.'
2`all sweet things tolerated,
2`those who came when called
2`were sheared of their fur.
2`this was the first day:
2`the dandelions blown.
3`the hollow,
3`which opens to a key: music.
3`the meerkats were led there.
3`where they stood.
4`now even the water
4`knows how to talk.
4`their leader, first to stand,
4`calls them to choir.
5`a dulcimer's sweet harmony and,
5`pretending to weep,
5`it announces the title of
5`a scroll: 'the fate.'
6`now they are a regiment.
6`gather them.
6`pour oil.
7`catching a leaf, ride it.
7`suture its veins.
7`scatter glass in the vineyard.
8`lanias came in silver.
8`he milled the wheat and barley.
8`he took oranges from the trees.
8`meerkats dashed to the ferns.
8`he raised his bow and screamed.
9`the bolt became the wind.
9`the silver sails lashed.
9`the silver ospreys swarmed.
9`the silver shadow wailed.
10`burning oil from bay to sky.
10`scampering keas in bags!
10`there was no one in the field.
10`lanias came and went in silver.
11`ravens are an old people.
11`but the mandate is new.
11`the spry one turns in the egg.
12`it reads 'the fate':
12`'man is woman'
12`'a house in heaven
12` is bought on earth.'
12`and not by hatching.
13`the egg turns. it cracks.
13`a meerkat tumbles out.
13`cold, it breathes its last.
14`when lanias drags down stars
14`in his net, he cannot
14`take down one: beauty.
15`he cannot envy the vain,
15`so lanias wrote this rood:
15`the vain will not have it.
16`no longer is 'the fate':
16`there are many fates.
16`the music is over now.
16`it is quiet in the garden.
17`where are you? a small bird,
17`divine. you are in the fences.
17`you are seedling, little one.
17`the gorgeous lily blooms.
18`a star in the sky shines
18`and you are born.
18`accept its blessing: caw,
18`do not sing.
19`you have your room.
19`i have mine.
19`let's dig a river,
19`and build a bridge.
20`let's dig a trap.
20`let's line it with spikes.
20`let's cover it with a sheet,
20`and bury it in soil.
21`a cuckoo stole an egg.
21`in the nest it left its young.
21`the summer was so lean
21`and the snow so deep.
22`it was plump as a berry
22`and it hatched.
22`meerkats were in the trees.
23`lanias said: old men suffer
23`and die for nothing. listen:
23`when you grow: you won't
23`understand it. you want what
23`you cannot have.
24`night is here.
24`you're asleep.
24`you leave this body.
24`you won't want to come back.
25`cross your eyes: 'the fate'
25`is in them, their tears,
25`their music, their silence.
26`our rood is the final one.
26`those we killed have been
26`planted like seeds. this rood,
26`like this city, will not
26`be destroyed.]]
}
function liturgy:init()
local verse_lines={}
for line in all(self.sacred_text_lines) do
local verse=tonum(line[1])
if (not verse_lines[verse]) verse_lines[verse]={}
add(verse_lines[verse], line[2])
end
local annotated_verses={}
for bookdata in all(self.holy_book) do
local name=bookdata[1]
local ix=1
for verse in all(split(bookdata[2])) do
local annotated_verse_name=name
local lines=verse_lines[verse]
annotated_verse_name..=":"..ix.."-"
ix+=#lines
annotated_verse_name..=ix-1
local annotated_verse=""
for l in all(lines) do
if (annotated_verse!="") annotated_verse..="\n"
annotated_verse..=l
end
annotated_verses[verse]={annotated_verse_name,annotated_verse}
end
end
self.annotated_verses=annotated_verses
end
liturgy:init()
function liturgy:suggest_verse(ruleset,card)
local meta=ruleset.deck.cards[card]
local i=2+meta.rank
if (meta.suit!="a") i=ruleset.preferred_verse or i
return i, unpack(liturgy.annotated_verses[i])
end

View File

@ -4,7 +4,15 @@ add(modules,main)
function main:init() function main:init()
extcmd("rec") extcmd("rec")
self.state_manager=state_manager:new() -- instantiate one global self.state_manager=state_manager:new() -- instantiate one global
self.state_manager:push(state_ironman:new(tutorial)) self.state_manager:push(state_menu:new())
--[[
local b=board:new(watcher:new(progression[#progression],1,{}))
b.last_card=75
self.state_manager:push(state_wonround:new(b))
]]--
if (completion_tracker:should_show_tutorial()) self.state_manager:push(state_ironman:new(tutorial)) self.state_manager:push(state_content_warning:new())
end end
function main:update() function main:update()
@ -13,4 +21,5 @@ end
function main:draw() function main:draw()
self.state_manager:draw() self.state_manager:draw()
apply_palette()
end end

359
main.p8
View File

@ -1,97 +1,107 @@
pico-8 cartridge // http://www.pico-8.com pico-8 cartridge // http://www.pico-8.com
version 41 version 41
__lua__ __lua__
-- raven's rood
-- by pyrex and nyeo
#include engine.lua #include engine.lua
#include palette.lua
#include animator.lua #include animator.lua
#include board.lua #include board.lua
#include board_animations.lua #include board_animations.lua
#include checkpoint.lua #include checkpoint.lua
#include completion_tracker.lua
#include dealer.lua #include dealer.lua
#include democrap.lua
#include cursor.lua #include cursor.lua
#include layout.lua #include layout.lua
#include layout_hint.lua #include layout_hint.lua
#include liturgy.lua
#include music_manager.lua
#include ruleset.lua #include ruleset.lua
#include palette.lua
#include progression.lua #include progression.lua
#include seed_constants.lua #include seed_constants.lua
#include seeds.lua #include seeds.lua
#include sounds.lua
#include state_archaeology.lua
#include state_content_warning.lua
#include state_excavate_menu.lua
#include state_manager.lua #include state_manager.lua
#include state_menu.lua
#include state_gameround.lua #include state_gameround.lua
#include state_ironman.lua #include state_ironman.lua
#include state_reset_menu.lua
#include state_wonironman.lua
#include state_wonround.lua
#include tutorial.lua #include tutorial.lua
#include text.lua #include text.lua
#include watcher.lua #include watcher.lua
#include main.lua #include main.lua
--[[
srand(2)
for i=1,10 do
print(tostr(rnd(),2))
end
stop()]]
__gfx__ __gfx__
00000000000000000000000000000000777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000077777000000000000000000000000000000000000000000000000000000000000000000000000000ddddddddddddd000
00000000007000000777000000070000700070000707070000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000700000077700000007000070007000070707000000000000000000000000000000000000000000000000000000000000000000d31231231231d000
07070000007000000777000000700000707070000077770000000000000000000000000000000000000000000000000000000000000000000000000000000000 0707000000700000077700000070000070707000007777000000000000000000000000000000000000000000000000000000000000000000d20000000002d000
00700000007000000777000000700000707070000770700000000000000000000000000000000000000000000000000000000000000000000000000000000000 0070000000700000077700000070000070707000077070000000000000000000000000000000000000000000000000000000000000000000d10000000003d000
07070000077700000070000007000000777070000077777000000000000000000000000000000000000000000000000000000000000000000000000000000000 0707000007770000007000000700000077707000007777700000000000000000000000000000000000000000000000000000000000000000d30000000001d000
00000000007000000777000007000000700070000700777000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000700000077700000700000070007000070077700000000000000000000000000000000000000000000000000000000000000000d20000000002d000
00000000000000000000000000000000707770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000070777000000000000000000000000000000000000000000000000000000000000000000000000000d10000000003d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d30000000001d000
00000000000000000000000000000000000000000000000000000000000070000000700000007000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007000000070000000700000000000000000000000000000000000d20000000002d000
00000000000070000000700000700070007000700070007000700070007000700070007000700070070707000707070007070700000000000000000000000000 0000000000007000000070000070007000700070007000700070007000700070007000700070007007070700070707000707070000000000d10000000003d000
00000000000000000000000000000000000000000000000000000000000070000000700000007000007777000077770000777700000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007000000070000000700000777700007777000077770000000000d30000000001d000
00007000000000000000700000000000000070000070007000707070000000000070007000700070077070000770700007707000000000000000000000000000 0000700000000000000070000000000000007000007000700070707000000000007000700070007007707000077070000770700000000000d20000000002d000
00000000000000000000000000000000000000000000000000000000000070000000000000007000007777700077777000777770000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007000000000000000700000777770007777700077777000000000d10000000003d000
00000000000070000000700000700070007000700070007000700070007000700070007000700070070077700700777007007770000000000000000000000000 0000000000007000000070000070007000700070007000700070007000700070007000700070007007007770070077700700777000000000d30000000001d000
00000000000000000000000000000000000000000000000000000000000070000000700000007000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000007000000070000000700000000000000000000000000000000000d20000000002d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d10000000003d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 dddddddddddddddddddd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d30000000001d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d123123123123123123d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d20000000002d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d300000000000000001d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d13213213213d000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d200000000000000002d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ddddddddddddd000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d100000000000000003d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d300000000000000001d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d200000000000000002d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d100000000000000003d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d300000000000000001d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d200000000000000002d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d100000000000000003d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d321321321321321321d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 dddddddddddddddddddd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
fffffffff000000000000000000000000000000000000ff00000000000000000000000a000000000000000000000000000000000000000000000000000000000
0ff0000fff00000000000000000000000000000000000ff00000000000fff000900009aa0000a000000000000000000000000000000000000000000000000000
0ff00000ff000ffff00ffff00fff00ffff000ff0fff00f00fffff000000fff00999009aa00aaa000000000000000000000000000000000000000000000000000
0ff0000ff000f000ff00ff0000f00f000ff0ffff00ff000ff000f00000fff000099999aaaaaa0000000000000000000000000000000000000000000770000000
0ff0fff000000000ff00ff0000f0ff000ff00ff000ff000ff000000000000000099999aaaaaa0000000000000000000000000000000000000000777700000000
0ff00ff000000fffff000ff00f00fffffff00ff000ff000ffff0000000000000099999aaaaaa0000000000000000000000000000000000000777777700000000
0ff000ff0000f000ff000ff00f00ff0000000ff000ff00000ffff00000000000009999aaaaa00000000000000000000000000000000000007777777700000000
0ff0000ff00ff000ff0000f0f000ff0000000ff000ff0000000ff00000000000009999aaaaa00000000000000000000000000000000000777777777000000000
0ff00000ff0ff00fff0000fff0000ff000f00ff000ff000f000ff000000000000000000000000000000000000000000000000000000007777777700000000000
ffff0000fff0fff0fff0000f000000ffff00ffff00fff00fffff0000000000000000000000000000000000000000000000000000000077777777000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000
fffffffff0000000000000000000000000fff0000000000000000000000000000000000000000000000000000000000000000000007777777700000dd0000000
0ff0000fff0000000000000000000000000ff000000000000000000000000000000000000000000000000000000000000000000000777777700000ddd0000000
0ff00000ff000ffff00000ffff00000fff0ff0000000000000000000000000000000000000000000000000000000000000000000077777770000dddddd000000
0ff0000ff000ff00ff000ff00ff000ff00fff00000000000000000000000000000000000000000000000000000000000000000000777777700ddddddd0000000
0ff0fff0000ff0000ff0ff0000ff0ff0000ff0000000000000000000000000000000000000000000000000000000000000000000777777770ddddddd00000000
0ff00ff0000ff0000ff0ff0000ff0ff0000ff0000000000000000000000000000000000000000000000000000000000000000000777777777dddddd000000000
0ff000ff000ff0000ff0ff0000ff0ff0000ff000000000000000000000000000000000000000000000000000000000000000000077777777dddddd0000000000
0ff0000ff00ff0000ff0ff0000ff0ff0000ff000000000000000000000000000000000000000000000000000000000000000000077777777ddddd00000777000
0ff00000ff00ff00ff000ff00ff000ff00fff000000000000000000000000000000000000000000000000000000000000000000077777777dddd000007777770
ffff0000fff00ffff00000ffff00000fff0fff0000000000000000000000000000000000000000000000000000000000000000077777777dddd0000077777777
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777dd7ddd7770777777700
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777d7777777777777777000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007777777777777777777777777000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777777777777777777777777700
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007777777777777777777770000777700
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077707777777777777777000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077777777777777777770000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077777777777777777770000700000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077770000007777777700000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077700000000077770000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000
c9311100fc009820e4509a50ca603c90a3a009a0d5b00dd055f027215d21a531e531d6319831e8317931277132a5120a007276821161320416d14631d331e862 c9311100fc009820e4509a50ca603c90a3a009a0d5b00dd055f027215d21a531e531d6319831e8317931277132a5120a007276821161320416d14631d331e862
7462511341324319b5779502eb05d82194423941818023885111644669aa2a169110a1561bb28201632467214103762f4812302241975603a9799117a3111c31 7462511341324319b5779502eb05d82194423941818023885111644669aa2a169110a1561bb28201632467214103762f4812302241975603a9799117a3111c31
54224678216131332299517613113822a1a81b2191451b9d4a12444e2146331121146b18a623a1212143b4414461930716662c10145931ca52421046d1d46453 54224678216131332299517613113822a1a81b2191451b9d4a12444e2146331121146b18a623a1212143b4414461930716662c10145931ca52421046d1d46453
@ -156,6 +166,136 @@ fa1da3a42c14300b02d04505c8f103471874735968bb1cd203743347342fd27240c1b61350475064
00113043464471777326217676060195001268be8381430c862a1c2b0265a4234a69635140318597cb49370643550c2a314e33781b490095f73245600a00de12 00113043464471777326217676060195001268be8381430c862a1c2b0265a4234a69635140318597cb49370643550c2a314e33781b490095f73245600a00de12
041497c80550a4701604144259018e4314582680b0bb8a28b4061216010d3063521c666031d4460d1412012e2547030e2389252b19e9da341623912035220923 041497c80550a4701604144259018e4314582680b0bb8a28b4061216010d3063521c666031d4460d1412012e2547030e2389252b19e9da341623912035220923
220d61f5d10673575950d15619fb7355715a214d604411ab425c28017fa0069204b0663402432027a2205515603021b5012178664215329112a53b219206035f 220d61f5d10673575950d15619fb7355715a214d604411ab425c28017fa0069204b0663402432027a2205515603021b5012178664215329112a53b219206035f
__label__
5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
gggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555
gggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555
gggggg5555555555555555gg55555555555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gg
gggggg5555555555555555gg55555555555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gg
gggggg555555555555555555555555555555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggg
gggggg555555555555555555555555555555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggg
gggggg5555555555555555555555555555gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggg
gggggg5555555555555555555555555555gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggg
gggggg55555555555555555555555555gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggg
gggggg55555555555555555555555555gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggg
gggggg555555555555555555555555gggggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg55
gggggg555555555555555555555555gggggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg55
gggg555555nnnnnnnnnnnnnnnnnngggggggggg5555555555555555ggggggggggggggggggggggggggggggggggggggggggggggnnnn55555555555555gggg555555
gggg555555nnnnnnnnnnnnnnnnnngggggggggg5555555555555555ggggggggggggggggggggggggggggggggggggggggggggggnnnn55555555555555gggg555555
gggg55555555nnnn55555555nnnnnn5555gg55555555555555gggggggggggggggggg5555ggggggggggggggggggggggggggggnnnn55555555555555gg55555555
gggg55555555nnnn55555555nnnnnn5555gg55555555555555gggggggggggggggggg5555ggggggggggggggggggggggggggggnnnn55555555555555gg55555555
gg5555555555nnnn5555555555nnnn555555nnnnnnnn5555nnnnnnnnggggnnnnnn5555nnnnnnnnggggggnnnnggnnnnnnggggnn5555nnnnnnnnnn555555555555
gg5555555555nnnn5555555555nnnn555555nnnnnnnn5555nnnnnnnnggggnnnnnn5555nnnnnnnnggggggnnnnggnnnnnnggggnn5555nnnnnnnnnn555555555555
555555555555nnnn55555555nnnn555555nn555555nnnn55ggnnnngg555555nn5555nnggggggnnnnggnnnnnnnnggggnnnngggg55nnnn555555nn555555555555
555555555555nnnn55555555nnnn555555nn555555nnnn55ggnnnngg555555nn5555nnggggggnnnnggnnnnnnnnggggnnnngggg55nnnn555555nn555555555555
555555555555nnnn55nnnnnn555555555555555555nnnn5555nnnn55555555nn55nnnnggggggnnnnggggnnnnggggggnnnngggg55nnnn55555555555555555555
555555555555nnnn55nnnnnn555555555555555555nnnn5555nnnn55555555nn55nnnnggggggnnnnggggnnnnggggggnnnngggg55nnnn55555555555555555555
555555555555nnnn5555nnnn5555555555ggnnnnnnnnnn555555nnnn5555nn5555nnnnnnnnnnnnnnggggnnnnggggggnnnngggg55nnnnnnnn55555555555555gg
555555555555nnnn5555nnnn5555555555ggnnnnnnnnnn555555nnnn5555nn5555nnnnnnnnnnnnnnggggnnnnggggggnnnngggg55nnnnnnnn55555555555555gg
555555555555nnnn555555nnnn5555ggggnnggggggnnnngg5555nnnn5555nn55ggnnnnggggggggggggggnnnnggggggnnnngg55555555nnnnnnnn55555555gggg
555555555555nnnn555555nnnn5555ggggnnggggggnnnngg5555nnnn5555nn55ggnnnnggggggggggggggnnnnggggggnnnngg55555555nnnnnnnn55555555gggg
555555555555nnnn55555555nnnnggggnnnnggggggnnnn55555555nn55nn55ggggnnnnggggggggggggggnnnnggggggnnnngg555555555555nnnn555555555555
555555555555nnnn55555555nnnnggggnnnnggggggnnnn55555555nn55nn55ggggnnnnggggggggggggggnnnnggggggnnnngg555555555555nnnn555555555555
555555555555nnnn5555555555nnnnggnnnn55ggnnnnnn55555555nnnnnnggggggggnnnnggggggnnggggnnnnggggggnnnn555555nn555555nnnn555555555555
555555555555nnnn5555555555nnnnggnnnn55ggnnnnnn55555555nnnnnnggggggggnnnnggggggnnggggnnnnggggggnnnn555555nn555555nnnn555555555555
ggggggggggnnnnnnnn55555555nnnnnnggnnnnnnggnnnnnn55555555nngggggggggg55nnnnnnnnggggnnnnnnnnggggnnnnnn5555nnnnnnnnnn55555555555555
ggggggggggnnnnnnnn55555555nnnnnnggnnnnnnggnnnnnn55555555nngggggggggg55nnnnnnnnggggnnnnnnnnggggnnnnnn5555nnnnnnnnnn55555555555555
gggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555
gggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555
ggggggggggnnnnnnnnnnnnnnnnnngggggggggggg55555555555555gggggggg555555555555ggggnnnnnngggg5555555555555555555555555555555555555555
ggggggggggnnnnnnnnnnnnnnnnnngggggggggggg55555555555555gggggggg555555555555ggggnnnnnngggg5555555555555555555555555555555555555555
ggggggggggggnnnnggggggggnnnnnngggggggggg55555555555555gggg55555555555555ggggggggnnnngg555555gg55555555555555555555555555555555gg
ggggggggggggnnnnggggggggnnnnnngggggggggg55555555555555gggg55555555555555ggggggggnnnngg555555gg55555555555555555555555555555555gg
gggg5555ggggnnnnggggggggggnnnnggggggnnnnnnnn5555555555nnnnnnnn55555555ggnnnnnnggnnnngg55555555555555555555555555555555555555gggg
gggg5555ggggnnnnggggggggggnnnnggggggnnnnnnnn5555555555nnnnnnnn55555555ggnnnnnnggnnnngg55555555555555555555555555555555555555gggg
555555ggggggnnnnggggggggnnnnggggggnnnn5555nnnn555555nnnn5555nnnn5555ggnnnnggggnnnnnngg55555555555555555555555555555555555555gggg
555555ggggggnnnnggggggggnnnnggggggnnnn5555nnnn555555nnnn5555nnnn5555ggnnnnggggnnnnnngg55555555555555555555555555555555555555gggg
555555ggggggnnnnggnnnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnnggggggggnnnngg55555555gggggggggggg5555555555555555gggggg
555555ggggggnnnnggnnnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnnggggggggnnnngg55555555gggggggggggg5555555555555555gggggg
555555ggggggnnnnggggnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnngg555555nnnngg555555gggggggggggggggggg55555555gggggggggg
555555ggggggnnnnggggnnnnggggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnngg555555nnnngg555555gggggggggggggggggg55555555gggggggggg
5555ggggggggnnnnggggggnnnnggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnn55555555nnnngg55gggggggggggggggggggggggggggggggggggggggg
5555ggggggggnnnnggggggnnnnggggggnnnngg555555nnnn55nnnn55555555nnnnggnnnn55555555nnnngg55gggggggggggggggggggggggggggggggggggggggg
ggggggggggggnnnnggggggggnnnnggggnnnn55555555nnnn55nnnn555555ggnnnnggnnnn55555555nnnn55gggggggggggggggggggggggggggggggggggggggggg
ggggggggggggnnnnggggggggnnnnggggnnnn55555555nnnn55nnnn555555ggnnnnggnnnn55555555nnnn55gggggggggggggggggggggggggggggggggggggggggg
ggggggggggggnnnnggggggggggnnnnggggnnnn5555nnnn555555nnnn5555nnnn55gg55nnnn5555nnnnnngggggggggggggggg5555gggggggggggggggggggggggg
ggggggggggggnnnnggggggggggnnnnggggnnnn5555nnnn555555nnnn5555nnnn55gg55nnnn5555nnnnnngggggggggggggggg5555gggggggggggggggggggggggg
ggggggggggnnnnnnnnggggggggnnnnnngg55nnnnnnnn5555555555nnnnnnnn5555555555nnnnnn55nnnnnngggggggg55555555gggggggggggggggggggggggggg
ggggggggggnnnnnnnnggggggggnnnnnngg55nnnnnnnn5555555555nnnnnnnn5555555555nnnnnn55nnnnnngggggggg55555555gggggggggggggggggggggggggg
gggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555555555gggggggggggggggggggggggggg
gggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555555555gggggggggggggggggggggggggg
gg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555555555gggggggggggggggggggggggggg
gg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555555555gggggggggggggggggggggggggg
5555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg55555555555555555555555555gggggggggggggggggggggggggggg
5555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg55555555555555555555555555gggggggggggggggggggggggggggg
55555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggg
55555555gggggggggggggg555555gg55555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggg
555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggg
555555gggggggggggggggg55555555555555555555555555555555555555gggggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggg
5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
5555gggggggggggggggggg55555555555555555555555555555555555555gggggggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggg
55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
55gggggggggggggggggggg55555555gggggggggggg5555555555555555gggggggggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55
gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
gggggggggg555555gggggg555555gggggggggggggggggg55555555gggggggggggggggggggg55555555555555gggggggggg555555gggggggggggggggggg555555
gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
gggggggg555555555555gg55gggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggggggg555555555555gggggggggggggg55555555
gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
gggggg5555555555555555gggggggggggggggggggggggggggggggggggggggggggggggggg55555555555555gggg55555555555555gggggggggggggg555555gg55
55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
55gg55555555555555gggggggggggggggggg5555gggggggggggggggggggggggggggggg5555555555555555gg55555555555555gggggggggggggggg5555555555
5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
5555555555555555gggggggggggggg55555555gggggggggggggggggggggggggggggggg555555555555555555555555555555gggggggggggggggggg5555555555
5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
5555555555555555gggggggg55555555555555gggggggggggggggggggggggggggggggg5555555555555555555555555555gggggggggggggggggggg55555555gg
555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
555555555555555555gggg5555555555555555gggggggggggggggggggggggggggggggg55555555555555555555555555gggggggggg555555gggggg555555gggg
55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
55gggggggg55555555555555555555555555gggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg555555555555gg55gggggggg
gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
gggggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggg555555555555555555555555gggggggggg5555555555555555gggggggggg
gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
gggggggggggggg5555555555555555gggggggggggggggggggggggggggggggggggggg555555555555555555555555555555gg55555555555555gggggggggggggg
gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
gggg55gggggg5555555555555555gggggggggggggggggggggggggggggggggggggg5555555555555555555555555555555555555555555555gggggggggggggg55
gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
gggggggggg5555555555555555gggggggggg5555gggggggggggggggggggggg55555555555555555555555555555555555555555555555555gggggggg55555555
gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
gggggggggg55555555555555gggggggggg555555gggggggggggggggggg55555555555555555555555555555555555555555555555555555555gggg5555555555
gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
gggggggg55555555555555gggggggg555555555555gggggggggggggg555555555555555555555555555555555555555555gggggggg5555555555555555555555
__map__ __map__
c30111e665c2b118f005bb151891000098020109634a06445a66afc5d3572f39d001b11430e3e61748055e3fd2637052131f2002560d516492b5020f990002b002f021f560105023b02d203145db2173d6341920c04b96902a31290d662d910e2752f9c05504756d0fb298534135a1a47803080f05360051613425132229001a c30111e665c2b118f005bb151891000098020109634a06445a66afc5d3572f39d001b11430e3e61748055e3fd2637052131f2002560d516492b5020f990002b002f021f560105023b02d203145db2173d6341920c04b96902a31290d662d910e2752f9c05504756d0fb298534135a1a47803080f05360051613425132229001a
d505aa3b118eb2f2c4333549a23b566224356131b5834961e12254034233120950235312522720922fb5e63672625833f9076b7242ca37d4bf5993aa1801f4c7346c2135300a0b625c674b2153531e33641560011046633b111045225280117720054d3a8f2619caed2015d3591418114689412040f632155d3331095f836644 d505aa3b118eb2f2c4333549a23b566224356131b5834961e12254034233120950235312522720922fb5e63672625833f9076b7242ca37d4bf5993aa1801f4c7346c2135300a0b625c674b2153531e33641560011046633b111045225280117720054d3a8f2619caed2015d3591418114689412040f632155d3331095f836644
@ -189,3 +329,88 @@ ac49a4516135e231316332ea30311c4262420391515020b57bd441827626ac3121117111e3143976
65c36534685711e9102895112512419d21062604c95c130841452445322376286c511128422626915a101d1784631830017c530411332960ae66b0413c47d931b13c711089060157a17361523352b25d1361221c656591611341ab14204a11439732663150620112032a4302036325e8322eb5573042a212431b18cf56578e33 65c36534685711e9102895112512419d21062604c95c130841452445322376286c511128422626915a101d1784631830017c530411332960ae66b0413c47d931b13c711089060157a17361523352b25d1361221c656591611341ab14204a11439732663150620112032a4302036325e8322eb5573042a212431b18cf56578e33
01447a75130226312881342247810740351d14141305239e12a4a2a05f13240a271933164e873663574b18d11154b2a2c2b508bd1139611c011433129273356283427d6691126215131a293225461533e0141302912a4014a0a339c5412251367842eb475112a2161c3053660c4165f0088114571448943b44b0213366192131 01447a75130226312881342247810740351d14141305239e12a4a2a05f13240a271933164e873663574b18d11154b2a2c2b508bd1139611c011433129273356283427d6691126215131a293225461533e0141302912a4014a0a339c5412251367842eb475112a2161c3053660c4165f0088114571448943b44b0213366192131
3595095320212d4246bb3525231d3b3234458d54831ad803236b13b2846895482785e36db149044cb33736ca3e121195567012831f4015944f3b1e536b19875925733040180b521901843ca07c561341e32205335aa1312525119424621210263825580964765b25958843f318b4b51518289837551312e812d22097226242e0 3595095320212d4246bb3525231d3b3234458d54831ad803236b13b2846895482785e36db149044cb33736ca3e121195567012831f4015944f3b1e536b19875925733040180b521901843ca07c561341e32205335aa1312525119424621210263825580964765b25958843f318b4b51518289837551312e812d22097226242e0
__sfx__
911300001305013031130321303213032130321105011031110321103211032110321505215031150321503215032150321503215032150321503215032150321503215032150321503215032150321503215032
911300001305013031130321303213032130321303213032130321303013030130301303013032130321303215050150311503015030150321503215032150301503015030150301503215032150321503215030
911300001605016031160301603016032160321805018031180301803018030180301105011031110301103011030110301103011030110321103211032130501505015031150321305011050110311103013052
911300001005210052100520905009031090300905009031090300903009030090300903009032090320903215050150311503015030150301503015030150301503015030150321503215032150301503015030
911300001806018031180301803218032180321606016031160301603216032160321a0601a0411a0401a0421a0421a0421a0401a0401a0401a0421a0421a0421a0421a0421a0511a0501a0501a0521a0521a052
91130000180501803118030180301803018030180321803218032180321803218032180321803218032180321a0601a0411a0401a0401a0401a0401a0421a0421a0421a0421a0421a0421a0421a0421a0421a040
911300001b0501b0311b0301b0321b0321b0321d0501d0311d0301d0321d0321d0321605016031160301603016030160301603216032160321603216032180501a0501a0311a0301805016050160311603218052
911300001505015031150300e0500e0310e0300e0500e0310e0300e0300e0300e0300e0300e0300e0300e0301a0501a0311a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a030
91130000190511a0311a0301a0301a0301a0301805018031180301803018030180301c0511c0311c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301c0301b031
911300001a0501a0311a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a0301a030
011300000c7530000007050070211a643000000000000000050500502105025000001a643000000a0500a0500c7530000000000000001a643000000a0500a0210a02500000000001a60302050020210102500000
011300000c7530000000050000211a643000000000000000000500002100025000001a6430000000000000000c7530000005050050501a643000000000000000050500505005025000001a643000000000000000
0113000000000000000c0500c0210c0250000000000000000a0500a0210a0250000000000000000f0500f0210f02500000000000000000000000000f0500f0210f02500000000000000007050070210602500000
011300000c753050000502505021050250000000000000000c753050000502505021050250000000000000000c7530a0000a0250a0210a0250000000000000000c7530a0000a0250a0210c753000000a0250a021
011300000c7530c0210c0200c0200c0200c0200c0200c0200c7530a0210a0200a0200a0200a0200a0200a0200c7530f0210f0200f0200f0200f0200f0500f0210c7530f0200f0200f02007050070210702006021
011300000c753050000502005020040250000000000000000c753050000502005020050200502005020050200c753000000a0500a0210a0250000000000000000c7530a0000a0200a0200a0200a0200a02500000
1513000000000000001a5552155521215265551a215000001b5552255522215275551b215000001a5552155521215265551a215000001a2051a2051a205000000c7530000000000000001a643000001a64300000
1513000000000000001c5552155521215285551c215000001c5552155521215285551c215000001d5552155521215295551d2150000000000000001d5552155521215295551d2150000000000000000000000000
1513000000000000001f52026520265212b5202b5202b5202052027520275212c5202c5202c5201f52026520265202b5202b5212b5222b5222b5202b5202b5202b5202b5202b5202b5202b5202b5202b5202b520
151300002b5202b5211f52526520265212b5202b5212b5202052527520275212c5202c5212c5221f52526520265212b5202b5222b5222b5222b5222b5222b5222b5222b5222b5222b5222b5222b5222b5222b522
151300002b5202b5222152026520265222d5202d5222d5222152026520265222d5202d5222d5222252026520265202e5202e5222e5222e5222e5202e5202e5202e5202e5202252026520265202f5202f5202f520
011300000c7530000000000000001a6430000000000000000c7530000000000000001a6430000000000000000c7530000000000000001a6430000000000000000c7530000000000000001a643000000000000000
011300000c7000000000000000001a6030000000000000000c7530000000000000001a6030000000000000000c7000000000000000001a6030000000000000000c7530000000000000001a643000000000000000
151300003053030530305303053030530305302e5302e5302e5202e5202e5202e5203252032520325203252032520325203052030520305203052030520305213051030510305103051030511305103051030510
a51300003051030510305103051030510305103051030510305103051030510305103051030510305103051524500245002450024500245002450024500245002450024500245002450024500245002450024500
011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
930a00003766437625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
954a00002b66518000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010400000c25512255232550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0108000013335113000c3000c3050c305000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__music__
01 00551544
00 01551544
00 020a1644
00 030b1644
00 000a1644
00 010b1644
00 020a1644
00 030b1644
00 000a1044
00 010b1044
00 020a1044
00 030b1144
00 040c1244
00 050d1344
00 060e1344
00 070f1444
00 08171544
02 09181544

19
music_manager.lua Normal file
View File

@ -0,0 +1,19 @@
music_manager={}
add(modules,music_manager)
function music_manager:init()
self._allow=true
end
function music_manager:allow(a)
self._allow=a
end
function music_manager:update()
if (not self._allow) music(-1,0) return
local is_playing = stat(54) != -1
local should_be_playing = completion_tracker:get_music_preference()
if (is_playing and not should_be_playing) music(-1,500)
if (not is_playing and should_be_playing) music(0)
local label,pref="start music",true
if (should_be_playing) label,pref="stop music",false
menuitem(1,label,function() completion_tracker:set_music_preference(pref) end)
end

17
palette.lua Normal file
View File

@ -0,0 +1,17 @@
function apply_palette()
-- bg
pal(13,-3,1)
-- arcana
-- pal(1,0,1)
pal(15,-9,1)
-- suits
pal(4,-11,1) -- first suit
pal(12,12,1)
pal(2,-8,1)
pal(3,-5,1)
-- pal(8,-9,1)
-- pal(14,8,1)
end

View File

@ -1,16 +1,16 @@
progression={ progression={
-- level 1 -- level 1
ruleset:new(5,1,9,0), -- by test: always winnable ruleset:new(1,5,1,9,0,nil,1), -- by test: always winnable
-- level 2 -- level 2
ruleset:new(5,2,9,0), -- by test: always winnable ruleset:new(2,5,2,9,0,nil,2), -- by test: always winnable
-- level 3 -- level 3
ruleset:new(7,2,9,8), -- by test: always winnable ruleset:new(3,7,2,9,8), -- by test: always winnable
-- level 4 (first challenging) -- level 4 (first challenging)
ruleset:new(9,3,9,16, "l4"), ruleset:new(4,9,3,9,16, "l4"),
-- level 5 -- level 5
ruleset:new(9,3,11,18, "l5"), ruleset:new(5,9,3,11,18, "l5"),
-- fortune's foundation -- fortune's foundation
ruleset:new(11,4,13,22,"ff"), ruleset:new(6,11,4,13,22,"ff"),
-- harder than fortune's foundation -- harder than fortune's foundation
ruleset:new(11,5,10,25,"l7") ruleset:new(7,11,5,10,25,"l7")
} }

View File

@ -1,5 +1,6 @@
ruleset=klass() ruleset=klass()
function ruleset:init( function ruleset:init(
completion_level,
-- Number of unlocked slots (up to 11) -- Number of unlocked slots (up to 11)
-- Includes the one in the middle -- Includes the one in the middle
-- For Fortune's Foundation: 11 -- For Fortune's Foundation: 11
@ -17,13 +18,16 @@ function ruleset:init(
-- Number of arcana (unbounded) -- Number of arcana (unbounded)
-- For Fortune's Foundation: 22 -- For Fortune's Foundation: 22
n_arcana, n_arcana,
pool pool,
preferred_verse
) )
self.completion_level=completion_level
self.n_slots=n_slots self.n_slots=n_slots
self.n_suits=n_suits self.n_suits=n_suits
self.n_cards_per_suit=n_cards_per_suit self.n_cards_per_suit=n_cards_per_suit
self.n_arcana=n_arcana self.n_arcana=n_arcana
self.pool=pool self.pool=pool
self.preferred_verse=preferred_verse
assert(self.n_slots<=11) assert(self.n_slots<=11)
assert(self.n_suits<=5) assert(self.n_suits<=5)
assert(self.n_cards_per_suit<=13) assert(self.n_cards_per_suit<=13)
@ -174,6 +178,7 @@ function ruleset:generate_layouts()
i-=ruleset.n_suits i-=ruleset.n_suits
if (i==1) return layout:new(x,y,layout_mode.obscured) if (i==1) return layout:new(x,y,layout_mode.obscured)
if (i==2) return layout:new(x+10,y,layout_mode.obscured) if (i==2) return layout:new(x+10,y,layout_mode.obscured)
if (i==3) return layout:new(x+5,y,layout_mode.rotated)
assert(false,"unknown well") assert(false,"unknown well")
end end

13
sounds.lua Normal file
View File

@ -0,0 +1,13 @@
sounds={}
function sounds:menu()
sfx(63,3)
end
function sounds:deal_card()
sfx(60,3)
end
function sounds:dire()
sfx(62,3)
end
function sounds:win()
sfx(61,3)
end

94
state_archaeology.lua Normal file
View File

@ -0,0 +1,94 @@
state_archaeology=klass()
function state_archaeology:init(tips_mode)
self.tips_mode=tips_mode
self.n_holy_books=#liturgy.holy_book
self:select_book(1)
end
function state_archaeology:enter() end
function state_archaeology:exit(new_top) end
function state_archaeology:reenter() end
function state_archaeology:suspend() end
function state_archaeology:select_book(n)
self.selection=n
if (self.tips_mode) self.title="tips" self.full_text=archaeology_tips return
local lines={}
local hb=liturgy.holy_book[self.selection]
self.title=hb[1]
printh()
for source in all(split(hb[2])) do
for line in all(liturgy.sacred_text_lines) do
if (line[1]==source) add(lines,self:_censor(source,line[2]))
end
end
self.full_text=""
for i=1,#lines do
if (i>1) self.full_text..="\n"
self.full_text..=lines[i]
end
end
function state_archaeology:_censor(src,line)
if (completion_tracker:was_seen(src)) return line
local line2=""
for i=1,#line do
local c=sub(line,i,i)
if ("a"<=c and c<="z") c="?"
line2..=c
end
return "\f6"..line2.."\ff"
end
function state_archaeology:update()
local vel=0
if (btnp(0)) vel-=1
if (btnp(1)) vel+=1
if (btnp(5)) sounds:menu() self.done=true
if (vel!=0) sounds:menu() self:select_book((self.selection+vel-1)%self.n_holy_books+1)
end
function state_archaeology:draw()
local fullw,fullh=measure_text(self.full_text)
local total_height=fullh+16
cls(13)
local y=64-total_height\2
local tw=measure_text(self.title)-1
local x=64-tw\2
local tx=x
print(self.title,x,y,15)
y+=6
line(x,y,x+tw-1,y,15)
y+=3
local x=64-fullw\2
rectfill(x-1,y-1,x+fullw,y+fullh-1,4)
print(self.full_text,x,y,15)
y+=fullh+1
line(tx,y,tx+tw-1,y,15)
y+=2
if not self.tips_mode then
print("⬅️",tx,y)
print("➡️",tx+tw-7,y)
end
print("❎ go back",1,122,15)
end
archaeology_tips=[[
wise archaeologists know these
secrets:
- hold ❎ to get a new board.
- hold 🅾️ to pick up more than
one card.
- updates and other games by
pyrex and nyeo are
available at nyeogmi.itch.io
and lexaloffle.
only diligent research can
uncover sacred mysteries!
- p & n]]

42
state_content_warning.lua Normal file
View File

@ -0,0 +1,42 @@
state_content_warning=klass()
function state_content_warning:init(prior_menu)
self.prior_menu=prior_menu
self.frame=0
self.frames=4
self.progress=0
end
function state_content_warning:enter() music_manager:allow(false) end
function state_content_warning:exit(new_top) music_manager:allow(true) end
function state_content_warning:reenter() end
function state_content_warning:suspend() end
function state_content_warning:update()
for i=0,6 do
if (btnp(i)) self.done=true
end
end
function state_content_warning:draw()
cls(0)
print([[
raven's rood explores post-
colonial subject matter,
including violent conflict
leading to genocide.
these themes are artistically
essential and inseparable from
the overall content of the game.
we understand all games are not
suitable for every individual.
we hope you enjoy our game
despite the bleak nature of its
subject matter.
once you continue, the tutorial
will begin, and you will not
encounter this message again.
]],2,2,6)
print("🅾️ continue",2,121,15)
end

23
state_excavate_menu.lua Normal file
View File

@ -0,0 +1,23 @@
-- todo: actually display a level picker or something
state_excavate_menu=klass()
function state_excavate_menu:init(prior_menu)
self.prior_menu=prior_menu
self.frame=0
self.frames=4
self.progress=0
end
function state_excavate_menu:enter() end
function state_excavate_menu:exit(new_top) end
function state_excavate_menu:reenter() end
function state_excavate_menu:suspend() end
function state_excavate_menu:update()
self.frame+=1
self.progress=self.frame/self.frames
if (self.progress>1) self.done=true main.state_manager:push(state_ironman:new(non_tutorial))
end
function state_excavate_menu:draw()
self.prior_menu:draw()
democrap:distort_screen(self.progress)
end

View File

@ -1,42 +1,75 @@
state_gameround=klass() state_gameround=klass()
function state_gameround:init(watcher,ruleset) function state_gameround:init(watcher,ruleset)
self.board=board:new(watcher,ruleset) self.board=board:new(watcher,ruleset)
self.outcome=nil
self.grab_frames=0
self.restart_frames=0
self.picking_up=false
end
function state_gameround:enter() self:add_menu() end
function state_gameround:exit() self:remove_menu() end
function state_gameround:reenter() self:add_menu() end
function state_gameround:suspend() self:remove_menu() end
function state_gameround:add_menu()
menuitem(4,"restart",function() self.outcome="restart" self.done=true end)
menuitem(5,"go to menu",function() self.outcome="menu" self.done=true end)
end
function state_gameround:remove_menu()
menuitem(4)
menuitem(5)
end end
function state_gameround:enter() end
function state_gameround:exit() end
function state_gameround:reenter() end
function state_gameround:suspend() end
function state_gameround:update() function state_gameround:update()
self.board:update() self.board:update()
if self.board:can_take_input() then if btn(4) then
if (btnp(0)) self.board.cursor:move_x(-1) self.grab_frames+=1
if (btnp(1)) self.board.cursor:move_x(1) else
if (btnp(2)) self.board.cursor:move_y(-1) self.grab_frames=0
if (btnp(3)) self.board.cursor:move_y(1)
if (btnp(4)) self.board.cursor:toggle_grab()
if (btnp(5)) self.board:undo()
end end
if (self.board:is_won()) self.done=true if btn(5) then
self.restart_frames+=1
else
self.restart_frames=0
end
local restart_progress=self.restart_frames/60
self.board:set_restart_progress(restart_progress)
if restart_progress>=1.0 then
self.outcome="restart"
self.done=true
return
end
if self.board:can_take_input() then
if (btnp(0)) self.board.cursor:move_x(-1) self.picking_up=false
if (btnp(1)) self.board.cursor:move_x(1) self.picking_up=false
if (btnp(2)) self.board.cursor:move_y(-1) self.picking_up=false
if (btnp(3)) self.board.cursor:move_y(1) self.picking_up=false
if btnp(4) then
if self.grab_frames<4 then
self.board.cursor:toggle_grab()
self.picking_up=true
else
self.board.cursor:incr_grab()
end
end
if btnp(5) and self.restart_frames < 4 then
if self.board.cursor:grabbed_card() then
self.board.cursor:drop_grab()
else
self.board:undo()
self.picking_up=false
end
end
end
if (self.board:is_won()) self.outcome="win" self.done=true main.state_manager:push(state_wonround:new(self.board))
end end
function state_gameround:draw() function state_gameround:draw()
cls(13) cls(13)
self.board:draw() self.board:draw()
-- bg
pal(13,-3,1)
-- arcana
-- pal(1,0,1)
pal(15,-9,1)
-- suits
pal(4,-11,1) -- first suit
pal(12,12,1)
pal(2,-8,1)
pal(3,-5,1)
-- pal(8,-9,1)
-- pal(14,8,1)
end end

View File

@ -7,16 +7,29 @@ end
function state_ironman:enter() self:on_enter() end function state_ironman:enter() self:on_enter() end
function state_ironman:exit() end function state_ironman:exit() end
function state_ironman:reenter() self:on_enter() end function state_ironman:reenter(round)
if round.outcome=="win" then
self.level+=1
elseif round.outcome=="menu" then
self.done=true
elseif round.outcome=="restart" then
else
assert(false,"unrecognized outcome: "..round.outcome)
end
self:on_enter()
end
function state_ironman:suspend() end function state_ironman:suspend() end
function state_ironman:on_enter() function state_ironman:on_enter()
self.done=true
local level=self.level local level=self.level
self.level+=1 if (self.done) return
if level <= #self.sequence then if level <= #self.sequence then
local w=self.sequence[level]() local w=self.sequence[level]()
main.state_manager:push(state_gameround:new(w)) main.state_manager:push(state_gameround:new(w))
else
main.state_manager:push(state_wonironman:new())
self.done=true
end end
end end

117
state_menu.lua Normal file
View File

@ -0,0 +1,117 @@
state_menu=klass()
function state_menu:init()
self.selection=1
self.frame=0
local function plain_opt(n,s,a)
return menu_option:new(function() return n end,function()
main.state_manager:push(s:new(a))
end)
end
self.options={
plain_opt("excavate",state_excavate_menu,self),
plain_opt("archaeology",state_archaeology),
menu_option:new(),
menu_option:new(function()
local pref=completion_tracker:get_music_preference()
if (pref) return "stop music"
return "start music"
end,function()
completion_tracker:set_music_preference(not completion_tracker:get_music_preference())
end),
plain_opt("reset data",state_reset_menu,self),
plain_opt("tips",state_archaeology,true)
}
end
function state_menu:enter() end
function state_menu:exit() end
function state_menu:reenter()
self.selection=1
end
function state_menu:suspend()
self.selection=nil
end
function state_menu:update()
self.frame+=1
self.frame%=1024
if (btnp(1) or btnp(4)) sounds:menu() self.options[self.selection]:cb() return
local vel=0
if (btnp(2)) vel-=1
if (btnp(3)) vel+=1
if vel!=0 then
while true do
self.selection=(self.selection+vel-1)%#self.options+1
if (self.options[self.selection].cb!=nil) break
end
end
end
function state_menu:draw()
cls(13)
self:draw_bg()
local optionsh=1
for o in all(self.options) do
optionsh+=2
if (o.cb) optionsh+=4
end
local totalh=optionsh+32
local y=128-totalh-1--64-totalh\2
-- rectfill(68,y,126,y+totalh-1,13)
local y0=y
spr(64,68,y,7,3)
y+=22
line(68,y,126,y,15)
y+=2
local optionsy=y+1
rectfill(68,y,126,y+optionsh-1,4)
y+=optionsh+1
line(68,y,126,y,15)
y+=2
print("by pyrex & nyeo",68,y,15)
local y1=y
local x=69
y=optionsy
for i=1,#self.options do
local o=self.options[i]
if (self.selection==i) spr(71,x-7+cos(time())*0.5,y)
local fg=13
if (o.cb) fg=15
if o.name then
print(o.name(),x,y,fg)
y+=6
else
line(x-1,y,x+57,y,fg)
y+=2
end
end
-- metascore
local metascore=completion_tracker:get_metascore()
if metascore>0 then
spr(72,66,y0-9,2,1)
print("="..tostr(metascore,2),79,y0-6,6)
end
end
function state_menu:draw_bg()
pal(7,1)
pal(13,1)
local m=128-(self.frame/2)%128
for col=-8,7 do
for row=-3,7 do
local realx=flr(col*32-row*16)+m
local realy=flr(row*30-col*12)
spr(76,realx,realy,4,4)
end
end
pal()
end
menu_option=klass()
function menu_option:init(name,cb)
self.name=name
self.cb=cb
end

62
state_reset_menu.lua Normal file
View File

@ -0,0 +1,62 @@
state_reset_menu=klass()
function state_reset_menu:init(prior_menu)
self.prior_menu=prior_menu
self.options="⬅️➡️⬆️⬇️🅾️"
self.code={}
self.code_i=1
for i=1,5 do
local i=flr(rnd(#self.options))
add(self.code,i)
end
end
function state_reset_menu:enter() end
function state_reset_menu:exit(new_top) end
function state_reset_menu:reenter() end
function state_reset_menu:suspend() end
function state_reset_menu:update()
for o=0,5 do
if btnp(o) then
if self.code_i>#self.code then
run()
end
if self.code[self.code_i]==o then
sounds:dire()
self.code_i+=1
if (self.code_i>#self.code) completion_tracker:reset()
else
self.done=true
end
return
end
end
end
function state_reset_menu:caption()
if (self.code_i > #self.code) return "savedata reset!"
local caption="to reset your\nsavedata, type\nthis code\n\n"
local code="\f7"
for i=1,#self.code do
local o=self.code[i]+1
local c=sub(self.options,o,o)
if (i-1<self.code_i and i>=self.code_i) code..="\ff"
if (i!=1) code..=" "
code..=c
end
return caption..code
end
function state_reset_menu:draw()
self.prior_menu:draw()
local caption=self:caption()
local w,h=measure_text(caption)
h-=1
local x=64-w\2
local y=64-h\2
rect(x-2,y-2,x+w+1,y+h+1,15)
rectfill(x-1,y-1,x+w,y+h,4)
print(caption,x,y,15)
end

31
state_wonironman.lua Normal file
View File

@ -0,0 +1,31 @@
state_wonironman=klass()
function state_wonironman:init()
end
function state_wonironman:enter()
sounds:win()
completion_tracker:incr_metascore()
end
function state_wonironman:exit(new_top) end
function state_wonironman:reenter() end
function state_wonironman:suspend() end
function state_wonironman:update()
if (btnp(4)) sounds:menu() self.done=true self.outcome="menu"
end
function state_wonironman:draw()
cls(13)
local msg="you have reached the bottom\n\nreceive one majestic kroner"
local w,h=measure_text(msg)
local x=64-w\2
local y=64-h\2
line(64-7,y-3,64+7,y-3,15)
line(64-7,y+h+1,64+7,y+h+1,15)
rectfill(x-1,y-1,x+w,y+h-1,4)
print(msg,x,y,15)
y+=h+3
spr(72,64-6,y,2,1)
line(64-7,y+9,64+7,y+9,15)
print("next",57,y+11,15)
print("(🅾️)",57,y+17,15)
end

76
state_wonround.lua Normal file
View File

@ -0,0 +1,76 @@
state_wonround=klass()
function state_wonround:init(board)
self.board=board
self.frame=0
self.frames=30
self.progress=0.0
self.card=self.board:get_endgame_card()
self.verse_id,self.verse_name,self.verse=liturgy:suggest_verse(self.board.ruleset,self.card)
end
seen_tip_this_session=false
function state_wonround:enter()
sounds:win()
completion_tracker:mark_seen(self.verse_id)
completion_tracker:advance_completion_level(self.board:get_completion_level())
if (self.board.watcher:allow_tips()) self.tip=deli(_won_round_tips,1) add(_won_round_tips,self.tip)
end
function state_wonround:exit(new_top) end
function state_wonround:reenter() end
function state_wonround:suspend() end
function state_wonround:update()
self.frame=min(self.frame+1,self.frames)
self.progress=self.frame/self.frames
self.board:set_restart_progress(self.progress)
if (self.progress<1.0) return
if (btnp(4)) sounds:menu() self.done=true
end
function state_wonround:draw()
cls(13)
if self.progress<1.0 then
self.board:draw()
return
end
self.board.ruleset.deck:draw_card(0,0,self.card,{})
poke(0x5f54,0x60)
-- blow it up
sspr(0,0,9,16,55,28+sin(time())+0.5,18,32)
poke(0x5f54,0x00)
rectfill(0,0,8,15,13)
local w,_=measure_text(self.verse_name)
local x=64-w\2
-- rectfill(x,64,x+w-2,70,4)
print(self.verse_name,x,64,15)
line(x,70,x+w-2,70,15)
local oldx,oldw=x,w
local y=73
local w,h=measure_text(self.verse)
local x=64-w\2
rectfill(x-1,y-1,x+w,y+h-1,4)
print(self.verse,x,y,15)
--[[
for line in all(split(self.verse,"\n")) do
local w,_=measure_text(line)
print(line,64-w\2,y,7)
y+=6
end
]]--
y+=h+1
line(oldx,y,oldx+oldw-2,y,15)
print("next",57,y+2,15)
print("(🅾️)",57,y+8,15)
if self.tip then
local w=measure_text(self.tip)
print(self.tip,64-w\2,122,15)
end
end
_won_round_tips={
"tip: hold ❎ to restart",
"tip: hold 🅾️ to stack cards"
}

View File

@ -1,36 +1,48 @@
standard_watcher_cb=function(i) return function() return watcher:new(progression[i]) end end
tutorial={ tutorial={
-- function() return watcher:new(progression[6]) end,
function() function()
return watcher:new(progression[1], 10,{ return watcher:new(progression[1], 10,{
tutorial_grab:new(1,4), tutorial_grab:new(1,4,"stack cards ascending..."),
tutorial_grab:new(5,1), tutorial_grab:new(5,1,"... or descending."),
tutorial_grab:new(4,3), tutorial_grab:new(4,3),
tutorial_grab:new(2,4), tutorial_grab:new(2,4,"fill the wells."),
}) })
end, end,
function() function()
return watcher:new(progression[2], 10,{ return watcher:new(progression[2], 10,{
tutorial_grab:new(1,6), tutorial_grab:new(1,6,"use the extra slot."),
tutorial_grab:new(1,2), tutorial_grab:new(1,2,"it blocks the wells."),
tutorial_grab:new(1,5), tutorial_grab:new(1,5,"it blocks the wells."),
tutorial_grab:new(1,5), tutorial_grab:new(1,5,"it blocks the wells."),
tutorial_grab:new(2,1), tutorial_grab:new(2,1,"it blocks the wells."),
tutorial_grab:new(2,1), tutorial_grab:new(2,1,"it blocks the wells."),
tutorial_grab:new(6,1), tutorial_grab:new(6,1,"drag it down."),
}) })
end, end,
function() function()
return watcher:new(progression[3],3,{ return watcher:new(progression[3],3,{
tutorial_grab:new(7,6), tutorial_grab:new(7,6,"here are more cards."),
tutorial_undo:new(), tutorial_undo:new("undo. (or hold to restart.)"),
tutorial_grab:new(6,7), tutorial_grab:new(6,7),
tutorial_grab:new(6,8), tutorial_grab:new(6,8,"they have their own well."),
tutorial_grab:new(2,6), tutorial_grab:new(2,6,"it can't be blocked."),
tutorial_grab:new(2,4), tutorial_grab:new(2,4,"stack ascending or descending."),
tutorial_grab:new(3,1), tutorial_grab:new(3,1,"collect the last card\nto read a scroll!"),
}) })
end, end,
function() return watcher:new(progression[4]) end, standard_watcher_cb(4),
function() return watcher:new(progression[5]) end, standard_watcher_cb(5),
function() return watcher:new(progression[6]) end, standard_watcher_cb(6),
function() return watcher:new(progression[7]) end standard_watcher_cb(7),
completion_stage=3
}
non_tutorial={
standard_watcher_cb(3),
standard_watcher_cb(4),
standard_watcher_cb(5),
standard_watcher_cb(6),
standard_watcher_cb(7)
} }

View File

@ -3,6 +3,10 @@ function watcher:init(ruleset,seed,stages)
self.ruleset=ruleset self.ruleset=ruleset
self.seed=seed self.seed=seed
self._stages=stages or {} self._stages=stages or {}
self._allow_tips=#self._stages == 0
end
function watcher:allow_tips()
return self._allow_tips
end end
function watcher:active_stage(board) function watcher:active_stage(board)
local stage=self._stages[1] local stage=self._stages[1]
@ -28,16 +32,25 @@ function watcher:draw(board)
x+=1 x+=1
y+=20 y+=20
local lx=x+3 local lx=x+3
line(lx,y-4,lx,y,15)
rectfill(x-2,y-2,x+w,y+h,1) rectfill(x-2,y-2,x+w,y+h,1)
rect(x-2,y-2,x+w,y+h,15) rect(x-2,y-2,x+w,y+h,15)
print(text,x,y,15) print(text,x,y,15)
local note=stage.note
if (not note) return
local w,h=measure_text(note)
local x=64-w\2
local y=88
rectfill(x-1,y-1,x+w-1,y+h-1,1)
rect(x-2,y-2,x+w,y+h,15)
print(note,x,y,15)
end end
tutorial_grab=klass() tutorial_grab=klass()
function tutorial_grab:init(src,dst) function tutorial_grab:init(src,dst,note)
self.src=src self.src=src
self.dst=dst self.dst=dst
self.note=note
end end
function tutorial_grab:active() function tutorial_grab:active()
@ -50,16 +63,16 @@ function tutorial_grab:intercept(x, slot)
end end
function tutorial_grab:draw(board,layouts) function tutorial_grab:draw(board,layouts)
local layout,i,text local layout,i,text
if board.cursor:acceptance_state() == acceptance_state.not_grabbed then if board.cursor:grabbed_card() == nil then
-- show a hint for grabbing -- show a hint for grabbing
layout=layouts:slot(self.src) layout=layouts:slot(self.src)
i=#board.slots[self.src].contents i=#board.slots[self.src].contents
draw_layout_hint(layout,i,15,false,0,0) draw_layout_hint(layout,i,15,false,true)
text="🅾️" text="🅾️"
else else
layout=layouts:slot(self.dst) layout=layouts:slot(self.dst)
i=#board.slots[self.dst].contents+1 i=#board.slots[self.dst].contents+2
draw_layout_hint(layout,i,15,false,0,0) draw_layout_hint(layout,i,15,false,true)
text="🅾️" text="🅾️"
end end
return layout,i,text return layout,i,text
@ -67,7 +80,9 @@ end
tutorial_undo=klass() tutorial_undo=klass()
function tutorial_undo:init() end function tutorial_undo:init(note)
self.note=note
end
function tutorial_undo:active() function tutorial_undo:active()
return true return true
end end
@ -77,7 +92,7 @@ end
function tutorial_undo:draw(board,layouts) function tutorial_undo:draw(board,layouts)
local layout,i,text local layout,i,text
layout=layouts:checkpoint() layout=layouts:checkpoint()
draw_layout_hint(layout,0,15,false,0,0) draw_layout_hint(layout,0,15,false,true)
text="" text=""
return layout,i,text return layout,i,text
end end