-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
155 lines (111 loc) · 5.01 KB
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
-- Beta - to do list
-- Real Game To-Do (outdated)
--[[
music
--metropolis tower
--metro add npc
--interactibles event click
--NPC quizmaster
--relic ruins boss room
--save files: type password
-- log button was supposed to be adventure log and download save password
--trophy room metropolis: complete tasks like "be on save slot 4" or "walk up 100 times.
metropolis -- personality, einstein puzzles, sudoku, walk according to instructions
-- map where you can move in but not out?
post in every map - find in minigame
weird scroll map
minor bug fixings:
mesa volcano/alp cave 5 no scroll.
desert prevent statues from merging to each other.
]]--
--[[
Metro file list:
start with 1
1 - 1 = Has not been saved before, 2 = has been saved
2 - 1 = main house, 2 = spirit house
10 -
]]--
-- Capstone Game: Main Code
-- Load map data
require("mapdata")
require("maprender")
-- Load button controls
require("upcontrol")
require("leftcontrol")
require("rightcontrol")
require("downcontrol")
require("actcontrol")
require("actfunction")
require("menucontrol")
require("logcontrol")
require("textcontrol")
require("savecontrol")
require("savefunction")
-- Load functions
require("interactibles") -- interactibles data
require("mainfunction")
require("mapfunction")
require("textfunction")
-- Load battle phases
require("fightcontrol")
require("battleinterface")
-- Load interface
require("buttoninterface")
-- Introduction
update = false
title = display.newImageRect("Icon.png", 270, 270)
title.x = 160
title.y = 160
option1 = display.newText("> Play the entire story", 160, 345, 300, 30, native.systemFontBold, "left")
option1:addEventListener("tap", nextIntro1)
option2 = display.newText("> Choose stage to play", 160, 395, 300, 30, native.systemFontBold, "left")
option2:addEventListener("tap", gotonewInterface)
-- Test codes
--[[for i = 1, 100 do
print(native.getFontNames()[i])
end]]--
-- Create map
--redoMap(info[file].map.name, info[file].map.realname, info[file].map.subname, info[file].map.id, info[file].map.subid, info[file].posx, info[file].posy, info[file].centerx, info[file].centery, info[file].dir)
-- The start
--redoMap("Cave", "Crypt Cave", "Spawn Path", 1, 1, 12, 5, 12, 5, "Down")
--redoMap("Cave", "Crypt Cave", "Trial of Insight", 1, 2, 5, 1, 5, 5, "Down")
--redoMap("Cave", "Crypt Cave", "Trial of Courage", 1, 3, 8, 1, 5, 5)
--redoMap("Cave", "Crypt Cave", "Trial of Visage", 1, 4, 6, 1, 5, 5)
--redoMap("Cave", "Crypt Cave", "Trial of Tenacity", 1, 5, 8, 1, 5, 5, "Down")
--redoMap("Cave", "Crypt Cave", "Trial of Tenacity", 1, 5, 8, 8, 5, 5, "Down")
--redoMap("Town", "Municipality Town", "Town Square", 2, 1, 5, 5, 5, 5, "Down")
--After desert
--redoMap("Town", "Anarchic Town", "Town Square Ruins", 2, 2, 2, 6, 5, 5, "Down")
--redoMap("Town", "Municipality Town", "Warp House", 2, 16, 5, 5, 5, 5, "Down")
--redoMap("Plains", "Steppe Plains", "Steppe Land", 3, 1, 26, 50, 26, 47, "Down")
--redoMap("Temple", "Fane Temple", "First Floor", 4, 1, 5, 5, 5, 5, "Down")
--redoMap("Temple", "Fane Temple", "Room 1", 4, 2, 5, 9, 5, 5, "Down")
--redoMap("Temple", "Fane Temple", "Second Floor", 4, 6, 5, 9, 5, 5, "Down")
--redoMap("Temple", "Fane Temple", "Room 10", 4, 12, 8, 7, 8, 7, "Down")
--redoMap("Temple", "Fane Temple", "Boss Room", 4, 13, 5, 5, 5, 5, "Down")
--redoMap("Volcano", "Mesa Volcano", "Trophy Peak", 5, 10, 5, 9, 5, 5, "Down")
--redoMap("Volcano", "Mesa Volcano", "Cave 5", 5, 6, 18, 5, 18, 5, "Down")
--redoMap("Volcano", "Mesa Volcano", "Exterior", 5, 1, 10, 14, 10, 14, "Down")
--redoMap("Volcano", "Mesa Volcano", "Cave 5", 5, 6, 6, 5, 6, 5, "Down")
--redoMap("Desert", "Arid Desert", "Dessert's Lair", 6, 1, 5, 5, 5, 5, "Down")
--redoMap("Metropolis", "Metropolitan City", "Main Area", 7, 1, 8, 18, 8, 18, "Down")
-- After alp
--redoMap("Ruins", "Relic Ruins", "1F, South Sector", 9, 1, 5, 8, 5, 5, "Up")
--redoMap("Ruins", "Relic Ruins", "3F, South Sector", 9, 5, 5, 7, 5, 5, "Down")
--redoMap("Ruins", "Relic Ruins", "6F, South Sector", 9, 11, 5, 7, 5, 5, "Down")
-- after Ruins
--redoMap("Ruins", "Relic Ruins", "Boss Room", 9, 16, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Cave Room", 10, 1, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Plains Room", 10, 2, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Volcano Room", 10, 3, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Alp Room", 10, 4, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Ruins Room", 10, 5, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Temple Room", 10, 6, 5, 5, 5, 5, "Down")
--redoMap("Void", "Void", "Void Room", 10, 7, 9, 9, 5, 5, "Down")
--redoMap("Ruins", "Relic Ruins", "6F, South Sector", 9, 11, 5, 9, 5, 5, "Down")
--redoMap("Ruins", "Relic Ruins", "3F, North Sector", 9, 6, 5, 5, 5, 5, "Down")
--redoMap("Ruins", "Relic Ruins", "3F, South Sector", 9, 5, 5, 7, 5, 5, "Down")
--redoMap("Ruins", "Relic Ruins", "Boss Room", 9, 16, 5, 5, 5, 5, "Down")
--redoMap("Snow", "Mesa Alp", "Exterior", 8, 1, 25, 5, 25, 5, "Down")
--redoMap("Snow", "Mesa Alp", "Exterior", 8, 1, 38, 15, 38, 15, "Up")
--redoMap("Snow", "Mesa Alp", "Cave 2", 8, 3, 5, 5, 5, 5, "Down")