diff --git a/Classes/Notes/Assets/Note_PlayerBlock.png b/Classes/Notes/Assets/Note_PlayerBlock.png new file mode 100644 index 00000000..4e2cf3b9 Binary files /dev/null and b/Classes/Notes/Assets/Note_PlayerBlock.png differ diff --git a/Classes/Notes/Assets/Note_PlayerBlock.png.import b/Classes/Notes/Assets/Note_PlayerBlock.png.import new file mode 100644 index 00000000..74152ff5 --- /dev/null +++ b/Classes/Notes/Assets/Note_PlayerBlock.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dhfeoc3nd6t4a" +path="res://.godot/imported/Note_PlayerBlock.png-9b2b822fe3c56ce932bb38c394998018.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Notes/Assets/Note_PlayerBlock.png" +dest_files=["res://.godot/imported/Note_PlayerBlock.png-9b2b822fe3c56ce932bb38c394998018.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 diff --git a/Classes/Relics/Assets/Relic_Bandage.png b/Classes/Relics/Assets/Relic_Bandage.png new file mode 100644 index 00000000..f9cbc9c9 Binary files /dev/null and b/Classes/Relics/Assets/Relic_Bandage.png differ diff --git a/Classes/Relics/Assets/Relic_Bandage.png.import b/Classes/Relics/Assets/Relic_Bandage.png.import new file mode 100644 index 00000000..bf7f127b --- /dev/null +++ b/Classes/Relics/Assets/Relic_Bandage.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dliqeijojucd2" +path="res://.godot/imported/Relic_Bandage.png-7332ff4bcec166f3ea2b8ef3f740e5ec.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_Bandage.png" +dest_files=["res://.godot/imported/Relic_Bandage.png-7332ff4bcec166f3ea2b8ef3f740e5ec.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 diff --git a/Classes/Relics/Assets/Relic_Chips.png b/Classes/Relics/Assets/Relic_Chips.png new file mode 100644 index 00000000..60e766e0 Binary files /dev/null and b/Classes/Relics/Assets/Relic_Chips.png differ diff --git a/Classes/Relics/Assets/Relic_Chips.png.import b/Classes/Relics/Assets/Relic_Chips.png.import new file mode 100644 index 00000000..ec17e1ea --- /dev/null +++ b/Classes/Relics/Assets/Relic_Chips.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8pluqlha2bdn" +path="res://.godot/imported/Relic_Chips.png-07f9cdab7fe18d0afca88a4403c4bdc6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_Chips.png" +dest_files=["res://.godot/imported/Relic_Chips.png-07f9cdab7fe18d0afca88a4403c4bdc6.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 diff --git a/Classes/Relics/Assets/Relic_EnergyDrink.png b/Classes/Relics/Assets/Relic_EnergyDrink.png new file mode 100644 index 00000000..09e05b9c Binary files /dev/null and b/Classes/Relics/Assets/Relic_EnergyDrink.png differ diff --git a/Classes/Relics/Assets/Relic_EnergyDrink.png.import b/Classes/Relics/Assets/Relic_EnergyDrink.png.import new file mode 100644 index 00000000..b564e084 --- /dev/null +++ b/Classes/Relics/Assets/Relic_EnergyDrink.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bi678rx26dxdd" +path="res://.godot/imported/Relic_EnergyDrink.png-31545a8db92a3c6cae482d1f8ecceff0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_EnergyDrink.png" +dest_files=["res://.godot/imported/Relic_EnergyDrink.png-31545a8db92a3c6cae482d1f8ecceff0.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 diff --git a/Classes/Relics/Assets/Relic_Medkit.png b/Classes/Relics/Assets/Relic_Medkit.png new file mode 100644 index 00000000..dfe770ca Binary files /dev/null and b/Classes/Relics/Assets/Relic_Medkit.png differ diff --git a/Classes/Relics/Assets/Relic_Medkit.png.import b/Classes/Relics/Assets/Relic_Medkit.png.import new file mode 100644 index 00000000..518fd23e --- /dev/null +++ b/Classes/Relics/Assets/Relic_Medkit.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wtddl5ssgrm3" +path="res://.godot/imported/Relic_Medkit.png-44673854c4fdf8be51048f39e6d245d1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_Medkit.png" +dest_files=["res://.godot/imported/Relic_Medkit.png-44673854c4fdf8be51048f39e6d245d1.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 diff --git a/Classes/Relics/Assets/Relic_PaperCut.png b/Classes/Relics/Assets/Relic_PaperCut.png new file mode 100644 index 00000000..36ef6326 Binary files /dev/null and b/Classes/Relics/Assets/Relic_PaperCut.png differ diff --git a/Classes/Relics/Assets/Relic_PaperCut.png.import b/Classes/Relics/Assets/Relic_PaperCut.png.import new file mode 100644 index 00000000..f91aa7f4 --- /dev/null +++ b/Classes/Relics/Assets/Relic_PaperCut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmd8hjrxxk4ic" +path="res://.godot/imported/Relic_PaperCut.png-c918160bd88b568b8e8ae4c716d26ae4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_PaperCut.png" +dest_files=["res://.godot/imported/Relic_PaperCut.png-c918160bd88b568b8e8ae4c716d26ae4.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 diff --git a/Classes/Relics/Assets/Relic_VinylRecord.png b/Classes/Relics/Assets/Relic_VinylRecord.png new file mode 100644 index 00000000..0191c7a3 Binary files /dev/null and b/Classes/Relics/Assets/Relic_VinylRecord.png differ diff --git a/Classes/Relics/Assets/Relic_VinylRecord.png.import b/Classes/Relics/Assets/Relic_VinylRecord.png.import new file mode 100644 index 00000000..e517ede6 --- /dev/null +++ b/Classes/Relics/Assets/Relic_VinylRecord.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk7k5dk7g1mih" +path="res://.godot/imported/Relic_VinylRecord.png-bd107871c395e71c5f912f3df2f1bdd4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_VinylRecord.png" +dest_files=["res://.godot/imported/Relic_VinylRecord.png-bd107871c395e71c5f912f3df2f1bdd4.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 diff --git a/Classes/Relics/RelicTemplate.cs b/Classes/Relics/RelicTemplate.cs index 3e51c656..5ae354ab 100644 --- a/Classes/Relics/RelicTemplate.cs +++ b/Classes/Relics/RelicTemplate.cs @@ -13,10 +13,13 @@ public partial class RelicTemplate : Resource, IDisplayable public Texture2D Texture { get; set; } public string Tooltip { get; set; } + public Rarity Rarity { get; set; } + public RelicTemplate( int id, string name = "", string tooltip = "", + Rarity rarity = Rarity.Common, Texture2D texture = null, RelicEffect[] effectTags = null ) @@ -26,11 +29,12 @@ public RelicTemplate( Name = name; Tooltip = tooltip; Texture = texture; + Rarity = rarity; } public RelicTemplate Clone() { - RelicTemplate newRelic = new RelicTemplate(Id, Name, Tooltip, Texture, Effects); + RelicTemplate newRelic = new RelicTemplate(Id, Name, Tooltip, Rarity, Texture, Effects); return newRelic; } } diff --git a/Globals/FunkEngineNameSpace.cs b/Globals/FunkEngineNameSpace.cs index f52af3de..6fa39472 100644 --- a/Globals/FunkEngineNameSpace.cs +++ b/Globals/FunkEngineNameSpace.cs @@ -235,6 +235,8 @@ public enum BattleEffectTrigger SelfNoteHit, OnPickup, OnLoop, + OnBattleStart, + OnBattleEnd, } public enum Stages @@ -247,6 +249,16 @@ public enum Stages Map, Load, } + +public enum Rarity +{ + Common, + Uncommon, + Rare, + Epic, + Legendary, + Breakfast, +} #endregion /** diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index 913cfe03..cbc0f1a4 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -94,6 +94,20 @@ public partial class Scribe : Node }, 0.25f ), + new Note( + 6, + "Play-c-HoldBlock", + "Gives player one charge of block.", + GD.Load("res://Classes/Notes/Assets/Note_PlayerBlock.png"), + null, + 1, + (director, note, timing) => + { + if (timing == Timing.Miss) + return; + //director.Player.GainShield(note.GetBaseVal()); //todo: should scale with timing???? + } + ), }; public static readonly RelicTemplate[] RelicDictionary = new[] @@ -102,6 +116,7 @@ public partial class Scribe : Node 0, "Breakfast", //Reference ha ha, Item to give when relic pool is empty. "Increases max hp.", //TODO: Description can include the relics values? + Rarity.Breakfast, GD.Load("res://Classes/Relics/Assets/Relic_Breakfast.png"), new RelicEffect[] { @@ -120,6 +135,7 @@ public partial class Scribe : Node 1, "Good Vibes", "Heals the player whenever they place a note.", + Rarity.Common, GD.Load("res://Classes/Relics/Assets/Relic_GoodVibes.png"), new RelicEffect[] { @@ -137,6 +153,7 @@ public partial class Scribe : Node 2, "Auroboros", "Bigger number, better person. Increases combo multiplier every riff.", + Rarity.Common, GD.Load("res://Classes/Relics/Assets/Relic_Auroboros.png"), new RelicEffect[] { @@ -155,6 +172,7 @@ public partial class Scribe : Node 3, "Colorboros", "Taste the rainbow. Charges the freestyle bar every riff.", + Rarity.Common, GD.Load("res://Classes/Relics/Assets/Relic_Colorboros.png"), new RelicEffect[] { @@ -169,6 +187,118 @@ public partial class Scribe : Node ), } ), + new RelicTemplate( + 4, + "Chips", + "Hitting a note deals a bit of damage.", + Rarity.Common, + GD.Load("res://Classes/Relics/Assets/Relic_Chips.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.NoteHit, + 1, + (e, self, val) => + { + e.BD.GetFirstEnemy().TakeDamage(val); + } + ), + } + ), + new RelicTemplate( + 5, + "Paper Cut", + "Deals damage each loop.", + Rarity.Common, + GD.Load("res://Classes/Relics/Assets/Relic_PaperCut.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnLoop, + 5, + (e, self, val) => + { + e.BD.GetFirstEnemy().TakeDamage(val); + } + ), + } + ), + new RelicTemplate( + 6, + "Energy Drink", + "Take a chance to cool down and sip an energy drink to increase your max energy bar.", + Rarity.Common, + GD.Load("res://Classes/Relics/Assets/Relic_EnergyDrink.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnPickup, + 10, + (e, self, val) => + { + StageProducer.PlayerStats.MaxComboBar -= val; + } + ), + } + ), + new RelicTemplate( + 7, + "Bandage", + "A clean strip of cloth. Use it after a fight to patch up and feel better.", + Rarity.Common, + GD.Load("res://Classes/Relics/Assets/Relic_Bandage.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnBattleEnd, + 10, + (e, self, val) => + { + StageProducer.PlayerStats.CurrentHealth += val; + } + ), + } + ), + new RelicTemplate( + 8, + "Medkit", + "A small kit with medical supplies. Heals you a bit after each loop.", + Rarity.Common, + GD.Load("res://Classes/Relics/Assets/Relic_Medkit.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnLoop, + 5, + (e, self, val) => + { + e.BD.Player.Heal(val); + } + ), + } + ), + new RelicTemplate( + 9, + "Vinyl Record", + "Right round, right round. All loop effects trigger twice.", + Rarity.Legendary, + GD.Load("res://Classes/Relics/Assets/Relic_VinylRecord.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnLoop, + 0, + (e, self, val) => + { + if ( + (e is BattleDirector.Harbinger.LoopEventArgs eLoop) + && !eLoop.ArtificialLoop + ) + BattleDirector.Harbinger.Instance.InvokeChartLoop(eLoop.Loop); + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types @@ -244,6 +374,7 @@ public static RelicTemplate[] GetRandomRelics(RelicTemplate[] excludedRelics, in { availableRelics = availableRelics.Append(RelicDictionary[0].Clone()).ToArray(); } + return availableRelics; } diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index 9de830cf..3957214b 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -42,6 +42,8 @@ NOTE_PLAYERVAMPIRE_NAME,PlayerVampire,玩家吸血 NOTE_PLAYERVAMPIRE_TOOLTIP,"Steals health from enemy.","从敌人吸取生命值" 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.","给予玩家一层格挡充能。" RELIC_BREAKFAST_NAME,Breakfast,早餐 RELIC_BREAKFAST_TOOLTIP,"Increases max hp.",提高最大生命值 RELIC_GOODVIBES_NAME,Good Vibes,良好消息 @@ -50,6 +52,18 @@ RELIC_AUROBOROS_NAME,Auroboros,无尾蛇 RELIC_AUROBOROS_TOOLTIP,"Bigger number, better person. Increases combo multiplier every riff.","进一步增加综合倍数,每次现场提升" RELIC_COLORBOROS_NAME,Colorboros,彩蛇轮回 RELIC_COLORBOROS_TOOLTIP,"Taste the rainbow. Charges the freestyle bar every riff.","品尝临岛,每次现场充值自由格条" +RELIC_CHIPS_NAME,"Chips",薯片 +RELIC_CHIPS_TOOLTIP,"Hitting a note deals a bit of damage.","击中音符会造成少量伤害。" +RELIC_PAPERCUT_NAME,Paper Cut,纸割伤 +RELIC_PAPERCUT_TOOLTIP,"Deals damage each loop.","每轮造成伤害" +RELIC_ENERGYDRINK_NAME,Energy Drink,"能量饮料" +RELIC_ENERGYDRINK_TOOLTIP,"Take a chance to cool down and sip an energy drink to increase your max energy bar.","碰碰运气,喝一口能量饮料来冷静下来并增加你的最大能量条。" +RELIC_BANDAGE_NAME,Bandage,"绷带" +RELIC_BANDAGE_TOOLTIP,"A clean strip of cloth. Use it after a fight to patch up and feel better.","一块干净的布条,战斗后使用来包扎并恢复一些健康。" +RELIC_MEDKIT_NAME,Medkit,"急救包" +RELIC_MEDKIT_TOOLTIP,"A small kit with medical supplies. Heals you a bit after each loop.","包含一些医疗用品的小包,每次循环后恢复少量生命。" +RELIC_VINYLRECORD_NAME,Vinyl Record,"黑胶唱片" +RELIC_VINYLRECORD_TOOLTIP,"Right round, right round. All loop effects trigger twice.","把我转起来,把我转起来。所有循环效果触发两次。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 diff --git a/Scenes/BattleDirector/Scripts/BattleDirector.cs b/Scenes/BattleDirector/Scripts/BattleDirector.cs index d62c13f6..be7ac2ee 100644 --- a/Scenes/BattleDirector/Scripts/BattleDirector.cs +++ b/Scenes/BattleDirector/Scripts/BattleDirector.cs @@ -50,6 +50,7 @@ private bool PlayerAddNote(ArrowType type, Beat beat) CD.AddPlayerNote(noteToPlace, type, beat); Harbinger.Instance.InvokeNotePlaced(new ArrowData(type, beat, noteToPlace)); + Harbinger.Instance.InvokeNoteHit(noteToPlace, Timing.Okay); //TODO: test how this feels? maybe take it out later return true; } @@ -160,7 +161,7 @@ private void UpdateBeat(Beat beat) } if (beat.Loop > TimeKeeper.LastBeat.Loop) { - Harbinger.Instance.InvokeChartLoop(beat.Loop); + Harbinger.Instance.InvokeChartLoop(beat.Loop, false); } TimeKeeper.LastBeat = beat; } @@ -196,6 +197,7 @@ private void OnTimedInput(ArrowData data, double beatDif) Timing timed = CheckTiming(beatDif); data.NoteRef.OnHit(this, timed); + Harbinger.Instance.InvokeNoteHit(data.NoteRef, timed); NPB.HandleTiming(timed, data.Type); CM.ComboText(timed, data.Type, NPB.GetCurrentCombo()); } @@ -289,6 +291,12 @@ private void AddEvent(IBattleEvent bEvent) case BattleEffectTrigger.OnLoop: Harbinger.Instance.ChartLooped += bEvent.OnTrigger; break; + case BattleEffectTrigger.NoteHit: + Harbinger.Instance.NoteHit += bEvent.OnTrigger; + break; + case BattleEffectTrigger.OnBattleEnd: + Harbinger.Instance.BattleEnded += bEvent.OnTrigger; + break; } } @@ -357,9 +365,22 @@ public class NoteEventArgs(BattleDirector bd, ArrowData data) : BattleEventArgs( /// /// The BattleDirector calling the event. /// The loop starting. - public class LoopEventArgs(BattleDirector bd, int incomingLoop) : BattleEventArgs(bd) + public class LoopEventArgs(BattleDirector bd, int incomingLoop, bool artificialLoop = true) + : BattleEventArgs(bd) { public int Loop = incomingLoop; + public bool ArtificialLoop = artificialLoop; + } + + /// + /// Event Args to handle notes being hit + /// + /// The BattleDirector calling the event. + /// The Note being hit. + public class NoteHitArgs(BattleDirector bd, Note note, Timing timing) : BattleEventArgs(bd) + { + public Note Note = note; + public Timing Timing = timing; } internal delegate void NotePlacedHandler(BattleEventArgs e); @@ -373,9 +394,25 @@ public void InvokeNotePlaced(ArrowData data) internal delegate void ChartLoopHandler(BattleEventArgs e); internal event ChartLoopHandler ChartLooped; - public void InvokeChartLoop(int incLoop) + public void InvokeChartLoop(int incLoop, bool artificialLoop = true) + { + ChartLooped?.Invoke(new LoopEventArgs(_curDirector, incLoop, artificialLoop)); + } + + internal delegate void NoteHitHandler(BattleEventArgs e); + internal event NoteHitHandler NoteHit; + + public void InvokeNoteHit(Note note, Timing timing) + { + NoteHit?.Invoke(new NoteHitArgs(_curDirector, note, timing)); + } + + internal delegate void BattleEndedHandler(BattleEventArgs e); + internal event BattleEndedHandler BattleEnded; + + public void InvokeBattleEnded() { - ChartLooped?.Invoke(new LoopEventArgs(_curDirector, incLoop)); + BattleEnded?.Invoke(new BattleEventArgs(_curDirector)); } } diff --git a/Scenes/BattleDirector/Scripts/NotePlacementBar.cs b/Scenes/BattleDirector/Scripts/NotePlacementBar.cs index a02acf33..ea285e1e 100644 --- a/Scenes/BattleDirector/Scripts/NotePlacementBar.cs +++ b/Scenes/BattleDirector/Scripts/NotePlacementBar.cs @@ -81,6 +81,7 @@ public void Setup(PlayerStats playerStats) } ShuffleNoteQueue(); ProgressQueue(); + MaxValue = playerStats.MaxComboBar; } #endregion diff --git a/Scenes/Puppets/Enemies/EnemyPuppet.tscn b/Scenes/Puppets/Enemies/EnemyPuppet.tscn index 1c2672fe..02e1ce82 100644 --- a/Scenes/Puppets/Enemies/EnemyPuppet.tscn +++ b/Scenes/Puppets/Enemies/EnemyPuppet.tscn @@ -1,11 +1,11 @@ [gd_scene load_steps=3 format=3 uid="uid://cwm0n2wu851nx"] -[ext_resource type="Script" path="res://Scenes/Puppets/Scripts/PuppetTemplate.cs" id="1_kgmh0"] +[ext_resource type="Script" uid="uid://bnfo57c070cll" path="res://Scenes/Puppets/Scripts/PuppetTemplate.cs" id="1_kgmh0"] [ext_resource type="PackedScene" uid="uid://bgomxovxs7sr8" path="res://Scenes/Puppets/HealthBar.tscn" id="1_sxlrs"] -[node name="EnemPuppet" type="Node2D" node_paths=PackedStringArray("_healthBar", "Sprite")] +[node name="EnemPuppet" type="Node2D" node_paths=PackedStringArray("HealthBar", "Sprite")] script = ExtResource("1_kgmh0") -_healthBar = NodePath("ProgressBar") +HealthBar = NodePath("ProgressBar") Sprite = NodePath("Sprite") [node name="Sprite" type="Sprite2D" parent="."] diff --git a/Scenes/Puppets/HealthBar.tscn b/Scenes/Puppets/HealthBar.tscn index c89d17c0..5950a341 100644 --- a/Scenes/Puppets/HealthBar.tscn +++ b/Scenes/Puppets/HealthBar.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://bgomxovxs7sr8"] -[ext_resource type="Script" path="res://Scenes/Puppets/Scripts/HealthBar.cs" id="1_b1t4i"] +[ext_resource type="Script" uid="uid://d24uqauywe5j5" path="res://Scenes/Puppets/Scripts/HealthBar.cs" id="1_b1t4i"] [sub_resource type="Gradient" id="Gradient_ve5ki"] colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 1) diff --git a/Scenes/Puppets/Scripts/PlayerStats.cs b/Scenes/Puppets/Scripts/PlayerStats.cs index cbb27a91..f41bc6eb 100644 --- a/Scenes/Puppets/Scripts/PlayerStats.cs +++ b/Scenes/Puppets/Scripts/PlayerStats.cs @@ -7,6 +7,7 @@ public partial class PlayerStats : Resource { public int MaxHealth = 100; public int CurrentHealth = 100; + public int MaxComboBar = 80; public Note[] CurNotes = new Note[] { Scribe.NoteDictionary[1].Clone(), diff --git a/Scenes/Puppets/Scripts/PuppetTemplate.cs b/Scenes/Puppets/Scripts/PuppetTemplate.cs index 1f053c4a..24651cc9 100644 --- a/Scenes/Puppets/Scripts/PuppetTemplate.cs +++ b/Scenes/Puppets/Scripts/PuppetTemplate.cs @@ -27,8 +27,6 @@ public partial class PuppetTemplate : Node2D protected int MaxHealth = 100; protected int CurrentHealth = 100; - //Stats would go here. - protected string UniqName = ""; //Eventually make subclasses/scenes/real stuff public override void _Ready() @@ -126,6 +124,7 @@ public virtual void TakeDamage(int amount) { deathTween.TweenCallback(Callable.From(Kill)); } + TextParticle newText = new TextParticle(); newText.Modulate = Colors.Red; Sprite.AddChild(newText); diff --git a/SharedAssets/Shield.png b/SharedAssets/Shield.png new file mode 100644 index 00000000..ef7ebdcf Binary files /dev/null and b/SharedAssets/Shield.png differ diff --git a/SharedAssets/Shield.png.import b/SharedAssets/Shield.png.import new file mode 100644 index 00000000..642ab775 --- /dev/null +++ b/SharedAssets/Shield.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bsg8b14xbddb6" +path="res://.godot/imported/Shield.png-c486d1322077e89abfccb7e98914abdd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://SharedAssets/Shield.png" +dest_files=["res://.godot/imported/Shield.png-c486d1322077e89abfccb7e98914abdd.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