update to version 1.16

main
Shoofle 8 months ago
parent fec1698236
commit 20493d93de
  1. 2
      art.lua
  2. 235
      ateli8.p8
  3. 2
      conversation.lua
  4. 5
      library.lua
  5. 20
      notes.md
  6. 603
      screen_crafting.lua
  7. 34
      screen_inventory.lua
  8. 12
      screen_letters.lua
  9. 14
      screen_recipe_list.lua
  10. 20
      screen_title.lua
  11. 98
      screen_walkaround.lua
  12. 8
      screen_workbench.lua
  13. 9
      script_charcoal_seller.lua
  14. 17
      script_lenore.lua
  15. 45
      script_library.lua
  16. 31
      script_neighbor.lua
  17. 36
      script_witch.lua
  18. 53
      utils.lua

@ -4,7 +4,7 @@ base_text_color = 5
blank_ingredient_outline_color = 6 blank_ingredient_outline_color = 6
light_text_color = 7 light_text_color = 7
phoebe_portrait = 72 ph_p = 72
lenore_portrait = 76 lenore_portrait = 76
seller_portrait = 136 seller_portrait = 136
neighbor_portrait = 140 neighbor_portrait = 140

@ -1,6 +1,9 @@
pico-8 cartridge // http://www.pico-8.com pico-8 cartridge // http://www.pico-8.com
version 41 version 41
__lua__ __lua__
-- atelier phoebe
-- by shoofle
#include utils.lua #include utils.lua
#include library.lua #include library.lua
@ -78,22 +81,22 @@ __gfx__
0088888000ccccc000bbbbb000222220545555450944444499999999fff4ffccccccccccc8ffffff00000000111100000000000000000111b0b0b0b033663333 0088888000ccccc000bbbbb000222220545555450944444499999999fff4ffccccccccccc8ffffff00000000111100000000000000000111b0b0b0b033663333
0088888000ccccc000bbbbb0002222205455554594444444099999900fffcccccccccccccccffff00000000011100000000000000001111100b000b033333333 0088888000ccccc000bbbbb0002222205455554594444444099999900fffcccccccccccccccffff00000000011100000000000000001111100b000b033333333
0000000000000000000000000000000054555545999999990099990000fccccccccccccccccccf00000000003111000000000000000011130000000033333333 0000000000000000000000000000000054555545999999990099990000fccccccccccccccccccf00000000003111000000000000000011130000000033333333
00000000006666000000000000070000006666000555555000000000000000000000aaa0055555500000000000000000009999a000000b000000000000000000 00000000006666000000000000070000006666000555555000000000000000000000aaa0055555500000000000000000009999a000000b000000000005000060
00000000000660000000000000007000066886605cccccc5670006c00009c000000aa0005555555500000000000000000999999a00000b000000000000000000 00000000000660000000000000007000066886605cccccc5670006c00009c000000aa0005555555500000000000000000999999a00000b000000000005500660
00000000000660000003033000555500068668605555555566606670009cc8000078870088888844000000000000000099999999a00000000000000000000000 00000000000660000003033000555500068668605555555566606670009cc8000078870088888844000000000000000099999999a00000000000000005556660
00066000006cc6000303b0000555655006666860544444450667660009ccccc00088770088448888000000000000000099999999a22222220009900000000000 00066000006cc6000303b0000555655006666860544444450667660009ccccc00088770088448888000000000000000099999999a22222220009900005566560
00d6660006cc7760030b3300055555500068866005444450066670000cc9ccc000877800888888880008800000dddd0056666666222222220009900000000110 00d6660006cc7760030b3300055555500068866005444450066670000cc9ccc000877800888888880008800000dddd0056666666222222220009900005556560
7d66666706cccc6003b00000055555500066660005444450006600000099cb0000778800448dd888008888000dddddd0566dd6665555555500999a0000011110 7d66666706cccc6003b00000055555500066660005444450006600000099cb0000778800448dd888008888000dddddd0566dd6665555555500999a0005566660
07766770006cc6000b333000005555000068600005444450006600000009900000788700888dd44808888880dddddddd566dd66666666665099999a001111111 07766770006cc6000b333000005555000068600005444450006600000009900000788700888dd44808888880dddddddd566dd66666666665099999a005556660
007770000006600000000000000000000066600000555500000000000000000000887700888dd88888888888dddddddd566dd666666666659999999a11111111 007770000006600000000000000000000066600000555500000000000000000000887700888dd88888888888dddddddd566dd666666666659999999a05566660
00044800000448000444444004444440004444000044440000000000555555555555555554444445566444455446648500228800024244907777777750000006 00044800000448000444444004444440004444000044440000000000555555555555555554444445566444455446648500228800024244907777777755556566
00448800004488000488ff400488ff400444444004444440000000005444444444444444544664455664444554466445022288802442449077b7766755066066 00448800004488000488ff400488ff400444444004444440000000005444444444444444544664455664444554466445022288802442449077b7766755566566
044f7f00044f7f0004f7f74004f7f7400244a4400244a4400000000054c4c4c4c4c4c4c454466445544446655444444522200888555555557bbb766755556666 044f7f00044f7f0004f7f74004f7f7400244a4400244a4400000000054c4c4c4c4c4c4c454466445544446655444444522200888555555557bbb766755556666
04ffff0004ffff0000ffff0000ffff0000244400002444000000000054c4c4c4c4c4c4c4544444455484466558448445400000042424444977b7777755566666 04ffff0004ffff0000ffff0000ffff0000244400002444000000000054c4c4c4c4c4c4c4544444455484466558448445400000042424444977b7777755566666
0082200000822000008228000082280000822800008228000000000054444444499999445444444558444445544444454dddddd4242444497777777755556666 0082200000822000008228000082280000822800008228000000011054444444499999445444444558444445544444454dddddd4242444497777777755556656
0802200008022000080220800802208008022080080220800000000054c4c4c4c9ddd9c45dd46465544dd44554866445dccc111d5555555576677dd7555dd666 0802200008022000080220800802208008022080080220800001111054c4c4c4c9ddd9c45dd46465544dd44554866445dccc111d5555555576677dd7555dd656
0002020000022000000202000002200000020200000220000000000054c4c4c4c9ddd9c45dd46465544dd44558466445dddddddd2442449076677dd7555dd666 0002020000022000000202000002200000020200000220000111111154c4c4c4c9ddd9c45dd46465544dd44558466445dddddddd2442449076677dd7555dd666
002002000002200000200200000220000020020000022000000000005444444449ddd9445dd44445544dd445544444455dddddd50242449077777dd7055dd660 002002000002200000200200000220000020020000022000111111115444444449ddd9445dd44445544dd445544444455dddddd50242449077777dd7055dd660
00000000000000000000000000000900000666000000000000000000000000006666666666666664444444666666666622222222222222222222222222222222 00000000000000000000000000000900000666000000000000000000000000006666666666666664444444666666666622222222222222222222222222222222
00000000000000000000000000000009000666000000000000000000000000006666666666665444444555444466666622222222222211511551122222222222 00000000000000000000000000000009000666000000000000000000000000006666666666665444444555444466666622222222222211511551122222222222
00000000000000000000000000000000000666600000000000000000000000006666666666544444445aaa544446666622222222225111111111111222222222 00000000000000000000000000000000000666600000000000000000000000006666666666544444445aaa544446666622222222225111111111111222222222
@ -201,111 +204,111 @@ __label__
44444499977777757777777799544499999999999999999944444444444444444999999999999999999444444444444444444999999999999999994444444444 44444499977777757777777799544499999999999999999944444444444444444999999999999999999444444444444444444999999999999999994444444444
444449977775777577775777794449ffffffffffffffffff99999999999999999ffffffffffffffffff999999999999999999fffffffffffffffff9999999999 444449977775777577775777794449ffffffffffffffffff99999999999999999ffffffffffffffffff999999999999999999fffffffffffffffff9999999999
444599777777577577757777799449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444599777777577577757777799449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
445997757777777777777777779949ff0f0f000f000f0fff000f00fff00ffffff00f000f000f000f0f0fffffffffffffffffffffffffffffffffffffffffffff 445997757777777777777777779949ff000ff00f000f000ff00f00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
444997775777777777777777577949ff0f0f0fff0f0f0ffff0ff0f0f0fffffff0fff0f0f0f0f0f0f0f0fffffffffffffffffffffffffffffffffffffffffffff 444997775777777777777777577949ff0f0f0f0ff0fff0ff0f0f0f0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
449977777777777777777775777999ff000f00ff000f0ffff0ff0f0f0fffffff000f000f00ff000f000fffffffffffffffffffffffffffffffffffffffffffff 449977777777777777777775777999ff000f0f0ff0fff0ff0f0f0f0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
459977777777777777777777777799ff0f0f0fff0f0f0ffff0ff0f0f0f0fffffff0f0fff0f0f0f0fff0fffffffffffffffffffffffffffffffffffffffffffff 459977777777777777777777777799ff0fff0f0ff0fff0ff0f0f0f0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
449977777777777777777777777799ff0f0f000f0f0f000f000f0f0f000fffff00ff0fff0f0f0f0f000fffffffffffffffffffffffffffffffffffffffffffff 449977777777777777777777777799ff0fff00fff0ff000f00ff0f0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
459975555777777777777775555799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 459975555777777777777775555799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
559977777777700057777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 559977777777700057777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
459977777777077000777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 459977777777077000777777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
459977777777070707007777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 459977777777070707007777777799ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
459977757777007707770075777999ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 459977757777007707770075777999ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
454977577770000077777777577949fff5ff5f5f555f5fff555f555f5f5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 454977577770000077777777577949fff5ff5f5f555f5fff555f555f5f5fffffffffffffff555fffff5f5f555f555f5fff555f55fff55fffffffffffffffffff
454997777000077777777777779959ff5f5f5f5f5f5f5ffff5fff5ff5f5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 454997777000077777777777779959ff5f5f5f5f5f5f5ffff5fff5ff5f5fffffffffffffff5f5fffff5f5f5fff5f5f5ffff5ff5f5f5fffffffffffffffffffff
445499777700777577757777799459ff5f5f5f5f555f5ffff5fff5ff555fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 445499777700777577757777799459ff5f5f5f5f555f5ffff5fff5ff555fffffffffffffff555fffff555f55ff555f5ffff5ff5f5f5fffffffffffffffffffff
444549977050777577775777994449ff55ff5f5f5f5f5ffff5fff5ffff5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444549977050777577775777994449ff55ff5f5f5f5f5ffff5fff5ffff5fffffffffffffff5f5fffff5f5f5fff5f5f5ffff5ff5f5f5f5fffffffffffffffffff
444454990777777577777799945449fff55ff55f5f5f555f555ff5ff555fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444454990777777577777799945449fff55ff55f5f5f555f555ff5ff555fffffffffffffff5f5fffff5f5f555f5f5f555f555f5f5f555fffffffffffffffffff
444445499777777577777999454449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444445499777777577777999454449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
4444445449999777779999445444449ffffffffffffffffffffffffffff00ff000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444445449999777779999445444449fffffffffffffffffffffffffffffffff000f00ffff555ff55f555f555ff55f55ffffffffffffffffffffffffffffffff
4444444554449999999444554444449fffffffffffffffffffffff5555ff0ff0fff0f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444444554449999999444554444449ffffffffffffffffffffffffffff5555f0ffff0ffff5f5f5f5ff5fff5ff5f5f5f5fffffffffffffffffffffffffffffff
4444444445554444444555444444449fffffffffffffffffffffff5ff5ff0ff000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444444445554444444555444444449ffffffffffffffffffffffffffff5ff5f000ff0ffff555f5f5ff5fff5ff5f5f5f5fffffffffffffffffffffffffffffff
4444444555445555555444444444449fffffffffffffffffffffff5f55ff0ffff0f0f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444444555445555555444444444449ffffffffffffffffffffffffffff5f55fff0ff0ffff5fff5f5ff5fff5ff5f5f5f5fffffffffffffffffffffffffffffff
4444455444444444444444444444449fffffffffffffffffffffff5555f000f000f000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444455444444444444444444444449ffffffffffffffffffffffffffff5555f000f000fff5fff55fff5ff555f55ff5f5fffffffffffffffffffffffffffffff
4455544444444444444444444444449fffffffffffffffffffffffffff5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4455544444444444444444444444449ffffffffffffffffffffffffffffffff5ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
5544444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 5544444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
4444444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444444444444444444444444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff 44444444444444455555554555555595555555f5555555f5555555ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaffffffffffffffffffffffffffffffffffffffffffffffffffffffaff 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
4444444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6666666666666666666666666666666666666666666666666666faff 4444444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444444444454646464546465655f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 4444444444444454646464546465655f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffff6f000f0f0f000f000fffff0f0f000f000f000f000ffffffffff6ffff
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444564646465656564656f6f6f656f6f6f656f6f6f65fffffffffffffffff6f0f0f0f0f0f0f0fffffff0f0f0f0ff0ff0fff0f0ffffffffff6ffff
4444444444444454646465556464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 4444444444444454646465556464645f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffff6f000f0f0f00ff00ffffff0f0f000ff0ff00ff00fffffffffff6ffff
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444564646565646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6f0fff0f0f0f0f0fffffff000f0f0ff0ff0fff0f0ffffffffff6ffff
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444455555554555555595555555f5555555f5555555ffffffffffffffffff6f0ffff00f0f0f000fffff000f0f0ff0ff000f0f0ffffffffff6ffff
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444445564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444444555454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5ffffff9af6ffffffffffffffffffffffffffffffffffffffffffffffffff6fa9f 4444444444555454646464546464695f6f6f6f5fbbbbbf5f6f6f6f5fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffff9aaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faa9 44444445554444564646465646464656f6f6f656bbbbb656f6f6f65fffffffffffffffff6ffff55f5f5f555f55ff5f5ffffffffffffffffffffffffffff6ffff
4444455444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5ffff9aaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa 4444455444444454646464546464695f6f6f6f5fbbbbbf5f6f6f6f5fffffffffffffffff6fff5fff5f5ff5ff5f5f5f5ffffffffffffffffffffffffffff6ffff
44555444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fff9aaaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa 44555444444444564646465646464656f6f6f656bbbbb656f6f6f65fffffffffffffffff6fff555f555ff5ff5f5f555ffffffffffffffffffffffffffff6ffff
5544444444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fff9aaaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa 5544444444444454646464546464695f6f6f6f5fbbbbbf5f6f6f6f5fffffffffffffffff6fffff5f5f5ff5ff5f5fff5fffffffffffffffffff000f000ff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65ffff9aaaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faaa 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6fff55ff5f5f555f5f5f555ffffffffffffff5555f0fff0f0ff6ffff
444444444444444555555545555555f5555555f5555555f5555555f5555555ffffff9aaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faa9 444444444444444555555545555555f5555555f5555555f5555555ffffffffffffffffff6ffffffffffffffffffffffffffffffffffff5ff5f000f0f0ff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65ffffff9af6ffffffffffffffffffffffffffffffffffffffffffffffffff6fa9f 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffff5f55fff0f0f0ff6ffff
4444444444444454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 4444444444444454222224546464695fbbbbbf5fbbbbbf5fbbbbbf5fffffffffffffffff6ffffffffffffffffffffffffffffffffffff5555f000f000ff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444562222265646464656bbbbb656bbbbb656bbbbb65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffff5fffffffff6ffff
4444444444444454646464546465695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 4444444444444454222224546465695fbbbbbf5fbbbbbf5fbbbbbf5fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444562222265656564656bbbbb656bbbbb656bbbbb65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444444444454646465556464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 4444444444444454222225556464695fbbbbbf5fbbbbbf5fbbbbbf5fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaf6ffffffffffffffffffffffffffffffffffffffffffffffffff6faff 44444444444444564646565646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444444444444555555545555555f5555555f5555555f5555555f5555555ffffffffaf6666666666666666666666666666666666666666666666666666faff 444444444444444555555545555555f5555555f5555555f5555555ffffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffaffffffffffffffffffffffffffffffffffffffffffffffffffffffaff 44444444444445564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
4444444444555454646464546464695f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaff 4444444444555454222224542222295f22222f5f6f6f6f5f6f6f6f5fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4444444555444456222226562222265622222656f6f6f656f6f6f65fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
4444455444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6666666666666666666666666666666666666666666666666666ffff 4444455444444454222224542222245f22222f5f6f6f6f5f6f6f6f5fffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
44555444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4455544444444456222226562222265622222656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
5544444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 5544444444444454222224542222245f22222f5f6f6f6f5f6f6f6f5fffffffffffffffff6f0f0f000f000f000ffffffffffffffffffffffffffffffffff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6f0f0f0fff0f0f0f0ffffffffffffffffffffffffffffffffff6ffff
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 44444444444444455555554555555595555555f5555555f5555555ffffffffffffffffff6f000f00ff00ff00fffffffffffffffffffffffffffffffffff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 44444444444444564646465646464656f6f6f656f6f6f656f6f6f65fffffffffffffffff6f0f0f0fff0f0f0f0ffffffffffffffffffffffffffffffffff6ffff
4444444444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4444444444444454222224542222245f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffff6f0f0f000f0f0f000ffffffffffffffffffffffffffffffffff6ffff
44444444444444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 44444444444444562222265622222656f6f6f656f6f6f656f6f6f65fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444444444454646464546465655f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4444444444444454222224542222255f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444444444564646465656564656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff6f6f666f666f6fff666f66fff66ffffffffffffffffffff6ffff 44444444444444562222265622222656f6f6f656f6f6f656f6f6f65fffffffffffffffff6afff55f555f555f555f55fffffffffffffffffffffffffffff6ffff
4444444444444454646465556464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6fff6f6f6fff6f6f6ffff6ff6f6f6ffffffffffffffffffffff6ffff 4444444444444454222225552222245f6f6f6f5f6f6f6f5f6f6f6f5fffffffffffffffffa9af5fff5f5f5fff5fff5f5ffffffffffffffffffffffffffff6ffff
44444444444444564646565646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff666f66ff666f6ffff6ff6f6f6ffffffffffffffffffffff6ffff 44444444444444564646565646464656f6f6f656f6f6f656f6f6f65fffffffffffffffffa9af5fff55ff55ff55ff5f5ffffffffffffffffffffffffffff6ffff
44444444444444455555554555555595555555f5555555f5555555f5555555ffffffffff6fff6f6f6fff6f6f6ffff6ff6f6f6f6ffffffffffffffffffff6ffff 44444444444444455555554555555595555555f5555555f5555555ffffffffffffffffff6aff5f5f5f5f5fff5fff5f5fffffffffffffffffff0f0f000ff6ffff
44444444444445564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6fff6f6f666f6f6f666f666f6f6f666ffffffffffffffffffff6ffff 4444444444444555444444444444449fffffffffffffffffffffffffffffffffffffffff6fff555f5f5f555f555f5f5ffffffffffffff5555f0f0fff0ff6ffff
4444444444555454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4444444444555444444444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffff5ff5f000f000ff6ffff
44444445554444564646465646464656f6f6f656f6f6f656f6f6f656f6f6f65fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4444444555444444444444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffff5f55fff0f0ffff6ffff
4444455444444454646464546464645f6f6f6f5f6f6f6f5f6f6f6f5f6f6f6f5fffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff 4444455444444444444444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffff5555fff0f000ff6ffff
44555444449999564649999646499996f6f69999f6f6f69999999996f6f6f659999999996ffffffff99999999fffffffff99999999fffffffffffffffff6ffff 445554444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffff5fffffffff6ffff
5544444449666699999666699996666999996666999969666666666999999996666666669999999996666666699999999966666666999999999ffffffff6ffff 554444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444496666666666666666444444466666666669f9666666666666666666666666666666666666666666666666666666666666666666669ffffffff6ffff 444444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444449666666666666654444445554444666666959665556556656566666555655565556555655566556666666666666666666666666669ffffffff6ffff 444444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444444966666666666544444445aaa54444666669f9665656565656566666656656565656656665665666666666666666666666666666669ffffffff6ffff 444444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444444496666666665444444445a6a544456666669f965556565655566666656655665556656665665556666666666666666666666666666966666666ffff 444444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
444444444496666666544444444445aaa544446666669f9656565656665666666566565656566566656666566666666666666666666666666669ffffffffffff 444444444444444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444449666666644444444444455544455666666909656565656555666666566565656565556656655666666666666666666666666666669ffffffffffff 444444444444444444444444444559ff000f000f000f000f000ff00fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444449666666544444a4444444444455a666666909666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff 444444444444444444444444555449fff0ff0f0f0f0ff0fff0ff0ffff0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444449666664444444a4444888888888a66666690966556555655565666566666665556556666665556565655566666655655565556556966666666ffff 444444444444444444444555444449fff0ff00ff000ff0fff0ff000fffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
44444444496666654444454a44888888888886666669f9665666656665665666566666666566565666666566565656666666566656566566565ffffffff6ffff 444444444444444444455444444449fff0ff0f0f0f0ff0fff0ffff0ff0ffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444446696666644444544448888488f8884866666909665556656665665666566666666566565666666566555655666666566655666566565ffffffff6ffff 444444466644444455544444444449fff0ff0f0f0f0f000ff0ff00ffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444669666654444544448888488fff8884866669f9666656656665665666566666666566565666666566565656666666565656566566565ffffffff6ffff 444444466644455544444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444669666644445444488899998ff99998466669f9665566656655565556555666665556565666666566565655566666555656565556555ffffffff6ffff 444444466665544444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444466696665444544488898888fffffff98666669f9666666666666666666666666666666666666666666666666666666666666666666669fffffff6ffff 444444466674444444444444444449ffffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444445556696644445444488888887ff9777ff6666669f9655565556666655565656555666665556556655666666655655565566666655565559fffffff6ffff 444445556676444444444444444449ffffff55f5f5f555f55ff5f5ffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
445554446696654445444848848717ff9717ff6666669f9656566566666665665656566666665666565656566666566656565656666656565669fffffff6ffff 445554446667444444444444444449fffff5fff5f5ff5ff5f5f5f5ffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
55444444569664444544848848f717ff9717f66666669f9655566566666665665556556666665566565656566666566655565656666655665569fffffff6ffff 5544444456676444444444444444449ffff555f555ff5ff5f5f555ffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444496665444a4488848ff777ff9777f6666669f9665656656666666566565656666666566656565656666656665656565666665656569ffffffff6ffff 4444444446666444444444444444449ffffff5f5f5ff5ff5f5fff5ffffffffffffffffff6fff666f666f666ff66f666f66ff666ffffffffffffffffffff6ffff
44444444496665544a448888fffffffff9fff6666669f9665656656666666566565655566666555656565556666665565656565666665556555ffffffff6ffff 4444444445667644444444444444449ffff55ff5f5f555f5f5f555ffffffffffffffffff6fff6f6f6fff6f6f6fff6fff6f6ff6fffffffffffffffffffff6ffff
44444444496665555a5489f9fffff9fff9fff6666669f9666666666666666666666666666666666666666666666666666666666666666666669ffffffff6ffff 4444444444667644444444444444449fffffffffffffffffffffffffffffffffffffffff6fff66ff66ff666f6fff66ff6f6ff6fffffffffffffffffffff6ffff
444444444966666688559f9fffffff999ffff6666669f9665556556655665556556666665556655666665556565655566666666666666666669ffffffff6ffff 4444444444566764444444444444449fffffffffffffffffffffffffffffffffffffffff6fff6f6f6fff6f6f6f6f6fff6f6ff6fffffffffffffffffffff6ffff
44444444449666668282f9f9fffffffffffff66666669f9656565656565656665656666665665656666665665656566666666666666666666669fffffff6ffff 4444444444466764444444444444449fffffffffffffffffffffffffffffffffffffffff6fff6f6f666f6f6f666f666f6f6ff6fffffffffffffffffffff6ffff
444444444496666688288f9f9fffefffffef666666669f9655565656565655665656666665665656666665665556556666666666666666666669fffffff6ffff 4444444444456111444444444445559fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444444966666828266f9fffffeeeeeff666666669f9656565656565656665656666665665656666665665656566666666666666666666669fffffff6ffff 44444444444411c1444444445554449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444449666682828666f9ffffffffff6666666669f9656565556555655565556666665665566666665665656555666666666666666666669fffffff6ffff 444444444444511c144445554444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444444496666882866669f9ffffffff66666666669f9666666666666666666666666666666666666666666666666666666666666666666669fffffff6ffff 444444444444511c144554444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
44444444496666882866666ff9999992866666666669f9665556555655665556566666665556555665565566565665565556656666666666669ffffffff6ffff 4444444444444511115444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444449666682826666fffffffff2866666666669f9665666656656565656566666665656565656565656565656666566656666666666669ffffffff6ffff 4444444444444511c14444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444444449666688286666fffffffff886dd26666669f9665566656656565556566666665556556656565656565656666566656666666666669ffffffff6ffff 44444444445554511c1444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
444444455962222222222ddddfffff9dd22222266669f9665666656656565656566666665666565656565656565656666566666666666666669ffffffff6ffff 44444445554444511c1444444444449fffffffffffffffffffffffffffffffffffffffff6ffffffffffffffffffffffffffffffffffffffffffffffffff6ffff
4444455444921122222222222dddddd22222221126669f965666555656565656555666665666565655665556655665566566656666666666666966666666ffff 444445544444444511c444444444449fffffffffffffffffffffffffffffffffffffffff6666666666666666666666666666666666666666666666666666ffff
44555444449211222222222222ddddd22222221122269f9666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff 445554444444444511c144444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
55444444449222222222211122ddddd22211222222269f9666666666666666666666666666666666666666666666666666666666666666666669ffffffffffff 5544444444444444111144444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
444444444499996666699996666999966666999966669f9999999996666666699999999966666666699999999666666666999999996666666669ffffffffffff 4444444444444444111c44444444449fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
444444444444449999911449999449f99999ffff9999fffffffffff99999999fffffffff999999999ffffffff999999999ffffffff999999999fffffffffffff 444444444444444441111444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
444444444444444441111444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444444444444444441111444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
44444444444444444411c144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 44444444444444444411c144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
444444444444444444111144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 444444444444444444111144444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
@ -321,7 +324,7 @@ __label__
445554444444444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 445554444444444444444444444449ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
__gff__ __gff__
0000000000000000000080808080000000000000000000808080808000000080000000000000000000814040818040400000000000000080808080808181808000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000080808080000000000000000000808080808080800080000000000000000000814040818040400000000000004080808080808181808000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__ __map__
0202020202030011110010101000130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0202020202030011110010101000130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
@ -343,16 +346,16 @@ __map__
1d0b0b0b0b1f1f0b0b0b0b0b0b0b0b1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1d0b0b0b0b1f1f0b0b0b0b0b0b0b0b1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0e3d2c2d0e0e0e0e00000e3c0e0f0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0e3d2c2d0e0e0e0e00000e3c0e0f0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0f0f0e000e0e000000000e0e0e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0f0f0e000e0e000000000e0e0e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d00002a2b2f2a0f00000000000e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d00002a2b362a0f00000000000e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d00003b3b3b3b00002e2b2a2b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d00003b3b3b3b00002e2b2a2b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d00003a3a3a3900003e3a393b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d00003a3a3a3900003e3a393b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d000000000e2a0f00000e2f2b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d000000000e2a0f00000e362b0e000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d00002b2f2a3b0000002b3a3900000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d00002b362a3b0000002b3a3900000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0f003a393a3a0037383b00000e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0f003a393a3a0037383b00000e0e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0f000000000f002a2b0f000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0f000000000f002a2b0f000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0000290f002a003a393d000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0000290f002a003a393d000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0f0000000f3b000000000000000e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0f0000000f3b000000000000000e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d000000000f0000000f0f0f001e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d000000000f0000000f0f2f001e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d00000000000000000f003f1e1e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d00000000000000000f003f1e1e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0d0e0e0000000000000000001e1e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0d0e0e0000000000000000001e1e1e0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1a0a0a17181818190a0a0a0a0a0a0a1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1a0a0a17181818190a0a0a0a0a0a0a1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

@ -33,7 +33,7 @@ function conversation_draw(screen)
--prev_screen.draw() --prev_screen.draw()
message = messages[message_idx] message = messages[message_idx]
if message[1] == phoebe_portrait then if message[1] == ph_p then
phoebe_say(unpack(message)) phoebe_say(unpack(message))
else else
draw_chatbox(unpack(message)) draw_chatbox(unpack(message))

@ -1,6 +1,3 @@
--tags represent what the object *is*
--traitss represent *special qualities* *beyoond* the default for that object.
testing = true
story = { story = {
main=1, main=1,
branch_lenore=1, branch_lenore=1,
@ -70,7 +67,7 @@ library.item_blueprints = {
title="reagent", title="reagent",
quality_base = 50, quality_range=10, quality_base = 50, quality_range=10,
trait_pool={"shiny"}, trait_chance=20, trait_pool={"shiny"}, trait_chance=20,
description="red reagent", description="alchemical \nreagent",
sprite=33, sprite_recolor={[12]=8}, sprite=33, sprite_recolor={[12]=8},
}, },
bomb = { bomb = {

@ -1,3 +1,16 @@
# release notes
hey everyone i made... a little tiny video game! please play it!
it's a bite-size fangame for the atelier franchise, about being a young alchemist in a town down on its luck. can you bring back the fireworks festival that used to light up the skies?
https://shoofle.net/static/atelier/ateli8.html it should be playable well on mobile, it takes about 15 minutes to play, and has no save or load. i am very proud of it and it's very short.
if you play it, please let me know! if you play it and it crashes, especially please let me know! i think i ironed out all the major crash spots but there might be one or two lurking somewhere.
i made a dialog-heavy crafting game in pico-8 because i do not fear god or reason!
one of my goals with #AtelierPhoebe was to make a game that had everything it needed to be a Real Game, even if it didn't actually have enough content/length to justify those things. obviously there's a lot more ui and interface stuff i could have added for that (like save/loads and more menus) but i had a good time making something weird. it's by far the most finished game i've ever made.
# story states: # story states:
story state: 1 story state: 1
@ -214,4 +227,9 @@ done! 7. make it so you can unselect final traits.
1. green T piece is bugged? 1. green T piece is bugged?
2. when starting to finalize traits it sshould reset cursors 2. when starting to finalize traits it sshould reset cursors
art for main screen, or "press z to start" # final touches 1/27
1. art for main screen, or "press z to start"
2. witch tower two tiles tall maybe?
3. anomalous green tiles bug? when you place a tile, ssometimes it removes non-overlapping traits
4. draw upper half of map, then player ssprite, then lower half, to enssure better layering?

@ -4,218 +4,294 @@ grid_height = 5
grid_x = 14 grid_x = 14
grid_y = 34 grid_y = 34
c = { center_glyph = 132
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. cursor = {
x=0, y=0 -- x y coordinates in the puzzle grid for the current trait ing_slot=1,
ing_idx=1,
trait_slot=1,
x=0, y=0,
big_button=false,
}
partial_recipe = {
ingredients = {},
trait_listings = {},
final_selected_traits = {}
} }
center_glyph = 132 state = {
ingredients = {} choosing_ingredient = true,
-- traits which have been placed placing_trait = false,
traits = {} finalizing = false,
choosing_ingredient = true filtered_ingredients={},
placing_trait = false final_trait_options={},
finalizing = false }
big_button = false
final_trait_options = {}
final_selected_traits = {}
function crafting_before() function crafting_before()
center_glyph = rnd({132, 134, 164, 166}) center_glyph = rnd({132, 134, 164, 166})
c.x = 0
c.y = 0 cursor = {
c.ing_slot = 1 ing_slot=1,
c.ing_idx = 1 ing_idx=1,
c.trait_slot = 0 trait_slot=1,
x=0, y=0,
ingredients = {} big_button=false, -- are we selecting the big button?
traits = {} }
final_trait_options = {}
partial_recipe = {
choosing_ingredient = true ingredients = {},
placing_trait = false trait_listings = {},
finalizing = false final_selected_traits = {}
big_button = false }
state = {
-- three state flags for which phase of synthesis we're in
choosing_ingredient = true, -- choosing an ingredient for one of the slots of the recipe.
placing_trait = false, -- placing a trait into the grid.
finalizing = false, -- selecting the final traits and clicking the create glyph
-- arrays in use
filtered_ingredients={}, -- the filtered list of ingredients we could use for the currently selected slot
final_trait_options={}, -- all the traits which were active at the end of the
}
update_filtered_ingredients()
end end
function crafting_update() function crafting_update()
if choosing_ingredient then if state.choosing_ingredient then
crafting_choice_update() crafting_choice_update()
elseif placing_trait then elseif state.placing_trait then
crafting_place_update() crafting_place_update()
elseif finalizing then elseif state.finalizing then
crafting_finalize_update() crafting_finalize_update()
end end
end end
function crafting_choice_update() function crafting_choice_update()
requirement = current_recipe.ingredients[c.ing_slot] local current_slot_requirement = current_recipe.ingredients[cursor.ing_slot]
filtered_ingredients = filter_list(
inventory,
function(ing)
if contains(ingredients, ing) then return false end
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 if btnp(0) and cursor.ing_idx>1 then
sfx(3) sfx(3)
c.ing_idx -= 1 cursor.ing_idx -= 1
end end
if btnp(1) and c.ing_idx<#filtered_ingredients then if btnp(1) and cursor.ing_idx<#state.filtered_ingredients then
sfx(3) sfx(3)
c.ing_idx += 1 cursor.ing_idx += 1
end end
local current_ingredient = state.filtered_ingredients[cursor.ing_idx]
if btnp(4) and current_ingredient ~= nil then if btnp(4) and current_ingredient ~= nil then
-- lock in this ingredient and move on to moving traits arund -- lock in this ingredient and move on to moving traits arund
add(ingredients, current_ingredient) add(partial_recipe.ingredients, current_ingredient)
if #current_ingredient.traits ~= 0 then
-- if there are traits on tihs ingredient, move on to setting traits. if #(current_ingredient.traits) ~= 0 then
choosing_ingredient = false -- if there are traits on this ingredient, set them.
placing_trait = true state.choosing_ingredient = false
finalizing = false state.placing_trait = true
c.trait_slot = 1
c.ing_idx = 1 cursor.trait_slot = 1
elseif #ingredients < #current_recipe.ingredients then elseif #partial_recipe.ingredients < #current_recipe.ingredients then
-- if there are remaining ingredients to set, then we move to the next ingredient slot. -- if there are remaining ingredients to set, do that.
choosing_ingredient = true cursor.ing_idx = 1
placing_trait = false cursor.ing_slot += 1
finalizing = false update_filtered_ingredients()
c.trait_slot = 0
c.ing_idx = 1
c.ing_slot += 1
else else
-- if there are no more ingredients to set, then we finalize. -- if there are no more ingredients to set, then move on to finalizing.
sfx(2) begin_finalize()
c.x, c.y = 0, 0
final_trait_options = filter_list(traits, function(x) return x.active end)
choosing_ingredient = false
placing_trait = false
final_selected_traits = {}
finalizing = true
c.trait_slot = 0
c.ing_idx = 1
c.ing_slot = 1
end end
end end
if (btnp(5)) then if btnp(5) then
-- delete the last ingredient from the ingredients list local previous_index = cursor.ing_slot - 1
if #ingredients == 0 then if #(partial_recipe.ingredients) == 0 then
-- if there's no ingredients set, we back out.
change_screen(screen_recipe_list) change_screen(screen_recipe_list)
--otherwise, there are ingreddients set, and cursor.ing_slot is greater than one.
elseif #(partial_recipe.ingredients[previous_index].traits) ~= 0 then
-- we're setting an ingredient.
-- the previous ingredient slot has an ingredient set with traits.
-- delete the last set trait and pick it up as our cursor.
local last_set_trait = deli(partial_recipe.trait_listings)
cursor.ing_slot -= 1
cursor.ing_idx = 1
cursor.trait_slot = last_set_trait.ingredient_trait_slot
cursor.x = last_set_trait.x
cursor.y = last_set_trait.y
state.choosing_ingredient = false
state.placing_trait = true
else else
traits = filter_list( --we're setting an ingredient, but the previouus ingredient didn't have any traits.
traits, deli(partial_recipe.ingredients)
function(set_trait) return set_trait.from_ingredient_slot ~= #ingredients end cursor.ing_slot = cursor.ing_slot - 1
) cursor.ing_idx = 1
update_filtered_ingredients()
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 end
end end
function update_filtered_ingredients()
local current_slot_requirement = current_recipe.ingredients[cursor.ing_slot]
state.filtered_ingredients = filter_list(
inventory,
function(ing)
if contains(partial_recipe.ingredients, ing) then return false end
if contains(ing.tags, current_recipe.ingredients[cursor.ing_slot]) then return true end
return current_slot_requirement == ing.title
end)
end
function crafting_place_update() function crafting_place_update()
current_ingredient = ingredients[c.ing_slot] local current_ingredient = partial_recipe.ingredients[cursor.ing_slot]
current_trait = library.traits[current_ingredient.traits[c.trait_slot]] local current_trait_name = current_ingredient.traits[cursor.trait_slot]
local current_trait = library.traits[current_trait_name]
width = current_trait[4] local width = current_trait[4]
height = current_trait[5] local height = current_trait[5]
if btnp(0) and c.x>0 then c.x -= 1 end if btnp(0) and cursor.x>0 then cursor.x -= 1 end
if btnp(1) and c.x+width < grid_width then c.x += 1 end if btnp(1) and cursor.x+width < grid_width then cursor.x += 1 end
if btnp(2) and c.y>0 then c.y -= 1 end if btnp(2) and cursor.y>0 then cursor.y -= 1 end
if btnp(3) and c.y+height < grid_height then c.y += 1 end if btnp(3) and cursor.y+height < grid_height then cursor.y += 1 end
if btnp(4) then if btnp(4) then
new_trait = {trait=current_trait, x=c.x, y=c.y, active=true, from_ingredient_slot=c.ing_slot} -- make a new trait listing
local new_trait_listing = {
for idx, trait in ipairs(traits) do ingredient_i_belong_to=cursor.ing_slot, -- index of the ingredient this strait belongs to
if overlaps(trait, new_trait) then ingredient_trait_slot=cursor.trait_slot, -- which trait slot we came from
traits[idx].active = false x=cursor.x, y=cursor.y, --offset of the piece in the grid
trait = current_trait, -- the trait in question
active = true, -- whether the trait is active
}
-- turn off all overlapped traits
for idx, trait_listing in ipairs(partial_recipe.trait_listings) do
if overlaps(trait_listing, new_trait_listing) then
trait_listing.active = false
end end
end end
add(traits, new_trait) -- add it to the record!~
add(partial_recipe.trait_listings, new_trait_listing)
c.x, c.y = 0,0
if c.trait_slot < #current_ingredient.traits then -- move on to the next step
-- if there's more traits to set, then we should keep setting traits. if cursor.trait_slot < #current_ingredient.traits then
choosing_ingredient = false -- if there's more traits to set, then we should keep setting traits!
placing_trait = true cursor.trait_slot += 1
finalizing = false elseif cursor.ing_slot < #current_recipe.ingredients then
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. -- if there's more ingredients to set, then we move on to setting ingredients.
choosing_ingredient = true state.choosing_ingredient = true
placing_trait = false state.placing_trait = false
finalizing = false
c.trait_slot = 0 cursor.trait_slot = 1
c.ing_slot += 1 cursor.ing_slot += 1
cursor.ing_idx = 1
update_filtered_ingredients()
else else
-- if there's no more ingredients to set, then we move on to finalizing. -- if there's no more ingredients to set, then we move on to finalizing.
sfx(2) begin_finalize()
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
final_selected_traits = {}
c.trait_slot = 0
c.ing_slot = 1
end end
end end
if (btnp(5)) then
undo_ingredient() if btnp(5) then
-- we are placing traits.
-- that means that cursor.ing_slot refers to an ingredient which is set
-- and cursor.trait_slot refers to 1 or 2, and one which isn't set.
-- if curssor.trait_slot is 2, then we should delete the last set trait.
if cursor.trait_slot == 1 then
state.choosing_ingredient = true
state.placing_trait = false
deli(partial_recipe.ingredients)
update_filtered_ingredients()
else
-- if we were placing the second trait, then we should go to placing the first trait,
-- which we also need to remoove from the trait listings.
cursor.trait_slot -= 1
local last = deli(partial_recipe.trait_listings)
cursor.x = last.x
cursor.y = last.y
end
end end
end end
function begin_finalize()
sfx(2)
state.final_trait_options = filter_list(partial_recipe.trait_listings, function(x) return x.active end)
state.choosing_ingredient = false
state.placing_trait = false
state.finalizing = true
cursor.x = 0
cursor.y = 0
end
function crafting_finalize_update() function crafting_finalize_update()
if #final_trait_options < 3 then big_button = true end if #state.final_trait_options < 3 then cursor.big_button = true end
if not big_button then local newx = cursor.x
newx, newy = c.x, c.y local newy = cursor.y
if btnp(0) then newx -= 1 end if btnp(0) then newx -= 1 end
if btnp(1) then newx += 1 end if btnp(1) then newx += 1 end
if btnp(2) then newy -= 1 end if btnp(2) then newy -= 1 end
if btnp(3) 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 if not cursor.big_button
c.x, c.y = newx, newy and (state.final_trait_options[2*newy + newx + 1] ~= nil)
elseif btnp(3) and not (btnp(0) or btnp(1) or btnp(2)) then and newx <= 1
big_button = true and newx >= 0 then
end cursor.x, cursor.y = newx, newy
local i = 2*c.y + c.x + 1 elseif btnp(3) and not (btnp(0) or btnp(1) or btnp(2)) then
-- if the next selected thing was out of bounds but we pressed down, then we're highlighting the big button
cursor.big_button = true
end
local i = 2*cursor.y + cursor.x + 1
if btnp(4) and not big_button then if btnp(4) and not cursor.big_button then
if contains(final_selected_traits, i) then if contains(partial_recipe.final_selected_traits, i) then
del(final_selected_traits, i) del(partial_recipe.final_selected_traits, i)
elseif #final_selected_traits < 2 then elseif #partial_recipe.final_selected_traits < 2 then
add(final_selected_traits, i) add(partial_recipe.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 end
if btnp(5) and #final_trait_options < 3 then end
-- go back a step
undo_ingredient() if btnp(2) and cursor.big_button and #state.final_trait_options > 2 then
finalizing = false -- if we're on the big button, and there's enough trait options, then if we press up,
elseif btnp(5) then -- it should unsselect the big button.
big_button = false cursor.big_button = false
end
if btnp(4) and cursor.big_button then
-- if you pressed o and had the big button selected, then do the thing!
make_the_product()
cursor.big_button = false
end
if btnp(5) then
local last_ingredient = partial_recipe.ingredients[#partial_recipe.ingredients]
if #last_ingredient.traits == 0 then
state.finalizing = false
state.choosing_ingredient = true
cursor.ing_idx = 1
deli(partial_recipe.ingredients)
else
local trait_listing = deli(partial_recipe.trait_listings)
state.finalizing = false
state.placing_trait = true
cursor.trait_slot = trait_listing.ingredient_trait_slot
cursor.x = trait_listing.x
cursor.y = trait_listing.y
end end
end end
end end
@ -223,41 +299,29 @@ end
function make_the_product() function make_the_product()
local product = make_item(library.item_blueprints[current_recipe.result]) local product = make_item(library.item_blueprints[current_recipe.result])
product.quality = quality() product.quality = quality()
add(inventory, product)
for x in all(ingredients) do for ingredient in all(partial_recipe.ingredients) do
del(inventory, x) -- remove all the ingredientss that we used
del(inventory, ingredient)
end end
product.traits = {} product.traits = {}
if #final_trait_options < 3 then
for t in all(final_trait_options) do if #state.final_trait_options < 3 then
add(product.traits, t.trait[1]) for trait_listing in all(state.final_trait_options) do
add(product.traits, trait_listing.trait[1])
end end
else else
for i in all(final_selected_traits) do for idx in all(partial_recipe.final_selected_traits) do
add(product.traits, final_trait_options[i].trait[1]) add(product.traits, state.final_trait_options[idx].trait[1])
end end
end end
add(inventory, product)
sfx(5) sfx(5)
change_screen(screen_recipe_list) change_screen(screen_recipe_list)
end 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() function crafting_draw()
cls() cls()
@ -270,91 +334,41 @@ function crafting_draw()
-- puzzle grid including pieces -- puzzle grid including pieces
draw_grid() draw_grid()
if finalizing then if state.finalizing then
if #final_trait_options > 2 then draw_finalizing_sheet()
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
end end
function draw_grid() function draw_grid()
map(0,0, grid_x,grid_y, grid_width+1,grid_height+1) map(0,0, grid_x,grid_y, grid_width+1,grid_height+1)
for trait in all(traits) do for t in all(partial_recipe.trait_listings) do
if trait.active then if t.active then
map(trait.trait[2], trait.trait[3], map(t.trait[2], t.trait[3],
(trait.x*grid_size)+grid_x, (trait.y*grid_size)+grid_y, (t.x*grid_size)+grid_x, (t.y*grid_size)+grid_y,
trait.trait[4], trait.trait[5]) t.trait[4], t.trait[5])
end end
end end
if (placing_trait) then if (state.placing_trait) then
trait = library.traits[ingredients[c.ing_slot].traits[c.trait_slot]] local current_ingredient = partial_recipe.ingredients[cursor.ing_slot]
local current_trait_label = current_ingredient.traits[cursor.trait_slot]
local trait = library.traits[current_trait_label]
-- draw the currently selected trait into the grid -- draw the currently selected trait into the grid
map(trait[2], trait[3], map(trait[2], trait[3],
(c.x*grid_size)+grid_x, (c.y*grid_size)+grid_y, (cursor.x*grid_size)+grid_x, (cursor.y*grid_size)+grid_y,
trait[4], trait[5]) trait[4], trait[5])
end end
end end
function draw_recipe_in_progress_on_paper(x, y) function draw_recipe_in_progress_on_paper(x, y)
-- selected ingredients -- selected ingredients
for i, ing in ipairs(ingredients) do for i, ing in ipairs(partial_recipe.ingredients) do
draw_ingredient_listing(ing, x+40, y + 26*i) draw_ingredient_listing(ing, x+40, y + 26*i)
end end
color(blank_ingredient_outline_color) color(blank_ingredient_outline_color)
for i=(c.ing_slot+1),#current_recipe.ingredients do for i=(cursor.ing_slot+1),#current_recipe.ingredients do
print(current_recipe.ingredients[i], x+46, y+2+26*i+9) print(current_recipe.ingredients[i], x+46, y+2+26*i+9)
end end
@ -365,49 +379,108 @@ function draw_recipe_in_progress_on_paper(x, y)
print_quality(quality(), x+44, y+18) print_quality(quality(), x+44, y+18)
if (choosing_ingredient and c.ing_slot < #current_recipe.ingredients + 1) then if state.choosing_ingredient and cursor.ing_slot < #current_recipe.ingredients + 1 then
-- draw a box around the ingredient we're choosing -- draw a box around the ingredient we're choosing
yc = y + 26*c.ing_slot yc = y + 26*cursor.ing_slot
xc = x+40 xc = x+40
rect(xc, yc, xc+55, yc+26,10) rect(xc, yc, xc+55, yc+26,10)
spr(6, xc-8, yc+10) spr(6, xc-8, yc+10)
spr(7, xc+56, yc+10) spr(7, xc+56, yc+10)
local current_ingredient = state.filtered_ingredients[cursor.ing_idx]
if current_ingredient == nil then if current_ingredient == nil then
color(blank_ingredient_outline_color) color(blank_ingredient_outline_color)
print(current_recipe.ingredients[c.ing_slot], x+46, y+2+26*c.ing_slot+9) print(current_recipe.ingredients[cursor.ing_slot], x+46, y+2+26*cursor.ing_slot+9)
else else
-- draw the ingredient listing for the selected ingredient -- draw the ingredient listing for the selected ingredient
draw_ingredient_listing(current_ingredient, xc, yc) draw_ingredient_listing(current_ingredient, xc, yc)
end end
elseif (placing_trait) then elseif state.placing_trait then
-- draw a marker for the trait we're picking -- draw a marker for the trait we're picking
yc = y + 26*c.ing_slot yc = y + 26*cursor.ing_slot
yc = 3+yc+c.trait_slot*6 yc = 3+yc+cursor.trait_slot*6
xc = x+38 xc = x+38
spr(8, xc, yc) spr(8, xc, yc)
end end
for i, t in ipairs(filter_list(traits, function(trait) return trait.active end)) do for i, t in ipairs(filter_list(partial_recipe.trait_listings, function(trait) return trait.active end)) do
color(base_text_color) color(base_text_color)
print(t.trait[1], x+5, y+78 + 8*i) print(t.trait[1], x+5, y+78 + 8*i)
end end
end end
function draw_finalizing_sheet()
if #state.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_listing in ipairs(state.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(partial_recipe.final_selected_traits, i) then
rect(x-1, y-1, x+29, y+5, 10)
end
if not cursor.big_button and xi == cursor.x and yi == cursor.y then
rect(x-2, y-2, x+30, y+6, 0)
end
if contains(partial_recipe.final_selected_traits, i) then
color(highlight_text_color)
else
color(base_text_color)
end
print(trait_listing.trait[1], x, y )
end
--draw_paper(40, 76, 128-40-40, 12)
color(highlight_text_color)
if cursor.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 cursor.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 cursor.big_button then
color(12)
else
color(highlight_text_color)
end
print("create!", 64-12, 80)
end
end
function quality() function quality()
local quality_sum = 0 local quality_sum = 0
for ing in all(ingredients) do for ing in all(partial_recipe.ingredients) do
quality_sum += ing.quality quality_sum += ing.quality
end end
if #ingredients > 1 then if #partial_recipe.ingredients > 1 then
quality_sum = flr(quality_sum/#ingredients) quality_sum = flr(quality_sum/#partial_recipe.ingredients)
else else
quality_sum = flr(quality_sum) quality_sum = flr(quality_sum)
end end
for trait in all(traits) do for trait in all(partial_recipe.traits) do
if trait.active then quality_sum += 5 end if trait.active then quality_sum += 5 end
end end
@ -416,12 +489,14 @@ end
screen_crafting_raw = {before=crafting_before, draw=crafting_draw, update=crafting_update} screen_crafting_raw = {before=crafting_before, draw=crafting_draw, update=crafting_update}
screen_crafting = screen_conversation({ screen_crafting = screen_conversation({
{phoebe_portrait, [[when i craft, i pick ingredients one by one with left and right]]}, {ph_p, [[when i craft, i pick which of each ingredient to use with left and right,]]},
{phoebe_portrait, [[and press 🅾 to lock them in before picking what traits to use]]}, {ph_p, [[and press 🅾 to lock them in.]]},
{phoebe_portrait, [[trying to fit them into the grid, which increases the quality. ]]}, {ph_p, [[some items have additional traits for their special properties.]]},
{phoebe_portrait, [[two traits from those still in the grid at the end are added to the product!]]}, {ph_p, [[i set a puzzle piece into the grid for each trait on the object.]]},
{phoebe_portrait, [[but if you overlap a trait, it will be removed.]]}, {ph_p, [[every trait i put in the grid increases the overall quality.]]},
{phoebe_portrait, [[i've even heard of some traits that combine to form others!]]} {ph_p, [[but if you overlap other traits' tiles, it'll remove the old ones!]]},
{ph_p, [[then at the end, you can pick two traits to transfer]]},
{ph_p, [[onto the final product.]]},
}, },
function() function()
screen_crafting = screen_crafting_raw screen_crafting = screen_crafting_raw

@ -5,6 +5,11 @@ inventory_cursor = {
x=0, y=0, x=0, y=0,
} }
function inventory_before()
inventory_cursor.x = 0
inventory_cursor.y = 0
end
function inventory_slide(x1, x2) function inventory_slide(x1, x2)
return { return {
timer = 0, timer = 0,
@ -28,25 +33,21 @@ function inventory_slide(x1, x2)
} }
end end
function inventory_before()
end
function inventory_update() function inventory_update()
cx, cy = inventory_cursor.x, inventory_cursor.y cx, cy = inventory_cursor.x, inventory_cursor.y
if btnp(0) then cx -= 1 end if btnp(0) then cx -= 1 end
if btnp(1) then cx += 1 end if btnp(1) then cx += 1 end
if btnp(2) then cy -= 1 end if btnp(2) then cy -= 1 end
if btnp(3) then cy += 1 end if btnp(3) then cy += 1 end
if cy >= 0 and cy < flr(#inventory/5) then if cy >= 0 and cy < flr(#inventory/5) and cx >= 0 and cx < 5 then
if cx >= 0 and cx < 5 then inventory_cursor.x = cx
inventory_cursor.x = cx inventory_cursor.y = cy
inventory_cursor.y = cy elseif cy == flr(#inventory / 5) and cx >= 0 and cx < #inventory % 5 then
end inventory_cursor.x = cx
elseif cy == flr(#inventory / 5) then inventory_cursor.y = cy
if cx >= 0 and cx < #inventory % 5 then elseif btnp(3) then
inventory_cursor.x = cx animate(inventory_slide(inventory_drawer_height_max,0))
inventory_cursor.y = cy change_screen(screen_workbench)
end
end end
if btnp(5) then if btnp(5) then
@ -100,16 +101,17 @@ function draw_drawer_contents()
end end
function draw_item_sheet() function draw_item_sheet()
if #inventory ~= 0 then local item = inventory[1 + 5*inventory_cursor.y + inventory_cursor.x]
if item ~= nil then
draw_paper(35,94, 128-2*35,28) draw_paper(35,94, 128-2*35,28)
draw_ingredient_listing(inventory[1 + 5*inventory_cursor.y + inventory_cursor.x], 35, 94) draw_ingredient_listing(item, 35, 94)
end end
end end
screen_inventory_raw = {before=inventory_before, draw=inventory_draw, update=inventory_update} screen_inventory_raw = {before=inventory_before, draw=inventory_draw, update=inventory_update}
screen_inventory = screen_conversation({ screen_inventory = screen_conversation({
{phoebe_portrait, [[oh right, this is the drawer where i keep my stuff!]]},}, {ph_p, [[oh right, this is the drawer where i keep my stuff!]]},},
function() function()
screen_inventory = screen_inventory_raw screen_inventory = screen_inventory_raw
change_screen(screen_inventory) change_screen(screen_inventory)

@ -102,6 +102,11 @@ function flip_in_letter(page, new_page)
end end
function letters_update() function letters_update()
if (btnp(1) and letter_idx == #letters) or btnp(5) then
animate(letters_move_out(-10, 8, -10-80, 8+8))
change_screen(screen_workbench)
end
if btnp(0) and letter_idx > 1 then if btnp(0) and letter_idx > 1 then
animate(flip_away_letter(letter_idx)) animate(flip_away_letter(letter_idx))
letter_idx -= 1 letter_idx -= 1
@ -111,11 +116,6 @@ function letters_update()
animate(flip_in_letter(letter_idx, letter_idx+1)) animate(flip_in_letter(letter_idx, letter_idx+1))
letter_idx = letter_idx + 1 letter_idx = letter_idx + 1
end end
if btnp(5) then
animate(letters_move_out(-10, 8, -10-80, 8+8))
change_screen(screen_workbench)
end
end end
@ -133,7 +133,7 @@ function draw_letter_on_paper(letter, x, y)
end end
screen_letters = {draw=letters_draw, update=letters_update} screen_letters = {draw=letters_draw, update=letters_update}
screen_letters = screen_conversation({{phoebe_portrait, "ah. pile of letters i should be reading."}}, screen_letters = screen_conversation({{ph_p, "ah. pile of letters i should be reading."}},
function() function()
screen_letters = {draw=letters_draw, update=letters_update} screen_letters = {draw=letters_draw, update=letters_update}
change_screen(screen_letters) change_screen(screen_letters)

@ -101,6 +101,11 @@ function flip_in(page, new_page)
end end
function pages_update() function pages_update()
if (btnp(0) and page_idx == 1) or btnp(5) then
animate(recipe_list_move_out(30, 8, 30+80, 8+8))
change_screen(screen_workbench)
end
if btnp(0) and page_idx ~= 1 then if btnp(0) and page_idx ~= 1 then
animate(flip_away(page_idx)) animate(flip_away(page_idx))
page_idx = page_idx - 1 page_idx = page_idx - 1
@ -115,10 +120,6 @@ function pages_update()
change_screen(screen_crafting) change_screen(screen_crafting)
current_recipe = grimoire[page_idx] current_recipe = grimoire[page_idx]
end end
if btnp(5) then
animate(recipe_list_move_out(30, 8, 30+80, 8+8))
change_screen(screen_workbench)
end
current_recipe = grimoire[page_idx] current_recipe = grimoire[page_idx]
end end
@ -135,9 +136,8 @@ end
screen_recipe_list = {draw=pages_draw, update=pages_update} screen_recipe_list = {draw=pages_draw, update=pages_update}
screen_recipe_list = screen_conversation({ screen_recipe_list = screen_conversation({
{phoebe_portrait, [[this is all my recipes. they each list what they need for ingredients.]]}, {ph_p, [[this is all my recipes. they each list what they need for ingredients.]]},
{phoebe_portrait, [[go through them with left and right, or]]}, {ph_p, [[go through them with left and right, or press 🅾 to start crafting!!]]},
{phoebe_portrait, [[press ❎ to back out to the workbench. 🅾 will start crafting!!]]},
}, },
function() function()
screen_recipe_list = {draw=pages_draw, update=pages_update} screen_recipe_list = {draw=pages_draw, update=pages_update}

@ -1,13 +1,13 @@
function title_update() function title_update()
if btnp(4) then if btnp(4) or btnp(5) then
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "hi! i'm phoebe! welcome to pilton!"}, {ph_p, "hi! i'm phoebe! welcome to pilton!"},
{phoebe_portrait, "this is a small town known for our fireworks festival."}, {ph_p, "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"}, {ph_p, "or we would be. my grandfather, the town's best alchemist, died suddenly and"},
{phoebe_portrait, "hadn't taught me about fireworks. my mother took up adventuring"}, {ph_p, "hadn't taught me about fireworks. my mother took up adventuring"},
{phoebe_portrait, "instead of alchemy, so now there's no one to carry on the tradition."}, {ph_p, "instead of 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."}, {ph_p, "the town's pretty broken up about it but i'm doing my best to carry on."},
{phoebe_portrait, "but i only know the basics of picking herbs and purifying water."}, {ph_p, "but i only know the basics of picking herbs and purifying water."},
}, },
function() change_screen(screen_workbench) end, function() change_screen(screen_workbench) end,
{update=walkaround_update, draw=walkaround_draw})) {update=walkaround_update, draw=walkaround_draw}))
@ -29,6 +29,10 @@ function title_draw()
end end
x = print(big .. c, x, 30 + sin(x/128+time()/4)*2, col) x = print(big .. c, x, 30 + sin(x/128+time()/4)*2, col)
end end
print("VERSION 1.16", 64-(5*4), 80)
print("press 🅾 or ❎ to start", 64-(11*4), 90)
end end
screen_title = {update=title_update, draw=title_draw} screen_title = {update=title_update, draw=title_draw}

@ -1,80 +1,80 @@
player_sprite_number = 48 p_x, p_y = 24,16
player_x, player_y = 24,16
step_timer = 0 step_timer = 0
player_sprite_number = 50
locations = {} the_map = {}
function crystals(story_state) function crystals(story_state)
add(inventory, make_item(library.item_blueprints.crystal)) add(inventory, make_item(library.item_blueprints.crystal))
change_screen(screen_conversation({{phoebe_portrait, "you can use these crystals for a lot."}})) change_screen(screen_conversation({{ph_p, "you can use these crystals for a lot."}}))
sfx(9) sfx(9)
toast("received crystal!") toast("received crystal!")
end end
locations["5,0"]=crystals the_map["5,0"]=crystals
locations["6,0"]=crystals the_map["6,0"]=crystals
function barrel(story_state) function barrel(story_state)
sfx(1) sfx(1)
change_screen(screen_conversation({{phoebe_portrait, "it's a barrel!"}})) change_screen(screen_conversation({{ph_p, "it's a barrel!"}}))
end end
locations["2,1"]=barrel the_map["2,1"]=barrel
locations["10,10"]=barrel the_map["10,10"]=barrel
locations["3,1"]=function() -- the atelier! the_map["3,1"]=function() -- the atelier!
sfx(4) sfx(4)
change_screen(screen_workbench) change_screen(screen_workbench)
end end
locations["12,1"]=function() --at the well. give us ssome water the_map["12,1"]=function() --at the well. give us ssome water
add(inventory, make_item(library.item_blueprints.well_water)) add(inventory, make_item(library.item_blueprints.well_water))
change_screen(screen_conversation({{phoebe_portrait, "slurp!"}})) change_screen(screen_conversation({{ph_p, "slurp!"}}))
toast("received water!") toast("received water!")
sfx(0) sfx(0)
end end
locations["3,10"] = script_charcoal_seller the_map["3,10"] = script_charcoal_seller
locations["11,5"] = script_neighbor the_map["11,5"] = script_neighbor
locations["9,5"] = script_lenore the_map["9,5"] = script_lenore
locations["9,8"] = script_library the_map["9,8"] = script_library
locations["11,13"] = script_witch the_map["11,13"] = script_witch
function herbs(story_state) function herbs(story_state)
add(inventory, make_item(library.item_blueprints.herb)) add(inventory, make_item(library.item_blueprints.herb))
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "ooh, healing herbs! i'll take some. not more than 1/3 the patch though!"} {ph_p, "ooh, healing herbs! i'll take some. not more than 1/3 the patch though!"}
})) }))
sfx(8) sfx(8)
toast("received herbs!") toast("received herbs!")
end end
locations["13,12"] = herbs the_map["13,12"] = herbs
locations["14,12"] = herbs the_map["14,12"] = herbs
locations["12,13"] = herbs the_map["12,13"] = herbs
locations["13,13"] = herbs the_map["13,13"] = herbs
locations["14,13"] = herbs the_map["14,13"] = herbs
locations["12,14"] = herbs the_map["12,14"] = herbs
locations["13,14"] = herbs the_map["13,14"] = herbs
locations["14,14"] = herbs the_map["14,14"] = herbs
function beach(story_state) function beach(story_state)
add(inventory, make_item(library.item_blueprints.sand)) add(inventory, make_item(library.item_blueprints.sand))
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "how many grains of sand does it take before it becomes a pile?"} {ph_p, "how many grains of sand does it take before it becomes a pile?"}
})) }))
sfx(6) sfx(6)
toast("received sand!") toast("received sand!")
end end
locations["3,15"] = beach the_map["3,15"] = beach
locations["4,15"] = beach the_map["4,15"] = beach
locations["5,15"] = beach the_map["5,15"] = beach
locations["6,15"] = beach the_map["6,15"] = beach
locations["7,15"] = beach the_map["7,15"] = beach
function interact(x, y) function interact(x, y)
result = locations[flr(x) .. "," .. flr(y)] result = the_map[flr(x) .. "," .. flr(y)]
if result ~= nil then result(story) end if result ~= nil then result(story) end
end end
@ -98,21 +98,21 @@ function walkaround_update()
if dy == 1 then up, down = false, true end if dy == 1 then up, down = false, true end
if dx ~= 0 or dy ~= 0 then moved = true end if dx ~= 0 or dy ~= 0 then moved = true 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 flags_from_xy(p_x + dx, p_y + dy) & 0x80 == 0 then p_x, p_y = p_x + dx, p_y + dy end
if moved then if moved then
test_x, test_y = player_x + 8*dx, player_y + 8*dy t_x, t_y = p_x + 8*dx, p_y + 8*dy
elseif up then elseif up then
test_x, test_y = player_x, player_y - 8 t_x, t_y = p_x, p_y - 8
elseif down then elseif down then
test_x, test_y = player_x, player_y + 8 t_x, t_y = p_x, p_y + 8
elseif flip_x then elseif flip_x then
test_x, test_y = player_x - 8, player_y t_x, t_y = p_x - 8, p_y
else else
test_x, test_y = player_x + 8, player_y t_x, t_y = p_x + 8, p_y
end end
if btnp(4) then interact(test_x/8, test_y/8) end if btnp(4) then interact(t_x/8, t_y/8) end
end end
function walkaround_draw() function walkaround_draw()
@ -121,7 +121,7 @@ function walkaround_draw()
map(0,16,0,0,16,16) -- draw the town map map(0,16,0,0,16,16) -- draw the town map
update_player_sprite() update_player_sprite()
spr(player_sprite_number, player_x-4, player_y-8, 1,1, flip_x) spr(player_sprite_number, p_x-4, p_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) map(0,16,0,0,16,16, 0x40) -- redraw the tiles which are supposed to appear over the player! (flag 6)
end end
function update_player_sprite() function update_player_sprite()
@ -141,10 +141,10 @@ end
screen_walkaround = {update=walkaround_update, draw=walkaround_draw} screen_walkaround = {update=walkaround_update, draw=walkaround_draw}
screen_walkaround = screen_conversation({ screen_walkaround = screen_conversation({
{phoebe_portrait, [[oh, and this is the town! all sorts of things to do here.]]}, {ph_p, [[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,]]}, {ph_p, [[like i could go get water from the well to the east,]]},
{phoebe_portrait, [[or pick up some charcoal from the red house to the southwest!]]}, {ph_p, [[or pick up some charcoal from the red house to the southwest!]]},
{phoebe_portrait, [[just face a building and press !]]} {ph_p, [[just face a building and press 🅾!]]}
}, },
function() function()
screen_walkaround = {draw=walkaround_draw, update=walkaround_update} screen_walkaround = {draw=walkaround_draw, update=walkaround_update}
@ -157,7 +157,9 @@ stars = {}
drag = 0.1 drag = 0.1
fireworks_frequency = 8 fireworks_frequency = 8
function work(f) function work(f)
if f == nil or f.vx == nil or f.vy == nil or f.x == nil or f.y == nil then return 0 end -- why is this necessary.
local vel = sqrt(f.vx*f.vx + f.vy*f.vy) local vel = sqrt(f.vx*f.vx + f.vy*f.vy)
f.x += f.vx f.x += f.vx
f.y += f.vy f.y += f.vy
f.vx = f.vx*(1-(drag*vel)) f.vx = f.vx*(1-(drag*vel))
@ -168,8 +170,8 @@ end
function fireworks_update() function fireworks_update()
walkaround_update() walkaround_update()
new_fireworks = {} local new_fireworks = {}
new_stars = {} local new_stars = {}
if rnd(100) < fireworks_frequency then add(new_fireworks, { if rnd(100) < fireworks_frequency then add(new_fireworks, {
x=rnd(128), x=rnd(128),
@ -181,7 +183,7 @@ function fireworks_update()
for f in all(fireworks) do for f in all(fireworks) do
local v = work(f) local v = work(f)
if v < 0.2 or v > 100 then if (v < 0.2 or v > 100) and (f.x ~= nil and f.y ~= nil and f.c ~= nil) then
for i=1,10 do for i=1,10 do
local theta = rnd(2) local theta = rnd(2)
add(new_stars,{ add(new_stars,{

@ -42,10 +42,10 @@ end
screen_workbench = {draw=bench_draw, update=bench_update} screen_workbench = {draw=bench_draw, update=bench_update}
screen_workbench = screen_conversation({ screen_workbench = screen_conversation({
{phoebe_portrait, "this is my workbench."}, {ph_p, "this is my workbench."},
{phoebe_portrait, "if you press left or right you can see my letters or recipes"}, {ph_p, "if you press left or right you can see my letters or recipes"},
{phoebe_portrait, "and the drawer where i keep ingredients is up top."}, {ph_p, "and the drawer where i keep ingredients is up top."},
{phoebe_portrait, "you can press ❎ to back out to the workbench."}, {ph_p, "you can press ❎ to back out to the workbench."},
}, },
function() function()
screen_workbench = {draw=bench_draw, update=bench_update} screen_workbench = {draw=bench_draw, update=bench_update}

@ -4,7 +4,7 @@ function script_charcoal_seller(s) -- the brick house!
change_screen(screen_conversation({ change_screen(screen_conversation({
{seller_portrait, "hey phoebe. if your family's not doing the festival this year"}, {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?"}, {seller_portrait, "you don't need the whole bulk order of charcoal, right?"},
{phoebe_portrait, "yeah."}, {ph_p, "yeah."},
{seller_portrait, "well, you can take as much as you need.", function() {seller_portrait, "well, you can take as much as you need.", function()
add(inventory, make_item(library.item_blueprints.charcoal)) add(inventory, make_item(library.item_blueprints.charcoal))
sfx(7) sfx(7)
@ -57,12 +57,15 @@ function script_charcoal_seller(s) -- the brick house!
add(inventory, make_item(library.item_blueprints.charcoal)) add(inventory, make_item(library.item_blueprints.charcoal))
sfx(7) sfx(7)
toast("received charcoal!") toast("received charcoal!")
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 -- end hans branch end -- end hans branch
elseif story_state.main == 8 then elseif s.main == 8 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{seller_portrait, "i'll meet you at the library for watching the fireworks!"}, {seller_portrait, "i'll meet you at the library for watching the fireworks!"},
})) }))
elseif story_state.main == 9 then elseif s.main == 9 then
change_screen(screen_conversation({{door_portrait, "[no one is here.]"}})) change_screen(screen_conversation({{door_portrait, "[no one is here.]"}}))
sfx(7) sfx(7)
add(inventory, make_item(library.item_blueprints.charcoal)) add(inventory, make_item(library.item_blueprints.charcoal))

@ -3,21 +3,21 @@ function script_lenore(story_state)
water = player_has(library.recipes.distilled_water.title) water = player_has(library.recipes.distilled_water.title)
if water == nil then if water == nil then
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, [[hi lenore!]]}, {ph_p, [[hi lenore!]]},
{lenore_portrait, [[hey alchemist. did you get my letter?]]}, {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!]]}, {ph_p, [[ah! i haven't gotten around to it but i'll get right on it!]]},
{lenore_portrait, [[thanks, kid.]]} {lenore_portrait, [[thanks, kid.]]}
})) }))
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, [[hey lenore! here's the clean water you requested!]]}, {ph_p, [[hey lenore! here's the clean water you requested!]]},
{lenore_portrait, [[thanks, kid. there's one other thing.]]}, {lenore_portrait, [[thanks, kid. there's one other thing.]]},
{lenore_portrait, [[my usual pharmacist is on vacation.]]}, {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, [[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, [[she lives in the house with a red roof just to the east of here.]]},
{lenore_portrait, [[healing herbs grow southeast of here.]]}, {lenore_portrait, [[healing herbs grow southeast of here.]]},
{lenore_portrait, [[and here's that reagent i promised you.]]}, {lenore_portrait, [[and here's that reagent i promised you.]]},
{phoebe_portrait, [[do you have a recipe for reagent? i'd love to learn to make it!]]}, {ph_p, [[do you have a recipe for reagent? i'd love to learn to make it!]]},
{lenore_portrait, [[yeah, sure. you start like this...]], function() {lenore_portrait, [[yeah, sure. you start like this...]], function()
del(inventory, water) del(inventory, water)
add(inventory, make_item(library.item_blueprints.reagent)) add(inventory, make_item(library.item_blueprints.reagent))
@ -37,15 +37,15 @@ function script_lenore(story_state)
elseif story_state.main == 4 or story_state.main == 5 or story_state.main == 6 then elseif story_state.main == 4 or story_state.main == 5 or story_state.main == 6 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{lenore_portrait, [[hey phoebe. any aches or pains?]]}, {lenore_portrait, [[hey phoebe. any aches or pains?]]},
{phoebe_portrait, [[i'm in tip-top shape!]]}, {ph_p, [[i'm in tip-top shape!]]},
})) }))
elseif story_state.main == 7 then elseif story_state.main == 7 then
if story_state.branch_lenore == 1 then if story_state.branch_lenore == 1 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{lenore_portrait, [[whoa, you can't just set off fireworks willy-nilly.]]}, {lenore_portrait, [[whoa, you can't just set off fireworks willy-nilly.]]},
{lenore_portrait, "get me 3 distilled water for cleaning bandages"}, {lenore_portrait, "get me 3 purified water for cleaning bandages"},
{lenore_portrait, "and 3 buckets of well water for fire."}, {lenore_portrait, "and 3 buckets of well water for fire."},
{phoebe_portrait, [[you got it!!]]}, {ph_p, [[you got it!!]]},
})) }))
story_state.branch_lenore = 2 story_state.branch_lenore = 2
elseif story_state.branch_lenore == 2 then elseif story_state.branch_lenore == 2 then
@ -69,6 +69,9 @@ function script_lenore(story_state)
end end
elseif story_state.branch_lenore == 3 then 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.]]}})) change_screen(screen_conversation({{lenore_portrait, [[i'll meet you at the library for viewing when you're ready.]]}}))
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 -- lenore branch finished end -- lenore branch finished
elseif story_state.main == 8 then elseif story_state.main == 8 then
change_screen(screen_conversation({{lenore_portrait, [[i'll see you at the library for viewing the festival!]]}})) change_screen(screen_conversation({{lenore_portrait, [[i'll see you at the library for viewing the festival!]]}}))

@ -2,15 +2,15 @@ function script_library(s)
if s.main == 1 or s.main == 2 or s.main == 3 then if s.main == 1 or s.main == 2 or s.main == 3 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{librarian_portrait, [[hey phoebe. looking for any book in particular today?]]}, {librarian_portrait, [[hey phoebe. looking for any book in particular today?]]},
{phoebe_portrait, [[just browsing!]]} {ph_p, [[just browsing!]]}
})) }))
elseif s.main == 4 then elseif s.main == 4 then
if not s.got_gunpowder_book then if not s.got_gunpowder_book then
change_screen(screen_conversation({ change_screen(screen_conversation({
{librarian_portrait, [[explosives, huh. well, this might help you out?]]}, {librarian_portrait, [[explosives, huh. well, this might help you out?]]},
{phoebe_portrait, [[oh, a chemistry manual? hmm... black powder...]]}, {ph_p, [[oh, a chemistry manual? hmm... black powder...]]},
{phoebe_portrait, [[and i could... yes, i think i can use this to make gunpowder! maybe more!]]}, {ph_p, [[and i could... yes, i think i can use this to make gunpowder! maybe more!]]},
{phoebe_portrait, [[thank you so much stef!!!]]} {ph_p, [[thank you so much stef!!!]]}
})) }))
add(grimoire, library.recipes.gunpowder) add(grimoire, library.recipes.gunpowder)
add(grimoire, library.recipes.bomb) add(grimoire, library.recipes.bomb)
@ -19,35 +19,35 @@ function script_library(s)
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{librarian_portrait, [[did that book help?]]}, {librarian_portrait, [[did that book help?]]},
{phoebe_portrait, [[you betcha!]]} {ph_p, [[you betcha!]]}
})) }))
end end
elseif s.main == 5 then elseif s.main == 5 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{librarian_portrait, [[hey phoebe. looking for any book in particular today?]]}, {librarian_portrait, [[hey phoebe. looking for any book in particular today?]]},
{phoebe_portrait, [[just browsing!]]} {ph_p, [[just browsing!]]}
})) }))
elseif s.main == 6 then elseif s.main == 6 then
if not s.got_crystal_book then if not s.got_crystal_book then
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, [[stef! i need books about gems! how to make them!]]}, {ph_p, [[stef! i need books about gems! how to make them!]]},
{librarian_portrait, [[gems, huh? let me check...]]}, {librarian_portrait, [[gems, huh? let me check...]]},
{librarian_portrait, [[here, does this help?]]}, {librarian_portrait, [[here, does this help?]]},
{phoebe_portrait, [[yes, this is perfect! let's see...]]}, {ph_p, [[yes, this is perfect! let's see...]]},
{phoebe_portrait, "hmm..."}, {ph_p, "hmm..."},
{phoebe_portrait, "hmm... \nhmm..."}, {ph_p, "hmm... \nhmm..."},
{phoebe_portrait, "hmm... \nhmm... \nhmm..."}, {ph_p, "hmm... \nhmm... \nhmm..."},
{phoebe_portrait, [[okay so i need raw crystal, polishing powder, and reagent.]], function() {ph_p, [[okay so i need raw crystal, polishing powder, and reagent.]], function()
add(grimoire, library.recipes.polishing_powder) add(grimoire, library.recipes.polishing_powder)
add(grimoire, library.recipes.starshine_gem) add(grimoire, library.recipes.starshine_gem)
toast("received recipes!") toast("received recipes!")
end}, end},
{phoebe_portrait, "i can get crystal from the cliffs and sand from the beach!"}, {ph_p, "i can get crystal from the cliffs and sand from the beach!"},
})) }))
s.got_crystal_book = true s.got_crystal_book = true
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "thanks for the book, stef!"}, {ph_p, "thanks for the book, stef!"},
{librarian_portrait, [[that's my job!]]}, {librarian_portrait, [[that's my job!]]},
})) }))
end end
@ -60,20 +60,21 @@ function script_library(s)
{librarian_portrait, [[a fireworks festival after all, huh?]]}, {librarian_portrait, [[a fireworks festival after all, huh?]]},
{neighbor_portrait, [[i thought it was done for after the alchemist passed away, rest his soul.]]}, {neighbor_portrait, [[i thought it was done for after the alchemist passed away, rest his soul.]]},
{seller_portrait, [[well it looks like phoebe took up the reins!]]}, {seller_portrait, [[well it looks like phoebe took up the reins!]]},
{phoebe_portrait, [[aw shucks!]]}, {ph_p, [[aw shucks!]]},
{lenore_portrait, [[thanks for making this happen, lil alchemist.]]}, {lenore_portrait, [[thanks for making this happen, lil alchemist.]]},
{neighbor_portrait, [[thanks, phoebe!]]}, {neighbor_portrait, [[thanks, phoebe!]]},
{seller_portrait, [[thanks, phoebe.]]}, {seller_portrait, [[thanks, phoebe.]]},
{phoebe_portrait, [[thank you all for helping so much. i couldn't have done it without you.]]}, {ph_p, [[thank you all for helping so much. i couldn't have done it without you.]]},
}, nil, {update=fireworks_update, draw=fireworks_draw})) }, nil, {update=fireworks_update, draw=fireworks_draw}))
s.main = 9
screen_walkaround = {update=fireworks_update, draw=fireworks_draw} screen_walkaround = {update=fireworks_update, draw=fireworks_draw}
screen_workbench = screen_conversation({ screen_workbench = screen_conversation({
{phoebe_portrait, "thank you for completing atelier phoebe!"}, {ph_p, "thank you for completing atelier phoebe!"},
{phoebe_portrait, "this was a labor of love and bafflement."}, {ph_p, "this was a labor of love and bafflement."},
{phoebe_portrait, "why did i make an atelier fangame in pico-8? i dunno."}, {ph_p, "why did i make an atelier fangame in pico-8? i dunno."},
{phoebe_portrait, "but i hope you enjoyed it! you can find me online as shoofle."}, {ph_p, "but i hope you enjoyed it! you can find me online as shoofle."},
{phoebe_portrait, "lately i spend my time @shoofle\n@beach.city."}, {ph_p, "lately i spend my time @shoofle\n@beach.city."},
{phoebe_portrait, "gimme a shout if you enjoyed atelier phoebe!"}, {ph_p, "gimme a shout if you enjoyed atelier phoebe!"},
}, },
function() function()
screen_workbench = {update=bench_update, draw=bench_draw} screen_workbench = {update=bench_update, draw=bench_draw}

@ -8,18 +8,18 @@ function script_neighbor(s)
change_screen(screen_conversation({{door_portrait, "[you hear the sound of groaning from inside.]"}})) change_screen(screen_conversation({{door_portrait, "[you hear the sound of groaning from inside.]"}}))
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, [[hello! i was asked to bring you a potion!]]}, {ph_p, [[hello! i was asked to bring you a potion!]]},
{neighbor_portrait, [[that's so kind! i injured my back trying to get a rock out]]}, {neighbor_portrait, [[that's so kind! i injured my back trying to get a rock out]]},
{neighbor_portrait, [[of my field. this potion will fix me right up.]]}, {neighbor_portrait, [[of my field. this potion will fix me right up.]]},
{neighbor_portrait, "i'm brigitte, by the way."}, {neighbor_portrait, "i'm brigitte, by the way."},
{neighbor_portrait, [[... hey, you're an alchemist, right?]]}, {neighbor_portrait, [[... hey, you're an alchemist, right?]]},
{phoebe_portrait, [[of course!]]}, {ph_p, [[of course!]]},
{neighbor_portrait, [[i've heard that alchemists can make explosives. a bomb could get rid of]]}, {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?]]}, {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,]]}, {ph_p, [[my grandfather never taught me to make explosives,]]},
{phoebe_portrait, "because they're dangerous."}, {ph_p, "because they're dangerous."},
{neighbor_portrait, [[damn. maybe the witch knows how to make them? she knows all sorts of things.]]}, {neighbor_portrait, [[damn. maybe the witch knows how to make them? she knows all sorts of things.]]},
{phoebe_portrait, [[i'll have to ask!]]}, {ph_p, [[i'll have to ask!]]},
{neighbor_portrait, [[she lives in the tower southeast of town, i think!]]}, {neighbor_portrait, [[she lives in the tower southeast of town, i think!]]},
})) }))
del(inventory, potion) del(inventory, potion)
@ -28,23 +28,23 @@ function script_neighbor(s)
elseif s.main == 3 then elseif s.main == 3 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{neighbor_portrait, [[did the witch give you the recipe?]]}, {neighbor_portrait, [[did the witch give you the recipe?]]},
{phoebe_portrait, [[not yet!]]} {ph_p, [[not yet!]]}
})) }))
elseif s.main == 4 then elseif s.main == 4 then
local bomb = player_has("bomb") local bomb = player_has("bomb")
if bomb == nil then if bomb == nil then
change_screen(screen_conversation({ change_screen(screen_conversation({
{neighbor_portrait, [[did the witch give you the recipe?]]}, {neighbor_portrait, [[did the witch give you the recipe?]]},
{phoebe_portrait, [[no and actually she was really rude about it!]]}, {ph_p, [[no and actually she was really rude about it!]]},
})) }))
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, [[this bomb should break up a rock! be very safe with it.]]}, {ph_p, [[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, [[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?]]}, {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!]]}, {ph_p, [[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.]]}, {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.]]}, {ph_p, [[she kept talking about how there's no great alchemy left in pilton.]]},
{neighbor_portrait, [[maybe she needs someone to impress her.]]} {neighbor_portrait, [[maybe she needs someone to impress her.]]}
})) }))
del(inventory, bomb) del(inventory, bomb)
@ -53,26 +53,29 @@ function script_neighbor(s)
elseif s.main == 5 then elseif s.main == 5 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{neighbor_portrait, [[that witch soften up yet?]]}, {neighbor_portrait, [[that witch soften up yet?]]},
{phoebe_portrait, [[grrrr!]]} {ph_p, [[grrrr!]]}
})) }))
elseif s.main == 6 then elseif s.main == 6 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{neighbor_portrait, [[that bomb worked a treat on my boulder!]]}, {neighbor_portrait, [[that bomb worked a treat on my boulder!]]},
{phoebe_portrait, [[hooray!]]} {ph_p, [[hooray!]]}
})) }))
elseif s.main == 7 then elseif s.main == 7 then
if s.branch_brigitte == 1 then if s.branch_brigitte == 1 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{neighbor_portrait, [[the fireworks festival? on my farm? you betcha!]]}, {neighbor_portrait, [[the fireworks festival? on my farm? you betcha!]]},
{neighbor_portrait, [[since harvest is over it's totally free.]]}, {neighbor_portrait, [[since harvest is over it's totally free.]]},
{phoebe_portrait, [[yippee!]]}, {ph_p, [[yippee!]]},
})) }))
s.branch_brigitte = 2 s.branch_brigitte = 2
if s.branch_brigitte == 2 and s.branch_lenore == 3 and s.branch_hans == 3 then if s.branch_brigitte == 2 and s.branch_lenore == 3 and s.branch_hans == 3 then
s.branch_main = 8 s.main = 8
end end
elseif s.branch_brigitte == 2 then elseif s.branch_brigitte == 2 then
change_screen(screen_conversation({{neighbor_portrait, [[meet up at the library for viewing, right?]]}})) change_screen(screen_conversation({{neighbor_portrait, [[meet up at the library for viewing, right?]]}}))
if s.branch_brigitte == 2 and s.branch_lenore == 3 and s.branch_hans == 3 then
s.main = 8
end
end end
elseif s.main == 8 then elseif s.main == 8 then
change_screen(screen_conversation({{neighbor_portrait, [[meetchya at the library for watching the fireworks!]]}})) change_screen(screen_conversation({{neighbor_portrait, [[meetchya at the library for watching the fireworks!]]}}))

@ -3,7 +3,7 @@ function script_witch(s)
change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}})) change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}}))
elseif s.main == 3 then elseif s.main == 3 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "excuse me! i would like to know how to make explosives!"}, {ph_p, "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, [[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, [[try as you might, phoebe, you aren't your grandfather.]]},
{witch_portrait, [[this town is a husk of what it once was. ]]}, {witch_portrait, [[this town is a husk of what it once was. ]]},
@ -13,23 +13,23 @@ function script_witch(s)
sfx(4) sfx(4)
end}, end},
{door_portrait, "i have no time for this."}, {door_portrait, "i have no time for this."},
{phoebe_portrait, "... huh!"}, {ph_p, "... huh!"},
})) }))
s.main = 4 s.main = 4
elseif s.main == 4 then elseif s.main == 4 then
change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}})) change_screen(screen_conversation({{door_portrait, "[there is no answer to your knocking.]"}}))
elseif s.main == 5 then elseif s.main == 5 then
change_screen(screen_conversation({ change_screen(screen_conversation({
{phoebe_portrait, "hey! witch!"}, {ph_p, "hey! witch!"},
{door_portrait, "my name is agnes."}, {door_portrait, "my name is agnes."},
{phoebe_portrait, "i figured out how to make gunpowder. suck on that."}, {ph_p, "i figured out how to make gunpowder. suck on that."},
{witch_portrait, "big whoop. you still know nothing."}, {witch_portrait, "big whoop. you still know nothing."},
{witch_portrait, "no one in this town knows the art of alchemy."}, {witch_portrait, "no one in this town knows the art of alchemy."},
{phoebe_portrait, "there's you! you know it!"}, {ph_p, "there's you! you know it!"},
{witch_portrait, "pah. no one of your generation knows the ways."}, {witch_portrait, "pah. no one of your generation knows the ways."},
{phoebe_portrait, "well maybe if someone would teach us-"}, {ph_p, "well maybe if someone would teach us-"},
{witch_portrait, "maybe if you showed any promise i could teach you."}, {witch_portrait, "maybe if you showed any promise i could teach you."},
{phoebe_portrait, "grrrr, you old hag!"}, {ph_p, "grrrr, you old hag!"},
{witch_portrait, "hm."}, {witch_portrait, "hm."},
{witch_portrait, "..."}, {witch_portrait, "..."},
{witch_portrait, "bring me a starshine gem. it must carry the red and shiny traits."}, {witch_portrait, "bring me a starshine gem. it must carry the red and shiny traits."},
@ -57,10 +57,10 @@ time!
})) }))
else else
change_screen(screen_conversation({ change_screen(screen_conversation({
{witch_portrait, "hm. this is... passable. i will help you."}, {witch_portrait, "hm. this is... passable. i will help you. keep the gem."},
{witch_portrait, "my bones are too tired to keep up this fight."}, {witch_portrait, "my bones are too tired to keep up this fight."},
{witch_portrait, "i can teach you to make fireworks."}, {witch_portrait, "i will teach you to make fireworks."},
{phoebe_portrait, "fireworks! the festival?!"}, {ph_p, "fireworks! the festival?!"},
{witch_portrait, "a festival is more than just a box of fireworks."}, {witch_portrait, "a festival is more than just a box of fireworks."},
{witch_portrait, "hm. this is a bad idea.", function() {witch_portrait, "hm. this is a bad idea.", function()
sfx(4) sfx(4)
@ -68,18 +68,18 @@ time!
toast("received recipe!") toast("received recipe!")
end}, end},
{door_portrait, "hm. this is a bad idea."}, {door_portrait, "hm. this is a bad idea."},
{phoebe_portrait, "wow, she's so awful!"}, {ph_p, "wow, she's so awful!"},
{door_portrait, "i can hear you out there."}, {door_portrait, "i can hear you out there."},
{phoebe_portrait, "keep it down, i'm thinking."}, {ph_p, "keep it down, i'm thinking."},
{phoebe_portrait, "a fireworks festival! that would be so incredible!"}, {ph_p, "a fireworks festival! that would be so incredible!"},
{phoebe_portrait, "but she's right. i'll have to call in favors."}, {ph_p, "but she's right. i'll have to call in favors."},
{phoebe_portrait, "hans the charcoal seller used to run the show itself."}, {ph_p, "hans the charcoal seller used to run the show itself."},
{phoebe_portrait, "i have to talk to lenore about safety."}, {ph_p, "i have to talk to lenore about safety."},
{phoebe_portrait, "and i should ask brigitte if we can use her farm!"}, {ph_p, "and i should ask brigitte if we can use her farm!"},
})) }))
s.main = 7 s.main = 7
end end
elseif s.main == 8 or s.main == 9 then elseif s.main == 8 or s.main == 9 then
change_screen(screen_conversation({witch_portrait, "thank you."})) change_screen(screen_conversation({{witch_portrait, "thank you."}}))
end end
end end

@ -58,32 +58,29 @@ function player_has(requirement, count, traits)
return nil return nil
end end
function make_item(blueprint) function make_item(bp)
--if blueprint.description == nil then --if bp.description == nil then
-- blueprint = library.item_blueprints[blueprint] -- bp = library.i_bps[bp]
--end --end
item = deepcopy(blueprint) local i = deepcopy(bp)
item.quality = flr(blueprint.quality_base + rnd(blueprint.quality_range)) i.quality = flr(bp.quality_base + rnd(bp.quality_range))
if blueprint.tags then item.tags = deepcopy(blueprint.tags) if bp.tags then i.tags = deepcopy(bp.tags)
else item.tags = {} end else i.tags = {} end
item.traits = {} i.traits = {}
if rnd(100) < blueprint.trait_chance then if rnd(100) < bp.trait_chance then
add(item.traits, rnd(blueprint.trait_pool)) add(i.traits, rnd(bp.trait_pool))
end end
if rnd(100) < blueprint.trait_chance then if rnd(100) < bp.trait_chance then
local t = rnd(blueprint.trait_pool) local t = rnd(bp.trait_pool)
if not contains(item.traits, t) then add(item.traits, t) end if not contains(i.traits, t) then add(i.traits, t) end
end end
return item return i
end end
function at(trait, x,y) function at(trait, x,y)
if (x < 0) return false if x < 0 or x >= trait[4] or y < 0 or y >= trait[5] then return false end
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 return mget(trait[2]+x, trait[3]+y) ~= 0
end end
@ -108,34 +105,32 @@ end
function change_screen(new_screen) function change_screen(new_screen)
prev_screen = current_screen prev_screen = current_screen
if new_screen.before ~= nil then if new_screen.before ~= nil then new_screen.before() end
new_screen.before()
end
current_screen = new_screen current_screen = new_screen
end end
-- add newlines to a string to fit it into lines. -- add newlines to a string to fit it into lines.
function wrap(str, line_length) 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 -- thanks to https://stackoverflow.com/questions/17586/best-word-wrap-algorithm, i did not feel like thinking this out myself
words = split(str, " ", false) local words = split(str, " ", false)
output = "" local output = ""
local current_line_length = 0 local c = 0
for w in all(words) do for w in all(words) do
while sub(w, 1, 1) == "\n" do while sub(w, 1, 1) == "\n" do
output = output .. "\n" output = output .. "\n"
current_line_length = 0 c = 0
w = sub(w, 2) w = sub(w, 2)
end end
if current_line_length + #w > line_length then if c + #w > line_length then
if current_line_length > 0 then if c > 0 then
output = output .. "\n" output = output .. "\n"
current_line_length = 0 c = 0
end end
end end
output = output .. w .. " " output = output .. w .. " "
current_line_length += #w + 1 c += #w + 1
end end
return output return output
end end

Loading…
Cancel
Save