Skip to content

Commit 8bdc26f

Browse files
committed
Set up musical notes and rests
1 parent 3c26e8e commit 8bdc26f

25 files changed

+229
-124
lines changed

assets/config/actor.ron

+18-48
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,10 @@
1616
],
1717
),
1818

19-
movement: Movement(
20-
speed: 80.0,
21-
),
22-
// TODO: Does this still work or does it get overwritten?
23-
attack: Attack(
24-
power: 2,
25-
force: 4,
26-
color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000)),
27-
),
28-
health: Health(
29-
max: 100,
30-
current: 100,
31-
),
32-
deck: Deck(
33-
cards: ["step", "pair"],
34-
),
19+
movement: Movement(speed: 80.0),
20+
attack: Attack(color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000))),
21+
health: Health(max: 100, current: 100),
22+
deck: Deck(cards: ["step", "pair"]),
3523
),
3624
},
3725

@@ -52,15 +40,13 @@
5240
],
5341
),
5442

55-
attack: Attack(
56-
color: Srgba(Srgba(red: 0.929, green: 0.557, blue: 0.576, alpha: 1.000)),
57-
),
58-
deck: Deck(
59-
cards: ["step", "step", "pair"],
60-
),
43+
attack: Attack(color: Srgba(Srgba(red: 0.929, green: 0.557, blue: 0.576, alpha: 1.000))),
44+
deck: Deck(cards: ["step", "step", "pair"]),
6145
),
6246

63-
"pink": Actor(
47+
// TODO: If character select screen is implemented, uncomment this and include logic to
48+
// avoid spawning enemies that look like the player (aka same key).
49+
/*"pink": Actor(
6450
name: "Linus",
6551
6652
texture: "image/actor/pink.png",
@@ -76,13 +62,9 @@
7662
],
7763
),
7864
79-
attack: Attack(
80-
color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000)),
81-
),
82-
deck: Deck(
83-
cards: ["step", "pair", "pair"],
84-
),
85-
),
65+
attack: Attack(color: Srgba(Srgba(red: 0.855, green: 0.576, blue: 0.800, alpha: 1.000))),
66+
deck: Deck(cards: ["step", "pair", "pair"]),
67+
),*/
8668

8769
"green": Actor(
8870
name: "Jade",
@@ -100,12 +82,8 @@
10082
],
10183
),
10284

103-
attack: Attack(
104-
color: Srgba(Srgba(red: 0.557, green: 0.722, blue: 0.518, alpha: 1.000)),
105-
),
106-
deck: Deck(
107-
cards: ["pair"],
108-
),
85+
attack: Attack(color: Srgba(Srgba(red: 0.557, green: 0.722, blue: 0.518, alpha: 1.000))),
86+
deck: Deck(cards: ["pair"]),
10987
),
11088

11189
"blue": Actor(
@@ -124,12 +102,8 @@
124102
],
125103
),
126104

127-
attack: Attack(
128-
color: Srgba(Srgba(red: 0.424, green: 0.694, blue: 0.725, alpha: 1.000)),
129-
),
130-
deck: Deck(
131-
cards: ["step", "pair"],
132-
),
105+
attack: Attack(color: Srgba(Srgba(red: 0.424, green: 0.694, blue: 0.725, alpha: 1.000))),
106+
deck: Deck(cards: ["step", "pair"]),
133107
),
134108

135109
"purple": Actor(
@@ -148,12 +122,8 @@
148122
],
149123
),
150124

151-
attack: Attack(
152-
color: Srgba(Srgba(red: 0.694, green: 0.529, blue: 0.788, alpha: 1.000)),
153-
),
154-
deck: Deck(
155-
cards: ["step"],
156-
),
125+
attack: Attack(color: Srgba(Srgba(red: 0.694, green: 0.529, blue: 0.788, alpha: 1.000))),
126+
deck: Deck(cards: ["step"]),
157127
),
158128
},
159129
)

assets/config/card.ron

+128-26
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,32 @@
4040
),
4141
},
4242
card_icon_map: {
43-
// TODO: Long-duration notes are stronger versions of short-duration notes (more damage and knockback, maybe less speed).
43+
"step": CardIcon(texture: "image/card/icon/step.png"),
44+
"splits": CardIcon(texture: "image/card/icon/splits.png"),
45+
"ballet": CardIcon(texture: "image/card/icon/ballet.png"),
46+
"moonwalk": CardIcon(texture: "image/card/icon/moonwalk.png"),
47+
"cartwheel": CardIcon(texture: "image/card/icon/cartwheel.png"),
48+
4449
"eighth_note": CardIcon(texture: "image/card/icon/eighth_note.png"),
45-
//"quarter_note": CardIcon(texture: "image/card/icon/quarter_note.png"),
46-
//"half_note": CardIcon(texture: "image/card/icon/half_note.png"),
47-
//"whole_note": CardIcon(texture: "image/card/icon/whole_note.png"),
50+
"quarter_note": CardIcon(texture: "image/card/icon/quarter_note.png"),
51+
"half_note": CardIcon(texture: "image/card/icon/half_note.png"),
52+
"whole_note": CardIcon(texture: "image/card/icon/whole_note.png"),
4853
"pair": CardIcon(texture: "image/card/icon/pair.png"),
49-
"major_chord": CardIcon(texture: "image/card/icon/major_chord.png"),
50-
"cluster_chord": CardIcon(texture: "image/card/icon/cluster_chord.png"),
51-
"rest": CardIcon(texture: "image/card/icon/rest.png"),
54+
//"triplet": CardIcon(texture: "image/card/icon/triplet.png"),
55+
"chord": CardIcon(texture: "image/card/icon/chord.png"),
56+
"cluster": CardIcon(texture: "image/card/icon/cluster.png"),
57+
58+
"eighth_rest": CardIcon(texture: "image/card/icon/eighth_rest.png"),
59+
"quarter_rest": CardIcon(texture: "image/card/icon/quarter_rest.png"),
60+
"half_rest": CardIcon(texture: "image/card/icon/half_rest.png"),
61+
"whole_rest": CardIcon(texture: "image/card/icon/whole_rest.png"),
62+
5263
"sharp_flat": CardIcon(texture: "image/card/icon/sharp_flat.png"),
5364
"natural": CardIcon(texture: "image/card/icon/natural.png"),
5465
"fermata": CardIcon(texture: "image/card/icon/fermata.png"),
5566
"bass_clef": CardIcon(texture: "image/card/icon/bass_clef.png"),
56-
57-
"step": CardIcon(texture: "image/card/icon/step.png"),
58-
"splits": CardIcon(texture: "image/card/icon/splits.png"),
59-
"ballet": CardIcon(texture: "image/card/icon/ballet.png"),
60-
"moonwalk": CardIcon(texture: "image/card/icon/moonwalk.png"),
6167
},
68+
// TODO: Write descriptions.
6269
card_map: {
6370
"step": Card(
6471
name: "Basic Step",
@@ -69,47 +76,142 @@
6976
// TODO: "Movement card" sfx.
7077
play_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
7178
action: Step,
72-
action_config: CardActionConfig(
79+
action_modifier: CardActionModifier(
7380
remove_on_beat: 8,
7481
),
7582
),
76-
"splits": Card(
83+
/*"splits": Card(
7784
name: "Splits",
7885
description: "Split in two!",
7986
background: "blue",
8087
icon: "splits",
8188
8289
// TODO: "Movement card" sfx.
8390
play_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
84-
action_config: CardActionConfig(
91+
action_modifier: CardActionModifier(
8592
remove_on_beat: 16,
8693
),
94+
),*/
95+
// TODO: Add other movement cards.
96+
97+
"eighth_note": Card(
98+
name: "Eighth Note",
99+
description: "",
100+
background: "pink",
101+
icon: "eighth_note",
102+
103+
action: Attack,
104+
action_modifier: CardActionModifier(
105+
remove_on_beat: 0,
106+
attack: Attack(projectile: Some("eighth_note")),
107+
),
108+
),
109+
"quarter_note": Card(
110+
name: "Quarter Note",
111+
description: "",
112+
background: "pink",
113+
icon: "quarter_note",
114+
115+
action: Attack,
116+
action_modifier: CardActionModifier(
117+
remove_on_beat: 0,
118+
attack: Attack(projectile: Some("quarter_note")),
119+
),
120+
),
121+
"half_note": Card(
122+
name: "Half Note",
123+
description: "",
124+
background: "pink",
125+
icon: "half_note",
126+
127+
action: Attack,
128+
action_modifier: CardActionModifier(
129+
remove_on_beat: 0,
130+
attack: Attack(projectile: Some("half_note")),
131+
),
132+
),
133+
"whole_note": Card(
134+
name: "Whole Note",
135+
description: "",
136+
background: "pink",
137+
icon: "whole_note",
138+
139+
action: Attack,
140+
action_modifier: CardActionModifier(
141+
remove_on_beat: 0,
142+
attack: Attack(projectile: Some("whole_note")),
143+
),
87144
),
88145
"pair": Card(
89146
name: "Pair",
90147
description: "Two beats, rapid fire!",
91148
background: "pink",
92149
icon: "pair",
93150

94-
action: DoubleBeat,
95-
action_config: CardActionConfig(
151+
action: Attack,
152+
action_modifier: CardActionModifier(
96153
remove_on_beat: 4,
97-
attack: Attack (
98-
power: 2.0,
99-
force: 4.0,
100-
projectile: Some("quarter_note"),
101-
),
154+
attack: Attack(projectile: Some("eighth_note")),
102155
),
103156
),
104-
"major_chord": Card(
157+
/*"major_chord": Card(
105158
name: "Major Chord",
106-
description: "Notes that move apart synchronously",
159+
description: "",
160+
background: "pink",
161+
icon: "chord",
162+
163+
action_modifier: CardActionModifier(
164+
remove_on_beat: 16,
165+
attack: Attack(projectile: Some("eighth_note")),
166+
),
167+
),
168+
"cluster_chord": Card(
169+
name: "Cluster Chord",
170+
description: "",
107171
background: "pink",
108-
icon: "major_chord",
172+
icon: "chord",
109173
110-
action_config: CardActionConfig(
174+
action_modifier: CardActionModifier(
111175
remove_on_beat: 16,
176+
attack: Attack(projectile: Some("whole_note")),
112177
),
178+
),*/
179+
180+
"eighth_rest": Card(
181+
name: "Eighth Rest",
182+
description: "Heal a little bit",
183+
background: "green",
184+
icon: "eighth_rest",
185+
186+
action: Heal,
187+
action_modifier: CardActionModifier(heal_flat: 5),
188+
),
189+
"quarter_rest": Card(
190+
name: "Quarter Rest",
191+
description: "Heal 25% health",
192+
background: "green",
193+
icon: "quarter_rest",
194+
195+
action: Heal,
196+
action_modifier: CardActionModifier(heal_percent: 25),
197+
),
198+
"half_rest": Card(
199+
name: "Half Rest",
200+
description: "Heal 50% health",
201+
background: "green",
202+
icon: "half_rest",
203+
204+
action: Heal,
205+
action_modifier: CardActionModifier(heal_percent: 50),
206+
),
207+
"whole_rest": Card(
208+
name: "Whole Rest",
209+
description: "Heal 100% health",
210+
background: "green",
211+
icon: "whole_rest",
212+
213+
action: Heal,
214+
action_modifier: CardActionModifier(heal_percent: 100),
113215
),
114216
}
115217
)

assets/config/projectile.ron

+34-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
(
2+
// TODO: Tune stats for each projectile.
23
projectiles: {
4+
"eighth_note": Projectile(
5+
name: "Eighth Note",
6+
7+
texture: "image/projectile/eighth_note.png",
8+
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
9+
spawn_sfx_volume: 0.5,
10+
11+
lifetime: 1,
12+
radius: 3.0,
13+
speed: 20.0,
14+
damage: 2.0,
15+
knockback: 0.5,
16+
),
317
"quarter_note": Projectile(
418
name: "Quarter Note",
519

@@ -13,18 +27,31 @@
1327
damage: 2.0,
1428
knockback: 0.5,
1529
),
16-
"double_beat": Projectile(
17-
name: "Double Beat",
30+
"half_note": Projectile(
31+
name: "Half Note",
1832

19-
texture: "image/projectile/quarter_note.png",
33+
texture: "image/projectile/half_note.png",
2034
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
2135
spawn_sfx_volume: 0.5,
2236

23-
lifetime: 2,
37+
lifetime: 1,
2438
radius: 3.0,
25-
speed: 25.0,
26-
damage: 3.0,
27-
knockback: 0.6,
39+
speed: 20.0,
40+
damage: 2.0,
41+
knockback: 0.5,
42+
),
43+
"whole_note": Projectile(
44+
name: "Whole Note",
45+
46+
texture: "image/projectile/whole_note.png",
47+
spawn_sfx: "audio/sfx/Projectile Hits Enemy.ogg",
48+
spawn_sfx_volume: 0.5,
49+
50+
lifetime: 1,
51+
radius: 3.0,
52+
speed: 20.0,
53+
damage: 2.0,
54+
knockback: 0.5,
2855
),
2956
},
3057
)
168 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.
-158 Bytes
Binary file not shown.
125 Bytes
Loading

assets/image/card/icon/half_note.png

121 Bytes
Loading

assets/image/card/icon/half_rest.png

117 Bytes
Loading

assets/image/card/icon/icons.aseprite

580 Bytes
Binary file not shown.
123 Bytes
Loading
File renamed without changes.

assets/image/card/icon/whole_note.png

118 Bytes
Loading

assets/image/card/icon/whole_rest.png

119 Bytes
Loading
127 Bytes
Loading

assets/image/projectile/half_note.png

113 Bytes
Loading
476 Bytes
Binary file not shown.
-261 Bytes
Binary file not shown.
117 Bytes
Loading

0 commit comments

Comments
 (0)