Compare commits
13 Commits
2085ba5a63
...
main
Author | SHA1 | Date | |
---|---|---|---|
2507a3f218 | |||
89dcee996f | |||
55eb61825e | |||
184ce112bd | |||
c2a978e315 | |||
93161c6465 | |||
7f87814d35 | |||
a7697fa1b2 | |||
0912e90510 | |||
119155a903 | |||
e3bc5a0dc6 | |||
dd46a76f54 | |||
ff1c59adf3 |
16
board.lua
16
board.lua
@ -96,8 +96,9 @@ function board:undo()
|
|||||||
if (not self.checkpoint) return
|
if (not self.checkpoint) return
|
||||||
if (not self.watcher:intercept("undo")) sounds:dire() return
|
if (not self.watcher:intercept("undo")) sounds:dire() return
|
||||||
sounds:menu()
|
sounds:menu()
|
||||||
|
local current_checkpoint=checkpoint:new(self,self.checkpoint.card)
|
||||||
self.checkpoint:apply(self)
|
self.checkpoint:apply(self)
|
||||||
self.checkpoint=nil
|
self.checkpoint=current_checkpoint
|
||||||
end
|
end
|
||||||
|
|
||||||
function board:on_idle()
|
function board:on_idle()
|
||||||
@ -128,6 +129,7 @@ function board:find_automove()
|
|||||||
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
|
self.last_card=top
|
||||||
|
|
||||||
@ -149,6 +151,7 @@ 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()
|
||||||
@ -172,13 +175,16 @@ function board:draw()
|
|||||||
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
|
||||||
@ -231,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)
|
||||||
|
@ -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
|
@ -7,7 +7,7 @@ end
|
|||||||
|
|
||||||
function completion_tracker:reset()
|
function completion_tracker:reset()
|
||||||
for i=0,63 do
|
for i=0,63 do
|
||||||
dset(i,0)
|
if (i!=59) dset(i,0) -- don't clear music pref flag
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
158
cursor.lua
158
cursor.lua
@ -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()
|
local slot=self:grabbed_slot()
|
||||||
if hover==self.grabbed then
|
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,43 +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)) sounds:dire() 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()
|
sounds:menu()
|
||||||
elseif acc==acceptance_state.would_accept then
|
elseif acc==acceptance_state.would_accept then
|
||||||
if (not self.board.watcher:intercept("drop",slot)) sounds:dire() return
|
if (not self.board.watcher:intercept("drop",slot)) sounds:dire() return
|
||||||
self.board:pre_move(src:peek())
|
self.board:pre_move(src:peek())
|
||||||
local card=src:pop()
|
while self:acceptance_state() == acceptance_state.would_accept do
|
||||||
tar:add(card)
|
local card=src:pop()
|
||||||
self.grabbed=nil
|
tar:add(card)
|
||||||
self.board:on_move(card)
|
deli(self.grabbed_slots)
|
||||||
|
end
|
||||||
|
self.grabbed_slots={}
|
||||||
|
self.board:on_move()
|
||||||
|
-- if (#self.grabbed_slots == 0) self:restore_hover()
|
||||||
sounds:menu()
|
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")) sounds:dire() return
|
self:drop_grab()
|
||||||
self.grabbed=nil
|
|
||||||
sounds:menu()
|
|
||||||
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
|
||||||
self.hover_x+=dx
|
if (dx==0) return
|
||||||
self.hover_x%=self.ruleset.n_slots -- TODO: Don't hard-code
|
local orig_x=self.hover_x
|
||||||
|
while true do
|
||||||
|
self.hover_x+=dx
|
||||||
|
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()
|
||||||
@ -72,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
|
33
engine.lua
33
engine.lua
@ -32,39 +32,6 @@ function klass()
|
|||||||
return k
|
return k
|
||||||
end
|
end
|
||||||
|
|
||||||
function alives(tbl)
|
|
||||||
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 gsv(s)
|
function gsv(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
|
||||||
|
@ -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
|
210
liturgy.lua
210
liturgy.lua
@ -1,109 +1,115 @@
|
|||||||
liturgy={
|
liturgy={
|
||||||
holy_book=gsv[[rood 1`1,2
|
holy_book=gsv[[rood 1`1,2,3
|
||||||
rood 2`3,4,5,6
|
rood 2`4,5,6,7
|
||||||
rood 3`7,8,9
|
rood 3`8,9,10
|
||||||
rood 4`10,11,12
|
rood 4`11,12,13
|
||||||
rood 5`13,14,15,16
|
rood 5`14,15,16,17,18
|
||||||
rood 6`17,18,19
|
rood 6`19,20
|
||||||
rood 7`20,21,22
|
rood 7`21,22,23
|
||||||
rood 8`23,24,25
|
rood 8`24,25,26]],
|
||||||
rood 9`26]],
|
|
||||||
sacred_text_lines=gsv
|
sacred_text_lines=gsv
|
||||||
[[1`come into this thicket.
|
[[1`one meerkat, one day
|
||||||
1`i have a bright wreath.
|
1`stood on two legs. it said:
|
||||||
1`my laurel is vibrant.
|
1`'come into this thicket.
|
||||||
2`the hollow of a stone.
|
1` i have a bright wreath.
|
||||||
2`this, too, opens to the key.
|
1` my laurel is vibrant.'
|
||||||
2`the tone of music delights me.
|
2`all sweet things tolerated,
|
||||||
2`the daisies.
|
2`those who came when called
|
||||||
3`whose angel is black like fish
|
2`were sheared of their fur.
|
||||||
3`is scarred like fish too.
|
2`this was the first day:
|
||||||
3`i know the elk's bite.
|
2`the dandelions blown.
|
||||||
4`a log does not eat.
|
3`the hollow,
|
||||||
4`nor does it suffer.
|
3`which opens to a key: music.
|
||||||
4`why write? why sing?
|
3`the meerkats were led there.
|
||||||
4`why answer for it?
|
3`where they stood.
|
||||||
5`a wolf that comes when called
|
4`now even the water
|
||||||
5`is sheared of its fur.
|
4`knows how to talk.
|
||||||
5`distolerate sweet things.
|
4`their leader, first to stand,
|
||||||
6`they are a regiment.
|
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`gather them.
|
||||||
6`bury their warglaives.
|
6`pour oil.
|
||||||
6`burn their holy book.
|
7`catching a leaf, ride it.
|
||||||
6`plant them like seeds.
|
7`suture its veins.
|
||||||
7`driftwood in a wash.
|
7`scatter glass in the vineyard.
|
||||||
7`the water is speaking.
|
8`lanias came in silver.
|
||||||
7`the bark is for beavers.
|
8`he milled the wheat and barley.
|
||||||
7`the twigs are for you.
|
8`he took oranges from the trees.
|
||||||
8`the stormwater drowns an ox.
|
8`meerkats dashed to the ferns.
|
||||||
8`go to the canopy.
|
8`he raised his bow and screamed.
|
||||||
8`fire arrows down.
|
9`the bolt became the wind.
|
||||||
9`catching a leaf, ride it.
|
9`the silver sails lashed.
|
||||||
9`suture its veins.
|
9`the silver ospreys swarmed.
|
||||||
9`scatter glass in the vineyard.
|
9`the silver shadow wailed.
|
||||||
10`lanias came in silver.
|
10`burning oil from bay to sky.
|
||||||
10`silver pants. silver armor.
|
10`scampering keas in bags!
|
||||||
10`he broke a seed with his beak.
|
10`there was no one in the field.
|
||||||
11`he milled the wheat and barley.
|
10`lanias came and went in silver.
|
||||||
11`he took oranges from the trees.
|
11`ravens are an old people.
|
||||||
11`apes scattered in the ferns.
|
11`but the mandate is new.
|
||||||
11`he raised his bow and screamed.
|
11`the spry one turns in the egg.
|
||||||
12`the bolt became the wind.
|
12`it reads 'the fate':
|
||||||
12`the silver sails lashed.
|
12`'man is woman'
|
||||||
12`the silver ospreys swarmed.
|
12`'a house in heaven
|
||||||
12`the silver shadow wailed.
|
12` is bought on earth.'
|
||||||
13`burning oil from bay to sky.
|
12`and not by hatching.
|
||||||
13`scampering keas!
|
13`the egg turns. it cracks.
|
||||||
13`no one left. quiet.
|
13`a meerkat tumbles out.
|
||||||
13`lanias came and went in silver.
|
13`cold, it breathes its last.
|
||||||
14`where were you? a small bird.
|
14`when lanias drags down stars
|
||||||
14`divine. you were in the fences.
|
14`in his net, he cannot
|
||||||
14`you were seedling, little one.
|
14`take down one: beauty.
|
||||||
14`the gorgeous lily blooms.
|
15`he cannot envy the vain,
|
||||||
15`ravens are an old people.
|
15`so lanias wrote this rood:
|
||||||
15`but the mandate is new.
|
15`the vain will not have it.
|
||||||
15`the spry one turns in the egg.
|
16`no longer is 'the fate':
|
||||||
16`it doesn't hatch.
|
16`there are many fates.
|
||||||
16`for a house in heaven, one
|
16`the music is over now.
|
||||||
16`buys it on earth.
|
16`it is quiet in the garden.
|
||||||
16`where does it go?
|
17`where are you? a small bird,
|
||||||
17`do not hate beauty.
|
17`divine. you are in the fences.
|
||||||
17`what ages, molts.
|
17`you are seedling, little one.
|
||||||
17`do not envy sores and rashes.
|
17`the gorgeous lily blooms.
|
||||||
18`do not despise vanity.
|
18`a star in the sky shines
|
||||||
18`who is this written for?
|
18`and you are born.
|
||||||
18`the vain will not have it
|
18`accept its blessing: caw,
|
||||||
19`you are a blossom in a blossom.
|
18`do not sing.
|
||||||
19`nobody will rip out your eyes.
|
19`you have your room.
|
||||||
19`you are waiting in the leaves.
|
19`i have mine.
|
||||||
20`you have your room.
|
19`let's dig a river,
|
||||||
20`i have mine.
|
19`and build a bridge.
|
||||||
20`let's dig a river,
|
20`let's dig a trap.
|
||||||
20`and build a bridge.
|
20`let's line it with spikes.
|
||||||
21`let's burn herbs and
|
20`let's cover it with a sheet,
|
||||||
21`feed your grandparents
|
20`and bury it in soil.
|
||||||
21`there's your soul!
|
21`a cuckoo stole an egg.
|
||||||
21`where? inside your body.
|
21`in the nest it left its young.
|
||||||
22`let's dig a trap.
|
21`the summer was so lean
|
||||||
22`let's line it with spikes.
|
21`and the snow so deep.
|
||||||
22`let's cover it with a sheet,
|
22`it was plump as a berry
|
||||||
22`and bury it in soil.
|
22`and it hatched.
|
||||||
23`is this what you want?
|
22`meerkats were in the trees.
|
||||||
23`let me tell you.
|
23`lanias said: old men suffer
|
||||||
23`you won't like how
|
23`and die for nothing. listen:
|
||||||
23`this ends.
|
23`when you grow: you won't
|
||||||
24`old men suffer and die
|
23`understand it. you want what
|
||||||
24`for nothing. listen:
|
23`you cannot have.
|
||||||
24`when you grow up: you won't
|
24`night is here.
|
||||||
24`understand it.
|
24`you're asleep.
|
||||||
25`night is here.
|
24`you leave this body.
|
||||||
25`you're asleep.
|
24`you won't want to come back.
|
||||||
25`you leave this body.
|
25`cross your eyes: 'the fate'
|
||||||
25`you won't want to come back.
|
25`is in them, their tears,
|
||||||
26`this rood is not for apes.
|
25`their music, their silence.
|
||||||
|
26`our rood is the final one.
|
||||||
26`those we killed have been
|
26`those we killed have been
|
||||||
26`planted how it says. like this
|
26`planted like seeds. this rood,
|
||||||
26`city, it will not be destroyed.]]
|
26`like this city, will not
|
||||||
|
26`be destroyed.]]
|
||||||
}
|
}
|
||||||
|
|
||||||
function liturgy:init()
|
function liturgy:init()
|
||||||
|
4
main.lua
4
main.lua
@ -10,9 +10,9 @@ function main:init()
|
|||||||
local b=board:new(watcher:new(progression[#progression],1,{}))
|
local b=board:new(watcher:new(progression[#progression],1,{}))
|
||||||
b.last_card=75
|
b.last_card=75
|
||||||
self.state_manager:push(state_wonround:new(b))
|
self.state_manager:push(state_wonround:new(b))
|
||||||
]]
|
]]--
|
||||||
|
|
||||||
if (completion_tracker:should_show_tutorial()) self.state_manager:push(state_ironman:new(tutorial))
|
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()
|
||||||
|
198
main.p8
198
main.p8
@ -1,6 +1,8 @@
|
|||||||
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 palette.lua
|
||||||
#include animator.lua
|
#include animator.lua
|
||||||
@ -22,55 +24,49 @@ __lua__
|
|||||||
#include seeds.lua
|
#include seeds.lua
|
||||||
#include sounds.lua
|
#include sounds.lua
|
||||||
#include state_archaeology.lua
|
#include state_archaeology.lua
|
||||||
|
#include state_content_warning.lua
|
||||||
#include state_excavate_menu.lua
|
#include state_excavate_menu.lua
|
||||||
#include state_manager.lua
|
#include state_manager.lua
|
||||||
#include state_menu.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_reset_menu.lua
|
||||||
#include state_restartmenu.lua
|
|
||||||
#include state_wonironman.lua
|
#include state_wonironman.lua
|
||||||
#include state_wonround.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
|
||||||
@ -170,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
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
music_manager={}
|
music_manager={}
|
||||||
add(modules,music_manager)
|
add(modules,music_manager)
|
||||||
function music_manager:init()
|
function music_manager:init()
|
||||||
|
self._allow=true
|
||||||
|
end
|
||||||
|
function music_manager:allow(a)
|
||||||
|
self._allow=a
|
||||||
end
|
end
|
||||||
function music_manager:update()
|
function music_manager:update()
|
||||||
|
if (not self._allow) music(-1,0) return
|
||||||
local is_playing = stat(54) != -1
|
local is_playing = stat(54) != -1
|
||||||
local should_be_playing = completion_tracker:get_music_preference()
|
local should_be_playing = completion_tracker:get_music_preference()
|
||||||
if (is_playing and not should_be_playing) music(-1,500)
|
if (is_playing and not should_be_playing) music(-1,500)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
state_archaeology=klass()
|
state_archaeology=klass()
|
||||||
function state_archaeology:init()
|
function state_archaeology:init(tips_mode)
|
||||||
|
self.tips_mode=tips_mode
|
||||||
self.n_holy_books=#liturgy.holy_book
|
self.n_holy_books=#liturgy.holy_book
|
||||||
self:select_book(1)
|
self:select_book(1)
|
||||||
end
|
end
|
||||||
@ -11,6 +12,7 @@ function state_archaeology:suspend() end
|
|||||||
|
|
||||||
function state_archaeology:select_book(n)
|
function state_archaeology:select_book(n)
|
||||||
self.selection=n
|
self.selection=n
|
||||||
|
if (self.tips_mode) self.title="tips" self.full_text=archaeology_tips return
|
||||||
local lines={}
|
local lines={}
|
||||||
local hb=liturgy.holy_book[self.selection]
|
local hb=liturgy.holy_book[self.selection]
|
||||||
self.title=hb[1]
|
self.title=hb[1]
|
||||||
@ -68,7 +70,25 @@ function state_archaeology:draw()
|
|||||||
line(tx,y,tx+tw-1,y,15)
|
line(tx,y,tx+tw-1,y,15)
|
||||||
y+=2
|
y+=2
|
||||||
|
|
||||||
print("⬅️",tx,y)
|
if not self.tips_mode then
|
||||||
print("➡️",tx+tw-7,y)
|
print("⬅️",tx,y)
|
||||||
|
print("➡️",tx+tw-7,y)
|
||||||
|
end
|
||||||
print("❎ go back",1,122,15)
|
print("❎ go back",1,122,15)
|
||||||
end
|
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
42
state_content_warning.lua
Normal 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
|
@ -2,7 +2,9 @@ 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.outcome=nil
|
||||||
|
self.grab_frames=0
|
||||||
self.restart_frames=0
|
self.restart_frames=0
|
||||||
|
self.picking_up=false
|
||||||
end
|
end
|
||||||
function state_gameround:enter() self:add_menu() end
|
function state_gameround:enter() self:add_menu() end
|
||||||
function state_gameround:exit() self:remove_menu() end
|
function state_gameround:exit() self:remove_menu() end
|
||||||
@ -22,6 +24,11 @@ end
|
|||||||
|
|
||||||
function state_gameround:update()
|
function state_gameround:update()
|
||||||
self.board:update()
|
self.board:update()
|
||||||
|
if btn(4) then
|
||||||
|
self.grab_frames+=1
|
||||||
|
else
|
||||||
|
self.grab_frames=0
|
||||||
|
end
|
||||||
if btn(5) then
|
if btn(5) then
|
||||||
self.restart_frames+=1
|
self.restart_frames+=1
|
||||||
else
|
else
|
||||||
@ -30,18 +37,34 @@ function state_gameround:update()
|
|||||||
local restart_progress=self.restart_frames/60
|
local restart_progress=self.restart_frames/60
|
||||||
self.board:set_restart_progress(restart_progress)
|
self.board:set_restart_progress(restart_progress)
|
||||||
|
|
||||||
|
|
||||||
if restart_progress>=1.0 then
|
if restart_progress>=1.0 then
|
||||||
main.state_manager:push(state_restartmenu:new())
|
self.outcome="restart"
|
||||||
|
self.done=true
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.board:can_take_input() then
|
if self.board:can_take_input() then
|
||||||
if (btnp(0)) self.board.cursor:move_x(-1)
|
if (btnp(0)) self.board.cursor:move_x(-1) self.picking_up=false
|
||||||
if (btnp(1)) self.board.cursor:move_x(1)
|
if (btnp(1)) self.board.cursor:move_x(1) self.picking_up=false
|
||||||
if (btnp(2)) self.board.cursor:move_y(-1)
|
if (btnp(2)) self.board.cursor:move_y(-1) self.picking_up=false
|
||||||
if (btnp(3)) self.board.cursor:move_y(1)
|
if (btnp(3)) self.board.cursor:move_y(1) self.picking_up=false
|
||||||
if (btnp(4)) self.board.cursor:toggle_grab()
|
if btnp(4) then
|
||||||
if (btnp(5)) self.board:undo()
|
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
|
end
|
||||||
if (self.board:is_won()) self.outcome="win" self.done=true main.state_manager:push(state_wonround:new(self.board))
|
if (self.board:is_won()) self.outcome="win" self.done=true main.state_manager:push(state_wonround:new(self.board))
|
||||||
end
|
end
|
||||||
|
@ -2,13 +2,14 @@ state_menu=klass()
|
|||||||
function state_menu:init()
|
function state_menu:init()
|
||||||
self.selection=1
|
self.selection=1
|
||||||
self.frame=0
|
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={
|
self.options={
|
||||||
menu_option:new(function() return "excavate" end,function()
|
plain_opt("excavate",state_excavate_menu,self),
|
||||||
main.state_manager:push(state_excavate_menu:new(self))
|
plain_opt("archaeology",state_archaeology),
|
||||||
end),
|
|
||||||
menu_option:new(function() return "archaeology" end,function()
|
|
||||||
main.state_manager:push(state_archaeology:new())
|
|
||||||
end),
|
|
||||||
menu_option:new(),
|
menu_option:new(),
|
||||||
menu_option:new(function()
|
menu_option:new(function()
|
||||||
local pref=completion_tracker:get_music_preference()
|
local pref=completion_tracker:get_music_preference()
|
||||||
@ -17,9 +18,8 @@ function state_menu:init()
|
|||||||
end,function()
|
end,function()
|
||||||
completion_tracker:set_music_preference(not completion_tracker:get_music_preference())
|
completion_tracker:set_music_preference(not completion_tracker:get_music_preference())
|
||||||
end),
|
end),
|
||||||
menu_option:new(function() return "reset data" end,function()
|
plain_opt("reset data",state_reset_menu,self),
|
||||||
main.state_manager:push(state_reset_menu:new(self))
|
plain_opt("tips",state_archaeology,true)
|
||||||
end)
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
function state_menu:enter() end
|
function state_menu:enter() end
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
state_restartmenu=klass()
|
|
||||||
function state_restartmenu:init()
|
|
||||||
end
|
|
||||||
function state_restartmenu:enter()
|
|
||||||
-- for now, make this only a restart button
|
|
||||||
self.outcome="restart" self.done=true
|
|
||||||
end
|
|
||||||
function state_restartmenu:exit(new_top)
|
|
||||||
new_top.outcome=self.outcome
|
|
||||||
new_top.done=true
|
|
||||||
end
|
|
||||||
|
|
||||||
function state_restartmenu:reenter() end
|
|
||||||
function state_restartmenu:suspend() end
|
|
||||||
|
|
||||||
function state_restartmenu:update()
|
|
||||||
if (btnp(0)) self.outcome="menu" self.done=true
|
|
||||||
if (btnp(4)) self.outcome="restart" self.done=true
|
|
||||||
end
|
|
||||||
function state_restartmenu:draw()
|
|
||||||
cls(13)
|
|
||||||
print("⬅️ back to menu",1,58,7)
|
|
||||||
print("🅾️ restart",1,64,7)
|
|
||||||
end
|
|
@ -11,7 +11,7 @@ function state_wonironman:reenter() end
|
|||||||
function state_wonironman:suspend() end
|
function state_wonironman:suspend() end
|
||||||
|
|
||||||
function state_wonironman:update()
|
function state_wonironman:update()
|
||||||
if (btnp(4)) sounds:menu() self.done=true
|
if (btnp(4)) sounds:menu() self.done=true self.outcome="menu"
|
||||||
end
|
end
|
||||||
function state_wonironman:draw()
|
function state_wonironman:draw()
|
||||||
cls(13)
|
cls(13)
|
||||||
|
@ -12,8 +12,7 @@ function state_wonround:enter()
|
|||||||
sounds:win()
|
sounds:win()
|
||||||
completion_tracker:mark_seen(self.verse_id)
|
completion_tracker:mark_seen(self.verse_id)
|
||||||
completion_tracker:advance_completion_level(self.board:get_completion_level())
|
completion_tracker:advance_completion_level(self.board:get_completion_level())
|
||||||
self.has_tip = not seen_tip_this_session
|
if (self.board.watcher:allow_tips()) self.tip=deli(_won_round_tips,1) add(_won_round_tips,self.tip)
|
||||||
seen_tip_this_session=true
|
|
||||||
end
|
end
|
||||||
function state_wonround:exit(new_top) end
|
function state_wonround:exit(new_top) end
|
||||||
|
|
||||||
@ -65,9 +64,13 @@ function state_wonround:draw()
|
|||||||
print("next",57,y+2,15)
|
print("next",57,y+2,15)
|
||||||
print("(🅾️)",57,y+8,15)
|
print("(🅾️)",57,y+8,15)
|
||||||
|
|
||||||
if self.has_tip then
|
if self.tip then
|
||||||
local tip="tip: hold ❎ to restart"
|
local w=measure_text(self.tip)
|
||||||
local w=measure_text(tip)
|
print(self.tip,64-w\2,122,15)
|
||||||
print(tip,64-w\2,122,15)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
_won_round_tips={
|
||||||
|
"tip: hold ❎ to restart",
|
||||||
|
"tip: hold 🅾️ to stack cards"
|
||||||
|
}
|
32
tutorial.lua
32
tutorial.lua
@ -3,32 +3,32 @@ tutorial={
|
|||||||
-- function() return watcher:new(progression[6]) end,
|
-- 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,
|
||||||
standard_watcher_cb(4),
|
standard_watcher_cb(4),
|
||||||
|
31
watcher.lua
31
watcher.lua
@ -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
|
||||||
|
Reference in New Issue
Block a user