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
5 changes: 3 additions & 2 deletions Globals/Translations/Translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ SHOP_REMOVAL,Remove A Note,移除音符
SHOP_CONFIRM,Confirm Purchase,购买已确认
SHOP_CANCEL,Cancel,取消操作
REMOVAL_COST,Removal Fee,删除费用
SHOP_HEAL,Heal 25%: 30g,愈合 25%: 30硬币
BATTLE_ROOM_BEGIN_BUTTON,Begin Battle [Enter],开始战斗 [Enter]
BATTLE_ROOM_PERFECT,Perfect,Perfect
BATTLE_ROOM_GOOD,Good,良好
Expand Down Expand Up @@ -122,15 +123,15 @@ TUTORIAL_NODYING,No dying during a tutorial!,教程中不会死亡!
TUTORIAL_DIALOGUE_1,"Hello, welcome to Midnight Riff!",你好!欢迎来到午夜即兴!
TUTORIAL_DIALOGUE_2,This is a rhythm game where notes move right to left.,这是一款节奏游戏,音符从右向左移动。
TUTORIAL_DIALOGUE_3,"Press the correct button as the notes line up to hit the note. Try to time it as well as you can!",音符对齐时按下正确的按键,尽量精准地进行点击!
TUTORIAL_DIALOGUE_4,"What are the correct buttons? I'll help you out and show you. These can be changed from the meu. Once you press continue we can get started!",正确的按键是什么?我会帮你指出来。这些可以在菜单中更改。按下继续后,我们就可以开始了!
TUTORIAL_DIALOGUE_4,"What are the correct buttons? I'll help you out and show you. These can be changed from the menu. Once you press continue we can get started!",正确的按键是什么?我会帮你指出来。这些可以在菜单中更改。按下继续后,我们就可以开始了!
TUTORIAL_LOOP_1,At set intervals the chart loops! This means all notes on the chart repeat. You know a loop is coming up when this symbol scrolls by.,在固定的时间间隔内,乐谱会循环!这意味着乐谱上的所有音符都会重复出现。当这个符号滚动经过时,你就知道循环即将开始。
TUTORIAL_LOOP_2,"In case you haven't noticed, I'll explain these things on the left side. This is your note queue.",如果你还没注意到,我会在左侧解释这些内容。这是你的音符队列。
TUTORIAL_LOOP_3,"This is the combo multiplier, as you hit notes successfully your multiplier will rise. If you miss a note, your multiplier gets reset.",这是连击倍数,成功点击音符后,你的倍数将会上升。如果你错过了一个音符,你的倍数将会重置。
TUTORIAL_LOOP_4,"This is the freestyle bar, as you hit notes successfully, the freestyle bar fills. The higher your multiplier the more this fills.",这是风格条,成功点击音符后,风格条将会填充。你的倍数越高,填充速度越快。
TUTORIAL_LOOP_5,"By now you've probably taken damage. These aren't just cozy songs, these are battles! You take damage when you miss or have bad timing, or from enemy effects. How do you deal damage to enemies? Fill up the bar and I'll tell you.",到目前为止,你可能已经受到伤害了。这些不仅仅是轻松的歌曲,它们是战斗!你错过音符或时机不好,或者受到敌人的效果影响时,都会受到伤害。你如何对敌人造成伤害?填满能量条,我会告诉你。
TUTORIAL_PLACE_1,"Okay, now that the bar is full, you can press a lane button to place your own note. Your notes have special effects. Placing notes consumes the freestyle bar.",好的,现在能量条已满,你可以按下轨道按键放置你自己的音符。你的音符具有特殊效果。放置音符会消耗风格条。
TUTORIAL_PLACE_2,These note effects range from dealing damage to applying status effects!,这些音符效果从造成伤害到施加状态效果不等!
TUTORIAL_PLACE_3,"Your notes can be placed anywhere a note doesn't already exist, and that isn't over the loop marker. But be careful, if you try to place a note while the bar isn't full you may miss a note!",你的音符可以放置在任何没有音符存在且不在循环标记上的位置。但是要小心,如果你试图在能量条未满时放置音符,你可能会错过音符!
TUTORIAL_PLACE_3,"Your notes can be placed anywhere a note doesn't already exist, and that isn't over the loop marker.",你的音符可以放置在任何没有音符存在且不在循环标记上的位置。
TUTORIAL_PLACE_4,"The note you'll place is indicated in the top of the note queue.",你将要放置的音符显示在音符队列顶部。
TUTORIAL_PLACE_5,"Notes are automatically hit when you place them, how helpful, but they come back around when the chart loops, and you need to time hitting them then.",放置音符时会自动击中,这非常方便,但当乐谱循环时它们会再次出现,你需要掌握时机才能击中它们。
TUTORIAL_PLACE_6,"Now go ahead, place a note in the bottom lane!",现在,在最下方的轨道上放置一个音符吧!
Expand Down
2 changes: 1 addition & 1 deletion Scenes/BattleDirector/Scripts/BattleDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public override void _UnhandledInput(InputEvent @event)
{
if (@event is InputEventKey eventKey && eventKey.Pressed && !eventKey.Echo)
{
return;
//return;
if (eventKey.Keycode == Key.Key0)
{
DebugKillEnemy();
Expand Down
49 changes: 43 additions & 6 deletions Scenes/ShopScene/Scripts/ShopScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public partial class ShopScene : Control
[Export]
private Button _removalButton;

[Export]
private Button _healButton;

[Export]
private GridContainer _noteGrid;

Expand Down Expand Up @@ -50,34 +53,35 @@ public partial class ShopScene : Control
[Export]
private Label _removalCostLabel;

[Export]
private PlayerPuppet _player;

private ButtonGroup _bGroup;

private readonly int[] _priceByRarity = [100, 90, 80, 70, 60, 50, 9];
const int NoteCost = 45;

private List<ShopItem> _shopItems = new List<ShopItem>();

public override void _Ready()
public override void _EnterTree()
{
BgAudioPlayer.LiveInstance.ResumeLevelMusic();
_bGroup = new ButtonGroup();
Initialize();
_confirmationButton.Pressed += TryPurchase;
_denyButton.Pressed += CloseConfirmationPopup;
_removalButton.Pressed += OpenRemovalPane;
_removalAcceptButton.Pressed += RemoveNote;
_cancelRemoveButton.Pressed += CloseRemovalPane;
}

public override void _EnterTree()
{
BgAudioPlayer.LiveInstance.ResumeLevelMusic();
_healButton.Pressed += TryHeal;
}

private void Initialize()
{
UpdateMoneyLabel();
GenerateShopItems();
PopulatePossessedNotes();
UpdateHealButton();
}

public override void _Input(InputEvent @event)
Expand Down Expand Up @@ -209,6 +213,7 @@ private void TryPurchase()
_currentUItem = null;

RefreshShopPrices();
UpdateHealButton();
}

private Control _lastFocused;
Expand Down Expand Up @@ -321,5 +326,37 @@ private void RemoveNote()
StageProducer.PlayerStats.RemoveNote(_toRemove);
_selectedRemoveButton.QueueFree();
CloseRemovalPane();
UpdateMoneyLabel();
UpdateHealButton();
}

private bool _hasHealed;
private const int HealCost = 30;
private int _healAmount = (StageProducer.PlayerStats.MaxHealth / 4);

private void UpdateHealButton()
{
_healButton.Disabled =
StageProducer.PlayerStats.Money <= HealCost
|| StageProducer.PlayerStats.CurrentHealth == StageProducer.PlayerStats.MaxHealth
|| _hasHealed;
}

private void TryHeal()
{
if (
StageProducer.PlayerStats.Money <= HealCost
|| StageProducer.PlayerStats.CurrentHealth == StageProducer.PlayerStats.MaxHealth
|| _hasHealed
)
{
return;
}

StageProducer.PlayerStats.Money -= HealCost;
UpdateMoneyLabel();
UpdateHealButton();
_hasHealed = true;
_player.Heal(_healAmount);
}
}
3 changes: 2 additions & 1 deletion Scenes/ShopScene/ShopScene.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ offset_bottom = 180.0
texture = ExtResource("2_dt33i")
script = ExtResource("3_n34g6")

[node name="ShopUI" parent="." instance=ExtResource("8_2xatg")]
[node name="ShopUI" parent="." node_paths=PackedStringArray("_player") instance=ExtResource("8_2xatg")]
offset_right = 640.0
offset_bottom = 360.0
_player = NodePath("../PlayerMarker/PlayerPuppet")
55 changes: 37 additions & 18 deletions Scenes/ShopScene/ShopUI.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[ext_resource type="Script" uid="uid://cahjluc6v7ked" path="res://Scenes/UI/TitleScreen/Scripts/SceneChange.cs" id="5_w0f8r"]
[ext_resource type="Texture2D" uid="uid://dyt1cvag13aik" path="res://SharedAssets/Money.png" id="6_tf865"]

[node name="ShopUI" type="Control" node_paths=PackedStringArray("_moneyLabel", "_exitButton", "_removalButton", "_noteGrid", "_relicGrid", "_confirmationPopup", "_confirmationButton", "_denyButton", "_descriptionLabel", "_removalPanel", "_possessionGrid", "_removalAcceptButton", "_cancelRemoveButton", "_removalCostLabel")]
[node name="ShopUI" type="Control" node_paths=PackedStringArray("_moneyLabel", "_exitButton", "_removalButton", "_healButton", "_noteGrid", "_relicGrid", "_confirmationPopup", "_confirmationButton", "_denyButton", "_descriptionLabel", "_removalPanel", "_possessionGrid", "_removalAcceptButton", "_cancelRemoveButton", "_removalCostLabel")]
z_index = 2
layout_mode = 3
anchors_preset = 15
Expand All @@ -18,8 +18,9 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_bmt43")
_moneyLabel = NodePath("MoneyContainer/MoneyFrame/MarginContainer/HBoxContainer/MoneyLabel")
_exitButton = NodePath("BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer/Continue")
_removalButton = NodePath("BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer/Removal")
_exitButton = NodePath("OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer/Continue")
_removalButton = NodePath("OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer/Removal")
_healButton = NodePath("OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer/Heal")
_noteGrid = NodePath("TopPanel/MarginContainer/VBoxContainer/NoteSelection/MarginContainer/NotesBox/CenterContainer/NotesGrid")
_relicGrid = NodePath("TopPanel/MarginContainer/VBoxContainer/RelicSelection/MarginContainer/RelicsBox/CenterContainer/RelicsGrid")
_confirmationPopup = NodePath("ConfirmPurchase")
Expand All @@ -34,7 +35,7 @@ _removalCostLabel = NodePath("Removal/Panel/MarginContainer/VBoxContainer/Option

[node name="TopPanel" type="NinePatchRect" parent="."]
layout_mode = 0
offset_right = 508.0
offset_right = 463.0
offset_bottom = 211.0
texture = ExtResource("1_67his")
patch_margin_left = 12
Expand Down Expand Up @@ -137,7 +138,7 @@ columns = 6
[node name="BottomPanel" type="NinePatchRect" parent="."]
layout_mode = 0
offset_top = 211.0
offset_right = 640.0
offset_right = 463.0
offset_bottom = 360.0
texture = ExtResource("1_67his")
patch_margin_left = 12
Expand All @@ -146,10 +147,12 @@ patch_margin_right = 12
patch_margin_bottom = 12

[node name="DescBox" type="MarginContainer" parent="BottomPanel"]
layout_mode = 2
offset_right = 640.0
offset_bottom = 149.0
grow_vertical = 0
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 3
size_flags_stretch_ratio = 0.4
theme_override_constants/margin_left = 10
Expand Down Expand Up @@ -210,9 +213,18 @@ autowrap_mode = 2
clip_text = true
text_overrun_behavior = 1

[node name="OptionsBG" type="NinePatchRect" parent="BottomPanel/DescBox/HBoxContainer"]
[node name="OptionsBG" type="NinePatchRect" parent="."]
self_modulate = Color(1, 1, 1, 0.75)
layout_mode = 2
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -176.0
offset_top = -179.0
grow_horizontal = 0
grow_vertical = 0
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_stretch_ratio = 0.39
Expand All @@ -222,7 +234,7 @@ patch_margin_top = 6
patch_margin_right = 6
patch_margin_bottom = 7

[node name="OptionsMargin" type="MarginContainer" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG"]
[node name="OptionsMargin" type="MarginContainer" parent="OptionsBG"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
Expand All @@ -235,37 +247,44 @@ theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4

[node name="OptionsBG" type="NinePatchRect" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin"]
[node name="OptionsBG" type="NinePatchRect" parent="OptionsBG/OptionsMargin"]
layout_mode = 2
texture = ExtResource("3_r34tc")
patch_margin_left = 7
patch_margin_top = 7
patch_margin_right = 7
patch_margin_bottom = 7

[node name="MarginContainer" type="MarginContainer" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG"]
[node name="MarginContainer" type="MarginContainer" parent="OptionsBG/OptionsMargin/OptionsBG"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 7
theme_override_constants/margin_top = 7
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 7

[node name="VBoxContainer" type="VBoxContainer" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG/MarginContainer"]
[node name="VBoxContainer" type="VBoxContainer" parent="OptionsBG/OptionsMargin/OptionsBG/MarginContainer"]
layout_mode = 2
alignment = 1

[node name="Removal" type="Button" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer"]
[node name="Removal" type="Button" parent="OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("4_3vktw")
text = "SHOP_REMOVAL"

[node name="Continue" type="Button" parent="BottomPanel/DescBox/HBoxContainer/OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer"]
[node name="Heal" type="Button" parent="OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme = ExtResource("4_3vktw")
text = "SHOP_HEAL"

[node name="Continue" type="Button" parent="OptionsBG/OptionsMargin/OptionsBG/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
Expand Down
Binary file added SharedAssets/Heart.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 SharedAssets/Heart.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dtaf4wcsur721"
path="res://.godot/imported/Heart.png-7dfefac643a1f449fa6e4073fe6379c7.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://SharedAssets/Heart.png"
dest_files=["res://.godot/imported/Heart.png-7dfefac643a1f449fa6e4073fe6379c7.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
Loading