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
20 changes: 19 additions & 1 deletion Globals/Translations/Translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,22 @@ CREDITS_ADDITIONAL_ART,Art,额外美术
CREDITS_ADDITIONAL_HELP,Additional Help,额外协助
CREDITS_OTHER_PLAYTESTERS,All our other playtesters,以及所有其他测试玩家
CREDITS_SPECIAL_THANKS,Special Thanks,特别鸣谢
CREDITS_THANKS_PLAYERS,And to you the player!,以及屏幕前的你!
CREDITS_THANKS_PLAYERS,And to you the player!,以及屏幕前的你!
BOSSBLOOD_EFFECT1,"Heal and convert a basic note into a Blood note.","每循环治疗 点生命,并将一个普通音符转化为血之音符。"
CYBERFOX_EFFECT1,Gains one dodge.,获得一次闪避。
EFFIGY_EFFECT1,Only takes 1 damage at a time.,每次只受到1点伤害。
EFFIGY_EFFECT2,Sets player's health to 1 if defeated.,被击败时将玩家的生命值设为1。
HOLOGRAEME_EFFECT1,Player only plays every other loop.,玩家每隔一轮行动一次。
HOLOGRAEME_EFFECT2,"Holograeme only has 1 health, and is immune to relic damage.","全息格莱姆仅有1点生命值,且免疫遗物伤害。"
KEYTHULU_EFFECT1,"Every loop mindcrush ticks down by one, when it reaches zero, the player is defeated.","每次循环,心灵碾压计数会减1。当计数归零时,玩家即被击败。"
LWS_EFFECT1,Converts an empty note into a Lesser Wolf Snake note.,将一个基础音符转化为次级狼蛇音符。
PARASIFLY_EFFECT1,All enemies gains block the first time fatal damage is dealt.,首次受到致命伤害时,所有敌人获得格挡。
STRAWMAN_EFFECT1,Player cannot take fatal damage.,玩家不会受到致命伤害。
GWS_EFFECT1,Adds Greater Wolf Snake notes after the first loop.,首次循环后,添加高级狼蛇音符。
TURTLE_EFFECT1,Gains one block and drains some of player's charge to heal.,获得一层格挡,并消耗玩家部分充能以进行治疗。
GWS_NOTE_DESCRIPTION,"If timed badly, deals high damage to the player. Damage increases each loop.","若时机不佳,则对玩家造成高额伤害,且伤害随每次循环递增。"
PARASIFLY_NOTE_DESCRIPTION,Parasifly gains block if timed badly.,若时机不佳,寄生蝇获得格挡。
BOSSBLOOD_NOTE_DESCRIPTION,Boss Blood heals if timed badly.,若时机不佳,首领之血会进行治疗。
SPIDER_NOTE_DESCRIPTION,Player gets poisoned if timed badly.,若时机不佳,玩家会中毒。
LWS_NOTE_DESCRIPTION,"If timed badly, deals damage to the player. Damage increases each loop.","若时机不佳,则对玩家造成伤害,且伤害随每次循环递增。"
MUSHROOM_NOTE_DESCRIPTION,Player gets poisoned if timed badly.,若时机不佳,玩家会中毒。
Binary file added Scenes/BattleDirector/Assets/BattleEndSymbol.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 Scenes/BattleDirector/Assets/BattleEndSymbol.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bmw2tkpmv22ew"
path="res://.godot/imported/BattleEndSymbol.png-5c282cbc73fc3f3efd9a51295ca4bc9d.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Scenes/BattleDirector/Assets/BattleEndSymbol.png"
dest_files=["res://.godot/imported/BattleEndSymbol.png-5c282cbc73fc3f3efd9a51295ca4bc9d.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 Scenes/BattleDirector/Assets/BattleStartSymbol.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 Scenes/BattleDirector/Assets/BattleStartSymbol.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c5r2idc5x21ro"
path="res://.godot/imported/BattleStartSymbol.png-a8cb230df43bb6721a2442dfafc1c8b6.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Scenes/BattleDirector/Assets/BattleStartSymbol.png"
dest_files=["res://.godot/imported/BattleStartSymbol.png-a8cb230df43bb6721a2442dfafc1c8b6.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
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 Scenes/BattleDirector/Assets/DamageInstanceSymbol.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dosjbiqlrb3cr"
path="res://.godot/imported/DamageInstanceSymbol.png-9cd27c768e2ba03d6c47f5ac093aa1d8.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Scenes/BattleDirector/Assets/DamageInstanceSymbol.png"
dest_files=["res://.godot/imported/DamageInstanceSymbol.png-9cd27c768e2ba03d6c47f5ac093aa1d8.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 Scenes/BattleDirector/Assets/LoopSymbol.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 Scenes/BattleDirector/Assets/LoopSymbol.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://r7oc2aa06s24"
path="res://.godot/imported/LoopSymbol.png-4d5a564a81d7d7d2248da6ec1ceb0061.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Scenes/BattleDirector/Assets/LoopSymbol.png"
dest_files=["res://.godot/imported/LoopSymbol.png-4d5a564a81d7d7d2248da6ec1ceb0061.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
25 changes: 19 additions & 6 deletions Scenes/BattleDirector/BattleScene.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://b0mrgr7h0ty1y"]
[gd_scene load_steps=14 format=3 uid="uid://b0mrgr7h0ty1y"]

[ext_resource type="Script" uid="uid://bttu0wmy2fp64" path="res://Scenes/BattleDirector/Scripts/BattleDirector.cs" id="1_jmdo1"]
[ext_resource type="Script" uid="uid://pl57giqyhckb" path="res://Scenes/UI/Scripts/MenuModule.cs" id="2_ka0ws"]
Expand All @@ -10,6 +10,7 @@
[ext_resource type="Script" uid="uid://cp6t6haqyef7o" path="res://Scenes/AreaBasedBackground.cs" id="7_6k2qj"]
[ext_resource type="Texture2D" uid="uid://dbjotl0v1ymia" path="res://SharedAssets/BattleFrame1.png" id="7_klvil"]
[ext_resource type="Theme" uid="uid://d37e3tpsbxwak" path="res://Scenes/UI/Assets/GeneralTheme.tres" id="8_62qim"]
[ext_resource type="PackedScene" uid="uid://bejjkejyeffek" path="res://Scenes/BattleDirector/EnemyDescriptions.tscn" id="11_gbbxr"]

[sub_resource type="Gradient" id="Gradient_8uy3a"]
offsets = PackedFloat32Array(0, 0.766234, 1)
Expand All @@ -20,7 +21,7 @@ gradient = SubResource("Gradient_8uy3a")
fill_from = Vector2(1, 0)
fill_to = Vector2(0.738532, 1)

[node name="ProtoBattleDirector" type="Node2D" node_paths=PackedStringArray("PuppetMarkers", "_countdownLabel", "CD", "CM", "DW", "NPB", "Audio", "FocusedButton")]
[node name="ProtoBattleDirector" type="Node2D" node_paths=PackedStringArray("PuppetMarkers", "_countdownLabel", "CD", "CM", "DW", "NPB", "Audio", "Descriptions", "FocusedButton")]
process_mode = 1
script = ExtResource("1_jmdo1")
PuppetMarkers = [NodePath("PlayerMarker"), NodePath("Enemy1Marker"), NodePath("Enemy2Marker"), NodePath("Enemy3Marker")]
Expand All @@ -30,6 +31,7 @@ CM = NodePath("VPContainer")
DW = NodePath("3D/SubViewport/3DWizard")
NPB = NodePath("NotePlacementBar")
Audio = NodePath("AudioStreamPlayer")
Descriptions = NodePath("EnemyDescriptions")
FocusedButton = NodePath("StartButton")
metadata/_edit_lock_ = true

Expand Down Expand Up @@ -100,10 +102,10 @@ offset_bottom = 360.0
texture = ExtResource("7_klvil")

[node name="StartButton" type="Button" parent="."]
offset_left = 241.0
offset_top = 230.0
offset_right = 443.0
offset_bottom = 267.0
offset_left = 190.0
offset_top = 200.0
offset_right = 450.0
offset_bottom = 248.0
theme = ExtResource("8_62qim")
text = "BATTLE_ROOM_BEGIN_BUTTON"

Expand Down Expand Up @@ -142,3 +144,14 @@ theme_override_constants/shadow_offset_y = 3
theme_override_constants/shadow_outline_size = 3
theme_override_font_sizes/font_size = 64
text = "5"

[node name="EnemyDescriptions" parent="." instance=ExtResource("11_gbbxr")]
anchors_preset = 0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = 320.0
offset_top = 183.0
offset_right = 320.0
offset_bottom = 183.0
grow_horizontal = 1
grow_vertical = 1
50 changes: 50 additions & 0 deletions Scenes/BattleDirector/EnemyDescriptions.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[gd_scene load_steps=3 format=3 uid="uid://bejjkejyeffek"]

[ext_resource type="Script" uid="uid://da8no3g3kbob7" path="res://Scenes/BattleDirector/Scripts/EnemyDescriptions.cs" id="1_r3tcc"]
[ext_resource type="Texture2D" uid="uid://djd6iw2g84bba" path="res://Scenes/UI/Assets/UI_CenterFrame.png" id="2_mg2uj"]

[node name="EnemyDescriptions" type="Control" node_paths=PackedStringArray("DescriptionsContainer")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_r3tcc")
DescriptionsContainer = NodePath("Center/MarginContainer/MarginContainer/VBoxContainer")

[node name="Center" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2

[node name="MarginContainer" type="MarginContainer" parent="Center"]
layout_mode = 2
mouse_filter = 2
theme_override_constants/margin_top = 230

[node name="UiCenterFrame" type="NinePatchRect" parent="Center/MarginContainer"]
custom_minimum_size = Vector2(280, 80)
layout_mode = 2
texture = ExtResource("2_mg2uj")
patch_margin_left = 12
patch_margin_top = 12
patch_margin_right = 12
patch_margin_bottom = 12

[node name="MarginContainer" type="MarginContainer" parent="Center/MarginContainer"]
layout_mode = 2
mouse_filter = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 6
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 6

[node name="VBoxContainer" type="VBoxContainer" parent="Center/MarginContainer/MarginContainer"]
layout_mode = 2
mouse_filter = 2
5 changes: 5 additions & 0 deletions Scenes/BattleDirector/Scripts/BattleDirector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public partial class BattleDirector : Node2D
[Export]
private AudioStreamPlayer Audio;

[Export]
public EnemyDescriptions Descriptions;

[Export]
public Button FocusedButton; //Initial start button

Expand Down Expand Up @@ -139,6 +142,7 @@ public override void _Ready()
{
FocusedButton.QueueFree();
FocusedButton = null;
Descriptions.QueueFree();
StartCountdown();
};

Expand Down Expand Up @@ -201,6 +205,7 @@ private void InitEnemies()
_enemies[i] = enemy;
AddEnemyEffects(enemy);
}
Descriptions.Setup(_enemies[0]);
}

public override void _Process(double delta)
Expand Down
78 changes: 78 additions & 0 deletions Scenes/BattleDirector/Scripts/EnemyDescriptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using FunkEngine;
using Godot;

public partial class EnemyDescriptions : Control
{
[Export]
private VBoxContainer DescriptionsContainer;

private const string _loopIconPath = "res://Scenes/BattleDirector/Assets/LoopSymbol.png";
private const string _damageInstanceIconPath =
"res://Scenes/BattleDirector/Assets/DamageInstanceSymbol.png";
private const string _battleStartIconPath =
"res://Scenes/BattleDirector/Assets/BattleStartSymbol.png";
private const string _battleEndIconPath =
"res://Scenes/BattleDirector/Assets/BattleEndSymbol.png";

private bool _isVisible = false;
private const string TranslationKeySuffix = "_NOTE_DESCRIPTION";

public void Setup(EnemyPuppet enemy)
{
if (enemy.InitialNote.Amount > 0)
{
string desc = NoteDescBuilder(Scribe.NoteDictionary[enemy.InitialNote.NoteId].Name);
AddDescriptionRow(Scribe.NoteDictionary[enemy.InitialNote.NoteId].Texture, desc);
_isVisible = true;
}

foreach (var effect in enemy.GetBattleEvents())
{
if (effect.Description == null)
continue;
Texture2D icon = GetTriggerIcon(effect.GetTrigger());
AddDescriptionRow(icon, effect.Description);
_isVisible = true;
}

Visible = _isVisible;
}

private void AddDescriptionRow(Texture2D iconTexture, string text)
{
HBoxContainer hbox = new HBoxContainer();

TextureRect icon = new TextureRect();
icon.Texture = iconTexture;
icon.StretchMode = TextureRect.StretchModeEnum.Keep;

Label desc = new Label();
desc.Text = text;
desc.SizeFlagsHorizontal = SizeFlags.ExpandFill;
desc.AutowrapMode = TextServer.AutowrapMode.WordSmart;

hbox.AddChild(icon);
hbox.AddChild(desc);
DescriptionsContainer.AddChild(hbox);
}

private string NoteDescBuilder(string noteName)
{
return noteName.ToUpper() + TranslationKeySuffix;
}

private Texture2D GetTriggerIcon(BattleEffectTrigger trigger)
{
//TODO: add more as we get more enemy effect triggers
return trigger switch
{
BattleEffectTrigger.OnLoop => GD.Load<Texture2D>(_loopIconPath),
BattleEffectTrigger.OnDamageInstance => GD.Load<Texture2D>(_damageInstanceIconPath),
BattleEffectTrigger.OnBattleStart => GD.Load<Texture2D>(_battleStartIconPath),
BattleEffectTrigger.OnBattleEnd => GD.Load<Texture2D>(_battleEndIconPath),
_ => null,
};
}
}
1 change: 1 addition & 0 deletions Scenes/BattleDirector/Scripts/EnemyDescriptions.cs.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://da8no3g3kbob7
Loading
Loading