Skip to content

Commit d726b9c

Browse files
committed
Added LWS note effect
1 parent 95e9440 commit d726b9c

5 files changed

Lines changed: 70 additions & 10 deletions

File tree

Classes/Notes/Assets/Note_LWS.png

749 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://8f1e7sld42dm"
6+
path="res://.godot/imported/Note_LWS.png-99644fe1956962c91597c9de6bb97929.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://Classes/Notes/Assets/Note_LWS.png"
14+
dest_files=["res://.godot/imported/Note_LWS.png-99644fe1956962c91597c9de6bb97929.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/Scribe.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,19 @@ public partial class Scribe : Node
218218
director.AddStatus(Targetting.Player, StatusEffect.Poison, amt);
219219
}
220220
),
221+
new Note(
222+
16,
223+
"LWS",
224+
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_LWS.png"),
225+
1,
226+
(director, note, timing) =>
227+
{
228+
int dmg = (3 - (int)timing) * note.GetBaseVal() + (TimeKeeper.LastBeat.Loop / 2);
229+
if (timing == Timing.Perfect)
230+
dmg = 0;
231+
director.DealDamage(Targetting.Player, dmg, note.Owner);
232+
}
233+
),
221234
};
222235

223236
public static readonly RelicTemplate[] RelicDictionary = new[]

Scenes/Puppets/Enemies/LWS/LWS.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
public partial class LWS : EnemyPuppet
66
{
7-
public static new readonly string LoadPath = "res://Scenes/Puppets/Enemies/LWS/LWS.tscn";
7+
public static new readonly string LoadPath = "res://Scenes/Puppets/Enemies/LWS/P_LWS.tscn";
88

99
public override void _Ready()
1010
{
1111
MaxHealth = 150;
1212
CurrentHealth = MaxHealth;
1313
BaseMoney = 25;
14-
InitialNote = (10, 3);
14+
InitialNote = (16, 3);
1515
base._Ready();
1616
var enemyTween = CreateTween();
1717
enemyTween.TweenProperty(Sprite, "position", Vector2.Up * 5, 1f).AsRelative();
@@ -20,5 +20,18 @@ public override void _Ready()
2020
enemyTween.SetEase(Tween.EaseType.InOut);
2121
enemyTween.SetLoops();
2222
enemyTween.Play();
23+
24+
BattleEvents = new EnemyEffect[]
25+
{
26+
new EnemyEffect(
27+
this,
28+
BattleEffectTrigger.OnLoop,
29+
1,
30+
(e, eff, val) =>
31+
{
32+
e.BD.RandApplyNote(eff.Owner, InitialNote.NoteId, val);
33+
}
34+
),
35+
};
2336
}
2437
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[gd_scene load_steps=7 format=3 uid="uid://beww544cthrsj"]
22

3-
[ext_resource type="Script" uid="uid://baudb5v4ai8br" path="res://Scenes/Puppets/Enemies/LWS/LWS.cs" id="1_byrda"]
4-
[ext_resource type="PackedScene" uid="uid://bgomxovxs7sr8" path="res://Scenes/Puppets/HealthBar.tscn" id="2_1w5rt"]
5-
[ext_resource type="Texture2D" uid="uid://b1k6m2uj4o76x" path="res://Scenes/Puppets/Enemies/LWS/Assets/LWS.png" id="2_byrda"]
6-
[ext_resource type="PackedScene" uid="uid://cdoguwlxehbpg" path="res://Scenes/Puppets/StatusContainer.tscn" id="3_2lppd"]
3+
[ext_resource type="Script" uid="uid://baudb5v4ai8br" path="res://Scenes/Puppets/Enemies/LWS/LWS.cs" id="1_slsco"]
4+
[ext_resource type="Texture2D" uid="uid://b1k6m2uj4o76x" path="res://Scenes/Puppets/Enemies/LWS/Assets/LWS.png" id="2_iipdd"]
5+
[ext_resource type="PackedScene" uid="uid://bgomxovxs7sr8" path="res://Scenes/Puppets/HealthBar.tscn" id="3_3fwan"]
6+
[ext_resource type="PackedScene" uid="uid://cdoguwlxehbpg" path="res://Scenes/Puppets/StatusContainer.tscn" id="4_dslq0"]
77

88
[sub_resource type="Gradient" id="Gradient_hguc7"]
99
offsets = PackedFloat32Array(0.0227273, 1)
@@ -16,19 +16,19 @@ width = 100
1616
height = 18
1717

1818
[node name="EnemPuppet" type="Node2D" node_paths=PackedStringArray("HealthBar", "Sprite", "_statusContainer")]
19-
script = ExtResource("1_byrda")
19+
script = ExtResource("1_slsco")
2020
HealthBar = NodePath("ProgressBar")
2121
Sprite = NodePath("Sprite")
2222
_statusContainer = NodePath("StatusContainer")
2323

2424
[node name="Sprite" type="Sprite2D" parent="."]
25-
texture = ExtResource("2_byrda")
25+
texture = ExtResource("2_iipdd")
2626

27-
[node name="ProgressBar" parent="." instance=ExtResource("2_1w5rt")]
27+
[node name="ProgressBar" parent="." instance=ExtResource("3_3fwan")]
2828
offset_left = -50.0
2929
offset_top = 32.0
3030
offset_right = 52.0
3131
offset_bottom = 52.0
3232
texture_progress = SubResource("GradientTexture2D_545vi")
3333

34-
[node name="StatusContainer" parent="." instance=ExtResource("3_2lppd")]
34+
[node name="StatusContainer" parent="." instance=ExtResource("4_dslq0")]

0 commit comments

Comments
 (0)