Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Classes/Notes/Assets/Note_PlayerEcho.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Classes/Notes/Assets/Note_PlayerEcho.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c0bmoqj5tcu7s"
path="res://.godot/imported/Note_PlayerEcho.png-354cc7c059464dfdec108f0ac5e70a23.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/Notes/Assets/Note_PlayerEcho.png"
dest_files=["res://.godot/imported/Note_PlayerEcho.png-354cc7c059464dfdec108f0ac5e70a23.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added Classes/Notes/Assets/Note_PlayerExplosive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Classes/Notes/Assets/Note_PlayerExplosive.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dqjvpiccco782"
path="res://.godot/imported/Note_PlayerExplosive.png-bd13543a7e0a0d375fad8d7b336bb4a4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/Notes/Assets/Note_PlayerExplosive.png"
dest_files=["res://.godot/imported/Note_PlayerExplosive.png-bd13543a7e0a0d375fad8d7b336bb4a4.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added Classes/Notes/Assets/Note_PlayerPoison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Classes/Notes/Assets/Note_PlayerPoison.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://byhspof1urah8"
path="res://.godot/imported/Note_PlayerPoison.png-f7291f8fff7355d0a3d6fb23b9e61bba.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/Notes/Assets/Note_PlayerPoison.png"
dest_files=["res://.godot/imported/Note_PlayerPoison.png-f7291f8fff7355d0a3d6fb23b9e61bba.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
8 changes: 7 additions & 1 deletion Classes/Notes/Note.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public Note Clone()
Owner,
_baseVal,
NoteEffect,
CostModifier
CostModifier,
TargetType
);
return newNote;
}
Expand All @@ -74,4 +75,9 @@ public int GetBaseVal()
{
return _baseVal;
}

public void SetBaseVal(int val)
{
_baseVal = val;
}
}
34 changes: 34 additions & 0 deletions Classes/StatusEffects/Assets/Status_Mulligan.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bqhvrayjisv1"
path="res://.godot/imported/Status_Mulligan.png-c4ed3ce3cd1b732c83e1cbf8c1373367.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/StatusEffects/Assets/Status_Mulligan.png"
dest_files=["res://.godot/imported/Status_Mulligan.png-c4ed3ce3cd1b732c83e1cbf8c1373367.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added Classes/StatusEffects/Assets/Status_Poison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Classes/StatusEffects/Assets/Status_Poison.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dhoqrahjqxhpu"
path="res://.godot/imported/Status_Poison.png-1942ffb14b97018a45894d80c7758af4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Classes/StatusEffects/Assets/Status_Poison.png"
dest_files=["res://.godot/imported/Status_Poison.png-1942ffb14b97018a45894d80c7758af4.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
22 changes: 22 additions & 0 deletions Classes/StatusEffects/StatusEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ public partial class StatusEffect : TextureRect, IBattleEvent
GD.Load<Texture2D>("res://Classes/StatusEffects/Assets/Status_Mulligan.png")
)
.SetTags(true);

private static readonly Action<BattleEventArgs, StatusEffect> PoisonEffect = (e, self) =>
{
if (e is not BattleDirector.Harbinger.LoopEventArgs)
return;
if (self.Sufferer == null)
return;
self.Sufferer.TakeDamage(new DamageInstance(self.Count, null, null)); //TODO: More robust damage types
self.DecCount();
};

/// <summary>
/// On loop, the owner takes damage equal to number of stacks, then the count gets decremented.
/// </summary>
public static readonly StatusEffect Poison = new StatusEffect()
.InitStatus(
"Poison",
PoisonEffect,
BattleEffectTrigger.OnLoop,
GD.Load<Texture2D>("res://Classes/StatusEffects/Assets/Status_Poison.png")
)
.SetTags(true);
#endregion

private BattleEffectTrigger _trigger;
Expand Down
45 changes: 45 additions & 0 deletions Globals/Scribe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,51 @@ public partial class Scribe : Node
director.AddStatus(Targetting.Player, StatusEffect.Block.GetInstance()); //todo: should scale with timing????
}
),
new Note(
7,
"PlayerExplosive",
"Deals damage to all enemies.",
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerExplosive.png"),
null,
1,
(director, note, timing) =>
{
if (timing == Timing.Miss)
return;
director.DealDamage(note, (int)timing * note.GetBaseVal(), director.Player);
},
1f,
Targetting.All
),
new Note(
8,
"PlayerEcho",
"Deals more damage with each loop.",
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerEcho.png"),
null,
1,
(director, note, timing) =>
{
if (timing == Timing.Miss)
return;
director.DealDamage(note, (int)timing * note.GetBaseVal(), director.Player);
note.SetBaseVal(note.GetBaseVal() + 1);
}
),
new Note(
9,
"PlayerPoison",
"Applies stacks of poison based on timing.",
GD.Load<Texture2D>("res://Classes/Notes/Assets/Note_PlayerPoison.png"),
null,
1,
(director, note, timing) =>
{
if (timing == Timing.Miss)
return;
director.AddStatus(Targetting.First, StatusEffect.Poison.GetInstance((int)timing));
}
),
};

public static readonly RelicTemplate[] RelicDictionary = new[]
Expand Down
6 changes: 6 additions & 0 deletions Globals/Translations/Translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ NOTE_PLAYERQUARTER_NAME,PlayerQuarter,玩家一分之一
NOTE_PLAYERQUARTER_TOOLTIP,"Basic note at a quarter of the cost.","以四分之一的耗费时间量发出基础音符"
NOTE_PLAYERBLOCK_NAME,PlayerBlock,玩家格挡
NOTE_PLAYERBLOCK_TOOLTIP,"Gives player one charge of block.","给予玩家一层格挡充能。"
NOTE_PLAYEREXPLOSIVE_NAME,PlayerExplosive,玩家炸药
NOTE_PLAYEREXPLOSIVE_TOOLTIP,"Deals damage to all enemies.","对所有敌人造成伤害"
NOTE_PLAYERECHO_NAME,PlayerEcho,玩家回声
NOTE_PLAYERECHO_TOOLTIP,"Deals more damage with each loop.","每次循环造成更多伤害"
NOTE_PLAYERPOISON_NAME,PlayerPoison,玩家中毒
NOTE_PLAYERPOISON_TOOLTIP,"Applies stacks of poison based on timing.","根据时机施加中毒层数"
RELIC_BREAKFAST_NAME,Breakfast,早餐
RELIC_BREAKFAST_TOOLTIP,"Increases max hp.",提高最大生命值
RELIC_GOODVIBES_NAME,Good Vibes,良好消息
Expand Down
10 changes: 10 additions & 0 deletions Scenes/BattleDirector/Scripts/BattleDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public override void _UnhandledInput(InputEvent @event)
{
DebugKillEnemy();
}

if (eventKey.Keycode == Key.Key9)
{
DebugRefillEnergy();
}
}
}

Expand Down Expand Up @@ -511,4 +516,9 @@ private void DebugKillEnemy()
enemy.TakeDamage(new DamageInstance(1000, null, enemy));
}
}

private void DebugRefillEnergy()
{
NPB.IncreaseCharge(100);
}
}