initial commit with finisshed game
This commit is contained in:
commit
25240b53e4
101
art.lua
Normal file
101
art.lua
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
paper_color = 15
|
||||||
|
highlight_text_color = 0
|
||||||
|
base_text_color = 5
|
||||||
|
blank_ingredient_outline_color = 6
|
||||||
|
light_text_color = 7
|
||||||
|
|
||||||
|
phoebe_portrait = 72
|
||||||
|
lenore_portrait = 76
|
||||||
|
seller_portrait = 136
|
||||||
|
neighbor_portrait = 140
|
||||||
|
witch_portrait = 200
|
||||||
|
librarian_portrait = 204
|
||||||
|
door_portrait = 196
|
||||||
|
|
||||||
|
toast_str=""
|
||||||
|
toast_timer=0
|
||||||
|
|
||||||
|
function toast(text)
|
||||||
|
toast_str = text
|
||||||
|
toast_timer = 4
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_workbench()
|
||||||
|
-- workbench surface
|
||||||
|
rectfill(0,0,140,140, 4)
|
||||||
|
-- seams on the workbench
|
||||||
|
for i=1,20 do
|
||||||
|
line(0, i*16, 140, i*16-50, 5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_background()
|
||||||
|
draw_workbench()
|
||||||
|
|
||||||
|
-- watch
|
||||||
|
pal(1,0) -- replace one color with black for the hands
|
||||||
|
spr(64, -2,0, 4,4)
|
||||||
|
pal()
|
||||||
|
|
||||||
|
-- pen
|
||||||
|
spr(68, 4, 90, 4,4)
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_paper(x,y,w,h)
|
||||||
|
draw_paper_with_color(x,y,w,h,paper_color)
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_paper_with_color(x,y, w, h, color)
|
||||||
|
-- paper
|
||||||
|
rectfill(x,y, x+w,y+h, color)
|
||||||
|
-- ragged borders
|
||||||
|
sspr(72,0, 2,8, x-1,y, 2,h+1) -- west
|
||||||
|
sspr(72,0, 8,2, x,y-1, w+1,2) -- north
|
||||||
|
sspr(72,0, 2,8, x+w,y, 2,h+1) -- east
|
||||||
|
sspr(72,0, 8,2, x,y+h, w+1,2) -- south
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_recipe_on_paper(recipe, x, y)
|
||||||
|
color(highlight_text_color)
|
||||||
|
print(recipe.title, x+2, y+2)
|
||||||
|
|
||||||
|
|
||||||
|
-- description
|
||||||
|
color(base_text_color)
|
||||||
|
print(library.item_blueprints[recipe.result].description, x+44, y+12)
|
||||||
|
|
||||||
|
for i=1,3 do
|
||||||
|
rect(x+42, y+2+26*i, x+93, y+26*i+24, blank_ingredient_outline_color)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- list of selected active traits
|
||||||
|
color(highlight_text_color)
|
||||||
|
print("traits:", x+2, y+78)
|
||||||
|
end
|
||||||
|
|
||||||
|
function decorate_recipe_unfinished(recipe, x, y)
|
||||||
|
color(blank_ingredient_outline_color)
|
||||||
|
for i, ing in ipairs(recipe.ingredients) do
|
||||||
|
print(ing, x+46, y+2+26*i+9)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_ingredient_listing(ing, x, y)
|
||||||
|
color(highlight_text_color)
|
||||||
|
print(ing.title,x+4,y+4)
|
||||||
|
|
||||||
|
print_quality(ing.quality, x+54, y+14)
|
||||||
|
|
||||||
|
color(base_text_color)
|
||||||
|
for i, trait in ipairs(ing.traits) do
|
||||||
|
print(library.traits[trait][1], x+6, 5+y+i*6)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function print_quality(quality, x, y)
|
||||||
|
the_str = tostring(quality)
|
||||||
|
color(highlight_text_color)
|
||||||
|
print(the_str, x - 5*(#the_str), y)
|
||||||
|
color()
|
||||||
|
spr(1, x - 5*(#the_str)-8, y-2)
|
||||||
|
end
|
1128
ateli8.html
Normal file
1128
ateli8.html
Normal file
File diff suppressed because one or more lines are too long
365
ateli8.p8
Normal file
365
ateli8.p8
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
pico-8 cartridge // http://www.pico-8.com
|
||||||
|
version 41
|
||||||
|
__lua__
|
||||||
|
#include utils.lua
|
||||||
|
#include library.lua
|
||||||
|
|
||||||
|
#include script_lenore.lua
|
||||||
|
#include script_library.lua
|
||||||
|
#include script_charcoal_seller.lua
|
||||||
|
#include script_neighbor.lua
|
||||||
|
#include script_witch.lua
|
||||||
|
|
||||||
|
#include art.lua
|
||||||
|
|
||||||
|
#include conversation.lua
|
||||||
|
#include screen_inventory.lua
|
||||||
|
#include screen_letters.lua
|
||||||
|
#include screen_workbench.lua
|
||||||
|
#include screen_recipe_list.lua
|
||||||
|
#include screen_walkaround.lua
|
||||||
|
#include screen_crafting.lua
|
||||||
|
#include screen_title.lua
|
||||||
|
|
||||||
|
current_screen = nil
|
||||||
|
animations = {}
|
||||||
|
change_screen(screen_title)
|
||||||
|
function _update()
|
||||||
|
|
||||||
|
for animation in all(animations) do
|
||||||
|
animation.timer += 1/30.
|
||||||
|
animation.update(animation)
|
||||||
|
end
|
||||||
|
|
||||||
|
animations = filter_list(animations, function(anim) return anim.active end)
|
||||||
|
|
||||||
|
current_screen.update()
|
||||||
|
end
|
||||||
|
|
||||||
|
function _draw()
|
||||||
|
if conversation_active then
|
||||||
|
prev_screen.draw()
|
||||||
|
else
|
||||||
|
current_screen.draw()
|
||||||
|
end
|
||||||
|
|
||||||
|
for animation in all(animations) do
|
||||||
|
animation.draw(animation)
|
||||||
|
end
|
||||||
|
|
||||||
|
if conversation_active then
|
||||||
|
current_screen.draw()
|
||||||
|
end
|
||||||
|
|
||||||
|
if toast_str ~= "" and toast_timer > 0 then
|
||||||
|
rectfill(0,120,128,128,5)
|
||||||
|
print(toast_str, 1, 121, 0)
|
||||||
|
toast_timer -= 1/30.
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ❎ 🅾️ are the buttons
|
||||||
|
__gfx__
|
||||||
|
0000000000000000055555550000000005555555000000000000000990000000000000009090909033333b330000000011111000000011113333333333333333
|
||||||
|
0000000000000000560606065000000000000000000000000000009aa9000000000000000909090933333b3300000000b11110000000011b3333b33333333b33
|
||||||
|
007007000000000050606060500000000000000000000000000009aaaa90000000000a00909090901111111100000000b11100000000111b3333b33333333b33
|
||||||
|
00077000000555505606060650000000000000000dddddd000009aaaaaa900000000a9a00909090910111101111010103111000000001111333333333b333333
|
||||||
|
000770000005005050606060500000000000000000d00d0000009aaaaaa900000000a9a0909090900000000011111111111100000000011b333333333b333333
|
||||||
|
0070070000050550560606065000000000000000000dd000000009aaaa90000000000a00090909090000000011111111b11110000000111b333b3333333333b3
|
||||||
|
0000000000055550506060605000000000000000000000000000009aa900000000000000909090900000000011b33311b111100000000113333b3333333333b3
|
||||||
|
00000000000000055606060650000000000000000000000000000009900000000000000009090909000000003333333331110000000001133333333333333333
|
||||||
|
0000000000000000000000000000000054555545000999990099990033333333333333333333333300000113000000003111000000000000000000000001116c
|
||||||
|
00000000000000000000000000000000545555450009444409999990333333333f33fff333333333000011130000000031111000000000000b00b00b6711176c
|
||||||
|
0088888000ccccc000bbbbb00022222054555545009444449999aa993333ffffffffffffffff11330000011100000000111000000000000000b0b0b066616667
|
||||||
|
0088888000ccccc000bbbbb000222220545555450094444499999a991111ffffffffffffffff111100000111010000001100000000000101b0b0b0b016676661
|
||||||
|
0088888000ccccc000bbbbb000222220545555450944444499999999111ffffccffccffcfffff11100000011110000000010000000001011b0b0b0b016676633
|
||||||
|
0088888000ccccc000bbbbb000222220545555450944444499999999ffffffcccccccccccfffffff00000000111100000000000000000111b0b0b0b033663333
|
||||||
|
0088888000ccccc000bbbbb0002222205455554594444444099999900fffcccccccccccccccffff00000000011100000000000000001111100b000b033333333
|
||||||
|
0000000000000000000000000000000054555545999999990099990000fccccccccccccccccccf00000000003111000000000000000011130000000033333333
|
||||||
|
000000000066660000000000000700000066660005555550000000000000000000000000055555500000000000000000009999a000000b000000000000000000
|
||||||
|
00000000000660000000000000007000066886605cccccc5670006c00009c000000000005555555500000000000000000999999a00000b000000000000000000
|
||||||
|
00000000000660000003033000555500068668605555555566606670009cc8000000000088888844000000000000000099999999a00000000000000000000000
|
||||||
|
00066000006cc6000303b0000555655006666860544444450667660009ccccc00000000088448888000000000000000099999999a22222220009900000000000
|
||||||
|
00d6660006cc7760030b3300055555500068866005444450066670000cc9ccc000000000888888880008800000dddd0056666666222222220009900000000110
|
||||||
|
7d66666706cccc6003b00000055555500066660005444450006600000099cb0000000000448dd888008888000dddddd0566dd6665555555500999a0000011110
|
||||||
|
07766770006cc6000b333000005555000068600005444450006600000009900000000000888dd44808888880dddddddd566dd66666666665099999a001111111
|
||||||
|
007770000006600000000000000000000066600000555500000000000000000000000000888dd88888888888dddddddd566dd666666666659999999a11111111
|
||||||
|
00044800000448000444444004444440004444000044440000000000555555555555555554444445566444455446648500228800024244907777777750000006
|
||||||
|
00448800004488000488ff400488ff400444444004444440000000005444444444444444544664455664444554466445022288802442449077b7766755066066
|
||||||
|
044f7f00044f7f0004f7f74004f7f7400244a4400244a4400000000054c4c4c4c4c4c4c454466445544446655444444522200888555555557bbb766755556666
|
||||||
|
04ffff0004ffff0000ffff0000ffff0000244400002444000000000054c4c4c4c4c4c4c4544444455484466558448445400000042424444977b7777755566666
|
||||||
|
0082200000822000008228000082280000822800008228000000000054444444499999445444444558444445544444454dddddd4242444497777777755556666
|
||||||
|
0802200008022000080220800802208008022080080220800000000054c4c4c4c9ddd9c45dd46465544dd44554866445dccc111d5555555576677dd7555dd666
|
||||||
|
0002020000022000000202000002200000020200000220000000000054c4c4c4c9ddd9c45dd46465544dd44558466445dddddddd2442449076677dd7555dd666
|
||||||
|
002002000002200000200200000220000020020000022000000000005444444449ddd9445dd44445544dd445544444455dddddd50242449077777dd7055dd660
|
||||||
|
00000000000000000000000000000900000666000000000000000000000000006666666666666664444444666666666622222222222222222222222222222222
|
||||||
|
00000000000000000000000000000009000666000000000000000000000000006666666666665444444555444466666622222222222211511551122222222222
|
||||||
|
00000000000000000000000000000000000666600000000000000000000000006666666666544444445aaa544446666622222222225111111111111222222222
|
||||||
|
00000000000000544444400000009090000666700000000000000000000000006666666665444444445a6a544456666622222222111111111151111122222222
|
||||||
|
00000000000549999999944400990000000566760000000000000000000000006666666544444444445aaa544446666622222215111115555111151151111112
|
||||||
|
00000000044999777777999994999000000066670000000000000000000000006666666444444444444555444556666622222211111511111111111151111111
|
||||||
|
0000000049997777757777779999000000005667600000000000000000000000666666544444a4444444444455a66666222229fff11111111111111151111111
|
||||||
|
0000000499977777757777777799000000000666600000000000000000000000666664444444a4444888888888a6666622222ffffff111555515551151111111
|
||||||
|
0000004997777577757777577779400000000566760000000000000000000000666654444454a448888888888866666622229fffffff11111111111121111111
|
||||||
|
0000059977777757757775777779940000000066760000000000000000000000666644444544448888488f888486666622229fffffffff111111511121111111
|
||||||
|
000059977577777777777777777799400000005667600000000000000000000066654444544448888488fff888486666222211fff111fff11555111121111111
|
||||||
|
000049977757777777777777775779400000000667600000000000000000000066644445444488899998ff999984666622229ffffffffff11111115111111111
|
||||||
|
00049977777777777777777775777994000000056111000000000000000000006665444544488898888fffffff986666222229fff999ffff1111151111111111
|
||||||
|
000599777777777777777777777777940000000011c1000000000000000000006644445444488888887ff9777ff6666622222179f7177ffff111511122111111
|
||||||
|
0004997777777777777777777777779400000000511c100000000000000000006654445444848848717ff9717ff6666622222179f7177fffff11111522211112
|
||||||
|
0005997555577777777777777555579400000000511c10000000000000000000664444544848848f717ff9717f66666622222f9ffffffffffff9911122211112
|
||||||
|
0005997777777771115777777777779400000000051111000000000000000000665444a4488848ff777ff9777f66666622222f9fffffffffffff911122211112
|
||||||
|
00059977777777177111777777777794000000000511c1000000000000000000665544a448888fffffffff9fff666666222229fff9fffffff9ff9f5222221112
|
||||||
|
000599777777771717171177777777940000000000511c100000000000000000665555a5489f9fffff9fff9fff666666222229fff9fffffff9a9f91222221112
|
||||||
|
000599777577771177177711757779950000000000511c1000000000000000006666688559f9fffffff999ffff66666622222299ffffffffffaf9f1222222112
|
||||||
|
0005497757777111117777777757794000000000000511c00000000000000000666668282f9f9fffffffffffff666666222222fffffffffffff9f92222222212
|
||||||
|
0005499777711117777777777777995000000000000511c100000000000000006666688288f9f9fffefffffef66666662222222feeeeefffff9f9f2222222222
|
||||||
|
000054997777117775777577777994000000000000001111000000000000000066666828266f9fffffeeeeeff66666662222222ffffffffffff9f22222222222
|
||||||
|
00000549977151777577775777994000000000000000111c0000000000000000666682828666f9ffffffffff6666666622222222ffffffffff99922222222222
|
||||||
|
00000054991777777577777799945000000000000000011110000000000000006666882866669f9ffffffff6666666662222222229999999999f227672222222
|
||||||
|
0000000549977777757777799945000000000000000001111000000000000000666882866666ff9999992866666666662226766677777999ffffff7766766222
|
||||||
|
000000005449999777779999445000000000000000000011c10000000000000066682826666fffffffff286666666666226767775655fffffff5577767677672
|
||||||
|
000000000554449999999444550000000000000000000011110000000000000066688286666fffffffff886dd2666666267767755655ffffff55677767777776
|
||||||
|
00000000000555444444455500000000000000000000000119000000000000002222222222ddddfffff9dd2222226666267677755565fffff556777767777777
|
||||||
|
000000000000005555555000000000000000000000000000199000000000000021122222222222dddddd2222222112662776775555655fff5565777677777767
|
||||||
|
0000000000000000000000000000000000000000000000000900000000000000211222222222222ddddd22222221122267677755556655f55655777677777776
|
||||||
|
0000000000000000000000000000000000000000000000000200000000000000222222222211122ddddd22211222222277677755555655556557777677777777
|
||||||
|
000000000ccc09999990ccc000000000000000000000000000000009000000005555555555550005500055555555555511111111111113331111111111111111
|
||||||
|
0000000cc99909000090999cc0000000000000000000000000000090900000005555555550000000005000005555555511111133113333333333333311111111
|
||||||
|
000000c990000090090000099c000000009990000000000000000900090000005555555550500000005555000555555511133333333333333333333333311111
|
||||||
|
00000c9000cc00900900cc0009c00000009900000009990000009009009000005555555550000000000000500005555511133333333333333333333333331111
|
||||||
|
0000c900cc990009900099cc009c0000009090900000990000009009009000005555555550004040400000500005555511133333333333333333333333333111
|
||||||
|
000c900c9900000990000099c009c00000000900000909000000900900900000555555555000444044004050005555551113b333333333333333333333333111
|
||||||
|
00c900c900000000000000009c009c000000909999900000000009900090000055555555504444444400405000055555111bb33b33333333b333333333333311
|
||||||
|
0c900c90000000000000000009c009c000000090009000000000090009000000555555555500444004004000000055551111b333f3b33333b333333333333331
|
||||||
|
0c90c9000000000000000000009c09c0000000900090000000009000990000005555555555444444444444000505555511113f33f33b3333b333333333333331
|
||||||
|
c900c9000000000000000000009c009c000000900090000000009009009000005555555555076440744444040005555511113ff3ff33f333f333333333333331
|
||||||
|
c90c900000000000000000000009c09c000000099900000000009009009000005555555555076440744444040005555511111ffffff3ff33f333333333333311
|
||||||
|
90c9000000000000000000000009c09c000000009000000000009009009000005555555555446444444444440005555511111ffffffffff3f333333333333311
|
||||||
|
00000000000000000000000000000000000000009000000000000900090000005555555555464444444444640555555511111333ff3333ffff33333333333311
|
||||||
|
00009900000000000000000000990000000000099900000000000090900000005555555555564a444444466a5555555511111ffffffffffffff3333333333331
|
||||||
|
00990900000000000000000000909900000000009000000000000009000000005555555555566664444464655555555511111777fff777fffff3333333333331
|
||||||
|
99000900000000000000000000909099000000000000000000000000000000005555555555544444444446655555555511111007dff007fffff33333b333b331
|
||||||
|
9900090000000000000000000090909900000000000000000000000000000000555555555554ddd4444464655555555511111fffdffffffffff33333b333b331
|
||||||
|
0099090000000000000000000090990000000000000000000000000000000000555555555555444d444446455555555511111ffdffffffffeff33b33b333b331
|
||||||
|
00009900000000000000000000990000000000999999000000000900090000005555555555554444444644655555555511111efdfffffffeffe33b33d3333331
|
||||||
|
00000000000000000000000000000000000009000009000000009000009000005555555555555444466444455555555511111fdfffdfffeffef33b33f3333331
|
||||||
|
c90c900000000000000000000009c09c00009099999900000000900000900000555555555555555544444465555555551111ffdffffdfffffff33333d3333331
|
||||||
|
c90c900000000000000000000009c09c00090090000900000000099999000000555555555555555544444445555555551111ffddddfffffffff3333df3333311
|
||||||
|
c900c9000000000000000000009c009c00090099999900000000900000900000555555555555555544444465555555551111ffffffffffffff33f33fdfd33311
|
||||||
|
0c90c9000000000000000000009c09c00009000000090000000090000090000055555555ccccddd44444464cccdddd551111fffefffffefffffffffdfdf33111
|
||||||
|
0c900c90000000000000000009c009c0000900000009000000009000009000005555555cccccccc4444ccaaacccccdd51111ffffeeeeefffffffffdfdf111111
|
||||||
|
00c900c900000000000000009c009c0000090000000900000000099999000000555555ccccccccca44aaaacccccccccd11111ffffffffffffffffdfdfd111111
|
||||||
|
000c900c9900000990000099c009c0000009000000090000000000090000000055555cccccccccccaaaccccccccccccd11111fffffffffffffffdfdfdff11111
|
||||||
|
0000c900cc990009900099cc009c00000009099999090000000000090000000055555ccccdccccccaccccccccccccccc111111fffffffffffffdfdddfff11111
|
||||||
|
00000c9000cc00900900cc0009c00000000909000909000000000099900000005555ccccdacccccaacccccaccdcccccc1111111fffffffffdfddddfffff11111
|
||||||
|
000000c990000099990000099c000000000909000909000000000009000000005555cccdacaccccacccccacacdcccccc111111111dddddddddddffffffff1111
|
||||||
|
0000000cc99909000090999cc000000000099900099900000000000000000000555cccdaccaccccaccccaccacddccccc1111111111111fffffffffffffff1111
|
||||||
|
000000000ccc09999990ccc00000000000000000000000000000000000000000555cccdccccccccccccccccccddccccc1111111111111ffffffffffffffff111
|
||||||
|
00000000000000000000000000000000000000005555555555555555500000002222222221111211111111112222222233333333333000000050003003333333
|
||||||
|
00000000009999999999990000000000888888855555555555555555558888882222222112111110000000011122222233333330000000500000000003333333
|
||||||
|
00000009999000000099099900000000000055555555444444555555555000002222111111110000022200000112222233333330000000000000000000033333
|
||||||
|
00000099000000000990000990000000000555555554844444844455555500002211111110000000000020000011221133333000050000000500005000003333
|
||||||
|
00000990000000009900000099000000888555555544844444844445555588881211111000000000000000000001111133333500000000000000000000050333
|
||||||
|
00009900000000009000000009000000005555544444844444844444555550001111110000000200000000000000011133330005000000000000000000003333
|
||||||
|
0000900999000009000000000900000905555548444484444484444445555000111112000f000020000200000000002133330000000000000000000000000333
|
||||||
|
000090000900000900000000090000098555554844448499998844444555558811111200fff00002000020000000002233333000000000000000000000500333
|
||||||
|
00009000090000900000000009000090055554484444994444994444445555002111120ffffff000000002000000000233330000000005000000000000003333
|
||||||
|
00009000990009900000000009000090055544484444944444894444845555002211120ffffffff0000000000020000033330000000000000000000000000333
|
||||||
|
000099999000090000000000990009900555444844498444448494448445555012111203fff333ff000000000002000033333304444400444444500000500333
|
||||||
|
00000000000099000000000990000900555544484449844444849444844555502121112ffffffffff00000000002000033333334666444446664400000003333
|
||||||
|
000000000000900000000990000099005555444844498444448494448444555521221123fff333ffff0000000000000033333334074444440744450000000333
|
||||||
|
00000000000900000099990000009000555544484449844444849444844455552111112173f7177ffff000020000000033333334074444440744450000005333
|
||||||
|
00000000000999999990000000009000555444484444944444894444844455552212112173fffff3ff3f00002002000033333334444466444444450000503333
|
||||||
|
00000000009000000000000000099000555444484444994444994444844445552222112f3ffffffffff3f0002002000033333334444644444444556400033333
|
||||||
|
000000000990000000000000000900995555444844448499998444448444455511211123ffffffffffff30000002000033333334444644444444556440033333
|
||||||
|
000000000900000000000000009999995555444844448444448444448444455511111123fff3fffffffff0000000000033333334444644444444556460333333
|
||||||
|
000000009900000000000000009090005555444844448444448444448444455521111123fff3ffffffff30000000000033333334444644464444554660333333
|
||||||
|
00000000900000000000000000990000555444484444844444844444844445552222211233fffffffffff3000000020033333334444666644444556466333333
|
||||||
|
000000099000000000000000099000005554444844448444448444448444455522222112ffffffffffffff000000020033333334444444444444444646333333
|
||||||
|
000000090000000000000000099000005554444844448444448444448444455511111122ffeeeff3fffff300200002003333333344444444e444446463333333
|
||||||
|
000000990000000000000000090000005554448844448444448444448444455511111122fefffef3ffffff400200000033333333444eeeee4444464633333333
|
||||||
|
0000099000000000000000009900000055544484444484444484444484444555111121223ffffff3fffff4400022000033333333344444444444646633333333
|
||||||
|
00000900000000000000000090000000555444844444844444844444484445552211221213333fff333333330000000033333333334444444446666463333333
|
||||||
|
00000900000000000000000090000000555444844444844444844444aaa4455522122999999993334443f3339999999033333333333366666666444663333333
|
||||||
|
0000090000000000000000009000000055544484444484444484444aaaaa455522299999999995ffff3f45599999999933333333333334444444446466333333
|
||||||
|
0000099000000000000000000000000055544484444484444484444aaaaa455522999999999995fffff459999999999933333333333334444444444646333333
|
||||||
|
0000009900000000000000000000000055544484444484444484444aaaaa455529999999999995ffff45599999999999333d11111111144444444464111d3333
|
||||||
|
00000000999000000000000000000000555444844444844444844444aaa445559999999999999954f455999999999999dd111111111111444441111111111ddd
|
||||||
|
00000000009999999999999999999999555444844444844444844444484445559999999999999955455999999999999911111111111111111111111111111111
|
||||||
|
0000000000000000000000000000000055544484444484444484444448444555999999999999995555999999999999991d111d111d111d11d11d111d11d11111
|
||||||
|
__label__
|
||||||
|
44444444444444444444444444494444444444444444555444444444444444444444444444444444444444444554444444444444444444444444444444444444
|
||||||
|
44444444444444444444444444444944444444444555444444444444444444444444444444444444444444555444444444444444444444444444444444444444
|
||||||
|
44444444444444444444444444444444444444555444444444444444444444444444444444444444444555444444444444444444444444444444444444444444
|
||||||
|
44444444444454444444444444949444444555444444444444444444444444444444444444444444555444444444444444444444444444444444444444444555
|
||||||
|
44444444454999999994444499444444455444444444444444444444444444444444444444444555444444444444444444444444444444444444444444555444
|
||||||
|
44444444499977777799999499944455544444444444444444444444444444444444444444455444444444444444444444444444444444444444444555444444
|
||||||
|
44444449997777757777779999455544444444444444444444444444444444444444444455544444444444444444444444444444444444444444455444444444
|
||||||
|
44444499977777757777777799544499999999999999999944444444444444444999999999999999999444444444444444444999999999999999994444444444
|
||||||
|
444449977775777577775777794449ffffffffffffffffff99999999999999999ffffffffffffffffff999999999999999999fffffffffffffffff9999999999
|
||||||
|
444599777777577577757777799449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
445997757777777777777777779949ff0f0f000f000f0fff000f00fff00ffffff00f000f000f000f0f0fffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444997775777777777777777577949ff0f0f0fff0f0f0ffff0ff0f0f0fffffff0fff0f0f0f0f0f0f0f0fffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
449977777777777777777775777999ff000f00ff000f0ffff0ff0f0f0fffffff000f000f00ff000f000fffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
459977777777777777777777777799ff0f0f0fff0f0f0ffff0ff0f0f0f0fffffff0f0fff0f0f0f0fff0fffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
449977777777777777777777777799ff0f0f000f0f0f000f000f0f0f000fffff00ff0fff0f0f0f0f000fffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
459975555777777777777775555799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
559977777777700057777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
459977777777077000777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
459977777777070707007777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
459977757777007707770075777999ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
454977577770000077777777577949fff5ff5f5f555f5fff555f555f5f5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
454997777000077777777777779959ff5f5f5f5f5f5f5ffff5fff5ff5f5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
445499777700777577757777799459ff5f5f5f5f555f5ffff5fff5ff555fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444549977050777577775777994449ff55ff5f5f5f5f5ffff5fff5ffff5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444454990777777577777799945449fff55ff55f5f5f555f555ff5ff555fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444445499777777577777999454449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444445449999777779999445444449ffffffffffffffffffffffffffff00ff000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444444554449999999444554444449fffffffffffffffffffffff5555ff0ff0fff0f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444444445554444444555444444449fffffffffffffffffffffff5ff5ff0ff000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444444555445555555444444444449fffffffffffffffffffffff5f55ff0ffff0f0f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444455444444444444444444444449fffffffffffffffffffffff5555f000f000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4455544444444444444444444444449fffffffffffffffffffffffffff5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
5544444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaffffffffffffffffffffffffffffffffffffffffffffffffffffffaff
|
||||||
|
4444444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6666666666666666666666666666666666666666666666666666faff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
4444444444444454646464546465655f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
4444444444444454646465556464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
4444444444555454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5ffffff9af6ffffffffffffffffffffffffffffffffffffffffffffffffff6fa9f
|
||||||
|
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffff9aaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faa9
|
||||||
|
4444455444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5ffff9aaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa
|
||||||
|
44555444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fff9aaaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa
|
||||||
|
5544444444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fff9aaaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65ffff9aaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa
|
||||||
|
444444444444444555555545555555f5555555f5555555f5555555f5555555ffffff9aaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faa9
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65ffffff9af6ffffffffffffffffffffffffffffffffffffffffffffffffff6fa9f
|
||||||
|
4444444444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
4444444444444454646464546465695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
4444444444444454646465556464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff
|
||||||
|
444444444444444555555545555555f5555555f5555555f5555555f5555555ffffffffaf6666666666666666666666666666666666666666666666666666faff
|
||||||
|
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaffffffffffffffffffffffffffffffffffffffffffffffffffffffaff
|
||||||
|
4444444444555454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff
|
||||||
|
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
4444455444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6666666666666666666666666666666666666666666666666666ffff
|
||||||
|
44555444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
5544444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
4444444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
4444444444444454646464546465655f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff6f6f666f666f6fff666f66fff66ffffffffffffffffffff6ffff
|
||||||
|
4444444444444454646465556464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6fff6f6f6fff6f6f6ffff6ff6f6f6ffffffffffffffffffffff6ffff
|
||||||
|
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff666f66ff666f6ffff6ff6f6f6ffffffffffffffffffffff6ffff
|
||||||
|
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffff6fff6f6f6fff6f6f6ffff6ff6f6f6f6ffffffffffffffffffff6ffff
|
||||||
|
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff6f6f666f6f6f666f666f6f6f666ffffffffffffffffffff6ffff
|
||||||
|
4444444444555454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
4444455444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
|
||||||
|
44555444449999564649999646499996f6f69999f6f6f69999999996f6f6f659999999996ffffffff99999999fffffffff99999999fffffffffffffffff6ffff
|
||||||
|
5544444449666699999666699996666999996666999969666666666999999996666666669999999996666666699999999966666666999999999ffffffff6ffff
|
||||||
|
44444444496666666666666666444444466666666669f9666666666666666666666666666666666666666666666666666666666666666666669ffffffff6ffff
|
||||||
|
4444444449666666666666654444445554444666666959665556556656566666555655565556555655566556666666666666666666666666669ffffffff6ffff
|
||||||
|
444444444966666666666544444445aaa54444666669f9665656565656566666656656565656656665665666666666666666666666666666669ffffffff6ffff
|
||||||
|
444444444496666666665444444445a6a544456666669f965556565655566666656655665556656665665556666666666666666666666666666966666666ffff
|
||||||
|
444444444496666666544444444445aaa544446666669f9656565656665666666566565656566566656666566666666666666666666666666669ffffffffffff
|
||||||
|
44444444449666666644444444444455544455666666909656565656555666666566565656565556656655666666666666666666666666666669ffffffffffff
|
||||||
|
44444444449666666544444a4444444444455a666666909666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff
|
||||||
|
44444444449666664444444a4444888888888a66666690966556555655565666566666665556556666665556565655566666655655565556556966666666ffff
|
||||||
|
44444444496666654444454a44888888888886666669f9665666656665665666566666666566565666666566565656666666566656566566565ffffffff6ffff
|
||||||
|
44444446696666644444544448888488f8884866666909665556656665665666566666666566565666666566555655666666566655666566565ffffffff6ffff
|
||||||
|
4444444669666654444544448888488fff8884866669f9666656656665665666566666666566565666666566565656666666565656566566565ffffffff6ffff
|
||||||
|
4444444669666644445444488899998ff99998466669f9665566656655565556555666665556565666666566565655566666555656565556555ffffffff6ffff
|
||||||
|
444444466696665444544488898888fffffff98666669f9666666666666666666666666666666666666666666666666666666666666666666669fffffff6ffff
|
||||||
|
444445556696644445444488888887ff9777ff6666669f9655565556666655565656555666665556556655666666655655565566666655565559fffffff6ffff
|
||||||
|
445554446696654445444848848717ff9717ff6666669f9656566566666665665656566666665666565656566666566656565656666656565669fffffff6ffff
|
||||||
|
55444444569664444544848848f717ff9717f66666669f9655566566666665665556556666665566565656566666566655565656666655665569fffffff6ffff
|
||||||
|
44444444496665444a4488848ff777ff9777f6666669f9665656656666666566565656666666566656565656666656665656565666665656569ffffffff6ffff
|
||||||
|
44444444496665544a448888fffffffff9fff6666669f9665656656666666566565655566666555656565556666665565656565666665556555ffffffff6ffff
|
||||||
|
44444444496665555a5489f9fffff9fff9fff6666669f9666666666666666666666666666666666666666666666666666666666666666666669ffffffff6ffff
|
||||||
|
444444444966666688559f9fffffff999ffff6666669f9665556556655665556556666665556655666665556565655566666666666666666669ffffffff6ffff
|
||||||
|
44444444449666668282f9f9fffffffffffff66666669f9656565656565656665656666665665656666665665656566666666666666666666669fffffff6ffff
|
||||||
|
444444444496666688288f9f9fffefffffef666666669f9655565656565655665656666665665656666665665556556666666666666666666669fffffff6ffff
|
||||||
|
4444444444966666828266f9fffffeeeeeff666666669f9656565656565656665656666665665656666665665656566666666666666666666669fffffff6ffff
|
||||||
|
44444444449666682828666f9ffffffffff6666666669f9656565556555655565556666665665566666665665656555666666666666666666669fffffff6ffff
|
||||||
|
444444444496666882866669f9ffffffff66666666669f9666666666666666666666666666666666666666666666666666666666666666666669fffffff6ffff
|
||||||
|
44444444496666882866666ff9999992866666666669f9665556555655665556566666665556555665565566565665565556656666666666669ffffffff6ffff
|
||||||
|
4444444449666682826666fffffffff2866666666669f9665666656656565656566666665656565656565656565656666566656666666666669ffffffff6ffff
|
||||||
|
4444444449666688286666fffffffff886dd26666669f9665566656656565556566666665556556656565656565656666566656666666666669ffffffff6ffff
|
||||||
|
444444455962222222222ddddfffff9dd22222266669f9665666656656565656566666665666565656565656565656666566666666666666669ffffffff6ffff
|
||||||
|
4444455444921122222222222dddddd22222221126669f965666555656565656555666665666565655665556655665566566656666666666666966666666ffff
|
||||||
|
44555444449211222222222222ddddd22222221122269f9666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff
|
||||||
|
55444444449222222222211122ddddd22211222222269f9666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff
|
||||||
|
444444444499996666699996666999966666999966669f9999999996666666699999999966666666699999999666666666999999996666666669ffffffffffff
|
||||||
|
444444444444449999911449999449f99999ffff9999fffffffffff99999999fffffffff999999999ffffffff999999999ffffffff999999999fffffffffffff
|
||||||
|
444444444444444441111444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
44444444444444444411c144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444444111144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444444411944444559ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444444441994555449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444444444955444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444444455244444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444444455544444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444444455544444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444444455544444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444444455544444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
444445544444444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
445554444444444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
|
||||||
|
__gff__
|
||||||
|
0000000000000000000080808080000000000000000000808080808000000080000000000000000000814040818040400000000000000080808080808181808000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
__map__
|
||||||
|
0202020202020311110010101000130000000000121200000000000000001010100000000000000011110000000000000000131300000000000000000012120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0202020202020300110000101000131313000000001200000000000000001000000000000000000011110000000000000000131300000000000000001212000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0202020202020300111100001000131300000000001212000000000000001000000000000000000000000000000000000000001300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0202020202020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0202020202020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0202020202020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0404040404040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
1d0b0b0b0b1f1f0b0b0b0b0b0b0b0b1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0e3d2c2d0e0e0e0e00000e3c0e0f0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0f0f0e0e0e0e000000000e0e0e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d00002a2b2f2a0f00000000000e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d00003b3b3b3b00002e2b2a2b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d00003a3a3a3900003e3a393b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d000000000e2a0f00000e2f2b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d00002b2f2a3b0028282b3a3900000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0f003a393a3a0037383b00000e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0f000000000f002a2b0f000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0000290f002a003a393d000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0f0000000f3b000000000000000e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d000000000f0000000f0f0f00001e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d00000000000000000f003f001e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0d0e0e000000000000000000001e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
1a0a0a17181818190a0a0a0a0a0a0a1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
__sfx__
|
||||||
|
000100001f0701907014070100700e0700e0700e0700f07011070150601a06021060280601a6701767014670116700f6700c6700b670076700666005660046600365003640036400263002630026200160001600
|
||||||
|
0003000019050190501905019050190501905019050190501d0501d0501d0501d0501d0501d0501d0502505025050250502505025050250502505025050250502005020050200502005020050200502005020050
|
||||||
|
0001000003600036000360001600016000160002600036100462005620076200a6200e6201462019620246202f6203562036620316202d6102a610276102460021600206001d6001860017600156001360012600
|
||||||
|
000100000c62000620220000000000000220002100000000000002200021000000002300000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000200000145001450014500144001440024500245002450034500345004450044400444005440054400744008440094200b4100e42014220182301c2302022024220282202a2202d2102e210302103121031250
|
||||||
|
00030000063500b3500e350123501535018350263500a3500f35015350193501e350213502a3500f35013350173501c35020350243502d3501f6501d6401b630196301762015620136201261010610106000e600
|
82
conversation.lua
Normal file
82
conversation.lua
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
prev_screen = screen_workbench
|
||||||
|
message_idx = 1
|
||||||
|
conversation_active = false
|
||||||
|
|
||||||
|
function phoebe_say(face_sprite, words, ...)
|
||||||
|
x,y=10,80
|
||||||
|
|
||||||
|
--background color
|
||||||
|
local c = sget((face_sprite*8) % 128, flr((face_sprite*8)/128)*8)
|
||||||
|
-- facebox
|
||||||
|
draw_paper_with_color(x,y, 4*8+1, 4*8+1, c)
|
||||||
|
spr(face_sprite, x+1,y+1, 4,4)
|
||||||
|
-- textbox
|
||||||
|
draw_paper_with_color(x+4*8+4, y, 68, 4*8+1, c)
|
||||||
|
color(base_text_color)
|
||||||
|
print(wrap(words, 16), x+4*8+4+2, y+2)
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_chatbox(face_sprite, words, ...)
|
||||||
|
x,y=10,80
|
||||||
|
--background color
|
||||||
|
local c = sget((face_sprite*8) % 128, flr((face_sprite*8)/128)*8)
|
||||||
|
-- textbox
|
||||||
|
draw_paper_with_color(x, y, 68, 4*8+1, c)
|
||||||
|
color(light_text_color)
|
||||||
|
print(wrap(words, 16), x+2, y+2)
|
||||||
|
-- facebox
|
||||||
|
draw_paper_with_color(x+68+3, y, 4*8+1,4*8+1, 0)
|
||||||
|
spr(face_sprite, x+69+3,y+1, 4,4)
|
||||||
|
end
|
||||||
|
|
||||||
|
function conversation_draw(screen)
|
||||||
|
--prev_screen.draw()
|
||||||
|
message = messages[message_idx]
|
||||||
|
|
||||||
|
if message[1] == phoebe_portrait then
|
||||||
|
phoebe_say(unpack(message))
|
||||||
|
else
|
||||||
|
draw_chatbox(unpack(message))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function conversation_update(after)
|
||||||
|
return function()
|
||||||
|
conversation_active = true
|
||||||
|
if btnp(4) or btnp(5) then
|
||||||
|
callback = messages[message_idx][3]
|
||||||
|
if callback ~= nil then callback() end
|
||||||
|
|
||||||
|
if message_idx == #messages then
|
||||||
|
if after ~= nil then
|
||||||
|
after()
|
||||||
|
else
|
||||||
|
change_screen(prev_screen)
|
||||||
|
end
|
||||||
|
|
||||||
|
conversation_active = false
|
||||||
|
else
|
||||||
|
message_idx += 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- base holds the screen to display under the conversation. nil if you want to simply use the existing screen.
|
||||||
|
-- convo holds a list of {headsprite, message} pairs to display as a conversation
|
||||||
|
-- after holds a callback for what to do after the screen is displayed. usually you'll call change_screen().
|
||||||
|
function screen_conversation(convo, after, base)
|
||||||
|
return {
|
||||||
|
before=function()
|
||||||
|
if base ~= nil then
|
||||||
|
prev_screen=base
|
||||||
|
end
|
||||||
|
messages=convo
|
||||||
|
message_idx=1
|
||||||
|
conversation_active = true
|
||||||
|
toast("conversation!")
|
||||||
|
end,
|
||||||
|
update=conversation_update(after),
|
||||||
|
draw=conversation_draw
|
||||||
|
}
|
||||||
|
end
|
171
library.lua
Normal file
171
library.lua
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
--tags represent what the object *is*
|
||||||
|
--traitss represent *special qualities* *beyoond* the default for that object.
|
||||||
|
testing = true
|
||||||
|
story = {
|
||||||
|
main=1,
|
||||||
|
branch_lenore=1,
|
||||||
|
branch_hans=1,
|
||||||
|
branch_brigitte=1,
|
||||||
|
hans_talked=false,
|
||||||
|
got_gunpowder_book=false,
|
||||||
|
got_crystal_book=false,
|
||||||
|
}
|
||||||
|
story.main = 1
|
||||||
|
|
||||||
|
library={}
|
||||||
|
|
||||||
|
library.traits={
|
||||||
|
large={"large", 10,0, 3,3},
|
||||||
|
shiny={"shiny", 14,0, 3,3},
|
||||||
|
fine={"fine", 27,0, 3,2},
|
||||||
|
red={"red", 29,0, 3,3},
|
||||||
|
blue={"blue", 7,0, 3,3},
|
||||||
|
green={"green", 17,0, 3,3},
|
||||||
|
}
|
||||||
|
|
||||||
|
library.item_blueprints = {
|
||||||
|
charcoal = {
|
||||||
|
title="charcoal", tags={"black", "fuel"},
|
||||||
|
quality_base=40, quality_range=20,
|
||||||
|
trait_pool={"fine", "shiny"}, trait_chance=10,
|
||||||
|
description="basket of \ncharcoal",
|
||||||
|
sprite=37, sprite_recolor={[12]=0},
|
||||||
|
},
|
||||||
|
well_water = {
|
||||||
|
title="well water", tags={"water"},
|
||||||
|
quality_base=30, quality_range=20,
|
||||||
|
trait_pool={"blue", "shiny"}, trait_chance=20,
|
||||||
|
description="water from\na well",
|
||||||
|
sprite=37,
|
||||||
|
},
|
||||||
|
herb = {
|
||||||
|
title="herb", tags={},
|
||||||
|
quality_base = 40, quality_range=30,
|
||||||
|
trait_pool={"green"}, trait_chance=30,
|
||||||
|
description="healing herb",
|
||||||
|
sprite=34,
|
||||||
|
},
|
||||||
|
crystal = {
|
||||||
|
title="crystal", tags={},
|
||||||
|
quality_base=40, quality_range=60,
|
||||||
|
trait_pool={"shiny", "large", "blue"}, trait_chance=50,
|
||||||
|
description="cliff \ncrystals",
|
||||||
|
sprite=38,
|
||||||
|
},
|
||||||
|
sand = {
|
||||||
|
title="sand", tags={},
|
||||||
|
quality_base=30, quality_range=40,
|
||||||
|
trait_pool={"fine"}, trait_chance=40,
|
||||||
|
description="beach sand",
|
||||||
|
sprite=32, sprite_recolor={[6]=15}
|
||||||
|
},
|
||||||
|
|
||||||
|
distilled_water={
|
||||||
|
title="pure water",tags={"water", "pure"},
|
||||||
|
quality_base=50, quality_range=20, --this should only be crafted, so this will be mostly irrelevant
|
||||||
|
trait_pool={}, trait_chance=0, -- again no use
|
||||||
|
description="filtered \npure water",
|
||||||
|
sprite=33,
|
||||||
|
},
|
||||||
|
reagent = {
|
||||||
|
title="reagent", tags={"red"},
|
||||||
|
quality_base = 50, quality_range=10,
|
||||||
|
trait_pool={"shiny"}, trait_chance=20,
|
||||||
|
description="red reagent",
|
||||||
|
sprite=33, sprite_recolor={[12]=8},
|
||||||
|
},
|
||||||
|
bomb = {
|
||||||
|
title="bomb", tags={"explosive"},
|
||||||
|
quality_base=60, quality_range=30,
|
||||||
|
trait_pool={}, trait_chance=0,
|
||||||
|
description="explodes for \nfun & profit",
|
||||||
|
sprite=35,
|
||||||
|
},
|
||||||
|
gunpowder={
|
||||||
|
title="gunpowder", tags={"explosive"},
|
||||||
|
quality_base=30, quality_range=10,
|
||||||
|
trait_pool={"fine"}, trait_chance=30,
|
||||||
|
description="be careful!",
|
||||||
|
sprite=32, sprite_recolor={[6]=5},
|
||||||
|
},
|
||||||
|
potion = {
|
||||||
|
title="potion", tags={},
|
||||||
|
quality_base = 50, quality_range=10,
|
||||||
|
trait_pool={"red", "shiny", "curing"}, trait_chance=10,
|
||||||
|
description="a healing\npotion",
|
||||||
|
sprite=33, sprite_recolor={[12]=11}
|
||||||
|
},
|
||||||
|
polishing_powder = {
|
||||||
|
title="polish", tags={},
|
||||||
|
quality_base=70, quality_range=30,
|
||||||
|
trait_pool={"shiny", "fine"}, trait_chance=30,
|
||||||
|
description="polishing \npowder",
|
||||||
|
sprite=32,
|
||||||
|
},
|
||||||
|
starshine_gem={
|
||||||
|
title="starshine", tags={},
|
||||||
|
quality_base=100, quality_range=50,
|
||||||
|
trait_pool={"shiny","large"}, trait_chance=40,
|
||||||
|
description="starshine \ngem!~",
|
||||||
|
sprite=39,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
library.recipes={
|
||||||
|
distilled_water={
|
||||||
|
title="pure water",
|
||||||
|
ingredients={"well water", "charcoal"},
|
||||||
|
result="distilled_water"
|
||||||
|
},
|
||||||
|
reagent={
|
||||||
|
title="reagent",
|
||||||
|
ingredients={"pure water", "charcoal", "herb"},
|
||||||
|
result="reagent"
|
||||||
|
},
|
||||||
|
bomb={
|
||||||
|
title="small bomb",
|
||||||
|
ingredients={"gunpowder", "fuel"},
|
||||||
|
result="bomb"
|
||||||
|
},
|
||||||
|
gunpowder={
|
||||||
|
title="gunpowder",
|
||||||
|
ingredients={"crystal", "charcoal", "reagent"},
|
||||||
|
result="gunpowder"
|
||||||
|
},
|
||||||
|
potion={
|
||||||
|
title="potion",
|
||||||
|
ingredients={"pure water", "herb", "reagent"},
|
||||||
|
result="potion"
|
||||||
|
},
|
||||||
|
polishing_powder={
|
||||||
|
title="polish",
|
||||||
|
ingredients={"crystals","sand","charcoal"},
|
||||||
|
result="polishing_powder"
|
||||||
|
},
|
||||||
|
starshine_gem={
|
||||||
|
title="starshine",
|
||||||
|
ingredients={"crystals", "polish", "reagent"},
|
||||||
|
result="starshine_gem"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if testing then
|
||||||
|
inventory = {}
|
||||||
|
|
||||||
|
for i=1,4 do
|
||||||
|
local c = make_item(library.item_blueprints.charcoal)
|
||||||
|
c.traits = {"fine", "red"}
|
||||||
|
add(inventory, c)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=1,4 do
|
||||||
|
local w = make_item(library.item_blueprints.well_water)
|
||||||
|
w.traits = {"shiny", "blue"}
|
||||||
|
add(inventory, w)
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
inventory = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
grimoire = {library.recipes.distilled_water, library.recipes.potion}
|
202
notes.md
Normal file
202
notes.md
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
# story states:
|
||||||
|
|
||||||
|
story state: 1
|
||||||
|
lenore requesting water: 1
|
||||||
|
lenore requesting potion for patient: 2
|
||||||
|
patient requesting bomb for farm: 3
|
||||||
|
witch turns us down: 4
|
||||||
|
librarian gives explosives book: 5
|
||||||
|
farmer prods to talk to witch again: 6
|
||||||
|
witch turns aroundd: 7
|
||||||
|
librarian gives gem book: 8
|
||||||
|
witch unsatisfied: 9
|
||||||
|
witch satisfied: 10
|
||||||
|
|
||||||
|
fireworks festival: 11
|
||||||
|
|
||||||
|
|
||||||
|
# larger ssscale:
|
||||||
|
|
||||||
|
fireworks festival, father's recipes are gone? someone's recipes are gone? evereyone is preemptively sad that it won't happen
|
||||||
|
|
||||||
|
gotta learn firewworks to make firewsorks for the festival
|
||||||
|
|
||||||
|
charcoal seller is grumpy and doesn't believe it's ever going to happen
|
||||||
|
|
||||||
|
|
||||||
|
# in depth:
|
||||||
|
there are five people to talk to - lenore (hospital), hans (charcoal seller), stef (librarian), brigitte (farmer), agnes (witch)
|
||||||
|
|
||||||
|
|
||||||
|
intro: hi! i'm phoebe! welcome to pilton! i would tell you about our fireworks festival, which was the pride of our town, but since my grandfather passed away after not being able to run it for a few years, it looks like it won't be happening anymore. everyone's broken up about it. it was really the pride of the town. i wish i could help but i barely know any alchemy - grandfather just kept all his knowledge in his head, and now i'm left without anything more than purifying water and picking herbs!
|
||||||
|
(send letter to phoebe about needing pure water)
|
||||||
|
(send letter to phoebe about charcoal)
|
||||||
|
|
||||||
|
|
||||||
|
1.
|
||||||
|
hospital:
|
||||||
|
if not has water:
|
||||||
|
lenore: hey phoebe. did you get my letter?
|
||||||
|
if has water:
|
||||||
|
lenore: thanks for the water. can you makee a potion for my patient neextdoor?
|
||||||
|
(takes water)
|
||||||
|
(gives reagent)
|
||||||
|
(gives recipe)
|
||||||
|
(goes to 2)
|
||||||
|
|
||||||
|
charcoal seller:
|
||||||
|
if not talk_charcoal_1
|
||||||
|
hans: hey phoebe. if your family's not putting on the festival this year, you won't need the whole bulk order of charcoal, right? you can take as much as you want.
|
||||||
|
(set talk_charcoal_1 true)
|
||||||
|
(gives charcoal)
|
||||||
|
if talk_charcoal_1
|
||||||
|
hans: hey phoebe. charcoal's out back.
|
||||||
|
(gives charcoal)
|
||||||
|
|
||||||
|
farmer:
|
||||||
|
door: you hear groaning from inside.
|
||||||
|
|
||||||
|
librarian:
|
||||||
|
stef: hey phoebe. looking for any book in particular?
|
||||||
|
phoebe: just browsing today!
|
||||||
|
|
||||||
|
witch:
|
||||||
|
door: there is no answer to your knocking.
|
||||||
|
|
||||||
|
|
||||||
|
2.
|
||||||
|
hospital:
|
||||||
|
lenore: you get that potion to my brigitte yet? she's got a red roof to the east of here.
|
||||||
|
|
||||||
|
charcoal seller: as above
|
||||||
|
|
||||||
|
farmer:
|
||||||
|
if not has potion:
|
||||||
|
door: you hear grooaning from inside.
|
||||||
|
if has potion:
|
||||||
|
brigitte: oof oww my back. thanks for healing it. do you know how to make bombs?
|
||||||
|
phoebe: i'm sorry but no, my grandfather hadn't taught me when he passed, because they're dangerous.
|
||||||
|
brigitte: i used to get them from the witch but she won't make them for me anymore. maybe you could ask her?
|
||||||
|
(goes to 3)
|
||||||
|
|
||||||
|
librarian:
|
||||||
|
stef: hey phoebe. looking for any book in particular?
|
||||||
|
phoebe: just browsing today!
|
||||||
|
|
||||||
|
witch:
|
||||||
|
door: there is no answer to your knocking.
|
||||||
|
|
||||||
|
3.
|
||||||
|
hospital:
|
||||||
|
lenore: thanks for helping out my patient.
|
||||||
|
|
||||||
|
charcoal sseller: as above
|
||||||
|
|
||||||
|
farmer:
|
||||||
|
brigitte: did she give you the recipe?
|
||||||
|
phoebe: not yet!
|
||||||
|
|
||||||
|
witch tower:
|
||||||
|
agnes: this town is dead. i can make no more explosions becauses there is no more gifted alchemist in this town. phoebe dear, you're lovely but yoou're noot your grandfather. this town is a husk of what it once was. i am done teaching. if you want to learn alchemy, there's a library in the middle of town. i have no time for this.
|
||||||
|
(goes to 4)
|
||||||
|
|
||||||
|
4.
|
||||||
|
hospital:
|
||||||
|
lenore: wow, that witch is rude.
|
||||||
|
|
||||||
|
charcoal seller:
|
||||||
|
as abovoe
|
||||||
|
|
||||||
|
farmer:
|
||||||
|
brigitte:
|
||||||
|
|
||||||
|
librarian: you say you're looking for a book about explosives? well, i don't have much but i found this in the reference area. maybe you can get something from it?
|
||||||
|
phoebe: this is a chemistry manual but... black powder... yes, i think i could do this and... yes, i think i can use this to make gunpowder! maybe i can improvise this!
|
||||||
|
(set flag got_chemistry_book)
|
||||||
|
|
||||||
|
farmer:
|
||||||
|
if not has gunpowder:
|
||||||
|
farmer: any idea what to do about that boulder?
|
||||||
|
if has gunpowder:
|
||||||
|
(take gunpowder)
|
||||||
|
farmer: hmm, yeah, i think if i poured this into the crack in the rock this would take it apart. did you convince the witch?
|
||||||
|
phoebe: no, that old hag basically told me to fuck off! so rude!
|
||||||
|
farmer: huh. i wonder what's up her bonnet.
|
||||||
|
phoebe: she kept talking about how there's no great alchemy left in this town.
|
||||||
|
farmer: maybe she needs someone to impress her.
|
||||||
|
(goes to 5)
|
||||||
|
|
||||||
|
5.
|
||||||
|
hospital:
|
||||||
|
lenore: hey phoebe. any aches today?
|
||||||
|
phoebe: i'm in tip top shape!
|
||||||
|
|
||||||
|
charcoal seller:
|
||||||
|
as above
|
||||||
|
|
||||||
|
witch:
|
||||||
|
agnes: this town is dead. our greatest alchemists are lost. you are a baby. yoour grandfather never taught you his ways. your parents forsook the craft. there is nothing for it.
|
||||||
|
phoebe: there's you! you could teach us!
|
||||||
|
agnes: maybe if you showed any promise i would teach you. you have forgotten the ways of old.
|
||||||
|
phoebe: grrrrr, you old hag! give me a test and i'll best it!!
|
||||||
|
agnes: construct a starshine gem which carries red energy and shininess. then i might consider you to have potential.
|
||||||
|
(goes to 6)
|
||||||
|
|
||||||
|
6.
|
||||||
|
hospital:
|
||||||
|
lenore: hey phoebe. any aches today?
|
||||||
|
phoebe: i'm in tip top shape!
|
||||||
|
|
||||||
|
charcoal seller:
|
||||||
|
as above
|
||||||
|
|
||||||
|
librarian: yeah i think i do have some bookss about gems... let me check.
|
||||||
|
librarian: here, does this help?
|
||||||
|
phoebe: yes, this is perfect! hmm... hmmm... hmm... okay i think i need some raw crystal, polishing powder, and reagent. and it's got a recipe for the polishing powder! i should be able to gather sand at the beach... at the location...
|
||||||
|
librarian: good luck!
|
||||||
|
(set flag got_crystal_book)
|
||||||
|
|
||||||
|
(take crystal)
|
||||||
|
witch: hm. this is... passable. it's passable enough that I will give you the recipe. my bones are too tired to keep up this fight.
|
||||||
|
phoebe: i'll show you up! i'll make the best fireworks festival!
|
||||||
|
witch: hm. it'll suck.
|
||||||
|
(door close)
|
||||||
|
(give recipe)
|
||||||
|
phoebe: okay. i can make this happen. charcoal seller was the one who set up the show, and i need to talk to lenore about safety!
|
||||||
|
(goes to 7)
|
||||||
|
|
||||||
|
7.
|
||||||
|
A:
|
||||||
|
charcoal seller: look, if you get me the fireworks, i can set up a show, but it'll need some space. maybe the farmer's field?
|
||||||
|
|
||||||
|
farmer: suure! harvest is over so i'm not doing much with the field, and i'd love to repay you for getting rid of that boulder.
|
||||||
|
|
||||||
|
charcoal seller: i'm all ready to go. when all the preparations are done, i'll meet you at the library.
|
||||||
|
(goes to 8 if A and B)
|
||||||
|
|
||||||
|
B:
|
||||||
|
|
||||||
|
lenore: whoa, you can't just set off fireworks willy-nilly. get me 3 clean bandages and a distilled water. you can't do something as dangerous as fireworks without being prepared for injuries.
|
||||||
|
phoebe: you got it!!
|
||||||
|
|
||||||
|
lenore: thanks. this looks good. i'll meet you at the library when you're ready.
|
||||||
|
(goes to 8 if A and B)
|
||||||
|
|
||||||
|
8.
|
||||||
|
librarian: i heard there's going to be a fireworks festival after all!
|
||||||
|
farmer: i thought it was done for since the old alchemist passed away, rest his soul.
|
||||||
|
charcoal seller: well it looks like phoebe took up the reins!
|
||||||
|
phoebe: aw shucks!
|
||||||
|
lenore: thanks for making this happen, phoebs.
|
||||||
|
farmer: thanks, phoebe!
|
||||||
|
charcoal seller: thanks, phoebe.
|
||||||
|
phoebe: thank you all for helping out so much. i couldn't have done it without you.
|
||||||
|
phoebe: and thank you for playing my game!
|
||||||
|
(goes to 9)
|
||||||
|
|
||||||
|
9.
|
||||||
|
atelier door: thank you for completing atelier phoebe! this was a labor of love and bafflement. why did i make an atelier fangame in pico-8? i couldn't tell you. but i hope you enjoyed it! you can find me online as shoofle in most places, most frequently @shoofle@beach.city. gimme a shout and tell me if you got to the end of this game! i hope you enjoyed it!
|
||||||
|
|
||||||
|
|
||||||
|
# sound effects to add
|
||||||
|
1. sounds for every gatherable
|
426
screen_crafting.lua
Normal file
426
screen_crafting.lua
Normal file
@ -0,0 +1,426 @@
|
|||||||
|
grid_size = 8
|
||||||
|
grid_width = 6
|
||||||
|
grid_height = 6
|
||||||
|
grid_x = 14
|
||||||
|
grid_y = 34
|
||||||
|
|
||||||
|
c = {
|
||||||
|
ing_slot=1, -- the slot in the recipe currently being modified, whether sselecting trait or ingredient
|
||||||
|
ing_idx=1, -- the index into filtered ingredients of the current ingredient selection
|
||||||
|
trait_slot=0, -- the trait sslot of the recipe we're modifying.
|
||||||
|
x=0, y=0 -- x y coordinates in the puzzle grid for the current trait
|
||||||
|
}
|
||||||
|
|
||||||
|
center_glyph = 132
|
||||||
|
ingredients = {}
|
||||||
|
-- traits which have been placed
|
||||||
|
traits = {}
|
||||||
|
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = false
|
||||||
|
big_button = false
|
||||||
|
final_trait_options = {}
|
||||||
|
final_selected_traits = {}
|
||||||
|
|
||||||
|
function crafting_before()
|
||||||
|
center_glyph = rnd({132, 134, 164, 166})
|
||||||
|
c.x = 0
|
||||||
|
c.y = 0
|
||||||
|
c.ing_slot = 1
|
||||||
|
c.ing_idx = 1
|
||||||
|
c.trait_slot = 0
|
||||||
|
|
||||||
|
ingredients = {}
|
||||||
|
traits = {}
|
||||||
|
final_trait_options = {}
|
||||||
|
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = false
|
||||||
|
big_button = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function crafting_update()
|
||||||
|
if choosing_ingredient then
|
||||||
|
crafting_choice_update()
|
||||||
|
elseif placing_trait then
|
||||||
|
crafting_place_update()
|
||||||
|
elseif finalizing then
|
||||||
|
crafting_finalize_update()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function crafting_choice_update()
|
||||||
|
requirement = current_recipe.ingredients[c.ing_slot]
|
||||||
|
filtered_ingredients = filter_list(
|
||||||
|
inventory,
|
||||||
|
function(ing) return requirement == ing.title or contains(ing.tags, requirement) end
|
||||||
|
)
|
||||||
|
current_ingredient = filtered_ingredients[c.ing_idx]
|
||||||
|
|
||||||
|
|
||||||
|
if btnp(0) and c.ing_idx>1 then
|
||||||
|
sfx(3)
|
||||||
|
c.ing_idx -= 1
|
||||||
|
end
|
||||||
|
if btnp(1) and c.ing_idx<#filtered_ingredients then
|
||||||
|
sfx(3)
|
||||||
|
c.ing_idx += 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(4) and current_ingredient ~= nil then
|
||||||
|
-- lock in this ingredient and move on to moving traits arund
|
||||||
|
add(ingredients, current_ingredient)
|
||||||
|
if #current_ingredient.traits ~= 0 then
|
||||||
|
-- if there are traits on tihs ingredient, move on to setting traits.
|
||||||
|
choosing_ingredient = false
|
||||||
|
placing_trait = true
|
||||||
|
finalizing = false
|
||||||
|
c.trait_slot = 1
|
||||||
|
c.ing_idx = 1
|
||||||
|
elseif #ingredients < #current_recipe.ingredients then
|
||||||
|
-- if there are remaining ingredients to set, then we move to the next ingredient slot.
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = false
|
||||||
|
c.trait_slot = 0
|
||||||
|
c.ing_idx = 1
|
||||||
|
c.ing_slot += 1
|
||||||
|
else
|
||||||
|
-- if there are no more ingredients to set, then we finalize.
|
||||||
|
sfx(2)
|
||||||
|
c.x, c.y = 0, 0
|
||||||
|
final_trait_options = filter_list(traits, function(x) return x.active end)
|
||||||
|
choosing_ingredient = false
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = true
|
||||||
|
c.trait_slot = 0
|
||||||
|
c.ing_idx = 1
|
||||||
|
c.ing_slot = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (btnp(5)) then
|
||||||
|
-- delete the last ingredient from the ingredients list
|
||||||
|
if #ingredients == 0 then
|
||||||
|
change_screen(screen_recipe_list)
|
||||||
|
else
|
||||||
|
traits = filter_list(
|
||||||
|
traits,
|
||||||
|
function(set_trait) return set_trait.from_ingredient_slot ~= #ingredients end
|
||||||
|
)
|
||||||
|
|
||||||
|
deli(ingredients)
|
||||||
|
c.trait_slot = 0
|
||||||
|
if choosing_ingredient and c.ing_slot > 1 then c.ing_slot -= 1 end
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function crafting_place_update()
|
||||||
|
current_ingredient = ingredients[c.ing_slot]
|
||||||
|
current_trait = library.traits[current_ingredient.traits[c.trait_slot]]
|
||||||
|
|
||||||
|
width = current_trait[4]
|
||||||
|
height = current_trait[5]
|
||||||
|
|
||||||
|
if btnp(0) and c.x>0 then c.x -= 1 end
|
||||||
|
if btnp(1) and c.x+width < grid_width then c.x += 1 end
|
||||||
|
if btnp(2) and c.y>0 then c.y -= 1 end
|
||||||
|
if btnp(3) and c.y+height < grid_height then c.y += 1 end
|
||||||
|
|
||||||
|
if btnp(4) then
|
||||||
|
new_trait = {trait=current_trait, x=c.x, y=c.y, active=true, from_ingredient_slot=c.ing_slot}
|
||||||
|
|
||||||
|
for idx, trait in ipairs(traits) do
|
||||||
|
if overlaps(trait, new_trait) then
|
||||||
|
traits[idx].active = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
add(traits, new_trait)
|
||||||
|
|
||||||
|
|
||||||
|
if c.trait_slot < #current_ingredient.traits then
|
||||||
|
-- if there's more traits to set, then we should keep setting traits.
|
||||||
|
choosing_ingredient = false
|
||||||
|
placing_trait = true
|
||||||
|
finalizing = false
|
||||||
|
c.trait_slot += 1
|
||||||
|
elseif c.ing_slot < #current_recipe.ingredients then
|
||||||
|
-- if there's more ingredients to set, then we move on to setting ingredients.
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = false
|
||||||
|
c.trait_slot = 0
|
||||||
|
c.ing_slot += 1
|
||||||
|
else
|
||||||
|
-- if there's no more ingredients to set, then we move on to finalizing.
|
||||||
|
sfx(2)
|
||||||
|
c.x, c.y = 0, 0
|
||||||
|
final_trait_options = filter_list(traits, function(x) return x.active end)
|
||||||
|
choosing_ingredient = false
|
||||||
|
placing_trait = false
|
||||||
|
finalizing = true
|
||||||
|
c.trait_slot = 0
|
||||||
|
c.ing_slot = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (btnp(5)) then
|
||||||
|
undo_ingredient()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function crafting_finalize_update()
|
||||||
|
if #final_trait_options < 3 then big_button = true end
|
||||||
|
|
||||||
|
if not big_button then
|
||||||
|
newx, newy = c.x, c.y
|
||||||
|
if btnp(0) then newx -= 1 end
|
||||||
|
if btnp(1) then newx += 1 end
|
||||||
|
if btnp(2) then newy -= 1 end
|
||||||
|
if btnp(3) then newy += 1 end
|
||||||
|
|
||||||
|
if (final_trait_options[2*newy + newx + 1] ~= nil) and newx <= 1 and newx >= 0 then
|
||||||
|
c.x, c.y = newx, newy
|
||||||
|
elseif btnp(3) and not (btnp(0) or btnp(1) or btnp(2)) then
|
||||||
|
big_button = true
|
||||||
|
end
|
||||||
|
local i = 2*c.y + c.x + 1
|
||||||
|
|
||||||
|
if btnp(4) and not big_button and #final_selected_traits < 2 then
|
||||||
|
if not contains(final_selected_traits, i) then
|
||||||
|
add(final_selected_traits, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--todo: go back (btnp5)
|
||||||
|
else
|
||||||
|
if btnp(2) and #final_trait_options > 2 then big_button = false end
|
||||||
|
if btnp(4) then
|
||||||
|
make_the_product()
|
||||||
|
big_button = false
|
||||||
|
end
|
||||||
|
if btnp(5) and #final_trait_options < 3 then
|
||||||
|
-- go back a step
|
||||||
|
undo_ingredient()
|
||||||
|
finalizing = false
|
||||||
|
elseif btnp(5) then
|
||||||
|
big_button = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function make_the_product()
|
||||||
|
local product = make_item(library.item_blueprints[current_recipe.result])
|
||||||
|
product.quality = quality()
|
||||||
|
add(inventory, product)
|
||||||
|
for x in all(ingredients) do
|
||||||
|
del(inventory, x)
|
||||||
|
end
|
||||||
|
product.traits = {}
|
||||||
|
if #final_trait_options < 3 then
|
||||||
|
for t in all(final_trait_options) do
|
||||||
|
add(product.traits, t.trait[1])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for i in all(final_selected_traits) do
|
||||||
|
add(product.traits, final_trait_options[i].trait[1])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
sfx(5)
|
||||||
|
change_screen(screen_recipe_list)
|
||||||
|
end
|
||||||
|
|
||||||
|
function undo_ingredient()
|
||||||
|
if #ingredients == 0 then
|
||||||
|
change_screen(screen_recipe_list)
|
||||||
|
else
|
||||||
|
traits = filter_list(
|
||||||
|
traits,
|
||||||
|
function(set_trait) return set_trait.from_ingredient_slot ~= #ingredients end
|
||||||
|
)
|
||||||
|
|
||||||
|
deli(ingredients)
|
||||||
|
c.trait_slot = 0
|
||||||
|
if choosing_ingredient and c.ing_slot > 1 then c.ing_slot -= 1 end
|
||||||
|
choosing_ingredient = true
|
||||||
|
placing_trait = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function crafting_draw()
|
||||||
|
cls()
|
||||||
|
|
||||||
|
draw_background()
|
||||||
|
|
||||||
|
draw_paper(30,8,140,140)
|
||||||
|
draw_recipe_on_paper(current_recipe, 30, 8)
|
||||||
|
draw_recipe_in_progress_on_paper(30, 8)
|
||||||
|
|
||||||
|
-- puzzle grid including pieces
|
||||||
|
draw_grid()
|
||||||
|
|
||||||
|
if finalizing then
|
||||||
|
if #final_trait_options > 2 then
|
||||||
|
draw_paper(24, 10, 128-24-24, 128-10-10)
|
||||||
|
color(highlight_text_color)
|
||||||
|
print("pick two traits\nto keep!",32, 20)
|
||||||
|
|
||||||
|
for i, trait in ipairs(final_trait_options) do
|
||||||
|
xi, yi = (i-1)%2, (i+i%2-2)/2
|
||||||
|
x, y = 64-32+xi*32, 34+yi*8
|
||||||
|
if contains(final_selected_traits, i) then
|
||||||
|
rect(x-2, y-2, x+30, y+6, 10)
|
||||||
|
end
|
||||||
|
if not big_button and xi == c.x and yi == c.y then
|
||||||
|
rect(x-2, y-2, x+30, y+6, 0)
|
||||||
|
end
|
||||||
|
if contains(final_selected_traits, i) then
|
||||||
|
color(highlight_text_color)
|
||||||
|
else
|
||||||
|
color(base_text_color)
|
||||||
|
end
|
||||||
|
print(trait.trait[1], x, y )
|
||||||
|
end
|
||||||
|
|
||||||
|
--draw_paper(40, 76, 128-40-40, 12)
|
||||||
|
color(highlight_text_color)
|
||||||
|
if big_button then
|
||||||
|
pal(9,0)
|
||||||
|
else
|
||||||
|
palt(12, true)
|
||||||
|
end
|
||||||
|
spr(128, 64-16, 72, 4,4)
|
||||||
|
spr(center_glyph, 64-8, 80, 2, 2)
|
||||||
|
pal()
|
||||||
|
palt()
|
||||||
|
if big_button then
|
||||||
|
color(12)
|
||||||
|
else
|
||||||
|
color(highlight_text_color)
|
||||||
|
end
|
||||||
|
print("create!", 64-12, 108)
|
||||||
|
else
|
||||||
|
draw_paper(30, 30, 128-30-30, 128-30-30)
|
||||||
|
pal(9,0)
|
||||||
|
spr(128, 64-16, 60-16, 4,4)
|
||||||
|
spr(center_glyph, 64-8, 60-8, 2, 2)
|
||||||
|
pal()
|
||||||
|
palt()
|
||||||
|
if big_button then
|
||||||
|
color(12)
|
||||||
|
else
|
||||||
|
color(highlight_text_color)
|
||||||
|
end
|
||||||
|
print("create!", 64-12, 80)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_grid()
|
||||||
|
map(0,0, grid_x,grid_y, grid_width+1,grid_height+1)
|
||||||
|
for trait in all(traits) do
|
||||||
|
if trait.active then
|
||||||
|
map(trait.trait[2], trait.trait[3],
|
||||||
|
(trait.x*grid_size)+grid_x, (trait.y*grid_size)+grid_y,
|
||||||
|
trait.trait[4], trait.trait[5])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if (placing_trait) then
|
||||||
|
trait = library.traits[ingredients[c.ing_slot].traits[c.trait_slot]]
|
||||||
|
|
||||||
|
-- draw the currently selected trait into the grid
|
||||||
|
map(trait[2], trait[3],
|
||||||
|
(c.x*grid_size)+grid_x, (c.y*grid_size)+grid_y,
|
||||||
|
trait[4], trait[5])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_recipe_in_progress_on_paper(x, y)
|
||||||
|
-- selected ingredients
|
||||||
|
for i, ing in ipairs(ingredients) do
|
||||||
|
draw_ingredient_listing(ing, x+40, y + 26*i)
|
||||||
|
end
|
||||||
|
color(blank_ingredient_outline_color)
|
||||||
|
|
||||||
|
for i=(c.ing_slot+1),#current_recipe.ingredients do
|
||||||
|
print(current_recipe.ingredients[i], x+46, y+2+26*i+9)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- quality listing
|
||||||
|
color(base_text_color)
|
||||||
|
print("quality", x+2, y+12)
|
||||||
|
print_quality(quality(), x+44, y+18)
|
||||||
|
|
||||||
|
|
||||||
|
if (choosing_ingredient and c.ing_slot < #current_recipe.ingredients + 1) then
|
||||||
|
-- draw a box around the ingredient we're choosing
|
||||||
|
yc = y + 26*c.ing_slot
|
||||||
|
xc = x+40
|
||||||
|
rect(xc, yc, xc+55, yc+26,10)
|
||||||
|
spr(6, xc-8, yc+10)
|
||||||
|
spr(7, xc+56, yc+10)
|
||||||
|
|
||||||
|
if current_ingredient == nil then
|
||||||
|
color(blank_ingredient_outline_color)
|
||||||
|
print(current_recipe.ingredients[c.ing_slot], x+46, y+2+26*c.ing_slot+9)
|
||||||
|
else
|
||||||
|
-- draw the ingredient listing for the selected ingredient
|
||||||
|
draw_ingredient_listing(current_ingredient, xc, yc)
|
||||||
|
end
|
||||||
|
elseif (placing_trait) then
|
||||||
|
-- draw a marker for the trait we're picking
|
||||||
|
yc = y + 26*c.ing_slot
|
||||||
|
yc = 3+yc+c.trait_slot*6
|
||||||
|
xc = x+38
|
||||||
|
spr(8, xc, yc)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i, t in ipairs(filter_list(traits, function(trait) return trait.active end)) do
|
||||||
|
color(base_text_color)
|
||||||
|
print(t.trait[1], x+5, y+78 + 8*i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function quality()
|
||||||
|
local quality_sum = 0
|
||||||
|
|
||||||
|
for ing in all(ingredients) do
|
||||||
|
quality_sum += ing.quality
|
||||||
|
end
|
||||||
|
|
||||||
|
if #ingredients > 1 then
|
||||||
|
quality_sum = flr(quality_sum/#ingredients)
|
||||||
|
else
|
||||||
|
quality_sum = flr(quality_sum)
|
||||||
|
end
|
||||||
|
|
||||||
|
for trait in all(traits) do
|
||||||
|
if trait.active then quality_sum += 5 end
|
||||||
|
end
|
||||||
|
|
||||||
|
return quality_sum
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_crafting_raw = {before=crafting_before, draw=crafting_draw, update=crafting_update}
|
||||||
|
screen_crafting = screen_crafting_raw
|
||||||
|
if not testing then
|
||||||
|
screen_crafting = screen_conversation({
|
||||||
|
{phoebe_portrait, [[when i craft, i pick ingredients one by one with left and right]]},
|
||||||
|
{phoebe_portrait, [[and press 🅾️ to lock them in before picking what traits to use]]},
|
||||||
|
{phoebe_portrait, [[trying to fit them into the grid, which increases the quality. ]]},
|
||||||
|
{phoebe_portrait, [[two traits from those still in the grid at the end are added to the product!]]},
|
||||||
|
{phoebe_portrait, [[but if you overlap a trait, it will be removed.]]},
|
||||||
|
{phoebe_portrait, [[i've even heard of some traits that combine to form others!]]}
|
||||||
|
},
|
||||||
|
function()
|
||||||
|
screen_crafting = screen_crafting_raw
|
||||||
|
change_screen(screen_crafting)
|
||||||
|
end,
|
||||||
|
screen_crafting_raw)
|
||||||
|
end
|
120
screen_inventory.lua
Normal file
120
screen_inventory.lua
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
inventory_drawer_height=0
|
||||||
|
inventory_drawer_height_max=106
|
||||||
|
|
||||||
|
inventory_cursor = {
|
||||||
|
x=0, y=0,
|
||||||
|
}
|
||||||
|
|
||||||
|
function inventory_slide(x1, x2)
|
||||||
|
return {
|
||||||
|
timer = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
inventory_drawer_height = x1
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
inventory_drawer_height = x1 + (s.timer/0.2)*(x2-x1)
|
||||||
|
if s.timer > 0.2 then
|
||||||
|
inventory_drawer_height = x2
|
||||||
|
s.active=false
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
draw=function(s)
|
||||||
|
draw_drawer()
|
||||||
|
draw_item_sheet()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function inventory_before()
|
||||||
|
end
|
||||||
|
|
||||||
|
function inventory_update()
|
||||||
|
cx, cy = inventory_cursor.x, inventory_cursor.y
|
||||||
|
if btnp(0) then cx -= 1 end
|
||||||
|
if btnp(1) then cx += 1 end
|
||||||
|
if btnp(2) then cy -= 1 end
|
||||||
|
if btnp(3) then cy += 1 end
|
||||||
|
if cy >= 0 and cy < flr(#inventory/5) then
|
||||||
|
if cx >= 0 and cx < 5 then
|
||||||
|
inventory_cursor.x = cx
|
||||||
|
inventory_cursor.y = cy
|
||||||
|
end
|
||||||
|
elseif cy == flr(#inventory / 5) then
|
||||||
|
if cx >= 0 and cx < #inventory % 5 then
|
||||||
|
inventory_cursor.x = cx
|
||||||
|
inventory_cursor.y = cy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(5) then
|
||||||
|
animate(inventory_slide(inventory_drawer_height_max,0))
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function inventory_draw()
|
||||||
|
bench_draw()
|
||||||
|
draw_drawer()
|
||||||
|
draw_item_sheet()
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_drawer()
|
||||||
|
rectfill(14, 0, 114, inventory_drawer_height, 4)
|
||||||
|
for y=0,(inventory_drawer_height_max / 8) do
|
||||||
|
yval = y*8 + inventory_drawer_height - inventory_drawer_height_max
|
||||||
|
line(10, yval, 110, yval, 5)
|
||||||
|
for x=1,(4 - (y%2)) do
|
||||||
|
xval = x*32 + (y%2)*16
|
||||||
|
line(xval, yval, xval, yval+8, 5)
|
||||||
|
end
|
||||||
|
spr(20, 10, yval)
|
||||||
|
spr(20, 110, yval)
|
||||||
|
end
|
||||||
|
rectfill(6, inventory_drawer_height, 120, inventory_drawer_height+7, 4)
|
||||||
|
line(6, inventory_drawer_height, 120, inventory_drawer_height, 9)
|
||||||
|
line(6, inventory_drawer_height+7, 120, inventory_drawer_height+7, 9)
|
||||||
|
spr(21, 2, inventory_drawer_height)
|
||||||
|
spr(21, 118, inventory_drawer_height, 1, 1, true, false)
|
||||||
|
spr(22, 60, inventory_drawer_height+8)
|
||||||
|
draw_drawer_contents()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_drawer_contents()
|
||||||
|
for i, val in ipairs(inventory) do
|
||||||
|
x, y = 20+20*((i-1)%5), 10+20*flr((i-1)/5) + inventory_drawer_height - inventory_drawer_height_max
|
||||||
|
if inventory_cursor.x + 5*inventory_cursor.y == i-1 then
|
||||||
|
rect(x-2,y-2,x+9,y+9, 10)
|
||||||
|
end
|
||||||
|
sprite = val.sprite
|
||||||
|
if sprite == nil then sprite = 36 end
|
||||||
|
if val.sprite_recolor ~= nil then
|
||||||
|
pal(val.sprite_recolor)
|
||||||
|
end
|
||||||
|
spr(sprite, x, y)
|
||||||
|
pal()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_item_sheet()
|
||||||
|
if #inventory ~= 0 then
|
||||||
|
draw_paper(35,94, 128-2*35,28)
|
||||||
|
draw_ingredient_listing(inventory[1 + 5*inventory_cursor.y + inventory_cursor.x], 35, 94)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
screen_inventory_raw = {before=inventory_before, draw=inventory_draw, update=inventory_update}
|
||||||
|
screen_inventory = screen_inventory_raw
|
||||||
|
if not testing then
|
||||||
|
screen_inventory = screen_conversation({
|
||||||
|
{phoebe_portrait, [[oh right, this is the drawer where i keep my stuff!]]},},
|
||||||
|
function()
|
||||||
|
screen_inventory = screen_inventory_raw
|
||||||
|
change_screen(screen_inventory)
|
||||||
|
end,
|
||||||
|
screen_inventory_raw)
|
||||||
|
end
|
141
screen_letters.lua
Normal file
141
screen_letters.lua
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
letters = {
|
||||||
|
{[[
|
||||||
|
phoebe,
|
||||||
|
|
||||||
|
i know you looked
|
||||||
|
forward to the
|
||||||
|
fireworks festival
|
||||||
|
every year but our
|
||||||
|
travels are going
|
||||||
|
to keep us away again
|
||||||
|
this year. i'm so
|
||||||
|
sorry.
|
||||||
|
|
||||||
|
mom & dad]]},
|
||||||
|
{[[
|
||||||
|
phoebe,
|
||||||
|
|
||||||
|
i need purified water.
|
||||||
|
bring it to the hospital.
|
||||||
|
i'll give you reagent
|
||||||
|
in return.
|
||||||
|
|
||||||
|
-- lenore
|
||||||
|
]],}
|
||||||
|
}
|
||||||
|
letter_idx = 2
|
||||||
|
letters_offset_x = -10
|
||||||
|
letters_offset_y = 8
|
||||||
|
|
||||||
|
function letters_move_to(x1, y1, x2, y2)
|
||||||
|
return {
|
||||||
|
timer = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
letters_offset_x = x1
|
||||||
|
letters_offset_y = y1
|
||||||
|
sfx(2)
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
letters_offset_x = x1 + (s.timer/0.2)*(x2-x1)
|
||||||
|
letters_offset_y = y1 + (s.timer/0.2)*(y2-y1)
|
||||||
|
if s.timer > 0.2 then
|
||||||
|
letters_offset_x = x2
|
||||||
|
letters_offset_y = y2
|
||||||
|
s.active=false
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
draw=function(s)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function letters_move_out(x1, y1, x2, y2)
|
||||||
|
new = letters_move_to(x1, y1, x2, y2)
|
||||||
|
new.draw = function(s)
|
||||||
|
draw_paper(letters_offset_x, letters_offset_y, 128, 128)
|
||||||
|
draw_letter_on_paper(letters[letter_idx], letters_offset_x+14, letters_offset_y+4)
|
||||||
|
end
|
||||||
|
return new
|
||||||
|
end
|
||||||
|
|
||||||
|
function flip_away_letter(page)
|
||||||
|
return {
|
||||||
|
prev_page_idx = page,
|
||||||
|
|
||||||
|
timer = 0,
|
||||||
|
t2 = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
sfx(2)
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
if s.timer > 0.2 then s.active=false end
|
||||||
|
s.t2 = s.timer
|
||||||
|
end,
|
||||||
|
|
||||||
|
draw=function(s)
|
||||||
|
local page_flip = 600*s.t2
|
||||||
|
local x = letters_offset_x + page_flip
|
||||||
|
local y = letters_offset_y + 0.1*page_flip
|
||||||
|
draw_paper(x, y, 128, 128)
|
||||||
|
draw_letter_on_paper(letters[s.prev_page_idx], x+14, y+4)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function flip_in_letter(page, new_page)
|
||||||
|
o = flip_away_letter(new_page)
|
||||||
|
f = o.draw
|
||||||
|
o.other_page_idx = page
|
||||||
|
o.draw = function(s)
|
||||||
|
s.t2 = 0.2-s.timer
|
||||||
|
draw_paper(letters_offset_x, letters_offset_y, 128, 128)
|
||||||
|
draw_letter_on_paper(letters[s.other_page_idx], letters_offset_x+14, letters_offset_y+4)
|
||||||
|
f(s)
|
||||||
|
end
|
||||||
|
return o
|
||||||
|
end
|
||||||
|
|
||||||
|
function letters_update()
|
||||||
|
if btnp(0) and letter_idx > 1 then
|
||||||
|
animate(flip_away_letter(letter_idx))
|
||||||
|
letter_idx -= 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(1) and letter_idx < #letters then
|
||||||
|
animate(flip_in_letter(letter_idx, letter_idx+1))
|
||||||
|
letter_idx = letter_idx + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(5) then
|
||||||
|
animate(letters_move_out(-10, 8, -10-80, 8+8))
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function letters_draw()
|
||||||
|
cls()
|
||||||
|
|
||||||
|
draw_background()
|
||||||
|
draw_paper(letters_offset_x, letters_offset_y, 128, 128)
|
||||||
|
draw_letter_on_paper(letters[letter_idx], letters_offset_x+14, letters_offset_y+4)
|
||||||
|
end
|
||||||
|
|
||||||
|
function draw_letter_on_paper(letter, x, y)
|
||||||
|
color(base_text_color)
|
||||||
|
print(letter[1], x, y)
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_letters = {draw=letters_draw, update=letters_update}
|
||||||
|
screen_letters = screen_conversation({{phoebe_portrait, [[oh jeez my pile of letters!]]}},
|
||||||
|
function()
|
||||||
|
screen_letters = {draw=letters_draw, update=letters_update}
|
||||||
|
change_screen(screen_letters)
|
||||||
|
end,
|
||||||
|
screen_letters)
|
150
screen_recipe_list.lua
Normal file
150
screen_recipe_list.lua
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
timer = 0
|
||||||
|
pages = grimoire
|
||||||
|
page_idx = 1
|
||||||
|
prev_page_idx = 1
|
||||||
|
animations={}
|
||||||
|
|
||||||
|
current_recipe = pages[page_idx]
|
||||||
|
|
||||||
|
recipe_list_offset_x=30
|
||||||
|
recipe_list_offset_y=8
|
||||||
|
|
||||||
|
function recipe_list_move_to(x1, y1, x2, y2)
|
||||||
|
return {
|
||||||
|
timer = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
recipe_list_offset_x = x1
|
||||||
|
recipe_list_offset_y = y1
|
||||||
|
sfx(2)
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
recipe_list_offset_x = x1 + (s.timer/0.2)*(x2-x1)
|
||||||
|
recipe_list_offset_y = y1 + (s.timer/0.2)*(y2-y1)
|
||||||
|
if s.timer > 0.2 then
|
||||||
|
recipe_list_offset_x = x2
|
||||||
|
recipe_list_offset_y = y2
|
||||||
|
s.active=false
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
draw=function(s)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function recipe_list_move_out(x1, y1, x2, y2)
|
||||||
|
new = recipe_list_move_to(x1, y1, x2, y2)
|
||||||
|
new.draw = function(s)
|
||||||
|
draw_paper(recipe_list_offset_x, recipe_list_offset_y, 140, 140)
|
||||||
|
draw_recipe_on_paper(current_recipe, recipe_list_offset_x, recipe_list_offset_y)
|
||||||
|
decorate_recipe_unfinished(current_recipe, recipe_list_offset_x, recipe_list_offset_y)
|
||||||
|
end
|
||||||
|
return new
|
||||||
|
end
|
||||||
|
|
||||||
|
function flip_away(page)
|
||||||
|
return {
|
||||||
|
prev_page_idx = page,
|
||||||
|
|
||||||
|
timer = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
sfx(2)
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
if s.timer > 0.2 then s.active=false end
|
||||||
|
end,
|
||||||
|
draw=function(s)
|
||||||
|
local page_flip = 600*s.timer
|
||||||
|
local x = 30 + page_flip
|
||||||
|
local y = 8 + 0.1*page_flip
|
||||||
|
draw_paper(x,y, 140, 140)
|
||||||
|
draw_recipe_on_paper(pages[s.prev_page_idx], x,y)
|
||||||
|
decorate_recipe_unfinished(pages[s.prev_page_idx], x, y)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function flip_in(page, new_page)
|
||||||
|
return {
|
||||||
|
prev_page_idx = page,
|
||||||
|
new_page_idx = new_page,
|
||||||
|
|
||||||
|
timer = 0,
|
||||||
|
active=true,
|
||||||
|
|
||||||
|
before=function(s)
|
||||||
|
sfx(2)
|
||||||
|
end,
|
||||||
|
|
||||||
|
update=function(s)
|
||||||
|
if s.timer >= 0.2 then s.active=false end
|
||||||
|
end,
|
||||||
|
draw=function(s)
|
||||||
|
|
||||||
|
draw_paper(30, 8, 140, 140)
|
||||||
|
draw_recipe_on_paper(pages[s.prev_page_idx], 30, 8)
|
||||||
|
decorate_recipe_unfinished(pages[s.prev_page_idx], 30, 8)
|
||||||
|
|
||||||
|
local page_flip = 600*(0.2-s.timer)
|
||||||
|
local x = 30 + page_flip
|
||||||
|
local y = 8 + 0.1*page_flip
|
||||||
|
|
||||||
|
draw_paper(x,y, 140, 140)
|
||||||
|
draw_recipe_on_paper(pages[s.new_page_idx], x,y)
|
||||||
|
decorate_recipe_unfinished(pages[s.new_page_idx], x, y)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function pages_update()
|
||||||
|
if btnp(0) and page_idx ~= 1 then
|
||||||
|
animate(flip_away(page_idx))
|
||||||
|
page_idx = page_idx - 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(1) and page_idx ~= #pages then
|
||||||
|
animate(flip_in(page_idx, page_idx+1))
|
||||||
|
page_idx = page_idx + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(4) then
|
||||||
|
change_screen(screen_crafting)
|
||||||
|
current_recipe = pages[page_idx]
|
||||||
|
end
|
||||||
|
if btnp(5) then
|
||||||
|
animate(recipe_list_move_out(30, 8, 30+80, 8+8))
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end
|
||||||
|
|
||||||
|
current_recipe = pages[page_idx]
|
||||||
|
end
|
||||||
|
|
||||||
|
function pages_draw()
|
||||||
|
cls()
|
||||||
|
|
||||||
|
draw_background()
|
||||||
|
|
||||||
|
draw_paper(recipe_list_offset_x, recipe_list_offset_y, 140, 140)
|
||||||
|
draw_recipe_on_paper(current_recipe, recipe_list_offset_x, recipe_list_offset_y)
|
||||||
|
decorate_recipe_unfinished(current_recipe, recipe_list_offset_x, recipe_list_offset_y)
|
||||||
|
end
|
||||||
|
|
||||||
|
recipe_tutorial = {
|
||||||
|
{phoebe_portrait, [[this is all my recipes. they each list what they need for ingredients.]]},
|
||||||
|
{phoebe_portrait, [[go through them with left and right, or]]},
|
||||||
|
{phoebe_portrait, [[press ❎ to back out to the workbench. 🅾️ will start crafting!!]]},
|
||||||
|
}
|
||||||
|
screen_recipe_list = {draw=pages_draw, update=pages_update}
|
||||||
|
if not testing then
|
||||||
|
screen_recipe_list = screen_conversation(recipe_tutorial,
|
||||||
|
function()
|
||||||
|
screen_recipe_list = {draw=pages_draw, update=pages_update}
|
||||||
|
change_screen(screen_recipe_list)
|
||||||
|
end,
|
||||||
|
screen_recipe_list)
|
||||||
|
end
|
34
screen_title.lua
Normal file
34
screen_title.lua
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function title_update()
|
||||||
|
if btnp(4) then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "hi! i'm phoebe! welcome to pilton!"},
|
||||||
|
{phoebe_portrait, "this is a small town known for our fireworks festival."},
|
||||||
|
{phoebe_portrait, "or we would be. my grandfather, the town's best alchemist, died suddenly and"},
|
||||||
|
{phoebe_portrait, "hadn't taught me about fireworks. my mother is an adventurer instead"},
|
||||||
|
{phoebe_portrait, "of learning alchemy, so now there's no one to carry on the tradition."},
|
||||||
|
{phoebe_portrait, "the town's pretty broken up about it but i'm doing my best to carry on."},
|
||||||
|
{phoebe_portrait, "but i just know the basics of picking herbs and purifying water."},
|
||||||
|
},
|
||||||
|
function() change_screen(screen_workbench) end,
|
||||||
|
{update=walkaround_update, draw=walkaround_draw}))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
r1, r2 = 0,0
|
||||||
|
function title_draw()
|
||||||
|
cls()
|
||||||
|
local big = "\^t\^w"
|
||||||
|
local t = "atelier phoebe"
|
||||||
|
local co = 0
|
||||||
|
local x = 10
|
||||||
|
for i=1,#t do
|
||||||
|
local c = sub(t, i, i)
|
||||||
|
col = 9
|
||||||
|
if (time()*2 + x/128) % 8 < 0.25 then
|
||||||
|
col = 10
|
||||||
|
end
|
||||||
|
x = print(big .. c, x, 30 + sin(x/128+time()/4)*2, col)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_title = {update=title_update, draw=title_draw}
|
225
screen_walkaround.lua
Normal file
225
screen_walkaround.lua
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
player_sprite_number = 48
|
||||||
|
player_x, player_y = 24,16
|
||||||
|
step_timer, stride_length = 0, 4
|
||||||
|
|
||||||
|
locations = {}
|
||||||
|
|
||||||
|
function crystals(story_state)
|
||||||
|
add(inventory, make_item(library.item_blueprints.crystal))
|
||||||
|
change_screen(screen_conversation({{phoebe_portrait, "my family makes things out of these crystals! i'll take one."}}))
|
||||||
|
end
|
||||||
|
locations["5,0"]=crystals
|
||||||
|
locations["6,0"]=crystals
|
||||||
|
|
||||||
|
|
||||||
|
function barrel(story_state)
|
||||||
|
sfx(1)
|
||||||
|
change_screen(screen_conversation({{phoebe_portrait, "it's a barrel!"}}))
|
||||||
|
end
|
||||||
|
locations["2,1"]=barrel
|
||||||
|
locations["10,10"]=barrel
|
||||||
|
|
||||||
|
locations["3,1"]=function() -- the atelier!
|
||||||
|
sfx(4)
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end
|
||||||
|
locations["12,1"]=function() --at the well. give us ssome water
|
||||||
|
add(inventory, make_item(library.item_blueprints.well_water))
|
||||||
|
change_screen(screen_conversation({{phoebe_portrait, "slurp!"}}))
|
||||||
|
toast("received water!")
|
||||||
|
sfx(0)
|
||||||
|
end
|
||||||
|
|
||||||
|
locations["3,10"] = script_charcoal_seller
|
||||||
|
locations["11,5"] = script_neighbor
|
||||||
|
locations["9,5"] = script_lenore
|
||||||
|
locations["9,8"] = script_library
|
||||||
|
locations["11,13"] = script_witch
|
||||||
|
|
||||||
|
function herbs(story_state)
|
||||||
|
add(inventory, make_item(library.item_blueprints.herb))
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "ooh, healing herbs! i'll take some. not more than 1/3 the patch though!"}
|
||||||
|
}))
|
||||||
|
toast("received herbs!")
|
||||||
|
end
|
||||||
|
|
||||||
|
locations["14,12"] = herbs
|
||||||
|
locations["14,13"] = herbs
|
||||||
|
locations["13,13"] = herbs
|
||||||
|
locations["13,14"] = herbs
|
||||||
|
|
||||||
|
function beach(story_state)
|
||||||
|
add(inventory, make_item(library.item_blueprints.sand))
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "how many grains of sand does it take before it becomes a pile?"}
|
||||||
|
}))
|
||||||
|
toast("received sand!")
|
||||||
|
end
|
||||||
|
|
||||||
|
locations["3,15"] = beach
|
||||||
|
locations["4,15"] = beach
|
||||||
|
locations["5,15"] = beach
|
||||||
|
locations["6,15"] = beach
|
||||||
|
locations["7,15"] = beach
|
||||||
|
|
||||||
|
function interact(x, y)
|
||||||
|
if testing then
|
||||||
|
toast(x .. "," .. y)
|
||||||
|
end
|
||||||
|
result = locations[flr(x) .. "," .. flr(y)]
|
||||||
|
if result ~= nil then result(story) end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function flags_from_xy(x, y)
|
||||||
|
return fget(mget(x/8, 16+y/8))
|
||||||
|
end
|
||||||
|
|
||||||
|
function walkaround_update()
|
||||||
|
moved=false
|
||||||
|
dx, dy = 0, 0
|
||||||
|
if btn(0) then dx = -1 end
|
||||||
|
if btn(1) then dx = 1 end
|
||||||
|
if btn(2) then dy = -1 end
|
||||||
|
if btn(3) then dy = 1 end
|
||||||
|
|
||||||
|
|
||||||
|
if dx == -1 then flip_x, up, down = true, false, false end
|
||||||
|
if dx == 1 then flip_x, up, down = false, false, false end
|
||||||
|
if dy == -1 then up, down = true, false end
|
||||||
|
if dy == 1 then up, down = false, true end
|
||||||
|
if dx ~= 0 or dy ~= 0 then moved = true end
|
||||||
|
|
||||||
|
if testing then dx, dy = 2*dx, 2*dy end
|
||||||
|
if flags_from_xy(player_x + dx, player_y + dy) & 0x80 == 0 then player_x, player_y = player_x + dx, player_y + dy end
|
||||||
|
if testing then dx, dy = dx/2, dy/2 end
|
||||||
|
|
||||||
|
if moved then
|
||||||
|
test_x, test_y = player_x + 8*dx, player_y + 8*dy
|
||||||
|
elseif up then
|
||||||
|
test_x, test_y = player_x, player_y - 8
|
||||||
|
elseif down then
|
||||||
|
test_x, test_y = player_x, player_y + 8
|
||||||
|
elseif flip_x then
|
||||||
|
test_x, test_y = player_x - 8, player_y
|
||||||
|
else
|
||||||
|
test_x, test_y = player_x + 8, player_y
|
||||||
|
end
|
||||||
|
|
||||||
|
if btnp(4) then interact(test_x/8, test_y/8) end
|
||||||
|
|
||||||
|
end
|
||||||
|
function walkaround_draw()
|
||||||
|
cls()
|
||||||
|
rectfill(8,8,120,120,3)
|
||||||
|
map(0,16,0,0,16,16) -- draw the town map
|
||||||
|
update_player_sprite()
|
||||||
|
|
||||||
|
spr(player_sprite_number, player_x-4, player_y-8, 1,1, flip_x)
|
||||||
|
map(0,16,0,0,16,16, 0x40) -- redraw the tiles which are supposed to appear over the player! (flag 6)
|
||||||
|
end
|
||||||
|
function update_player_sprite()
|
||||||
|
if up then player_sprite_number = 52 + (player_sprite_number % 2)
|
||||||
|
elseif down then player_sprite_number = 50 + (player_sprite_number % 2)
|
||||||
|
else player_sprite_number = 48 + (player_sprite_number % 2) end
|
||||||
|
|
||||||
|
if moved then
|
||||||
|
step_timer += 1
|
||||||
|
if step_timer > stride_length then
|
||||||
|
step_timer = 0
|
||||||
|
if player_sprite_number % 2 == 0 then player_sprite_number += 1
|
||||||
|
elseif player_sprite_number % 2 ~= 0 then player_sprite_number -= 1 end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_walkaround = {update=walkaround_update, draw=walkaround_draw}
|
||||||
|
if not testing then
|
||||||
|
screen_walkaround = screen_conversation({
|
||||||
|
{phoebe_portrait, [[oh, and this is the town! all sorts of things to do here.]]},
|
||||||
|
{phoebe_portrait, [[like i could go get water from the well to the east,]]},
|
||||||
|
{phoebe_portrait, [[or go pick up some charcoal from the red house to the southwest!]]},
|
||||||
|
{phoebe_portrait, [[just face a building and press ❎!]]}
|
||||||
|
},
|
||||||
|
function()
|
||||||
|
screen_walkaround = {draw=walkaround_draw, update=walkaround_update}
|
||||||
|
change_screen(screen_walkaround)
|
||||||
|
end,
|
||||||
|
screen_walkaround)
|
||||||
|
end
|
||||||
|
|
||||||
|
fireworks = {}
|
||||||
|
stars = {}
|
||||||
|
drag = 0.1
|
||||||
|
fireworks_frequency = 8
|
||||||
|
function fireworks_update()
|
||||||
|
walkaround_update()
|
||||||
|
|
||||||
|
new_fireworks = {}
|
||||||
|
new_stars = {}
|
||||||
|
|
||||||
|
if rnd(100) < fireworks_frequency then add(new_fireworks, new_firework()) end
|
||||||
|
|
||||||
|
for f in all(fireworks) do
|
||||||
|
velocity = sqrt(f.vx*f.vx + f.vy*f.vy)
|
||||||
|
f.x = f.x + f.vx
|
||||||
|
f.y = f.y + f.vy
|
||||||
|
f.vx = f.vx*(1-drag*velocity)
|
||||||
|
f.vy = f.vy*(1-drag*velocity)
|
||||||
|
if velocity < 0.2 then
|
||||||
|
for i=1,10 do
|
||||||
|
add(new_stars,new_star(f))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
add(new_fireworks, f)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for s in all(stars) do
|
||||||
|
velocity = sqrt(s.vx*s.vx + s.vy*s.vy)
|
||||||
|
s.x = s.x + s.vx
|
||||||
|
s.y = s.y + s.vy
|
||||||
|
s.vx = s.vx*(1-drag*velocity)
|
||||||
|
s.vy = s.vy*(1-drag*velocity)
|
||||||
|
if velocity > 0.2 then
|
||||||
|
add(new_stars, s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
fireworks = new_fireworks
|
||||||
|
stars = new_stars
|
||||||
|
end
|
||||||
|
|
||||||
|
function new_firework()
|
||||||
|
return {
|
||||||
|
alive=true,
|
||||||
|
x=rnd(128),
|
||||||
|
y=rnd(112)+16,
|
||||||
|
vx=rnd(0.4)-0.2,
|
||||||
|
vy=-5+rnd(1),
|
||||||
|
c=rnd({10, 8, 7})
|
||||||
|
}
|
||||||
|
end
|
||||||
|
function new_star(t)
|
||||||
|
z = rnd(2)
|
||||||
|
return {
|
||||||
|
alive=true,
|
||||||
|
x=t.x,
|
||||||
|
y=t.y,
|
||||||
|
vx = sin(z)*2,
|
||||||
|
vy = cos(z)*2,
|
||||||
|
c=t.c
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function fireworks_draw()
|
||||||
|
walkaround_draw()
|
||||||
|
|
||||||
|
for f in all(fireworks) do
|
||||||
|
circfill(f.x, f.y, 1, f.c)
|
||||||
|
end
|
||||||
|
for s in all(stars) do
|
||||||
|
circfill(s.x, s.y, 1, s.c)
|
||||||
|
end
|
||||||
|
end
|
55
screen_workbench.lua
Normal file
55
screen_workbench.lua
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
page_flip = 0
|
||||||
|
timer = 0
|
||||||
|
|
||||||
|
function bench_update()
|
||||||
|
if btnp(0) then
|
||||||
|
animate(letters_move_to(-10-80, 8+8, -10, 8))
|
||||||
|
change_screen(screen_letters)
|
||||||
|
end
|
||||||
|
if btnp(1) then
|
||||||
|
animate(recipe_list_move_to(30+80, 8+8, 30, 8))
|
||||||
|
change_screen(screen_recipe_list)
|
||||||
|
end
|
||||||
|
if btnp(2) then
|
||||||
|
animate(inventory_slide(0, inventory_drawer_height_max))
|
||||||
|
change_screen(screen_inventory)
|
||||||
|
end
|
||||||
|
if btnp(5) then
|
||||||
|
sfx(4)
|
||||||
|
change_screen(screen_walkaround)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function bench_draw()
|
||||||
|
cls()
|
||||||
|
|
||||||
|
draw_background()
|
||||||
|
|
||||||
|
current_recipe = pages[page_idx]
|
||||||
|
|
||||||
|
outwards_x = 80
|
||||||
|
outwards_y = outwards_x/10
|
||||||
|
draw_paper(30+outwards_x, 8+outwards_y, 128, 128)
|
||||||
|
draw_recipe_on_paper(current_recipe, 30+outwards_x, 8+outwards_y)
|
||||||
|
decorate_recipe_unfinished(current_recipe, 30+outwards_x, 8+outwards_y)
|
||||||
|
|
||||||
|
draw_paper(-10-outwards_x, 8+outwards_y, 128, 128)
|
||||||
|
draw_letter_on_paper(letters[letter_idx], 4-outwards_x, 12+outwards_y)
|
||||||
|
|
||||||
|
draw_drawer()
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_workbench = {draw=bench_draw, update=bench_update}
|
||||||
|
if not testing then
|
||||||
|
screen_workbench = screen_conversation({
|
||||||
|
{phoebe_portrait, [[this is my workbench.]]},
|
||||||
|
{phoebe_portrait, [[if you press left or right you can see my letters or recipes.]]},
|
||||||
|
{phoebe_portrait, [[then press ❎ to get back to the workbench.]]},
|
||||||
|
},
|
||||||
|
function()
|
||||||
|
screen_workbench = {draw=bench_draw, update=bench_update}
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end,
|
||||||
|
screen_workbench)
|
||||||
|
end
|
58
script_charcoal_seller.lua
Normal file
58
script_charcoal_seller.lua
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
function script_charcoal_seller(s) -- the brick house!
|
||||||
|
if s.main == 1 or s.main == 2 or s.main == 3 or s.main == 4 or s.main == 5 or s.main == 6 then
|
||||||
|
if not s.hans_talked then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "hey phoebe. if your family's not doing the festival this year"},
|
||||||
|
{seller_portrait, "you don't need the whole bulk order of charcoal, right?"},
|
||||||
|
{phoebe_portrait, "yeah."},
|
||||||
|
{seller_portrait, "well, you can take as much as you need.", function()
|
||||||
|
add(inventory, make_item(library.item_blueprints.charcoal))
|
||||||
|
toast("received charcoal!")
|
||||||
|
end},
|
||||||
|
}))
|
||||||
|
s.hans_talked = true
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "hey phoebe. charcoal's out back.", function()
|
||||||
|
add(inventory, make_item(library.item_blueprints.charcoal))
|
||||||
|
toast("received charcoal!")
|
||||||
|
end},
|
||||||
|
}))
|
||||||
|
end
|
||||||
|
elseif s.main == 7 then
|
||||||
|
if s.branch_hans == 1 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "look, if you get me the fireworks, i can set up a show. three boxes should do it."}
|
||||||
|
}))
|
||||||
|
s.branch_hans = 2
|
||||||
|
elseif s.branch_hans == 2 then
|
||||||
|
fireworks = player_has("fireworks", 3)
|
||||||
|
if fireworks == nil then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "i need three boxes of fireworks if we're gonna do a show."}
|
||||||
|
}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "this looks good. fantastic quality."},
|
||||||
|
{seller_portrait, "i'll set up the show and meet you at the library for viewing!"},
|
||||||
|
}))
|
||||||
|
|
||||||
|
for x in all(fireworks) do del(inventory, x) end
|
||||||
|
s.branch_hans = 3
|
||||||
|
if s.branch_hans == 3 and s.branch_lenore == 3 and s.branch_brigitte == 2 then
|
||||||
|
s.main = 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif s.branch_hans == 3 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "i'll meet you at the library for viewing when you're ready."},
|
||||||
|
}))
|
||||||
|
end -- end hans branch
|
||||||
|
elseif story_state.main == 8 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{seller_portrait, "i'll meet you at the library for watching the fireworks!"},
|
||||||
|
}))
|
||||||
|
elseif story_state.main == 9 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[no one is here.]"}}))
|
||||||
|
end
|
||||||
|
end
|
76
script_lenore.lua
Normal file
76
script_lenore.lua
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
function script_lenore(story_state)
|
||||||
|
if story_state.main == 1 then
|
||||||
|
water = player_has(library.recipes.distilled_water.title)
|
||||||
|
if water == nil then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, [[hi lenore!]]},
|
||||||
|
{lenore_portrait, [[hey alchemist. did you get my letter?]]},
|
||||||
|
{phoebe_portrait, [[ah! i haven't gotten around to it but i'll get right on it!]]},
|
||||||
|
{lenore_portrait, [[thanks, kid.]]}
|
||||||
|
}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, [[hey lenore! here's the clean water you requested!]]},
|
||||||
|
{lenore_portrait, [[thanks, kid. there's one other thing.]]},
|
||||||
|
{lenore_portrait, [[my usual pharmacist is on vacation.]]},
|
||||||
|
{lenore_portrait, [[think you could take this recipe and make a potion for a patient?]]},
|
||||||
|
{lenore_portrait, [[she lives in the house with a red roof just to the east of here.]]},
|
||||||
|
{lenore_portrait, [[there should be healing herbs southeast of here.]]},
|
||||||
|
{lenore_portrait, [[oh, and by the way -- here's that reagent i promised you.]]},
|
||||||
|
{phoebe_portrait, [[do you have a recipe for reagent? i'd love to learn to make it!]]},
|
||||||
|
{lenore_portrait, [[yeah, sure. you start by doing this...]], function()
|
||||||
|
del(inventory, water)
|
||||||
|
add(inventory, make_item(library.item_blueprints.reagent))
|
||||||
|
add(grimoire, library.recipes.reagent)
|
||||||
|
toast("received reagent recipe!")
|
||||||
|
end}
|
||||||
|
}))
|
||||||
|
story_state.main = 2
|
||||||
|
end
|
||||||
|
elseif story_state.main == 2 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{lenore_portrait, [[you get that potion to my patient? red roof to the east.]]}
|
||||||
|
}))
|
||||||
|
elseif story_state.main == 3 then
|
||||||
|
change_screen(screen_conversation({{lenore_portrait, [[thanks for helping out my patient.]]}}))
|
||||||
|
elseif story_state.main == 4 or story_state.main == 5 or story_state.main == 6 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{lenore_portrait, [[hey phoebe. any aches or pains?]]},
|
||||||
|
{phoebe_portrait, [[i'm in tip-top shape!]]},
|
||||||
|
}))
|
||||||
|
elseif story_state.main == 7 then
|
||||||
|
if story_state.branch_lenore == 1 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{lenore_portrait, [[whoa, you can't just set off fireworks willy-nilly. get me 3 clean bandages and a distilled water.]]},
|
||||||
|
{lenore_portrait, [[you can't do something as dangerous as fireworks without being prepared for the worst.]]},
|
||||||
|
{phoebe_portrait, [[you got it!!]]},
|
||||||
|
}))
|
||||||
|
story_state.branch_lenore = 2
|
||||||
|
elseif story_state.branch_lenore == 2 then
|
||||||
|
local bandages = player_has("bandages", 3)
|
||||||
|
local water = player_has("distilled water")
|
||||||
|
if bandages == nil or water == nil then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{lenore_portrait, [[i need 3 clean bandages and a distilled water.]]}
|
||||||
|
}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{lenore_portrait, [[thanks. this looks good. i'll meet you at the library for viewing when you're ready.]]}
|
||||||
|
}))
|
||||||
|
for x in all(bandages) do del(inventory, x) end
|
||||||
|
del(inventory, water)
|
||||||
|
|
||||||
|
story_state.branch_lenore = 3
|
||||||
|
if story_state.branch_hans == 3 and story_state.branch_lenore == 3 and story_state.branch_brigitte == 2 then
|
||||||
|
story_state.main = 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif story_state.branch_lenore == 3 then
|
||||||
|
change_screen(screen_conversation({{lenore_portrait, [[i'll meet you at the library for viewing when you're ready.]]}}))
|
||||||
|
end -- lenore branch finished
|
||||||
|
elseif story_state.main == 8 then
|
||||||
|
change_screen(screen_conversation({{lenore_portrait, [[i'll see you at the library for viewing the festival!]]}}))
|
||||||
|
elseif story_state.main == 9 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[no one is here.]"}}))
|
||||||
|
end
|
||||||
|
end
|
85
script_library.lua
Normal file
85
script_library.lua
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
function script_library(s)
|
||||||
|
if s.main == 1 or s.main == 2 or s.main == 3 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, [[hey phoebe. looking for any book in particular today?]]},
|
||||||
|
{phoebe_portrait, [[just browsing!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 4 then
|
||||||
|
if not s.got_gunpowder_book then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, [[explosives, huh. well, this might help you out?]]},
|
||||||
|
{phoebe_portrait, [[oh, a chemistry manual? hmm... black powder...]]},
|
||||||
|
{phoebe_portrait, [[and i could... yes, i think i can use this to make gunpowder! maybe more!]]},
|
||||||
|
{phoebe_portrait, [[thank you so much stef!!!]]}
|
||||||
|
}))
|
||||||
|
add(grimoire, library.recipes.gunpowder)
|
||||||
|
add(grimoire, library.recipes.bomb)
|
||||||
|
toast("received recipes!")
|
||||||
|
s.got_gunpowder_book = true
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, [[did that book help?]]},
|
||||||
|
{phoebe_portrait, [[you betcha!]]}
|
||||||
|
}))
|
||||||
|
end
|
||||||
|
elseif s.main == 5 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, [[hey phoebe. looking for any book in particular today?]]},
|
||||||
|
{phoebe_portrait, [[just browsing!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 6 then
|
||||||
|
if not s.got_crystal_book then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, [[stef! i need books about crystals! how to make them!]]},
|
||||||
|
{librarian_portrait, [[gems, huh? let me check...]]},
|
||||||
|
{librarian_portrait, [[here, does this help?]]},
|
||||||
|
{phoebe_portrait, [[yes, this is perfect! let's see...]]},
|
||||||
|
{phoebe_portrait, "hmm..."},
|
||||||
|
{phoebe_portrait, "hmm... \nhmm..."},
|
||||||
|
{phoebe_portrait, "hmm... \nhmm... \nhmm..."},
|
||||||
|
{phoebe_portrait, [[okay so i need raw crystal, polishing powder, and reagent.]], function()
|
||||||
|
add(grimoire, library.recipes.starshine_crystal)
|
||||||
|
add(grimoire, library.recipes.polishing_powder)
|
||||||
|
end},
|
||||||
|
{phoebe_portrait, [[i can get crystal from the cliffs, sand from the beach, it's got a recipe for]]},
|
||||||
|
{phoebe_portrait, [[polishing powder...]]},
|
||||||
|
}))
|
||||||
|
s.got_crystal_book = true
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "thanks for the book, \nstef!"},
|
||||||
|
{librarian_portrait, [[that's my job!]]},
|
||||||
|
}))
|
||||||
|
end
|
||||||
|
elseif s.main == 7 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, "fireworks festival,\nhuh? well, the library\nwill be a great\nplace to watch from!"}
|
||||||
|
}))
|
||||||
|
elseif s.main == 8 or s.main == 9 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{librarian_portrait, [[a fireworks festival after all, huh?]]},
|
||||||
|
{neighbor_portrait, [[i thought it was done for after the old alchemist passed away, rest his soul.]]},
|
||||||
|
{seller_portrait, [[well it looks like phoebe took up the reins!]]},
|
||||||
|
{phoebe_portrait, [[aw shucks!]]},
|
||||||
|
{lenore_portrait, [[thanks for making this happen, lil alchemist.]]},
|
||||||
|
{neighbor_portrait, [[thanks, phoebe!]]},
|
||||||
|
{seller_portrait, [[thanks, phoebe.]]},
|
||||||
|
{phoebe_portrait, [[thank you all for helping out so much. i couldn't have done it without you.]]},
|
||||||
|
{phoebe_portrait, [[and thank you, player, for playing my game!~]]}
|
||||||
|
}, nil, {update=fireworks_update, draw=fireworks_draw}))
|
||||||
|
screen_walkaround = {update=fireworks_update, draw=fireworks_draw}
|
||||||
|
screen_workbench = screen_conversation({
|
||||||
|
{phoebe_portrait, "thank you for completing atelier phoebe!"},
|
||||||
|
{phoebe_portrait, "this was a labor of love and bafflement."},
|
||||||
|
{phoebe_portrait, "why did i make an atelier fangame in pico-8? i couldn't tell you."},
|
||||||
|
{phoebe_portrait, "but i hope you enjoyed it! you can find me online as shoofle"},
|
||||||
|
{phoebe_portrait, "lately i spend my time @shoofle@beach.city."},
|
||||||
|
{phoebe_portrait, "gimme a shout if you enjoyed atelier phoebe!"},
|
||||||
|
},
|
||||||
|
function()
|
||||||
|
screen_workbench = {update=workbench_update, draw=workbench_draw}
|
||||||
|
change_screen(screen_workbench)
|
||||||
|
end,
|
||||||
|
screen_workbench)
|
||||||
|
end
|
||||||
|
end
|
86
script_neighbor.lua
Normal file
86
script_neighbor.lua
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
function script_neighbor(s)
|
||||||
|
if s.main == 1 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[you hear the sound of groaning from inside.]"}}))
|
||||||
|
end
|
||||||
|
if s.main == 2 then
|
||||||
|
potion = player_has("potion")
|
||||||
|
if potion == nil then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[you hear the sound of groaning from inside.]"}}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, [[hello! i was asked to bring you a potion!]]},
|
||||||
|
{neighbor_portrait, [[oh my goodness! that's so kind. i injured my back trying to get a rock out]]},
|
||||||
|
{neighbor_portrait, [[of my farm. this potion will fix me right up.]]},
|
||||||
|
{neighbor_portrait, [[... hey, you're an alchemist, right?]]},
|
||||||
|
{phoebe_portrait, [[of course!]]},
|
||||||
|
{neighbor_portrait, [[i've heard that alchemists can make explosives. a bomb could get rid of]]},
|
||||||
|
{neighbor_portrait, [[that boulder in my field. do you think you could bring me one?]]},
|
||||||
|
{phoebe_portrait, [[my grandfather never taught me to make explosives,]]},
|
||||||
|
{phoebe_portrait, "because they're dangerous."},
|
||||||
|
{neighbor_portrait, [[damn. maybe the witch knows how to make them? she knows all sorts of things.]]},
|
||||||
|
{phoebe_portrait, [[i'll have to ask!]]},
|
||||||
|
{neighbor_portrait, [[she lives in the tower southeast of town, i think!]]},
|
||||||
|
}))
|
||||||
|
del(inventory, potion)
|
||||||
|
s.main = 3
|
||||||
|
end
|
||||||
|
elseif s.main == 3 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[did the witch give you the recipe?]]},
|
||||||
|
{phoebe_portrait, [[not yet!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 4 then
|
||||||
|
local bomb = player_has("bomb")
|
||||||
|
if bomb == nil then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[did the witch give you the recipe?]]},
|
||||||
|
{phoebe_portrait, [[no and actually she was really rude about it!]]},
|
||||||
|
}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, [[this bomb should break up a rock! be very safe with it.]]},
|
||||||
|
{neighbor_portrait, [[oh wow, thank you so much! i will be far away when it goes off.]]},
|
||||||
|
{neighbor_portrait, [[so how did you convince the witch to give you the recipe?]]},
|
||||||
|
{phoebe_portrait, [[i didn't! she was incredibly rude and basically told me to fuck off!]]},
|
||||||
|
{neighbor_portrait, [[huh, i wonder what bee's in her bonnet.]]},
|
||||||
|
{phoebe_portrait, [[she kept talking about how there's no great alchemy left in pilton.]]},
|
||||||
|
{neighbor_portrait, [[maybe what she needs is someone to impress her.]]}
|
||||||
|
}))
|
||||||
|
del(inventory, bomb)
|
||||||
|
s.main = 5
|
||||||
|
end
|
||||||
|
elseif s.main == 5 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[that witch soften up yet?]]},
|
||||||
|
{phoebe_portrait, [[grrrr!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 6 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[that bomb worked a treat on my boulder problem!]]},
|
||||||
|
{phoebe_portrait, [[hooray!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 7 then
|
||||||
|
if s.branch_brigitte == 1 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[the fireworks festival? on my farm? you betcha!]]},
|
||||||
|
{neighbor_portrait, [[since harvest is over it's totally free!]]},
|
||||||
|
{phoebe_portrait, [[yippee!]]},
|
||||||
|
}))
|
||||||
|
s.branch_brigitte = 2
|
||||||
|
if s.branch_brigitte == 2 and s.branch_lenore == 3 and s.branch_hans == 3 then
|
||||||
|
s.branch_main = 8
|
||||||
|
end
|
||||||
|
elseif s.branch_brigitte == 2 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[meet up at the library for viewing, right?]]}
|
||||||
|
}))
|
||||||
|
|
||||||
|
end
|
||||||
|
elseif s.main == 8 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{neighbor_portrait, [[meetchya at the library for watching the fireworks!]]}
|
||||||
|
}))
|
||||||
|
elseif s.main == 9 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[no one is here.]"}}))
|
||||||
|
end
|
||||||
|
end
|
74
script_witch.lua
Normal file
74
script_witch.lua
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
function script_witch(s)
|
||||||
|
if s.main == 1 or s.main == 2 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}}))
|
||||||
|
elseif s.main == 3 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "excuse me! i would like to know how to make explosives!"},
|
||||||
|
{witch_portrait, [[this town is dead. i can make no explosions. the alchemy of pilton has died.]]},
|
||||||
|
{witch_portrait, [[try as you might, phoebe, you aren't your grandfather.]]},
|
||||||
|
{witch_portrait, [[this town is a husk of what it once was. ]]},
|
||||||
|
{witch_portrait, [[i am done teaching.]]},
|
||||||
|
{witch_portrait, [[if you want alchemy, go read at the library in the middle of town.]]},
|
||||||
|
{witch_portrait, [[i have no time for this.]], function()
|
||||||
|
sfx(4)
|
||||||
|
end},
|
||||||
|
{door_portrait, "i have no time for this."},
|
||||||
|
{phoebe_portrait, "... huh!"},
|
||||||
|
}))
|
||||||
|
s.main = 4
|
||||||
|
elseif s.main == 4 then
|
||||||
|
change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}}))
|
||||||
|
elseif s.main == 5 then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{phoebe_portrait, "hey! witch!"},
|
||||||
|
{door_portrait, "my name is agnes."},
|
||||||
|
{phoebe_portrait, "i figured out how to make gunpowder. suck on that."},
|
||||||
|
{witch_portrait, "big whoop. you still know nothing."},
|
||||||
|
{witch_portrait, "no one in this town knows the art of alchemy."},
|
||||||
|
{phoebe_portrait, "there's you! you know it!"},
|
||||||
|
{witch_portrait, "pah. no one of your generation knows the ways."},
|
||||||
|
{phoebe_portrait, "well maybe if someone would teach us-"},
|
||||||
|
{witch_portrait, "maybe if you showed any promise i could teach you."},
|
||||||
|
{witch_portrait, "your generation has forgotten the ways of old."},
|
||||||
|
{phoebe_portrait, "grrrr, you old hag!"},
|
||||||
|
{witch_portrait, "hm."},
|
||||||
|
{witch_portrait, "..."},
|
||||||
|
{witch_portrait, "bring me a starshine gem. it must carry the red and shiny traits."},
|
||||||
|
{witch_portrait, "if you can do this, i might consider you to have potential."},
|
||||||
|
}))
|
||||||
|
s.main = 6
|
||||||
|
elseif s.main == 6 then
|
||||||
|
local crystal = player_has("starshine")
|
||||||
|
if crystal == nil then
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{door_portrait, "[there is no answer to your knocking.]"}
|
||||||
|
}))
|
||||||
|
else
|
||||||
|
change_screen(screen_conversation({
|
||||||
|
{witch_portrait, "hm. this is... passable. it's passable enough that I will help you."},
|
||||||
|
{witch_portrait, "my bones are too tired to keep up this fight."},
|
||||||
|
{witch_portrait, "i can teach you to make fireworks."},
|
||||||
|
{phoebe_portrait, "fireworks! the festival?!"},
|
||||||
|
{witch_portrait, "a festival is more than just a box of fireworks."},
|
||||||
|
{witch_portrait, "hm. this is a bad idea.", function()
|
||||||
|
sfx(4)
|
||||||
|
add(grimoire, library.recipes.fireworks)
|
||||||
|
toast("received recipe!")
|
||||||
|
end},
|
||||||
|
{door_portrait, "hm. this is a bad idea."},
|
||||||
|
{phoebe_portrait, "wow, she's so awful!"},
|
||||||
|
{door_portrait, "i can hear you out there."},
|
||||||
|
{phoebe_portrait, "keep it down, i'm thinking."},
|
||||||
|
{phoebe_portrait, "a fireworks festival! that would be so incredible!"},
|
||||||
|
{phoebe_portrait, "but she's right. i'll have to call in favors."},
|
||||||
|
{phoebe_portrait, "okay. i can make this happen."},
|
||||||
|
{phoebe_portrait, "hans the charcoal seller used to set up the show."},
|
||||||
|
{phoebe_portrait, "i have to talk to lenore about safety."},
|
||||||
|
{phoebe_portrait, "and i should ask brigitte if we can use her farm!"},
|
||||||
|
}))
|
||||||
|
s.main = 7
|
||||||
|
end
|
||||||
|
elseif s.main == 8 or s.main == 9 then
|
||||||
|
change_screen(screen_conversation({witch_portrait, "thank you."}))
|
||||||
|
end
|
||||||
|
end
|
145
utils.lua
Normal file
145
utils.lua
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
|
||||||
|
function animate(animation)
|
||||||
|
add(animations, animation, 1)
|
||||||
|
animation.before()
|
||||||
|
end
|
||||||
|
|
||||||
|
function contains(haystack, needle)
|
||||||
|
for h in all(haystack) do
|
||||||
|
if needle == h then return true end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function deepcopy(orig)
|
||||||
|
local orig_type = type(orig)
|
||||||
|
local copy
|
||||||
|
if orig_type == 'table' then
|
||||||
|
copy = {}
|
||||||
|
for orig_key, orig_value in next, orig, nil do
|
||||||
|
copy[deepcopy(orig_key)] = deepcopy(orig_value)
|
||||||
|
end
|
||||||
|
setmetatable(copy, deepcopy(getmetatable(orig)))
|
||||||
|
else -- number, string, boolean, etc
|
||||||
|
copy = orig
|
||||||
|
end
|
||||||
|
return copy
|
||||||
|
end
|
||||||
|
|
||||||
|
function filter_list(arr, func)
|
||||||
|
new = {}
|
||||||
|
|
||||||
|
for old_index, v in ipairs(arr) do
|
||||||
|
if func(v, old_index) then add(new, v) end
|
||||||
|
end
|
||||||
|
|
||||||
|
return new
|
||||||
|
end
|
||||||
|
|
||||||
|
function player_has(requirement, count)
|
||||||
|
if count == nil then count = 1 end
|
||||||
|
output = {}
|
||||||
|
for x in all(inventory) do
|
||||||
|
if x.title == requirement or contains(x.tags, requirement) then
|
||||||
|
if count == 1 then return x end
|
||||||
|
add(output, x)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #output >= count then
|
||||||
|
return filter_list(output, function(x,i) return i<=count end)
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function make_item(blueprint)
|
||||||
|
--if blueprint.description == nil then
|
||||||
|
-- blueprint = library.item_blueprints[blueprint]
|
||||||
|
--end
|
||||||
|
|
||||||
|
item = deepcopy(blueprint)
|
||||||
|
--item.sprite_recolor = blueprint.sprite_recolor
|
||||||
|
--item.sprite = blueprint.sprite
|
||||||
|
--item.title = blueprint.title
|
||||||
|
--item.description = blueprint.description
|
||||||
|
item.quality = flr(blueprint.quality_base + rnd(blueprint.quality_range))
|
||||||
|
item.tags = deepcopy(blueprint.tags)
|
||||||
|
item.traits = {}
|
||||||
|
if rnd(100) < blueprint.trait_chance then
|
||||||
|
add(item.traits, rnd(blueprint.trait_pool))
|
||||||
|
end
|
||||||
|
if rnd(100) < blueprint.trait_chance then
|
||||||
|
add(item.traits, rnd(blueprint.trait_pool))
|
||||||
|
end
|
||||||
|
return item
|
||||||
|
end
|
||||||
|
|
||||||
|
function at(trait, x,y)
|
||||||
|
if (x < 0) return false
|
||||||
|
if (x > trait[4]) return false
|
||||||
|
if (y < 0) return false
|
||||||
|
if (y > trait[4]) return false
|
||||||
|
return mget(trait[2]+x, trait[3]+y) ~= 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function at_absolute(trait, x,y)
|
||||||
|
return at(trait.trait, x-trait.x, y-trait.y)
|
||||||
|
end
|
||||||
|
|
||||||
|
function overlaps(trait1, trait2)
|
||||||
|
t1_width = trait1.trait[4]
|
||||||
|
t1_height = trait1.trait[5]
|
||||||
|
for i=0,(t1_width-1) do
|
||||||
|
for j=0,(t1_height-1) do
|
||||||
|
x = trait1.x + i
|
||||||
|
y = trait1.y + j
|
||||||
|
if at_absolute(trait1, x, y) and at_absolute(trait2, x, y) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function change_screen(new_screen)
|
||||||
|
prev_screen = current_screen
|
||||||
|
if new_screen.before ~= nil then
|
||||||
|
new_screen.before()
|
||||||
|
end
|
||||||
|
current_screen = new_screen
|
||||||
|
end
|
||||||
|
|
||||||
|
-- add newlines to a string to fit it into lines.
|
||||||
|
function wrap(str, line_length)
|
||||||
|
-- thanks to https://stackoverflow.com/questions/17586/best-word-wrap-algorithm, i did not feel like thinking this out myself
|
||||||
|
words = split(str, " ", false)
|
||||||
|
output = ""
|
||||||
|
|
||||||
|
local current_line_length = 0
|
||||||
|
for w in all(words) do
|
||||||
|
while sub(w, 1, 1) == "\n" do
|
||||||
|
output = output .. "\n"
|
||||||
|
current_line_length = 0
|
||||||
|
w = sub(w, 2)
|
||||||
|
end
|
||||||
|
if current_line_length + #w > line_length then
|
||||||
|
if current_line_length > 0 then
|
||||||
|
output = output .. "\n"
|
||||||
|
current_line_length = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
while #w > line_length do
|
||||||
|
output = output .. sub(w, 1, line_length) .. "-\n"
|
||||||
|
w = sub(w, line_length)
|
||||||
|
current_line_length = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
while w[1] == " " do
|
||||||
|
w = sub(w, 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
output = output .. w .. " "
|
||||||
|
current_line_length += #w + 1
|
||||||
|
end
|
||||||
|
return output
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user