-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconstants.lua
More file actions
127 lines (110 loc) · 3.86 KB
/
Copy pathconstants.lua
File metadata and controls
127 lines (110 loc) · 3.86 KB
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
-- constants.lua
-- Centralized gameplay constants for easy tuning
local C = {}
-- Customer
C.CUSTOMER_SPEED = 60
C.CUSTOMER_MONEY = 3
C.CUSTOMER_SPAWN_INTERVAL = 6
-- Barack & Robot (new mechanics)
C.BARACK_COST = {
wood = 0,
stone = 0,
metal = 0
}
C.ROBOT_SPAWN_COST = {
wood = 1,
stone = 1,
metal = 1
}
C.ROBOT_SPEED = 60
C.ROBOT_SIZE = 16
-- Flag System (robot pathing/command)
C.FLAG_COMMAND_RADIUS = 25 -- How close a robot must be to a command flag to recognize and execute it
C.DIR_FLAG_DEFAULT_DISTANCE = 200 -- Default distance (in pixels) for direction flags ("arrow" flags)
-- Flag HP per type (flags are now destructible by enemies)
C.FLAG_HP = {
dir = 10,
chop_wood = 10,
collect_wood = 10,
splitter = 10,
build_something = 10,
-- Add more flag types and their HP values as needed.
}
-- Flag priorities: higher means higher precedence when multiple flags are within range.
C.FLAG_PRIORITIES = {
-- Directional flags (can further customize each if needed)
dir_up = 1,
dir_down = 1,
dir_left = 1,
dir_right = 1,
-- Command flags
chop_wood = 2,
collect_wood = 2,
build_something = 2,
splitter = 1
}
-- Enemy
C.ENEMY_SPEED = 80
C.ENEMY_HEALTH = 3
C.ENEMY_WAVE_SIZE = 5
-- Controls resources dropped when an enemy dies
-- Example: { {type = "coin", amount = 1}, {type = "wood", amount = 2} }
C.ENEMY_DEATH_DROPS = {}
-- Controls resources dropped when a robot self-destructs
-- Example: { {type = "coin", amount = 1}, {type = "wood", amount = 2} }
C.ROBOT_DEATH_DROPS = {}
C.ENEMY_RESOURCE_DROP = 0 -- deprecated; use ENEMY_DEATH_DROPS
C.ENEMY_MONEY_DROP = 1 -- deprecated; use ENEMY_DEATH_DROPS
C.ENEMY_TOWER_DAMAGE = 1
C.ENEMY_RESOURCE_DAMAGE = 1
-- Resources
C.RESOURCE_MAX_HP = {
wood = 5,
grass = 5,
stone = 5,
metal = 5
}
C.RESOURCE_RESPAWN_TIME = {
wood = 5,
grass = 7,
stone = 10,
metal = 15
}
-- Towers
C.TOWER_COST = {
charged = { coin = 1, wood = 2 },
auto = { wood = 1, grass = 2 }
}
C.TOWER_HP = 30
C.TOWER_RANGE = 64
C.TOWER_FIRE_RATE = 0.5
C.TOWER_RADIUS = 64
C.TOWER_DAMAGE = { wood = 1, grass = 2, stone = 3, metal = 4, coin = 10 }
C.MAX_CARRY = 10
C.CUSTOMER_EXCHANGES = {
{ want = 'wood', want_amount = 1, offer = 'coin', offer_amount = 2 },
{ want = 'coin', want_amount = 1, offer = 'wood', offer_amount = 1 },
{ want = 'stone', want_amount = 2, offer = 'coin', offer_amount = 1 },
{ want = 'coin', want_amount = 1, offer = 'stone', offer_amount = 2 },
{ want = 'metal', want_amount = 1, offer = 'coin', offer_amount = 3 },
{ want = 'coin', want_amount = 3, offer = 'metal', offer_amount = 1 },
{ want = 'grass', want_amount = 1, offer = 'coin', offer_amount = 1 },
{ want = 'coin', want_amount = 2, offer = 'wood', offer_amount = 1 },
{ want = 'coin', want_amount = 1, offer = 'stone', offer_amount = 1 },
{ want = 'coin', want_amount = 1, offer = 'metal', offer_amount = 1 },
{ want = 'coin', want_amount = 1, offer = 'grass', offer_amount = 1 },
{ want = 'wood', want_amount = 1, offer = 'stone', offer_amount = 2 },
{ want = 'stone', want_amount = 1, offer = 'wood', offer_amount = 1 },
{ want = 'wood', want_amount = 1, offer = 'stone', offer_amount = 1 },
{ want = 'metal', want_amount = 2, offer = 'grass', offer_amount = 2 },
{ want = 'grass', want_amount = 1, offer = 'metal', offer_amount = 1 },
}
-- Unified list of all resources (including coin as a true resource)
C.RESOURCE_TYPES = {
{ name = 'wood', color = { 0.545, 0.27, 0.074 }, shape = 'square' },
{ name = 'grass', color = { 0.133, 0.545, 0.133 }, shape = 'square' },
{ name = 'stone', color = { 0.47, 0.47, 0.47 }, shape = 'square' },
{ name = 'metal', color = { 0.75, 0.75, 0.75 }, shape = 'square' },
{ name = 'coin', color = { 1, 0.85, 0.2 }, shape = 'circle' },
}
return C