Skip to content

Commit 5e04b03

Browse files
authored
Merge pull request #78 from Project-Funk-Engine/RelicNJuice
Relic n juice
2 parents 31e6304 + beee83e commit 5e04b03

File tree

21 files changed

+323
-40
lines changed

21 files changed

+323
-40
lines changed

Classes/Notes/Note.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
* @class Note
77
* @brief Data structure class for holding data and methods for a battle time note. WIP
88
*/
9-
public partial class Note : Resource
9+
public partial class Note : Resource, IDisplayable
1010
{
1111
public PuppetTemplate Owner;
12-
public string Name;
12+
public string Name { get; set; }
1313
private int _baseVal;
1414
public float CostModifier { get; private set; }
1515
private Action<BattleDirector, Note, Timing> NoteEffect; //TODO: Where/How to deal with timing.
1616

17-
public string Tooltip;
18-
public Texture2D Texture;
17+
public string Tooltip { get; set; }
18+
public Texture2D Texture { get; set; }
1919

2020
public Note(
2121
string name,

Classes/Relics/RelicTemplate.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
using FunkEngine;
33
using Godot;
44

5-
public partial class RelicTemplate : Resource
5+
public partial class RelicTemplate : Resource, IDisplayable
66
{
77
public RelicEffect[] Effects;
8-
public string Name;
8+
public string Name { get; set; }
99

10-
public Texture2D Texture;
11-
public string Tooltip;
10+
public Texture2D Texture { get; set; }
11+
public string Tooltip { get; set; }
1212

1313
public RelicTemplate(
1414
string name = "",
772 Bytes
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://cqlrv1vra4mbn"
6+
path="res://.godot/imported/Auroboros.png-27bfe2114f3955a0f6ef5ceb4e65adbf.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://Classes/Relics/assets/Auroboros.png"
14+
dest_files=["res://.godot/imported/Auroboros.png-27bfe2114f3955a0f6ef5ceb4e65adbf.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
891 Bytes
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://ccd6pskxcwpxg"
6+
path="res://.godot/imported/Colorboros.png-56197d792c620150c773fb4ecce6289c.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://Classes/Relics/assets/Colorboros.png"
14+
dest_files=["res://.godot/imported/Colorboros.png-56197d792c620150c773fb4ecce6289c.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

Globals/FunkEngineNameSpace.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public enum BattleEffectTrigger
5050
NoteHit,
5151
SelfNoteHit,
5252
OnPickup,
53+
OnLoop,
5354
}
5455

5556
public enum Stages
@@ -191,3 +192,10 @@ public interface IBattleEvent
191192
void OnTrigger(BattleDirector BD);
192193
BattleEffectTrigger GetTrigger();
193194
}
195+
196+
public interface IDisplayable
197+
{
198+
string Name { get; set; }
199+
string Tooltip { get; set; }
200+
Texture2D Texture { get; set; }
201+
}

Globals/Scribe.cs

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public partial class Scribe : Node
103103
),
104104
new RelicTemplate(
105105
"Good Vibes",
106-
"Good vibes, heals the player whenever they place a note.", //TODO: Description can include the relics values?
106+
"Heals the player whenever they place a note.",
107107
GD.Load<Texture2D>("res://Classes/Relics/assets/relic_GoodVibes.png"),
108108
new RelicEffect[]
109109
{
@@ -117,14 +117,46 @@ public partial class Scribe : Node
117117
),
118118
}
119119
),
120+
new RelicTemplate(
121+
"Auroboros",
122+
"Bigger number, better person. Increases combo multiplier every riff.",
123+
GD.Load<Texture2D>("res://Classes/Relics/assets/Auroboros.png"),
124+
new RelicEffect[]
125+
{
126+
new RelicEffect(
127+
BattleEffectTrigger.OnLoop,
128+
1,
129+
(director, val) =>
130+
{
131+
director.NotePlacementBar.IncreaseBonusMult(val);
132+
}
133+
),
134+
}
135+
),
136+
new RelicTemplate(
137+
"Colorboros",
138+
"Taste the rainbow. Charges the freestyle bar every riff.",
139+
GD.Load<Texture2D>("res://Classes/Relics/assets/Colorboros.png"),
140+
new RelicEffect[]
141+
{
142+
new RelicEffect(
143+
BattleEffectTrigger.OnLoop,
144+
20,
145+
(director, val) =>
146+
{
147+
director.NotePlacementBar.IncreaseCharge(val);
148+
}
149+
),
150+
}
151+
),
120152
};
121153

122154
//TODO: Item pool(s)
123155

124156
public static RelicTemplate[] GetRandomRelics(RelicTemplate[] ownedRelics, int count)
125157
{
126158
var availableRelics = Scribe
127-
.RelicDictionary.Where(r => !ownedRelics.Any(o => o.Name == r.Name))
159+
.RelicDictionary.Where(r => ownedRelics.All(o => o.Name != r.Name))
128160
.ToArray();
129161

130162
availableRelics = availableRelics
@@ -139,4 +171,19 @@ public static RelicTemplate[] GetRandomRelics(RelicTemplate[] ownedRelics, int c
139171
}
140172
return availableRelics;
141173
}
174+
175+
public static Note[] GetRandomRewardNotes(int count)
176+
{
177+
var availableNotes = Scribe
178+
.NoteDictionary.Where(r => r.Name.Contains("Player")) //TODO: Classifications/pools
179+
.ToArray();
180+
181+
availableNotes = availableNotes
182+
.OrderBy(_ => StageProducer.GlobalRng.Randi())
183+
.Take(count)
184+
.Select(r => r.Clone())
185+
.ToArray();
186+
187+
return availableNotes;
188+
}
142189
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ Current team members include:
1515

1616
#### Attributions:
1717
First Song: <a href="https://freesound.org/people/Magntron/sounds/335571/" title="gameMusic">gameMusic by Magntron - freesound.org</a>
18-
Input buttons by <a href="https://thoseawesomeguys.com/prompts/" title="inputkeys">Nicolae (Xelu) Berbece</a>
18+
Input buttons by <a href="https://thoseawesomeguys.com/prompts/" title="inputkeys">Nicolae (Xelu) Berbece</a>

project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ project/assembly_name="Funk Engine"
3434

3535
[game]
3636

37-
input_scheme="QWERT"
37+
input_scheme="ARROWS"
3838

3939
[input]
4040

0 commit comments

Comments
 (0)