From 0069a099cdbb01f4fb342243bb12dd33069e96b8 Mon Sep 17 00:00:00 2001 From: cornerloan Date: Sat, 3 May 2025 20:04:23 -0700 Subject: [PATCH 01/11] Added loose change Also appears on the score screen as a flat addition to income --- Classes/Relics/Assets/Relic_LooseChange.png | Bin 0 -> 1154 bytes .../Assets/Relic_LooseChange.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 17 +++++++++ Globals/Translations/Translations.csv | 3 +- Scenes/UI/ScoreScreen.tscn | 13 ++++++- Scenes/UI/Scripts/ScoringScreen.cs | 20 ++++++++++- 6 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 Classes/Relics/Assets/Relic_LooseChange.png create mode 100644 Classes/Relics/Assets/Relic_LooseChange.png.import diff --git a/Classes/Relics/Assets/Relic_LooseChange.png b/Classes/Relics/Assets/Relic_LooseChange.png new file mode 100644 index 0000000000000000000000000000000000000000..435e58d3103f133cf2e43921ff19a086e1bccfbb GIT binary patch literal 1154 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSK$uZf!>a+Pp*=Gsq9nrC$0|8LS1&OoKPgqOBDVmjnt{Q_ zzM>#8IXksPAt^OIGtXB2{qFth3YjUk>fxro2EGN(sTr9bRYj@6RemAKRoTgwDeCri zyj(UFRzMSSQ%e#RDspr3imfVamB0pD0ofp7eI+}aqLehNAQv~N3Lwu`DWjyMz)D}g zyu4hm+*mKaC|%#s($Z4jz)0W7NEfI=x41H|B(Xv_uUHvsfJi^MBT&`V?*5(W8)NaQ$q`*G{Yn%sP!e8 zX$brCilM;(3=n;gjJ~0s0m#W9wv~TTW-8DXAS>+*ZNTyNhTFv5S52Cg*Sk_qDY;rPsuYf;@JG$Nb4?+As1)RHp6Xi;rg|9~|L!Nw&Pw zcQix8=Jn^a6|$3?ne1kjb9dZYw|HaEF{7;AZ@&1={;{{hc<0)$>9zMtHXbXgIFv6Y z(7U&(VAUSsAUy`XNp?Hg4Z`nnvg}^*c9Ravspe09AsM_39RKb#?FhWb+0onZxvJNk zo56zlDI>$NhlT8de{rLo3C^KP;m2@w%e!7@@143%f4-o zl)i7=`_#>N=l#pwoKx=yy?f_necEi=;yaJUPwG8gXe{Uvyhh@I-rjDzX;Zj6UQ9CC ze%rEx_dsOS384w4bFH&>vs~18?^3C*+;IJ3vZ@ zKSPOBoE5LYvZU7ej5nuDmSntCvM$uQt+3(_@0GgarY$RF4HrAE%#AL;rWeup$$Bn> zB+H+clKrpumR}Iw#d33AQT~JYvBdJt4p)*+feHdoS3j3^P6("res://Classes/Relics/Assets/Relic_LooseChange.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnBattleEnd, + 10, + (e, self, val) => + { + StageProducer.PlayerStats.Money += val; + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index acd641cc..e2f59f2d 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -107,4 +107,5 @@ TUTORIAL_PLACE_6,"Now go ahead, place a note in the bottom lane!",(TODO) TUTORIAL_FINAL_1,"Good job, you placed a note! You either healed yourself, or dealt damage. I can't tell I'm just a Strawman.",(TODO) TUTORIAL_FINAL_2,"As a refresher: Hit notes to build a combo and fill the bar. When the bar is full, press one of your buttons for a lane that doesn't have a note at the current beat. Notes in the chart will loop around. Keep it up to win.",(TODO) TUTORIAL_FINAL_3,"Good luck! I believe in you.",(TODO) -TUTORIAL_BOSS,"This may take some getting used to, but death is ok in the grand scheme of things. Just have some patience with yourself, you'll learn in the end.",(TODO) \ No newline at end of file +TUTORIAL_BOSS,"This may take some getting used to, but death is ok in the grand scheme of things. Just have some patience with yourself, you'll learn in the end.",(TODO) +RELIC_PLACED,"Loose Change income:","零钱收入:" \ No newline at end of file diff --git a/Scenes/UI/ScoreScreen.tscn b/Scenes/UI/ScoreScreen.tscn index 79c212ce..1c8be324 100644 --- a/Scenes/UI/ScoreScreen.tscn +++ b/Scenes/UI/ScoreScreen.tscn @@ -6,7 +6,7 @@ [ext_resource type="Texture2D" uid="uid://burj10os057fx" path="res://Scenes/UI/Assets/UI_CrystalFrameInset.png" id="3_usavq"] [ext_resource type="Theme" uid="uid://d37e3tpsbxwak" path="res://Scenes/UI/Assets/GeneralTheme.tres" id="4_1rsqt"] -[node name="ScoreScreen" type="CanvasLayer" node_paths=PackedStringArray("_styleLabel", "_styleAmount", "_perfectsLabel", "_perfectsAmount", "_placedLabel", "_placedAmount", "_totalLabel", "_totalAmount", "_acceptButton")] +[node name="ScoreScreen" type="CanvasLayer" node_paths=PackedStringArray("_styleLabel", "_styleAmount", "_perfectsLabel", "_perfectsAmount", "_placedLabel", "_placedAmount", "_totalLabel", "_totalAmount", "_relicLabel", "_relicAmount", "_acceptButton")] process_mode = 3 script = ExtResource("1_ma4hf") _styleLabel = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox/StyleLabel") @@ -17,6 +17,8 @@ _placedLabel = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/B _placedAmount = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/ScoreMargin/LabelVbox/PlacedLabel") _totalLabel = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox/TotalLabel") _totalAmount = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/ScoreMargin/LabelVbox/TotalLabel") +_relicLabel = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox/RelicLabel") +_relicAmount = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/ScoreMargin/LabelVbox/RelicLabel") _acceptButton = NodePath("Bg/WindowMargin/PanelBg/VBoxContainer/ButtonMargin/AcceptButton") [node name="Bg" type="NinePatchRect" parent="."] @@ -144,6 +146,10 @@ text = "SCORING_PERFECTS" layout_mode = 2 text = "SCORING_PLACED" +[node name="RelicLabel" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox"] +layout_mode = 2 +text = "RELIC_PLACED" + [node name="Placeholder" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox"] layout_mode = 2 @@ -181,6 +187,11 @@ layout_mode = 2 text = "999" horizontal_alignment = 2 +[node name="RelicLabel" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/ScoreMargin/LabelVbox"] +layout_mode = 2 +text = "999" +horizontal_alignment = 2 + [node name="Placeholder" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/ScoreMargin/LabelVbox"] layout_mode = 2 horizontal_alignment = 2 diff --git a/Scenes/UI/Scripts/ScoringScreen.cs b/Scenes/UI/Scripts/ScoringScreen.cs index 1d5a757b..4cad1836 100644 --- a/Scenes/UI/Scripts/ScoringScreen.cs +++ b/Scenes/UI/Scripts/ScoringScreen.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using Godot; public partial class ScoringScreen : CanvasLayer @@ -70,13 +71,22 @@ public void SetEndHp(float amount) [Export] private Label _totalAmount; + [Export] + private Label _relicLabel; + + [Export] + private Label _relicAmount; + [Export] private Button _acceptButton; private int _totalBaseMoney; private float _perfectMulti; private float _placedMulti; - private int FinalMoney => (int)(_totalBaseMoney * _perfectMulti * _placedMulti); + private bool _hasChange; + private int _changeAmount = Scribe.RelicDictionary[10].Effects[0].Value; + private int FinalMoney => + (int)(_totalBaseMoney * _perfectMulti * _placedMulti) + (_hasChange ? _changeAmount : 0); public delegate void FinishedHandler(); public event FinishedHandler Finished; @@ -84,6 +94,13 @@ public void SetEndHp(float amount) public override void _Ready() { _acceptButton.Pressed += FinishScoring; + + _hasChange = StageProducer.PlayerStats.CurRelics.Contains(Scribe.RelicDictionary[10]); + if (!_hasChange) + { + _relicLabel.Visible = false; + _relicAmount.Visible = false; + } } public override void _Process(double delta) @@ -127,6 +144,7 @@ private void DrawScoreLabels() _styleAmount.Text = $"{_totalBaseMoney}"; _perfectsAmount.Text = $"X{_perfectMulti:0.00}"; _placedAmount.Text = $"X{_placedMulti:0.00}"; + _relicAmount.Text = $"+{_changeAmount}"; _totalAmount.Text = $"{FinalMoney}"; } From 5b8d045a28dfb06f6c13460807a35a4a9115d532 Mon Sep 17 00:00:00 2001 From: LifeHckr Date: Sat, 3 May 2025 20:47:16 -0700 Subject: [PATCH 02/11] Refactor Loose Change increase display Add relic bonus directly into BattleScore Fix issue where battleend could be called multiple times Fix issue where min stage heights weren't being applied correctly --- Globals/FunkEngineNameSpace.cs | 3 ++- Globals/Scribe.cs | 2 +- Globals/Translations/Translations.csv | 4 +-- .../BattleDirector/Scripts/BattleDirector.cs | 18 ++++++------- Scenes/UI/ScoreScreen.tscn | 2 +- Scenes/UI/Scripts/ScoringScreen.cs | 27 ++++++++++--------- 6 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Globals/FunkEngineNameSpace.cs b/Globals/FunkEngineNameSpace.cs index b5a4f214..db26af8c 100644 --- a/Globals/FunkEngineNameSpace.cs +++ b/Globals/FunkEngineNameSpace.cs @@ -365,7 +365,8 @@ private Stages PickRoomType(int x, int y, MapLevels.MapConfig curConfig) } //Random roll for the room type. - float[] validRooms = curConfig.StageOdds; + float[] validRooms = new float[curConfig.StageOdds.Length]; + curConfig.StageOdds.CopyTo(validRooms, 0); foreach ((Stages stage, int height) in curConfig.MinHeights) { if (y < height) diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index 0c6d6478..f5e26f88 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -344,7 +344,7 @@ public partial class Scribe : Node 10, (e, self, val) => { - StageProducer.PlayerStats.Money += val; + e.BD.BattleScore.IncRelicBonus(val); } ), } diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index e2f59f2d..890de151 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -88,6 +88,7 @@ HOW_TO_PLAY,How to Play,如何游玩 HOW_TO_PLAY_BLOCK1,"Hit notes to\nbuild combo","点击音符\n以建立连击" HOW_TO_PLAY_BLOCK2,"Place notes when\ncombo is full","当连击满\n时放置音符" HOW_TO_PLAY_BLOCK3,"Only placed notes\nhave effects","只有已放置\n的音符才有效" +SCORING_RELICS,"Loose Change income:","零钱收入:" TUTORIAL_NODYING,"No dying during a tutorial!",(TODO) TUTORIAL_DIALOGUE_1,"Hello, welcome to Midnight Riff!",(TODO) TUTORIAL_DIALOGUE_2,"This is a rhythm game where notes more right to left.",(TODO) @@ -107,5 +108,4 @@ TUTORIAL_PLACE_6,"Now go ahead, place a note in the bottom lane!",(TODO) TUTORIAL_FINAL_1,"Good job, you placed a note! You either healed yourself, or dealt damage. I can't tell I'm just a Strawman.",(TODO) TUTORIAL_FINAL_2,"As a refresher: Hit notes to build a combo and fill the bar. When the bar is full, press one of your buttons for a lane that doesn't have a note at the current beat. Notes in the chart will loop around. Keep it up to win.",(TODO) TUTORIAL_FINAL_3,"Good luck! I believe in you.",(TODO) -TUTORIAL_BOSS,"This may take some getting used to, but death is ok in the grand scheme of things. Just have some patience with yourself, you'll learn in the end.",(TODO) -RELIC_PLACED,"Loose Change income:","零钱收入:" \ No newline at end of file +TUTORIAL_BOSS,"This may take some getting used to, but death is ok in the grand scheme of things. Just have some patience with yourself, you'll learn in the end.",(TODO) \ No newline at end of file diff --git a/Scenes/BattleDirector/Scripts/BattleDirector.cs b/Scenes/BattleDirector/Scripts/BattleDirector.cs index f0a59fc0..db8e3011 100644 --- a/Scenes/BattleDirector/Scripts/BattleDirector.cs +++ b/Scenes/BattleDirector/Scripts/BattleDirector.cs @@ -110,7 +110,7 @@ public override void _Ready() Harbinger.Instance.InvokeBattleStarted(); } - private ScoringScreen.ScoreGuide _battleScore; + public ScoringScreen.ScoreGuide BattleScore; private void InitScoringGuide() { @@ -119,20 +119,20 @@ private void InitScoringGuide() { baseMoney += enem.BaseMoney; } - _battleScore = new ScoringScreen.ScoreGuide(baseMoney, Player.GetCurrentHealth()); + BattleScore = new ScoringScreen.ScoreGuide(baseMoney, Player.GetCurrentHealth()); Harbinger.Instance.NotePlaced += (_) => { - _battleScore.IncPlaced(); + BattleScore.IncPlaced(); }; Harbinger.Instance.NoteHit += (_) => { - _battleScore.IncHits(); + BattleScore.IncHits(); }; Harbinger.Instance.NoteHit += (e) => { if (e is Harbinger.NoteHitArgs { Timing: Timing.Perfect }) - _battleScore.IncPerfects(); - _battleScore.IncHits(); + BattleScore.IncPerfects(); + BattleScore.IncHits(); }; } @@ -290,7 +290,6 @@ private void CheckBattleStatus(PuppetTemplate puppet) //Called when a puppet die { if (!IsBattleWon()) return; - Harbinger.Instance.InvokeBattleEnded(); CM.ProcessMode = ProcessModeEnum.Disabled; tween.TweenCallback(Callable.From(OnBattleWon)); } @@ -303,10 +302,11 @@ private bool IsBattleWon() private void OnBattleWon() { + Harbinger.Instance.InvokeBattleEnded(); CleanUpRelics(); - _battleScore.SetEndHp(Player.GetCurrentHealth()); + BattleScore.SetEndHp(Player.GetCurrentHealth()); Audio.ProcessMode = ProcessModeEnum.Always; - ScoringScreen.CreateScore(this, _battleScore).Finished += () => + ScoringScreen.CreateScore(this, BattleScore).Finished += () => { ShowRewardSelection(3); }; diff --git a/Scenes/UI/ScoreScreen.tscn b/Scenes/UI/ScoreScreen.tscn index 1c8be324..30ff0c18 100644 --- a/Scenes/UI/ScoreScreen.tscn +++ b/Scenes/UI/ScoreScreen.tscn @@ -148,7 +148,7 @@ text = "SCORING_PLACED" [node name="RelicLabel" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox"] layout_mode = 2 -text = "RELIC_PLACED" +text = "SCORING_RELICS" [node name="Placeholder" type="Label" parent="Bg/WindowMargin/PanelBg/VBoxContainer/MarginContainer/BottomPanelBg/HBoxContainer/LabelMargin/LabelVbox"] layout_mode = 2 diff --git a/Scenes/UI/Scripts/ScoringScreen.cs b/Scenes/UI/Scripts/ScoringScreen.cs index 4cad1836..8aa47176 100644 --- a/Scenes/UI/Scripts/ScoringScreen.cs +++ b/Scenes/UI/Scripts/ScoringScreen.cs @@ -12,6 +12,7 @@ public struct ScoreGuide public int TotalHits = 0; public int TotalPerfects = 0; public int TotalPlaced = 0; + public int RelicBonus = 0; public float StartingHealth = 0; public float EndingHealth = 0; @@ -41,6 +42,11 @@ public void IncPlaced() TotalPlaced++; } + public void IncRelicBonus(int amount) + { + RelicBonus += amount; + } + public void SetEndHp(float amount) { EndingHealth = amount; @@ -83,10 +89,8 @@ public void SetEndHp(float amount) private int _totalBaseMoney; private float _perfectMulti; private float _placedMulti; - private bool _hasChange; - private int _changeAmount = Scribe.RelicDictionary[10].Effects[0].Value; - private int FinalMoney => - (int)(_totalBaseMoney * _perfectMulti * _placedMulti) + (_hasChange ? _changeAmount : 0); + private int _relicBonus; + private int FinalMoney => (int)(_totalBaseMoney * _perfectMulti * _placedMulti) + _relicBonus; public delegate void FinishedHandler(); public event FinishedHandler Finished; @@ -94,13 +98,6 @@ public void SetEndHp(float amount) public override void _Ready() { _acceptButton.Pressed += FinishScoring; - - _hasChange = StageProducer.PlayerStats.CurRelics.Contains(Scribe.RelicDictionary[10]); - if (!_hasChange) - { - _relicLabel.Visible = false; - _relicAmount.Visible = false; - } } public override void _Process(double delta) @@ -128,6 +125,7 @@ private void GenerateScore(ScoreGuide info) if (float.IsNaN(_perfectMulti)) _perfectMulti = 1; _placedMulti = Math.Max(2 - (float)Math.Abs(info.TotalPlaced - info.BaseMoney) / 10, 1); + _relicBonus = info.RelicBonus; DrawScoreLabels(); } @@ -141,10 +139,15 @@ private int CalcTotalBase(ScoreGuide info) private void DrawScoreLabels() { + if (_relicBonus <= 0) + { + _relicLabel.Visible = false; + _relicAmount.Visible = false; + } _styleAmount.Text = $"{_totalBaseMoney}"; _perfectsAmount.Text = $"X{_perfectMulti:0.00}"; _placedAmount.Text = $"X{_placedMulti:0.00}"; - _relicAmount.Text = $"+{_changeAmount}"; + _relicAmount.Text = $"+{_relicBonus}"; _totalAmount.Text = $"{FinalMoney}"; } From 1939a2f7c88960a01e38e4c06d925b644ef7df24 Mon Sep 17 00:00:00 2001 From: cornerloan Date: Sun, 4 May 2025 01:09:27 -0700 Subject: [PATCH 03/11] Added spiked shield --- Classes/Relics/Assets/Relic_SpikedShield.png | Bin 0 -> 1139 bytes .../Assets/Relic_SpikedShield.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 25 +++++++++++++ Scenes/Puppets/Scripts/PuppetTemplate.cs | 8 +++++ 4 files changed, 67 insertions(+) create mode 100644 Classes/Relics/Assets/Relic_SpikedShield.png create mode 100644 Classes/Relics/Assets/Relic_SpikedShield.png.import diff --git a/Classes/Relics/Assets/Relic_SpikedShield.png b/Classes/Relics/Assets/Relic_SpikedShield.png new file mode 100644 index 0000000000000000000000000000000000000000..e6056d946f54444d7c4616a39a08b830f950e537 GIT binary patch literal 1139 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=Dh+L6~vJ#O${~4egmB5hW46K32*3xq68y`AMmI6}bgK)eHls47YguJQ{>uF6ifOi{PD zbs{}UK3djZt>nqvW6s4qD1-ZCERRDRmN*N_31y=g{ z<>lpi<;HsXMd|v6mX?v90`zGE;%B09k2gXakl<5wp<;IRwdJb`TMuUx6%m z$bfQOZNgE0r+kZY>VD6Q-MXa~4cie3? zo*-1rl5tjYf$`2`v$Qw7Tf!HsIN7N_Z1q>=8Pjcoeq67xo#dvRX)?dTIG!i_ux7>O zu1$ZJ*HqliW84vW_k;SL%%{HbdYArx`fWT%reTw<{+-wRw$0~pUCeXfb=hlQ?abDD zTOO4rU(SD*9_4vo^`6OG^Rs$&?I0Z=TCiON!*)f-dx*b z?#td7_-(_tU3VQeNYoUzmOMK&y{a$L&iT=;+25=gmgtIo5M)rOVN9LJHdSDMnSjJo zJ~fFa(g)hNL~-Of`$smu=xP*WNE3fox<1EWP><1OT69>k$-_m9XIwp5#{SShwOZ@? z{pokJi};R&#xLD0={VE*N6@SwgHv+Tnr=!RDcxe}@GUcG{q0`!vwTP7no`RY3>Xe< zcvRrG@nP7`e|2+mHiduN;8OVg{+FjsQ}pI8zy4Ni%Fa#gORx8`u2fHUFJowG{}UU0 z|9kz>lcf*xKR;!h^K<{lWjFVRH{Dmh|6jS{a>>iKS{2UrYU$2%?VGCRoZOLIqtd{6 z>g)HFJ8HTjSOeJw!puC1Om^#>_RL%TRyVb52`6i_P5;w975pYx$+tlHs>@$ZA-fd5QOs(W=Lik&Jh$?nVSzO)yW*zTv4i zQS#V{kve|E5Q_9$w)mmhk("res://Classes/Relics/Assets/Relic_SpikedShield.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnDamageInstance, + 5, + (e, self, val) => + { + if ( + e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs + && dmgArgs.Dmg.Target == e.BD.Player + && dmgArgs.Dmg.Damage > 0 + && e.BD.Player.HasStatus(StatusEffect.Block.GetInstance()) + ) + { + e.BD.DealDamage(Targetting.First, val, null); + } + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Scenes/Puppets/Scripts/PuppetTemplate.cs b/Scenes/Puppets/Scripts/PuppetTemplate.cs index b530fd76..9f69c969 100644 --- a/Scenes/Puppets/Scripts/PuppetTemplate.cs +++ b/Scenes/Puppets/Scripts/PuppetTemplate.cs @@ -192,5 +192,13 @@ public void RemoveStatusEffect(StatusEffect effect) StatusEffects.Remove(effect); effect.QueueFree(); } + + public bool HasStatus(StatusEffect effect) + { + int index = StatusEffects.FindIndex(sEff => sEff.StatusName == effect.StatusName); + if (index != -1) + return true; + return false; + } #endregion } From fb6d25b4311d81ff2859c1a7319673356a01325e Mon Sep 17 00:00:00 2001 From: cornerloan Date: Sun, 4 May 2025 01:14:51 -0700 Subject: [PATCH 04/11] Added translations for previous relics --- Globals/Translations/Translations.csv | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index 890de151..391753ca 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -80,6 +80,10 @@ 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.","把我转起来,把我转起来。所有循环效果触发两次。" +RELIC_LOOSECHANGE_NAME,Loose Change,零钱 +RELIC_LOOSECHANGE_TOOLTIP,"Gain extra money after battles.","战斗后获得额外金钱。" +RELIC_SPIKEDSHIELD_NAME,Spiked Shield,尖刺之盾 +RELIC_SPIKEDSHIELD_TOOLTIP,"Deal damage when you lose a charge of block.","失去格挡层数时造成伤害。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 From 42bb1f13f9d7f4a5aa954b86b277fed4f085399b Mon Sep 17 00:00:00 2001 From: cornerloan Date: Sun, 4 May 2025 15:37:40 -0700 Subject: [PATCH 05/11] Added lucky dice --- Classes/Relics/Assets/Relic_LuckyDice.png | Bin 0 -> 1045 bytes .../Relics/Assets/Relic_LuckyDice.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 17 +++++++++ Globals/Translations/Translations.csv | 2 ++ 4 files changed, 53 insertions(+) create mode 100644 Classes/Relics/Assets/Relic_LuckyDice.png create mode 100644 Classes/Relics/Assets/Relic_LuckyDice.png.import diff --git a/Classes/Relics/Assets/Relic_LuckyDice.png b/Classes/Relics/Assets/Relic_LuckyDice.png new file mode 100644 index 0000000000000000000000000000000000000000..9fc93f968a62383fd6d4b4ccc480de465f3f5ab3 GIT binary patch literal 1045 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=Dh+K$tP>S|=w^LwjaOL`j6Nk5zJhu3lnFep0GlMQ#C5H3Nf< zeMLcHa&~HoLQ-maW}dD3``!E16*5z7)x%AF4SWlnQ!_F>s)|yBtNcQetFn_VQ`GJ4 zc)4sUtbiuurj{fsROII56ON0GHI_ zN%^HEwo0X?nJHFjiD{-uDJiD9Nr}cOx`u`+iMoj?#)i5n#>Oe;riK zGN53Bhi+;fFi6XRVW%@?1~&r(lenjgV@QPi+i5#Xr40qz_6KsW<|){+TFj?4?_iSJ zb%)kPUK5-rn|eq_vY!;&($jOcMa+V41N*m4D-M7AT>WQKt@VyNhUS@#!s<$UPKw=2 z>0b9&b&s$4y|nAGzYXVX{paHQ`oF2h{9VhEGq``S^Key|i3{f&ul={zH~iz(ipf^_ z#c9sw>h_lH(++xc$<=4Gz`v9E}x`n?ryK?*D#5lh9yqPzTVQNPC zu5V_SAM_Y4oaZ97dlS!bS;eAg{a2sdFX*1wb@h4v#adryp16bVibXqE|Gs_qe?`Ls z{YzD=)c^VKIr+@F@Q-rER^dL?h1-kPG+1e==}nLOP|3cSX^(HXugaCx$L{gzq?#@% zbPef!eXCtUBp_XXy7!|Z$AY_dQ}$MD~1R*B$("res://Classes/Relics/Assets/Relic_LuckyDice.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnPickup, + 1, + (e, self, val) => + { + StageProducer.PlayerStats.Rerolls = 1; + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index 391753ca..e943355d 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -84,6 +84,8 @@ RELIC_LOOSECHANGE_NAME,Loose Change,零钱 RELIC_LOOSECHANGE_TOOLTIP,"Gain extra money after battles.","战斗后获得额外金钱。" RELIC_SPIKEDSHIELD_NAME,Spiked Shield,尖刺之盾 RELIC_SPIKEDSHIELD_TOOLTIP,"Deal damage when you lose a charge of block.","失去格挡层数时造成伤害。" +RELIC_LUCKYDICE_NAME,Lucky Dice,幸运骰子 +RELIC_LUCKYDICE_TOOLTIP,"Gain one reroll for reward selections.","获得一次奖励重选。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 From 17eca84b53b24574c8161142a642a91f778d07be Mon Sep 17 00:00:00 2001 From: cornerloan Date: Mon, 5 May 2025 01:20:11 -0700 Subject: [PATCH 06/11] Added shortcut Possible fixes: - should maybe show on the map that the player has a charge of this relic - I don't know if the tooltip is strangely worded, maybe could use a change --- Classes/Relics/Assets/Relic_Shortcut.png | Bin 0 -> 998 bytes .../Relics/Assets/Relic_Shortcut.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 17 +++++++++ Globals/Translations/Translations.csv | 2 ++ Scenes/Maps/Scripts/Cartographer.cs | 21 +++++++++-- Scenes/Puppets/Scripts/PlayerStats.cs | 1 + 6 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 Classes/Relics/Assets/Relic_Shortcut.png create mode 100644 Classes/Relics/Assets/Relic_Shortcut.png.import diff --git a/Classes/Relics/Assets/Relic_Shortcut.png b/Classes/Relics/Assets/Relic_Shortcut.png new file mode 100644 index 0000000000000000000000000000000000000000..6df1df7aab83b76433ee20914a063a170c162ab6 GIT binary patch literal 998 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DkxL735kHCP3xp*=Gsq9nrC$0|8LS1&OoKPgqOBDVmjnt{Q_ zzM>#8IXksPAt^OIGtXB2{qFth3YjUk>fxro2EGN(sTr9bRYj@6RemAKRoTgwDeCri zyj(UFRzMSSQ%e#RDspr3imfVamB0pD0ofp7eI+}aqLehNAQv~N3Lwu`DWjyMz)D}g zyu4hm+*mKaC|%#s($Z4jz)0W7NEfI=x41H|B(Xv_uUHvsfJi^MBT&`V?*5(W8)NaQ$q`*G{Yn%sP!e8 zX$brCilM;(3=n;gjJ~0s0m#W9wv~TTW-8DXAS>+*ZNTyR`!c1{)_|q!1$J&e zpD=afZXc`Vq304xgVrhj;!;}8Ft?!1m+{{X5!s8zT9Y{M^Kk2lAK89HNIv0FzWR+E z*_>_fj_V(7uS*aJyv@IN`h+F77djo|+#$l;>R~T1=?z=Os{H&wF@}yhrjw4`k5{># z@!hU)TJ8FdBH>9T{ipm}+!tZE;r9hzSwsm{<>Hc$DN zy5_N6>)8xl7Eo{(}YX2I^6_97ioAvM-c1sd|btJgVBS3D{5 z(D0u7qe(tKK7ZEBytV27eZqpR{E)Z7j&8n!q~rO5bAvveD>DwAdi0EZSHkAf=U>;_ zURMiKy<(`IXgaQl7Q-wb0("res://Classes/Relics/Assets/Relic_Shortcut.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnPickup, + 1, + (e, self, val) => + { + StageProducer.PlayerStats.MapLaneChanges = 1; + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index e943355d..713b5e9c 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -86,6 +86,8 @@ RELIC_SPIKEDSHIELD_NAME,Spiked Shield,尖刺之盾 RELIC_SPIKEDSHIELD_TOOLTIP,"Deal damage when you lose a charge of block.","失去格挡层数时造成伤害。" RELIC_LUCKYDICE_NAME,Lucky Dice,幸运骰子 RELIC_LUCKYDICE_TOOLTIP,"Gain one reroll for reward selections.","获得一次奖励重选。" +RELIC_SHORTCUT_NAME,Shortcut,捷径 +RELIC_SHORTCUT_TOOLTIP,"Can choose any path regardless of connections, but only once.","可无视路径连接选择任意路线,但仅限一次。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 diff --git a/Scenes/Maps/Scripts/Cartographer.cs b/Scenes/Maps/Scripts/Cartographer.cs index 94573f16..d9b62ca7 100644 --- a/Scenes/Maps/Scripts/Cartographer.cs +++ b/Scenes/Maps/Scripts/Cartographer.cs @@ -85,18 +85,33 @@ private void DrawMapSprite(MapGrid.Room room) newButton.CustomMinimumSize = MapIconSize; newButton.IconAlignment = HorizontalAlignment.Center; AddChild(newButton); + bool isChild = StageProducer.GetCurRoom().Children.Contains(room.Idx); + + // checks if the next room is one below current room, and player has charges of maplanechanges + bool isLaneChangeAllowed = + room.Y == StageProducer.GetCurRoom().Y + 1 + && StageProducer.PlayerStats.MapLaneChanges > 0; + //button is disabled if it is not a child of current room. - if (!StageProducer.GetCurRoom().Children.Contains(room.Idx)) + //unless player has charges of lane changing + if (!isChild && !isLaneChangeAllowed) { newButton.Disabled = true; newButton.FocusMode = Control.FocusModeEnum.None; } else { - newButton.GrabFocus(); - _focusedButton = newButton; + //grab focus on children paths, to really make sure user wants to use a charge of maplanechanges + if (isChild) + { + newButton.GrabFocus(); + _focusedButton = newButton; + } newButton.Pressed += () => { + if (!isChild) + StageProducer.PlayerStats.MapLaneChanges--; + EnterStage(room.Idx, newButton); }; _validButtons = _validButtons.Append(newButton).ToArray(); diff --git a/Scenes/Puppets/Scripts/PlayerStats.cs b/Scenes/Puppets/Scripts/PlayerStats.cs index 78cd0653..e12ece81 100644 --- a/Scenes/Puppets/Scripts/PlayerStats.cs +++ b/Scenes/Puppets/Scripts/PlayerStats.cs @@ -14,6 +14,7 @@ public partial class PlayerStats : Resource public int NotesToIncreaseCombo = 4; public int RewardAmountModifier = 0; public int Rerolls = 0; + public int MapLaneChanges = 0; //Array in order of descending rarities, Legendary -> ... Common. Int odds out of 100. public int[] RarityOdds = [1, 5, 10, 20, 100]; From 796b4f75f84bbc75aa61dcff0b778dfbcaae306e Mon Sep 17 00:00:00 2001 From: cornerloan Date: Mon, 5 May 2025 16:42:18 -0700 Subject: [PATCH 07/11] updated to shortcut to work between saves --- Globals/SaveSystem.cs | 8 ++++++-- Globals/Scribe.cs | 5 ++--- Globals/StageProducer.cs | 1 + Scenes/Maps/Scripts/Cartographer.cs | 7 ++++--- Scenes/Puppets/Scripts/PlayerStats.cs | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Globals/SaveSystem.cs b/Globals/SaveSystem.cs index f5551751..fd3a609e 100644 --- a/Globals/SaveSystem.cs +++ b/Globals/SaveSystem.cs @@ -385,6 +385,7 @@ public class SaveFile public int[] NoteIds { get; init; } public int[] RelicIds { get; init; } public int PlayerHealth { get; init; } + public int UsedShortcuts { get; init; } public SaveFile( ulong rngSeed, @@ -394,7 +395,8 @@ public SaveFile( int[] relicIds, int playerHealth, int area, - int money + int money, + int usedShortcuts ) { RngSeed = rngSeed; @@ -405,6 +407,7 @@ int money PlayerHealth = playerHealth; Area = area; Money = money; + UsedShortcuts = usedShortcuts; } } @@ -420,7 +423,8 @@ public static void SaveGame() relicIds, StageProducer.PlayerStats.CurrentHealth, StageProducer.CurLevel.Id, - StageProducer.PlayerStats.Money + StageProducer.PlayerStats.Money, + StageProducer.PlayerStats.usedShortcuts ); string json = JsonSerializer.Serialize(sv); diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index d617e223..3a5af42f 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -401,9 +401,8 @@ e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs new RelicEffect( BattleEffectTrigger.OnPickup, 1, - (e, self, val) => - { - StageProducer.PlayerStats.MapLaneChanges = 1; + (e, self, val) => { + // this no longer has an effect, we just check that the player has looted it :) } ), } diff --git a/Globals/StageProducer.cs b/Globals/StageProducer.cs index 5be42be8..a5841709 100644 --- a/Globals/StageProducer.cs +++ b/Globals/StageProducer.cs @@ -103,6 +103,7 @@ private bool LoadGame() } PlayerStats.CurrentHealth = sv.PlayerHealth; PlayerStats.Money = sv.Money; + PlayerStats.usedShortcuts = sv.UsedShortcuts; IsInitialized = true; return true; } diff --git a/Scenes/Maps/Scripts/Cartographer.cs b/Scenes/Maps/Scripts/Cartographer.cs index d9b62ca7..615b005b 100644 --- a/Scenes/Maps/Scripts/Cartographer.cs +++ b/Scenes/Maps/Scripts/Cartographer.cs @@ -87,10 +87,11 @@ private void DrawMapSprite(MapGrid.Room room) AddChild(newButton); bool isChild = StageProducer.GetCurRoom().Children.Contains(room.Idx); - // checks if the next room is one below current room, and player has charges of maplanechanges + // checks if the next room is one below current room, player has shortcut, and player hasn't used all its charges bool isLaneChangeAllowed = room.Y == StageProducer.GetCurRoom().Y + 1 - && StageProducer.PlayerStats.MapLaneChanges > 0; + && StageProducer.PlayerStats.usedShortcuts < Scribe.RelicDictionary[13].Effects[0].Value + && StageProducer.PlayerStats.CurRelics.Any(r => r.Id == Scribe.RelicDictionary[13].Id); //button is disabled if it is not a child of current room. //unless player has charges of lane changing @@ -110,7 +111,7 @@ private void DrawMapSprite(MapGrid.Room room) newButton.Pressed += () => { if (!isChild) - StageProducer.PlayerStats.MapLaneChanges--; + StageProducer.PlayerStats.usedShortcuts++; EnterStage(room.Idx, newButton); }; diff --git a/Scenes/Puppets/Scripts/PlayerStats.cs b/Scenes/Puppets/Scripts/PlayerStats.cs index e12ece81..6ead6202 100644 --- a/Scenes/Puppets/Scripts/PlayerStats.cs +++ b/Scenes/Puppets/Scripts/PlayerStats.cs @@ -14,7 +14,7 @@ public partial class PlayerStats : Resource public int NotesToIncreaseCombo = 4; public int RewardAmountModifier = 0; public int Rerolls = 0; - public int MapLaneChanges = 0; + public int usedShortcuts = 0; //Array in order of descending rarities, Legendary -> ... Common. Int odds out of 100. public int[] RarityOdds = [1, 5, 10, 20, 100]; From 3e5e1434450e9a20296d52d522ee8c34367518d8 Mon Sep 17 00:00:00 2001 From: LifeHckr Date: Mon, 5 May 2025 17:38:42 -0700 Subject: [PATCH 08/11] Refine Shortcut Logic This should be more elegant? Especially if we add any other sources of shortcuts. Only faulty aspect, is if we change values later, save files won't be accurate across versions, but whatever, because saves are readable text. --- Globals/SaveSystem.cs | 8 ++++---- Globals/Scribe.cs | 5 +++-- Globals/StageProducer.cs | 2 +- Scenes/Maps/Scripts/Cartographer.cs | 8 +++----- Scenes/Puppets/Scripts/PlayerStats.cs | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Globals/SaveSystem.cs b/Globals/SaveSystem.cs index fd3a609e..7eb6b5b1 100644 --- a/Globals/SaveSystem.cs +++ b/Globals/SaveSystem.cs @@ -385,7 +385,7 @@ public class SaveFile public int[] NoteIds { get; init; } public int[] RelicIds { get; init; } public int PlayerHealth { get; init; } - public int UsedShortcuts { get; init; } + public int Shortcuts { get; init; } public SaveFile( ulong rngSeed, @@ -396,7 +396,7 @@ public SaveFile( int playerHealth, int area, int money, - int usedShortcuts + int shortcuts ) { RngSeed = rngSeed; @@ -407,7 +407,7 @@ int usedShortcuts PlayerHealth = playerHealth; Area = area; Money = money; - UsedShortcuts = usedShortcuts; + Shortcuts = shortcuts; } } @@ -424,7 +424,7 @@ public static void SaveGame() StageProducer.PlayerStats.CurrentHealth, StageProducer.CurLevel.Id, StageProducer.PlayerStats.Money, - StageProducer.PlayerStats.usedShortcuts + StageProducer.PlayerStats.Shortcuts ); string json = JsonSerializer.Serialize(sv); diff --git a/Globals/Scribe.cs b/Globals/Scribe.cs index 3a5af42f..031c08b2 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -401,8 +401,9 @@ e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs new RelicEffect( BattleEffectTrigger.OnPickup, 1, - (e, self, val) => { - // this no longer has an effect, we just check that the player has looted it :) + (e, self, val) => + { + StageProducer.PlayerStats.Shortcuts += 1; } ), } diff --git a/Globals/StageProducer.cs b/Globals/StageProducer.cs index a5841709..c3a01789 100644 --- a/Globals/StageProducer.cs +++ b/Globals/StageProducer.cs @@ -103,7 +103,7 @@ private bool LoadGame() } PlayerStats.CurrentHealth = sv.PlayerHealth; PlayerStats.Money = sv.Money; - PlayerStats.usedShortcuts = sv.UsedShortcuts; + PlayerStats.Shortcuts = sv.Shortcuts; IsInitialized = true; return true; } diff --git a/Scenes/Maps/Scripts/Cartographer.cs b/Scenes/Maps/Scripts/Cartographer.cs index 615b005b..b60a8a17 100644 --- a/Scenes/Maps/Scripts/Cartographer.cs +++ b/Scenes/Maps/Scripts/Cartographer.cs @@ -87,11 +87,9 @@ private void DrawMapSprite(MapGrid.Room room) AddChild(newButton); bool isChild = StageProducer.GetCurRoom().Children.Contains(room.Idx); - // checks if the next room is one below current room, player has shortcut, and player hasn't used all its charges + // checks if the next room is one below current room, player has shortcuts bool isLaneChangeAllowed = - room.Y == StageProducer.GetCurRoom().Y + 1 - && StageProducer.PlayerStats.usedShortcuts < Scribe.RelicDictionary[13].Effects[0].Value - && StageProducer.PlayerStats.CurRelics.Any(r => r.Id == Scribe.RelicDictionary[13].Id); + room.Y == StageProducer.GetCurRoom().Y + 1 && StageProducer.PlayerStats.Shortcuts > 0; //button is disabled if it is not a child of current room. //unless player has charges of lane changing @@ -111,7 +109,7 @@ private void DrawMapSprite(MapGrid.Room room) newButton.Pressed += () => { if (!isChild) - StageProducer.PlayerStats.usedShortcuts++; + StageProducer.PlayerStats.Shortcuts--; EnterStage(room.Idx, newButton); }; diff --git a/Scenes/Puppets/Scripts/PlayerStats.cs b/Scenes/Puppets/Scripts/PlayerStats.cs index 6ead6202..237aa5ca 100644 --- a/Scenes/Puppets/Scripts/PlayerStats.cs +++ b/Scenes/Puppets/Scripts/PlayerStats.cs @@ -14,7 +14,7 @@ public partial class PlayerStats : Resource public int NotesToIncreaseCombo = 4; public int RewardAmountModifier = 0; public int Rerolls = 0; - public int usedShortcuts = 0; + public int Shortcuts = 0; //Array in order of descending rarities, Legendary -> ... Common. Int odds out of 100. public int[] RarityOdds = [1, 5, 10, 20, 100]; From 8a1d841eb45585f28e8a0472433191204871ad0c Mon Sep 17 00:00:00 2001 From: cornerloan Date: Tue, 6 May 2025 15:57:15 -0700 Subject: [PATCH 09/11] Added second pick --- Classes/Relics/Assets/Relic_SecondPick.png | Bin 0 -> 1021 bytes .../Relics/Assets/Relic_SecondPick.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 18 ++++++++++ Globals/Translations/Translations.csv | 2 ++ 4 files changed, 54 insertions(+) create mode 100644 Classes/Relics/Assets/Relic_SecondPick.png create mode 100644 Classes/Relics/Assets/Relic_SecondPick.png.import diff --git a/Classes/Relics/Assets/Relic_SecondPick.png b/Classes/Relics/Assets/Relic_SecondPick.png new file mode 100644 index 0000000000000000000000000000000000000000..3691aa713a5b916895ee50fee548388ddb5f916d GIT binary patch literal 1021 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=Dh+L6~vJ#O${~4egmB5hW46K32*3xq68y`AMmI6}bgK)eHls47YguJQ{>uF6ifOi{PD zbs{}UK3djZt>nqvW6s4qD1-ZCERRDRmN*N_31y=g{ z<>lpi<;HsXMd|v6mX?v90`zGE;%B09k2gXakl<5wp<;IRwdJb`TMuUx6%m z$bf0E=Po;s8(Wm~4 z`#uD2soco6cGKU^{m@(wTguT>SNC_IjhKIde_A^~@?~i*H|0 zx&8aO*0hNxHW{;~Wtnx(ewFFd?I9jH{g3ypnA5Fk-yZlcOZaTEj@8Wnr2KxybiFG@ z8&5{Z$1&CIJ~v}o1j7-(-IL_>`I6O)7{p)AUMG-UTd5h@_~iDUEoS<>C%wZGp8UPV z*Z=Z)naZlSdtdImT*tU%Msua$3vPyjg^?x8V`r`O>{klC9c$iUV4>*XQnpK0^75AN z0>-8im*+b8#XGz{ef8azkjXn%8r=OJ^}lXLYJ8*o%3#-mjr-Wj<~o&6-f?qo(E*h_ zEf>=h!r!j<^z`iM2KxE$UB1j(!MItspZA|V(Hf;+`}zGtUu!?Mq~&`zCdBNFh~K`C z!)=>~S}==>f4a@1kJnC!9kOfGjm`P=cZcoqGKF0Mr+th!JV}#Xs~^7L+=;SS!LqhD zpR-R|?qUdD@_+6-<C4SET$*W}{c{0J}*)&id^mO%e JS?83{1OWD&n>zpi literal 0 HcmV?d00001 diff --git a/Classes/Relics/Assets/Relic_SecondPick.png.import b/Classes/Relics/Assets/Relic_SecondPick.png.import new file mode 100644 index 00000000..63bb10d4 --- /dev/null +++ b/Classes/Relics/Assets/Relic_SecondPick.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cbv2j4ysk3ydd" +path="res://.godot/imported/Relic_SecondPick.png-0361bd1bad087f4d81be27c9c5b3fe2b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_SecondPick.png" +dest_files=["res://.godot/imported/Relic_SecondPick.png-0361bd1bad087f4d81be27c9c5b3fe2b.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/Globals/Scribe.cs b/Globals/Scribe.cs index 031c08b2..ca4861c2 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -408,6 +408,24 @@ e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs ), } ), + new RelicTemplate( + 14, + "Second Pick", + Rarity.Uncommon, + GD.Load("res://Classes/Relics/Assets/Relic_SecondPick.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.NotePlaced, + 20, + (e, self, val) => + { + if (StageProducer.GlobalRng.RandiRange(1, 100) <= val) + e.BD.NPB.IncreaseCharge(StageProducer.PlayerStats.MaxComboBar); + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index 713b5e9c..68048a23 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -88,6 +88,8 @@ RELIC_LUCKYDICE_NAME,Lucky Dice,幸运骰子 RELIC_LUCKYDICE_TOOLTIP,"Gain one reroll for reward selections.","获得一次奖励重选。" RELIC_SHORTCUT_NAME,Shortcut,捷径 RELIC_SHORTCUT_TOOLTIP,"Can choose any path regardless of connections, but only once.","可无视路径连接选择任意路线,但仅限一次。" +RELIC_SECONDPICK_NAME,Second Pick,备用拨片 +RELIC_SECONDPICK_TOOLTIP,"Placing a note has a 20% chance to instantly refill the combo bar.","每次演奏音符时,有20%的几率立即填满连击槽。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 From 2120a108dca7bb9e0c94165b9b75ed6b45e1275a Mon Sep 17 00:00:00 2001 From: cornerloan Date: Tue, 6 May 2025 16:24:40 -0700 Subject: [PATCH 10/11] Added broken drumstick - need to make damage scale with what act the player is on --- .../Relics/Assets/Relic_BrokenDrumstick.png | Bin 0 -> 1122 bytes .../Assets/Relic_BrokenDrumstick.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 18 ++++++++++ Globals/Translations/Translations.csv | 2 ++ 4 files changed, 54 insertions(+) create mode 100644 Classes/Relics/Assets/Relic_BrokenDrumstick.png create mode 100644 Classes/Relics/Assets/Relic_BrokenDrumstick.png.import diff --git a/Classes/Relics/Assets/Relic_BrokenDrumstick.png b/Classes/Relics/Assets/Relic_BrokenDrumstick.png new file mode 100644 index 0000000000000000000000000000000000000000..4228762196f4e144a20d0a97d13d44ff9b18e7fa GIT binary patch literal 1122 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=Dh+L6~vJ#O${~4egmB5hW46K32*3xq68y`AMmI6}bgK)eHls47YguJQ{>uF6ifOi{PD zbs{}UK3djZt>nqvW6s4qD1-ZCERRDRmN*N_31y=g{ z<>lpi<;HsXMd|v6mX?v90`zGE;%B09k2gXakl<5wp<;IRwdJb`TMuUx6%m z$bfJkp-Et6Uz5keNcHUI4Poh1iVicDd zr#F^ej(${n-@==v7C{~@A)&| z`#q1}7gt_3PhMVpdFy=c$E}xlGA1(gF*?lb($jv&IJ0_oj;ovhk~fc}1gF`ZtXrHj zcc;$%ifSSCq`mrQSsgY6ZJX7fWR(A;JXOnSL(#5^Z*F~4SFZ4}Rs1H+a9Lop!uR`+ zf~G%}=2&a=Rpmyl%nsXgp@K(v7@}A?ejGlY$lk?w?YfEE%vVcAxfzzQRj5CZx;K+C zV)q&Wfz9_~l*H~bd7RuUtlDDs)%8)e(+PD3JGUcU8+g=N1l(Fu_e7_@^0YqP_)WRt zOl%m3Liwq%&)fJJemb1eyK~dX_s_w9RjfOTtjv`b>l>a+ZMBHC*(Myjv*;;POxT^> zI{CNW?_YMA{oZ`Ho?SoMM55FZr>s03vLWet@V0X`HTypEX8dPxP+zo}VIxoG@{Lp7 ztNagebBj6pgz2V>thszcBdg)eq6)^ME0e0Z85Rg9{+eqQrDW3bA$`XthV2Im=bZ>( zH0$71_;I6D>06!AikQU>;+LZvPQ2hea;dwo=G`y;6J}g~*NdN?np%D^^=ICT>i7Hq znCj1LI;Z;}#lL)4MNZ2ST`kSv)K$|<4jY7a8i~%;o9DPQbeZ1m(>8nOZfGo$R+mX# zy)@?zn4b-V?Sm&^Ze`k8rsv5#%%qpQVHm*t`l%V%u#4sg58JsXtK NJzf1=);T3K0RRO4zdZl| literal 0 HcmV?d00001 diff --git a/Classes/Relics/Assets/Relic_BrokenDrumstick.png.import b/Classes/Relics/Assets/Relic_BrokenDrumstick.png.import new file mode 100644 index 00000000..056f3973 --- /dev/null +++ b/Classes/Relics/Assets/Relic_BrokenDrumstick.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8j841tqqkqeb" +path="res://.godot/imported/Relic_BrokenDrumstick.png-94c905ef353da245ad24e71cbd686e66.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Classes/Relics/Assets/Relic_BrokenDrumstick.png" +dest_files=["res://.godot/imported/Relic_BrokenDrumstick.png-94c905ef353da245ad24e71cbd686e66.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/Globals/Scribe.cs b/Globals/Scribe.cs index ca4861c2..722452b6 100644 --- a/Globals/Scribe.cs +++ b/Globals/Scribe.cs @@ -426,6 +426,24 @@ e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs ), } ), + new RelicTemplate( + 15, + "Broken Drumstick", + Rarity.Uncommon, + GD.Load("res://Classes/Relics/Assets/Relic_BrokenDrumstick.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnBattleStart, + 10, + (e, self, val) => + { + //TODO: make damage scale with current act + e.BD.DealDamage(Targetting.All, val, e.BD.Player); + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index 68048a23..bceaad7e 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -90,6 +90,8 @@ RELIC_SHORTCUT_NAME,Shortcut,捷径 RELIC_SHORTCUT_TOOLTIP,"Can choose any path regardless of connections, but only once.","可无视路径连接选择任意路线,但仅限一次。" RELIC_SECONDPICK_NAME,Second Pick,备用拨片 RELIC_SECONDPICK_TOOLTIP,"Placing a note has a 20% chance to instantly refill the combo bar.","每次演奏音符时,有20%的几率立即填满连击槽。" +RELIC_BROKENDRUMSTICK_NAME,Broken Drumstick,破碎的鼓棒 +RELIC_BROKENDRUMSTICK_TOOLTIP,"Enemies start combat damaged.","敌人在战斗开始时受到伤害。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置 From 6ee89229107b77101baa6b9a7180164054c5d05d Mon Sep 17 00:00:00 2001 From: cornerloan Date: Tue, 6 May 2025 16:52:07 -0700 Subject: [PATCH 11/11] Added blood money --- Classes/Relics/Assets/Relic_BloodMoney.png | Bin 0 -> 968 bytes .../Relics/Assets/Relic_BloodMoney.png.import | 34 ++++++++++++++++++ Globals/Scribe.cs | 23 ++++++++++++ Globals/Translations/Translations.csv | 2 ++ 4 files changed, 59 insertions(+) create mode 100644 Classes/Relics/Assets/Relic_BloodMoney.png create mode 100644 Classes/Relics/Assets/Relic_BloodMoney.png.import diff --git a/Classes/Relics/Assets/Relic_BloodMoney.png b/Classes/Relics/Assets/Relic_BloodMoney.png new file mode 100644 index 0000000000000000000000000000000000000000..f1bef7ea7747e9d80e3348b99cbbbeec51d3fe15 GIT binary patch literal 968 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=Dh+L6~vJ#O${~4egmB5hW46K32*3xq68y`AMmI6}bgK)eHls47YguJQ{>uF6ifOi{PD zbs{}UK3djZt>nqvW6s4qD1-ZCERRDRmN*N_31y=g{ z<>lpi<;HsXMd|v6mX?v90`zGE;%B09k2gXakl<5wp<;IRwdJb`TMuUx6%m z$bf8EGx4y}ot?;9I= zzdW^c*O&12bt}x1|L=dXS0?_`QTL2Z4eQpJ+FX686n15|&b(b$MW=fI`{%oR(LEP= zug_{1OBgRnq#w1=);OD8IG3+1wU)nX_M?}RUNIDzoa^mG)_cd(c3I7J||92L>a()=8_hBaQWLAyTH1kzOe%TLMFCN`+jr9=s z1J=K60@h_u=SNT2^VT)(a0;W-uW1U$Cup3o*vXa%ytdC(ES3%H zdad<2zt43jd+hn5n!&cw?#nmj7k5Qk9v!^5ohkM(hf^Vo_S5V_*$2y}9J~4VHWS;1 zA1reWp8scAnBt!1B9`)aPv>*iSk|!dK;a zyto1D!jJnLCn;Q+x^-DS*Fx2apP0YgtAAL3wdZN%e82sSQ*Q}&1n1<;2W2NuS3j3^ HP6("res://Classes/Relics/Assets/Relic_BloodMoney.png"), + new RelicEffect[] + { + new RelicEffect( + BattleEffectTrigger.OnDamageInstance, + 10, + (e, self, val) => + { + if ( + e is BattleDirector.Harbinger.OnDamageInstanceArgs dmgArgs + && dmgArgs.Dmg.Target == e.BD.Player + && e.BD.Player.GetCurrentHealth() + < StageProducer.PlayerStats.MaxHealth / 2 + ) + StageProducer.PlayerStats.Money += val; + } + ), + } + ), }; public static readonly SongTemplate[] SongDictionary = new[] //Generalize and make pools for areas/room types diff --git a/Globals/Translations/Translations.csv b/Globals/Translations/Translations.csv index bceaad7e..2c762eec 100644 --- a/Globals/Translations/Translations.csv +++ b/Globals/Translations/Translations.csv @@ -92,6 +92,8 @@ RELIC_SECONDPICK_NAME,Second Pick,备用拨片 RELIC_SECONDPICK_TOOLTIP,"Placing a note has a 20% chance to instantly refill the combo bar.","每次演奏音符时,有20%的几率立即填满连击槽。" RELIC_BROKENDRUMSTICK_NAME,Broken Drumstick,破碎的鼓棒 RELIC_BROKENDRUMSTICK_TOOLTIP,"Enemies start combat damaged.","敌人在战斗开始时受到伤害。" +RELIC_BLOODMONEY_NAME,Blood Money,血腥钱袋 +RELIC_BLOODMONEY_TOOLTIP,"Gain money when taking damage below half health.","在生命值低于一半时受到伤害可获得金钱。" INVENTORY_TAB_NOTES,Notes,乐谱 INVENTORY_TAB_RELICS,Relics,遗物 OPTIONS_VOLUME_LABEL,Master Volume,最终音量设置