fortunes_foundation/liturgy.lua
2024-02-11 21:53:19 -08:00

145 lines
3.6 KiB
Lua

liturgy={
holy_book=gsv[[rood 1`1,2
rood 2`3,4,5,6
rood 3`7,8,9
rood 4`10,11,12
rood 5`13,14,15,16
rood 6`17,18,19
rood 7`20,21,22
rood 8`23,24,25
rood 9`26]],
sacred_text_lines=gsv
[[1`come into this thicket.
1`i have a bright wreath.
1`my laurel is vibrant.
2`the hollow of a stone.
2`this, too, opens to the key.
2`the tone of music delights me.
2`the daisies.
3`whose angel is black like fish
3`is scarred like fish too.
3`i know the elk's bite.
4`a log does not eat.
4`nor does it suffer.
4`why write? why sing?
4`why answer for it?
5`a wolf that comes when called
5`is sheared of its fur.
5`distolerate sweet things.
6`they are a regiment.
6`gather them.
6`bury their warglaives.
6`burn their holy book.
6`plant them like seeds.
7`driftwood in a wash.
7`the water is speaking.
7`the bark is for beavers.
7`the twigs are for you.
8`the stormwater drowns an ox.
8`go to the canopy.
8`fire arrows down.
9`catching a leaf, ride it.
9`suture its veins.
9`scatter glass in the vineyard.
10`lanias came in silver.
10`silver pants. silver armor.
10`he broke a seed with his beak.
11`he milled the wheat and barley.
11`he took oranges from the trees.
11`apes scattered in the ferns.
11`he raised his bow and screamed.
12`the bolt became the wind.
12`the silver sails lashed.
12`the silver ospreys swarmed.
12`the silver shadow wailed.
13`burning oil from bay to sky.
13`scampering keas!
13`no one left. quiet.
13`lanias came and went in silver.
14`where were you? a small bird.
14`divine. you were in the fences.
14`you were seedling, little one.
14`the gorgeous lily blooms.
15`ravens are an old people.
15`but the mandate is new.
15`the spry one turns in the egg.
16`it doesn't hatch.
16`for a house in heaven, one
16`buys it on earth.
16`where does it go?
17`do not hate beauty.
17`what ages, molts.
17`do not envy sores and rashes.
18`do not despise vanity.
18`who is this written for?
18`the vain will not have it
19`you are a blossom in a blossom.
19`nobody will rip out your eyes.
19`you are waiting in the leaves.
20`you have your room.
20`i have mine.
20`let's dig a river,
20`and build a bridge.
21`let's burn herbs and
21`feed your grandparents
21`there's your soul!
21`where? inside your body.
22`let's dig a trap.
22`let's line it with spikes.
22`let's cover it with a sheet,
22`and bury it in soil.
23`is this what you want?
23`let me tell you.
23`you won't like how
23`this ends.
24`old men suffer and die
24`for nothing. listen:
24`when you grow up: you won't
24`understand it.
25`night is here.
25`you're asleep.
25`you leave this body.
25`you won't want to come back.
26`this rood is not for apes.
26`those we killed have been
26`planted how it says. like this
26`city, it will not 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