Skip to content

Commit 14d7212

Browse files
committed
Clean up
For now I think baseVal should multiple into effect. Have Miss return, so its easier to add OnMiss effect later. Hardcode Timing.Okay for now in on place effect hit.
1 parent e70fba9 commit 14d7212

6 files changed

Lines changed: 24 additions & 24 deletions

File tree

Globals/Scribe.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class Scribe : Node
2020
1,
2121
(director, note, timing) =>
2222
{
23-
director.Player.TakeDamage((3 - (int)timing) + note.GetBaseVal());
23+
director.Player.TakeDamage((3 - (int)timing) * note.GetBaseVal());
2424
}
2525
),
2626
new Note(
@@ -32,8 +32,9 @@ public partial class Scribe : Node
3232
1,
3333
(director, note, timing) =>
3434
{
35-
if (timing != Timing.Miss)
36-
director.Enemy.TakeDamage((int)timing + note.GetBaseVal());
35+
if (timing == Timing.Miss)
36+
return;
37+
director.Enemy.TakeDamage((int)timing * note.GetBaseVal());
3738
}
3839
),
3940
new Note(
@@ -42,11 +43,12 @@ public partial class Scribe : Node
4243
"Basic player note, deals double damage to enemy.",
4344
GD.Load<Texture2D>("res://Classes/Notes/assets/double_note.png"),
4445
null,
45-
1,
46+
2,
4647
(director, note, timing) =>
4748
{
48-
if (timing != Timing.Miss)
49-
director.Enemy.TakeDamage((2 * (int)timing) + note.GetBaseVal());
49+
if (timing == Timing.Miss)
50+
return;
51+
director.Enemy.TakeDamage(note.GetBaseVal() * (int)timing);
5052
}
5153
),
5254
new Note(
@@ -58,8 +60,9 @@ public partial class Scribe : Node
5860
1,
5961
(director, note, timing) =>
6062
{
61-
if (timing != Timing.Miss)
62-
director.Player.Heal((int)timing + note.GetBaseVal());
63+
if (timing == Timing.Miss)
64+
return;
65+
director.Player.Heal((int)timing * note.GetBaseVal());
6366
}
6467
),
6568
new Note(
@@ -71,11 +74,10 @@ public partial class Scribe : Node
7174
1,
7275
(director, note, timing) =>
7376
{
74-
if (timing != Timing.Miss)
75-
{
76-
director.Player.Heal((int)timing);
77-
director.Enemy.TakeDamage((int)timing + note.GetBaseVal());
78-
}
77+
if (timing == Timing.Miss)
78+
return;
79+
director.Player.Heal((int)timing * note.GetBaseVal());
80+
director.Enemy.TakeDamage((int)timing * note.GetBaseVal());
7981
}
8082
),
8183
new Note(
@@ -87,8 +89,9 @@ public partial class Scribe : Node
8789
1,
8890
(director, note, timing) =>
8991
{
90-
if (timing != Timing.Miss)
91-
director.Enemy.TakeDamage((int)timing + note.GetBaseVal());
92+
if (timing == Timing.Miss)
93+
return;
94+
director.Enemy.TakeDamage((int)timing + note.GetBaseVal());
9295
},
9396
0.25f
9497
),

project.godot

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ window/stretch/scale_mode="integer"
3737

3838
project/assembly_name="Funk Engine"
3939

40-
[game]
41-
42-
4340
[input]
4441

4542
ui_accept={

scenes/BattleDirector/scripts/BattleDirector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ private bool PlayerAddNote(ArrowType type, int beat)
4747
!CD.AddNoteToLane(
4848
type,
4949
beat % CM.BeatsPerLoop,
50-
NotePlacementBar.PlacedNote(this, Timing.Okay),
50+
NotePlacementBar.PlacedNote(this),
5151
false
5252
)
53-
)
53+
) //TODO: Remove passing BD into NPB
5454
return false;
5555
NotePlaced?.Invoke(this);
5656
return true;

scenes/BattleDirector/scripts/Conductor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public bool AddNoteToLane(ArrowType type, int beat, Note note, bool isActive = t
4545
{
4646
beat %= CM.BeatsPerLoop;
4747
Note newNote = note.Clone();
48-
if (beat == 0 || _laneData[(int)type][beat] != null)
48+
if (beat == 0 || _laneData[(int)type][beat] != null) //TODO: Double check if this is still necessary, doesn't seem to matter for player placed notes
4949
return false;
5050

5151
NoteArrow arrow;
52-
if (isActive) //Currently an enemy note.
52+
if (isActive) //Currently isActive means an enemy note.
5353
{
5454
arrow = CM.AddArrowToLane(type, beat, newNote);
5555
}

scenes/BattleDirector/scripts/NotePlacementBar.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ public void IncreaseCharge(int amount = 1)
184184
}
185185

186186
// Placing a note resets the note placement bar
187-
public Note PlacedNote(BattleDirector BD, Timing timing)
187+
public Note PlacedNote(BattleDirector BD)
188188
{
189189
_currentBarValue -= (int)(_currentNoteInstance.CostModifier * MaxValue);
190190

191191
UpdateNotePlacementBar(_currentBarValue);
192192
//fullBarParticles.Emitting = false;
193193

194194
Note placedNote = GetNote(Input.IsActionPressed("Secondary"));
195-
placedNote?.OnHit(BD, timing);
195+
placedNote?.OnHit(BD, Timing.Okay); //Hardcode for now, eventually the note itself could have its default
196196
return placedNote;
197197
}
198198

scenes/UI/assets/combobar.png

-411 Bytes
Loading

0 commit comments

Comments
 (0)