From 017be896f34e48f86e5922444cc1aafc10de75d3 Mon Sep 17 00:00:00 2001 From: Zenny Date: Mon, 16 Feb 2026 16:44:36 -0800 Subject: [PATCH] Weapons tested and general changes made to support the results of those tests --- .../Equipment/Tags/ItemTag.cs | 3 +- .../Map/IDungeonFloor.cs | 2 - Zennysoft.Game.Ma/export_presets.cfg | 2 +- .../enemy_types/02. michael/Michael.tscn | 9 +- Zennysoft.Game.Ma/src/items/armor/Armor.cs | 16 +- .../items/armor/resources/BlessedArmor.tres | 33 + .../src/items/armor/resources/DemonRobe.tres | 33 + .../items/armor/resources/GiftOfGrace.tres | 33 + .../src/items/armor/resources/JaguarSuit.tres | 33 + .../src/items/armor/resources/SaintCloth.tres | 34 + .../items/armor/resources/StoneSafety.tres | 33 + .../items/armor/resources/WoodenArmament.tres | 2 +- .../src/items/restorative/Restorative.cs | 13 + .../src/items/restorative/Restorative.tscn | 45 +- .../items/weapons/PersuaderProjectile.tscn | 590 +------------ Zennysoft.Game.Ma/src/items/weapons/Weapon.cs | 12 +- .../weapons/resources/BlackPlumeSword.tres | 6 +- .../src/items/weapons/resources/Ciello.tres | 6 +- .../items/weapons/resources/CrossSword.tres | 8 +- .../weapons/resources/GeomanticReactor.tres | 4 +- .../items/weapons/resources/HopesEdge.tres | 2 +- .../weapons/resources/HuracansBlade.tres | 2 +- .../src/items/weapons/resources/Katara.tres | 4 +- .../src/items/weapons/resources/Kubel.tres | 11 +- .../weapons/resources/LoveJudgement.tres | 2 +- .../items/weapons/resources/MothersSpear.tres | 2 +- .../items/weapons/resources/NaddahaSword.tres | 2 +- .../items/weapons/resources/NebulaChain.tres | 6 +- .../weapons/resources/Palm of Heaven.tres | 4 +- .../items/weapons/resources/Persuader.tres | 6 +- .../items/weapons/resources/PlasmaSword.tres | 6 +- .../weapons/resources/ShiningHalberd.tres | 2 +- .../items/weapons/resources/SpadedStaff.tres | 2 +- .../weapons/resources/Swan Sword Odette.tres | 2 +- .../src/map/Placeables/Stele B.tscn | 4 +- .../src/map/dungeon/code/Overworld.cs | 81 +- .../src/map/dungeon/code/SpecialFloor.cs | 5 - .../floors/Special Floors/00. Altar.tscn | 8 +- Zennysoft.Game.Ma/src/player/Player.cs | 29 +- Zennysoft.Game.Ma/src/player/Player.tscn | 777 +++++++++++++++--- Zennysoft.Game.Ma/src/system/Projectile.cs | 18 +- .../src/ui/inventory_menu/InventoryMenu.cs | 24 +- .../src/ui/load_next_level/LoadNextLevel.cs | 1 - 43 files changed, 1096 insertions(+), 821 deletions(-) create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/BlessedArmor.tres create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/DemonRobe.tres create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/GiftOfGrace.tres create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/JaguarSuit.tres create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/SaintCloth.tres create mode 100644 Zennysoft.Game.Ma/src/items/armor/resources/StoneSafety.tres diff --git a/Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs b/Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs index 19aca5eb1..9dd02c81b 100644 --- a/Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs +++ b/Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs @@ -20,5 +20,6 @@ public enum ItemTag RestrictUnequip, UnequipAllItems, EjectAllItems, - UseAllItems + UseAllItems, + GlueOnEquip, } \ No newline at end of file diff --git a/Zennysoft.Game.Ma.Implementation/Map/IDungeonFloor.cs b/Zennysoft.Game.Ma.Implementation/Map/IDungeonFloor.cs index 3f7a8fc93..b65496db4 100644 --- a/Zennysoft.Game.Ma.Implementation/Map/IDungeonFloor.cs +++ b/Zennysoft.Game.Ma.Implementation/Map/IDungeonFloor.cs @@ -11,7 +11,5 @@ public interface IDungeonFloor : INode3D public ImmutableList Rooms { get; } - public void FadeOutAudio(); - public bool FloorIsLoaded { get; set; } } diff --git a/Zennysoft.Game.Ma/export_presets.cfg b/Zennysoft.Game.Ma/export_presets.cfg index 2c6b8dce3..f79bc47e8 100644 --- a/Zennysoft.Game.Ma/export_presets.cfg +++ b/Zennysoft.Game.Ma/export_presets.cfg @@ -9,7 +9,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="Export/Ma.exe" +export_path="../../Export/Ma.exe" patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.tscn index aff22da71..197d4e1df 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=14 format=3 uid="uid://xeuulxx1p702"] [ext_resource type="Script" uid="uid://c4pdledq3bll3" path="res://src/enemy/enemy_types/02. michael/Michael.cs" id="1_lb5oy"] -[ext_resource type="PackedScene" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="3_wrps7"] +[ext_resource type="PackedScene" uid="uid://uqle8gaeajg6" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="3_wrps7"] [ext_resource type="PackedScene" uid="uid://cn4fv2gv6raql" path="res://src/enemy/behaviors/PatrolBehavior.tscn" id="5_fkx5j"] [ext_resource type="PackedScene" uid="uid://cve5oouhowtff" path="res://src/enemy/behaviors/FollowBehavior.tscn" id="6_bun8r"] [ext_resource type="AudioStream" uid="uid://ba8xendacec6" path="res://src/audio/sfx/item_kyuu_layer_2.ogg" id="6_x8mrp"] @@ -32,6 +32,13 @@ axis_lock_angular_x = true axis_lock_angular_z = true motion_mode = 1 script = ExtResource("1_lb5oy") +AeolicResistance = -20.0 +HydricResistance = -20.0 +IgenousResistance = -20.0 +FerrumResistance = -20.0 +TelluricResistance = -20.0 +HolyResistance = -20.0 +CurseResistance = -20.0 [node name="LineOfSight" type="Area3D" parent="."] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/items/armor/Armor.cs b/Zennysoft.Game.Ma/src/items/armor/Armor.cs index 72feda780..0af1d95ea 100644 --- a/Zennysoft.Game.Ma/src/items/armor/Armor.cs +++ b/Zennysoft.Game.Ma/src/items/armor/Armor.cs @@ -20,6 +20,8 @@ public partial class Armor : Node3D, IArmor _bonusDamage = Stats.BonusAttack; _bonusDefense = Stats.BonusDefense; _bonusLuck = Stats.BonusLuck; + _bonusHp = Stats.BonusHP; + _bonusVt = Stats.BonusVT; } public string ItemName => Stats.Name; @@ -60,6 +62,16 @@ public partial class Armor : Node3D, IArmor [Save("armor_bonus_luck")] private int _bonusLuck { get; set; } = 0; + public int BonusHP { get => _bonusHp; } + + public int BonusVT { get => _bonusVt; } + + [Save("armor_bonus_hp")] + private int _bonusHp { get; set; } = 0; + + [Save("armor_bonus_vt")] + private int _bonusVt { get; set; } = 0; + public ElementalResistanceSet ElementalResistance => new ElementalResistanceSet(Stats.AeolicResistance, Stats.HydricResistance, Stats.IgneousResistance, Stats.FerrumResistance, Stats.TelluricResistance, Stats.HolyResistance, Stats.CurseResistance); public void IncreaseArmorDefense(int bonus) => _bonusDefense += bonus; @@ -71,9 +83,9 @@ public partial class Armor : Node3D, IArmor [Save("armor_stats")] [Export] public ArmorStats Stats { get; set; } = new ArmorStats(); + public Augment Augment { get; set; } - public int BonusHP { get; } - public int BonusVT { get; } + public bool Glued { get; set; } public Texture2D GetTexture() => Stats.Texture; diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/BlessedArmor.tres b/Zennysoft.Game.Ma/src/items/armor/resources/BlessedArmor.tres new file mode 100644 index 000000000..553551596 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/BlessedArmor.tres @@ -0,0 +1,33 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://cu1uhwj8xjp58"] + +[ext_resource type="Texture2D" uid="uid://ckt7wupdlylo2" path="res://src/items/armor/textures/HolyArmor2.png" id="1_5f68i"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_11yah"] + +[resource] +script = ExtResource("2_11yah") +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +_holyResistance = 0.0 +_curseResistance = 0.0 +Name = "Blessed Armor" +Description = "Raises HP by 25." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 3 +BonusLuck = 0 +BonusHP = 25 +BonusVT = 0 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_5f68i") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/DemonRobe.tres b/Zennysoft.Game.Ma/src/items/armor/resources/DemonRobe.tres new file mode 100644 index 000000000..32e90459d --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/DemonRobe.tres @@ -0,0 +1,33 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://djv02oycfyavl"] + +[ext_resource type="Texture2D" uid="uid://ckt7wupdlylo2" path="res://src/items/armor/textures/HolyArmor2.png" id="1_1o8ag"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_cwod3"] + +[resource] +script = ExtResource("2_cwod3") +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +_holyResistance = 0.0 +_curseResistance = 0.0 +Name = "Demon Robe" +Description = "Raises Luck." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 3 +BonusLuck = 15 +BonusHP = 0 +BonusVT = 0 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_1o8ag") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/GiftOfGrace.tres b/Zennysoft.Game.Ma/src/items/armor/resources/GiftOfGrace.tres new file mode 100644 index 000000000..979b09eb9 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/GiftOfGrace.tres @@ -0,0 +1,33 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://bbakqutps7jn6"] + +[ext_resource type="Texture2D" uid="uid://ckt7wupdlylo2" path="res://src/items/armor/textures/HolyArmor2.png" id="1_ny4sc"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_5nugg"] + +[resource] +script = ExtResource("2_5nugg") +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +_holyResistance = 0.0 +_curseResistance = 0.0 +Name = "Gift of Grace" +Description = "Raises VT by 25." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 3 +BonusLuck = 0 +BonusHP = 0 +BonusVT = 25 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_ny4sc") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/JaguarSuit.tres b/Zennysoft.Game.Ma/src/items/armor/resources/JaguarSuit.tres new file mode 100644 index 000000000..9722aa60c --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/JaguarSuit.tres @@ -0,0 +1,33 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://vangfekav0c"] + +[ext_resource type="Texture2D" uid="uid://8ls7ei4nl6le" path="res://src/items/armor/textures/Jaguar Suit.png" id="1_7p33d"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_aw6ev"] + +[resource] +script = ExtResource("2_aw6ev") +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +_holyResistance = 0.0 +_curseResistance = 0.0 +Name = "Jaguar Suit" +Description = "Raises ATK by 3." +SpawnRate = 0.5 +BonusAttack = 3 +BonusDefense = 3 +BonusLuck = 0 +BonusHP = 0 +BonusVT = 0 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_7p33d") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/SaintCloth.tres b/Zennysoft.Game.Ma/src/items/armor/resources/SaintCloth.tres new file mode 100644 index 000000000..8348a2ff1 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/SaintCloth.tres @@ -0,0 +1,34 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://cn8d8d2m8g2cl"] + +[ext_resource type="Texture2D" uid="uid://ckt7wupdlylo2" path="res://src/items/armor/textures/HolyArmor2.png" id="1_svley"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_534n3"] + +[resource] +script = ExtResource("2_534n3") +_telluricResistance = 20.0 +_aeolicResistance = 20.0 +_hydricResistance = 20.0 +_igneousResistance = 20.0 +_ferrumResistance = 20.0 +_holyResistance = 20.0 +_curseResistance = 20.0 +Name = "Saint Cloth" +Description = "Resistant to all elements. +Raises HP and VT by 50." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 5 +BonusLuck = 0 +BonusHP = 50 +BonusVT = 50 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_svley") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/StoneSafety.tres b/Zennysoft.Game.Ma/src/items/armor/resources/StoneSafety.tres new file mode 100644 index 000000000..1e060aeae --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/armor/resources/StoneSafety.tres @@ -0,0 +1,33 @@ +[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://dvctqg5decxv5"] + +[ext_resource type="Texture2D" uid="uid://ckt7wupdlylo2" path="res://src/items/armor/textures/HolyArmor2.png" id="1_abjuy"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="2_gppme"] + +[resource] +script = ExtResource("2_gppme") +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +_holyResistance = 0.0 +_curseResistance = 0.0 +Name = "Stone Safety" +Description = "Cannot be unequipped." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 5 +BonusLuck = 0 +BonusHP = 0 +BonusVT = 0 +AeolicResistance = 0 +TelluricResistance = 0 +HydricResistance = 0 +IgneousResistance = 0 +FerrumResistance = 0 +HolyResistance = 0 +CurseResistance = 0 +ThrowSpeed = 12.0 +ThrowDamage = 5 +ItemTag = 19 +Texture = ExtResource("1_abjuy") diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/WoodenArmament.tres b/Zennysoft.Game.Ma/src/items/armor/resources/WoodenArmament.tres index c00d19138..bd4f3969e 100644 --- a/Zennysoft.Game.Ma/src/items/armor/resources/WoodenArmament.tres +++ b/Zennysoft.Game.Ma/src/items/armor/resources/WoodenArmament.tres @@ -17,7 +17,7 @@ Description = "+3 DEF" SpawnRate = 0.3 BonusAttack = 0 BonusDefense = 3 -BonusLuck = 0.05 +BonusLuck = 5 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/restorative/Restorative.cs b/Zennysoft.Game.Ma/src/items/restorative/Restorative.cs index b2ffd9550..53e3f25a0 100644 --- a/Zennysoft.Game.Ma/src/items/restorative/Restorative.cs +++ b/Zennysoft.Game.Ma/src/items/restorative/Restorative.cs @@ -16,6 +16,19 @@ public partial class Restorative : Node3D, IHealthPack [Node] public Area3D Pickup { get; set; } = default!; + private Timer _despawnTimer; + + public void OnEnterTree() + { + _despawnTimer = new Timer(); + AddChild(_despawnTimer); + _despawnTimer.Timeout += _despawnTimer_Timeout; + _despawnTimer.WaitTime = 30; + _despawnTimer.Start(); + } + + private void _despawnTimer_Timeout() => CallDeferred(MethodName.QueueFree); + [Export] public int RestoreAmount { get; set; } = 4; } diff --git a/Zennysoft.Game.Ma/src/items/restorative/Restorative.tscn b/Zennysoft.Game.Ma/src/items/restorative/Restorative.tscn index e5c977146..331c510ab 100644 --- a/Zennysoft.Game.Ma/src/items/restorative/Restorative.tscn +++ b/Zennysoft.Game.Ma/src/items/restorative/Restorative.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://cwtl2h0srj5jd"] +[gd_scene load_steps=10 format=3 uid="uid://cwtl2h0srj5jd"] [ext_resource type="Script" uid="uid://qjvotbwutcb5" path="res://src/items/restorative/Restorative.cs" id="1_3beyl"] [ext_resource type="Texture2D" uid="uid://b36xqrykgtdkw" path="res://src/items/restorative/texture/FRAME1.png" id="2_jv3e6"] @@ -26,6 +26,43 @@ animations = [{ "speed": 7.0 }] +[sub_resource type="Animation" id="Animation_jv3e6"] +resource_name = "FadeOut" +length = 30.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite3D:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(25, 25.6, 26.3, 27.0333, 27.5333, 28.3333, 28.9308, 29.9955, 30), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 0)] +} + +[sub_resource type="Animation" id="Animation_wrrxk"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimatedSprite3D:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_wrrxk"] +_data = { +&"FadeOut": SubResource("Animation_jv3e6"), +&"RESET": SubResource("Animation_wrrxk") +} + [node name="Restorative" type="Node3D"] script = ExtResource("1_3beyl") @@ -45,3 +82,9 @@ texture_filter = 0 render_priority = 100 sprite_frames = SubResource("SpriteFrames_mejdx") autoplay = "default" + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +&"": SubResource("AnimationLibrary_wrrxk") +} +autoplay = "FadeOut" diff --git a/Zennysoft.Game.Ma/src/items/weapons/PersuaderProjectile.tscn b/Zennysoft.Game.Ma/src/items/weapons/PersuaderProjectile.tscn index ebd8ef8ee..2a03cc31f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/PersuaderProjectile.tscn +++ b/Zennysoft.Game.Ma/src/items/weapons/PersuaderProjectile.tscn @@ -1,9 +1,7 @@ -[gd_scene load_steps=73 format=3 uid="uid://c4kc2vybdy5t"] +[gd_scene load_steps=8 format=3 uid="uid://c4kc2vybdy5t"] [ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_7ykt2"] [ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_3v8me"] -[ext_resource type="Texture2D" uid="uid://c1x4iaqgj2rur" path="res://src/vfx/Items Etc/smokepuff.png" id="3_7ykt2"] -[ext_resource type="AudioStream" uid="uid://bgvt4kqyvl5gp" path="res://src/audio/sfx/ENEMY_EDEN_FIRE.ogg" id="4_3v8me"] [sub_resource type="Resource" id="Resource_14f5p"] script = ExtResource("2_3v8me") @@ -11,587 +9,35 @@ Damage = 99 ElementType = 0 metadata/_custom_type_script = "uid://ctshiyffvt4y5" -[sub_resource type="AtlasTexture" id="AtlasTexture_3v8me"] -atlas = ExtResource("3_7ykt2") -region = Rect2(0, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_fqyvm"] -atlas = ExtResource("3_7ykt2") -region = Rect2(512, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dd88y"] -atlas = ExtResource("3_7ykt2") -region = Rect2(1024, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dh58r"] -atlas = ExtResource("3_7ykt2") -region = Rect2(1536, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dkte1"] -atlas = ExtResource("3_7ykt2") -region = Rect2(2048, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_blqrc"] -atlas = ExtResource("3_7ykt2") -region = Rect2(2560, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_arywf"] -atlas = ExtResource("3_7ykt2") -region = Rect2(3072, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8qbn2"] -atlas = ExtResource("3_7ykt2") -region = Rect2(3584, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_t4sid"] -atlas = ExtResource("3_7ykt2") -region = Rect2(4096, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jsygo"] -atlas = ExtResource("3_7ykt2") -region = Rect2(4608, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kgaue"] -atlas = ExtResource("3_7ykt2") -region = Rect2(5120, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_qyxji"] -atlas = ExtResource("3_7ykt2") -region = Rect2(5632, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_8ss7g"] -atlas = ExtResource("3_7ykt2") -region = Rect2(6144, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_87a2b"] -atlas = ExtResource("3_7ykt2") -region = Rect2(6656, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6xin2"] -atlas = ExtResource("3_7ykt2") -region = Rect2(7168, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vleot"] -atlas = ExtResource("3_7ykt2") -region = Rect2(7680, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_70ig7"] -atlas = ExtResource("3_7ykt2") -region = Rect2(8192, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_snqpl"] -atlas = ExtResource("3_7ykt2") -region = Rect2(8704, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_spu52"] -atlas = ExtResource("3_7ykt2") -region = Rect2(9216, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rnfxb"] -atlas = ExtResource("3_7ykt2") -region = Rect2(9728, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_oywdj"] -atlas = ExtResource("3_7ykt2") -region = Rect2(10240, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_t6bla"] -atlas = ExtResource("3_7ykt2") -region = Rect2(10752, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_k40vd"] -atlas = ExtResource("3_7ykt2") -region = Rect2(11264, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0wdl3"] -atlas = ExtResource("3_7ykt2") -region = Rect2(11776, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_d1m4j"] -atlas = ExtResource("3_7ykt2") -region = Rect2(12288, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_qs5lg"] -atlas = ExtResource("3_7ykt2") -region = Rect2(12800, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_uwjde"] -atlas = ExtResource("3_7ykt2") -region = Rect2(13312, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_pgllj"] -atlas = ExtResource("3_7ykt2") -region = Rect2(13824, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mcef2"] -atlas = ExtResource("3_7ykt2") -region = Rect2(14336, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6rbxw"] -atlas = ExtResource("3_7ykt2") -region = Rect2(14848, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ng4rb"] -atlas = ExtResource("3_7ykt2") -region = Rect2(15360, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_xuahn"] -atlas = ExtResource("3_7ykt2") -region = Rect2(15872, 0, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_dsa18"] -atlas = ExtResource("3_7ykt2") -region = Rect2(0, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hvxd8"] -atlas = ExtResource("3_7ykt2") -region = Rect2(512, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jfuun"] -atlas = ExtResource("3_7ykt2") -region = Rect2(1024, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_gmolx"] -atlas = ExtResource("3_7ykt2") -region = Rect2(1536, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rq7q0"] -atlas = ExtResource("3_7ykt2") -region = Rect2(2048, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ehup4"] -atlas = ExtResource("3_7ykt2") -region = Rect2(2560, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_v46bh"] -atlas = ExtResource("3_7ykt2") -region = Rect2(3072, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_mn1q0"] -atlas = ExtResource("3_7ykt2") -region = Rect2(3584, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_57r4m"] -atlas = ExtResource("3_7ykt2") -region = Rect2(4096, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_cv4sa"] -atlas = ExtResource("3_7ykt2") -region = Rect2(4608, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_287xc"] -atlas = ExtResource("3_7ykt2") -region = Rect2(5120, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_igxdn"] -atlas = ExtResource("3_7ykt2") -region = Rect2(5632, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_yowi7"] -atlas = ExtResource("3_7ykt2") -region = Rect2(6144, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_74d6p"] -atlas = ExtResource("3_7ykt2") -region = Rect2(6656, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_37ncv"] -atlas = ExtResource("3_7ykt2") -region = Rect2(7168, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_f5mpf"] -atlas = ExtResource("3_7ykt2") -region = Rect2(7680, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rbj0v"] -atlas = ExtResource("3_7ykt2") -region = Rect2(8192, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_kj88y"] -atlas = ExtResource("3_7ykt2") -region = Rect2(8704, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_li0qy"] -atlas = ExtResource("3_7ykt2") -region = Rect2(9216, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_6lgr3"] -atlas = ExtResource("3_7ykt2") -region = Rect2(9728, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_jd6k4"] -atlas = ExtResource("3_7ykt2") -region = Rect2(10240, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0wyru"] -atlas = ExtResource("3_7ykt2") -region = Rect2(10752, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_ei8cw"] -atlas = ExtResource("3_7ykt2") -region = Rect2(11264, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_c6y4b"] -atlas = ExtResource("3_7ykt2") -region = Rect2(11776, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_j1hc4"] -atlas = ExtResource("3_7ykt2") -region = Rect2(12288, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_vbf54"] -atlas = ExtResource("3_7ykt2") -region = Rect2(12800, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_rrfn3"] -atlas = ExtResource("3_7ykt2") -region = Rect2(13312, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_hng4w"] -atlas = ExtResource("3_7ykt2") -region = Rect2(13824, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_0rgn5"] -atlas = ExtResource("3_7ykt2") -region = Rect2(14336, 512, 512, 512) - -[sub_resource type="AtlasTexture" id="AtlasTexture_a3qva"] -atlas = ExtResource("3_7ykt2") -region = Rect2(14848, 512, 512, 512) - -[sub_resource type="SpriteFrames" id="SpriteFrames_pck2g"] -animations = [{ -"frames": [{ -"duration": 1.0, -"texture": SubResource("AtlasTexture_3v8me") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_fqyvm") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dd88y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dh58r") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dkte1") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_blqrc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_arywf") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8qbn2") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_t4sid") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_jsygo") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kgaue") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_qyxji") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_8ss7g") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_87a2b") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6xin2") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vleot") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_70ig7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_snqpl") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_spu52") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rnfxb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_oywdj") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_t6bla") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_k40vd") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0wdl3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_d1m4j") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_qs5lg") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_uwjde") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_pgllj") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mcef2") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6rbxw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ng4rb") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_xuahn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_dsa18") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_hvxd8") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_jfuun") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_gmolx") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rq7q0") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ehup4") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_v46bh") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_mn1q0") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_57r4m") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_cv4sa") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_287xc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_igxdn") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_yowi7") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_74d6p") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_37ncv") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_f5mpf") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rbj0v") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_kj88y") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_li0qy") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_6lgr3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_jd6k4") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0wyru") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_ei8cw") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_c6y4b") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_j1hc4") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_vbf54") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_rrfn3") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_hng4w") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_0rgn5") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_a3qva") -}], -"loop": false, -"name": &"default", -"speed": 24.0 -}] - -[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"] - [sub_resource type="Animation" id="Animation_xrn7e"] resource_name = "fire" length = 0.66667 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath(".:animation") +tracks/0/path = NodePath("%ProjectileHitbox:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"default"] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".:frame") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0.2, 0.666667), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [0, 67] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("%ProjectileHitbox:position") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { "times": PackedFloat32Array(0, 0.666667), "transitions": PackedFloat32Array(1, 1), "update": 0, "values": [Vector3(0, 2.1, 0), Vector3(0, 2.1, -40)] } -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("%ProjectileHitbox/CollisionShape3D:disabled") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0, 0.0166667, 0.666667), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 1, -"values": [true, false, true] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("../Bullet/ProjectileHitbox/AudioStreamPlayer3D:stream") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [ExtResource("4_3v8me")] -} -tracks/5/type = "value" -tracks/5/imported = false -tracks/5/enabled = true -tracks/5/path = NodePath("../Bullet/ProjectileHitbox/AudioStreamPlayer3D:playing") -tracks/5/interp = 1 -tracks/5/loop_wrap = true -tracks/5/keys = { -"times": PackedFloat32Array(0.0333333), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} [sub_resource type="Animation" id="Animation_8qeb2"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath(".:animation") +tracks/0/path = NodePath("%ProjectileHitbox:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"default"] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".:frame") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("%ProjectileHitbox:position") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), "update": 0, -"values": [Vector3(0, 0, 0)] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("%ProjectileHitbox/CollisionShape3D:disabled") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("%AudioStreamPlayer3D:playing") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] +"values": [Vector3(0, 2.1, 0)] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_q8n6h"] @@ -600,34 +46,26 @@ _data = { &"RESET": SubResource("Animation_8qeb2") } +[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"] + [node name="Persuader" type="Node3D"] script = ExtResource("1_7ykt2") AttackData = SubResource("Resource_14f5p") -[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, -2) -pixel_size = 0.0025 -billboard = 1 -sprite_frames = SubResource("SpriteFrames_pck2g") +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +unique_name_in_owner = true +libraries = { +&"": SubResource("AnimationLibrary_q8n6h") +} [node name="Bullet" type="Node3D" parent="."] [node name="ProjectileHitbox" type="Area3D" parent="Bullet"] unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0) collision_mask = 2049 +monitoring = false +monitorable = false [node name="CollisionShape3D" type="CollisionShape3D" parent="Bullet/ProjectileHitbox"] shape = SubResource("SphereShape3D_kct8n") -disabled = true - -[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Bullet/ProjectileHitbox"] -unique_name_in_owner = true -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.1, 5.8557) -stream = ExtResource("4_3v8me") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="Bullet"] -unique_name_in_owner = true -root_node = NodePath("../../AnimatedSprite3D") -libraries = { -&"": SubResource("AnimationLibrary_q8n6h") -} diff --git a/Zennysoft.Game.Ma/src/items/weapons/Weapon.cs b/Zennysoft.Game.Ma/src/items/weapons/Weapon.cs index 53010d917..1deaea949 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/Weapon.cs +++ b/Zennysoft.Game.Ma/src/items/weapons/Weapon.cs @@ -22,6 +22,8 @@ public partial class Weapon : Node3D, IWeapon _bonusDamage = Stats.BonusAttack; _bonusDefense = Stats.BonusDefense; _bonusLuck = Stats.BonusLuck; + _bonusHp = Stats.BonusHP; + _bonusVt = Stats.BonusVT; } public string ItemName => Stats.Name; @@ -63,9 +65,9 @@ public partial class Weapon : Node3D, IWeapon public int BonusLuck { get => _bonusLuck; } - public int BonusHP { get; } + public int BonusHP { get => _bonusHp; } - public int BonusVT { get; } + public int BonusVT { get => _bonusVt; } [Save("weapon_bonus_damage")] private int _bonusDamage { get; set; } = 0; @@ -76,6 +78,12 @@ public partial class Weapon : Node3D, IWeapon [Save("weapon_bonus_luck")] private int _bonusLuck { get; set; } = 0; + [Save("weapon_bonus_hp")] + private int _bonusHp { get; set; } = 0; + + [Save("weapon_bonus_vt")] + private int _bonusVt { get; set; } = 0; + [Export] [Save("weapon_stats")] public WeaponStats Stats { get; set; } = new WeaponStats(); diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/BlackPlumeSword.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/BlackPlumeSword.tres index 0c28c3804..8f0b1031e 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/BlackPlumeSword.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/BlackPlumeSword.tres @@ -11,11 +11,13 @@ WeaponTag = 0 SelfDamage = 0 SoundEffect = 23 Name = "Black Plume Sword" -Description = "Deals curse damage." +Description = "Deals curse damage. + +A profane blade to vanquish the sacred." SpawnRate = 0.1 BonusAttack = 8 BonusDefense = 0 -BonusLuck = 5 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Ciello.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Ciello.tres index 69236c252..b9433adc0 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Ciello.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Ciello.tres @@ -12,11 +12,13 @@ SelfDamage = 0 SoundEffect = 23 Name = "Ciello" Description = "Triple Strike. -Does more damage when thrown." +Does more damage when thrown. + +A performance of blades." SpawnRate = 0.1 BonusAttack = 4 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/CrossSword.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/CrossSword.tres index 574635f40..631892645 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/CrossSword.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/CrossSword.tres @@ -10,12 +10,14 @@ WeaponElement = 6 WeaponTag = 0 SelfDamage = 0 SoundEffect = 23 -Name = "Cross Sword" -Description = "Holy damage." +Name = "Cruciform Sword" +Description = "Holy damage. + +Wielded by the heroine of a convent from the late 176th Century." SpawnRate = 0.1 BonusAttack = 9 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres index 9841891ff..960a0b5ea 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres @@ -11,11 +11,11 @@ WeaponTag = 11 SelfDamage = 0 SoundEffect = 23 Name = "Geomantic Reactor" -Description = "" +Description = "Standard armament of holy ecologists dispatched to the tower a thousand years ago." SpawnRate = 0.1 BonusAttack = 15 BonusDefense = 0 -BonusLuck = 5 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/HopesEdge.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/HopesEdge.tres index 03badca03..b7e6c76ef 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/HopesEdge.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/HopesEdge.tres @@ -15,7 +15,7 @@ Description = "Sword that strikes harder the lower HP you have." SpawnRate = 0.1 BonusAttack = 0 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/HuracansBlade.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/HuracansBlade.tres index 5e416ccba..724a1ef2c 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/HuracansBlade.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/HuracansBlade.tres @@ -15,7 +15,7 @@ Description = "Igneous damage." SpawnRate = 0.1 BonusAttack = 7 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Katara.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Katara.tres index 4810e06ef..04eb5f44f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Katara.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Katara.tres @@ -13,9 +13,9 @@ SoundEffect = 23 Name = "Katara" Description = "+1 ATK, Fast" SpawnRate = 0.3 -BonusAttack = 1 +BonusAttack = 3 BonusDefense = 0 -BonusLuck = 5 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Kubel.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Kubel.tres index 55af6e9c1..ac22c7495 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Kubel.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Kubel.tres @@ -11,13 +11,14 @@ WeaponTag = 0 SelfDamage = 0 SoundEffect = 24 Name = "Kubel" -Description = "+9 ATK -A very powerful spear. -For every hit, you lose 5 HP." +Description = "Deals Ferrum damage. +Increases DEF by 3. + +A massive weapon that protects oneself against larger foes." SpawnRate = 0.01 BonusAttack = 9 -BonusDefense = 0 -BonusLuck = 0.05 +BonusDefense = 3 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/LoveJudgement.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/LoveJudgement.tres index 8075b96e5..1d269670f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/LoveJudgement.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/LoveJudgement.tres @@ -16,7 +16,7 @@ A mace only wieldable by the stout of heart." SpawnRate = 0.01 BonusAttack = 11 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/MothersSpear.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/MothersSpear.tres index 0a0fe8622..54388124e 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/MothersSpear.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/MothersSpear.tres @@ -15,7 +15,7 @@ Description = "\"Earth, When I am about to Die, I Lean on you. Earth, While I am SpawnRate = 0.01 BonusAttack = 7 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/NaddahaSword.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/NaddahaSword.tres index 2e73c3967..58561040a 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/NaddahaSword.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/NaddahaSword.tres @@ -15,7 +15,7 @@ Description = "Hydric Damage." SpawnRate = 0.01 BonusAttack = 7 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/NebulaChain.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/NebulaChain.tres index 825965635..e66ebeb85 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/NebulaChain.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/NebulaChain.tres @@ -11,11 +11,11 @@ WeaponTag = 2 SelfDamage = 0 SoundEffect = 23 Name = "Nebula Chain" -Description = "Chain Whip that strikes through time and dimension." +Description = "Chain whip that strikes through time and dimension." SpawnRate = 0.01 -BonusAttack = 7 +BonusAttack = 12 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Palm of Heaven.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Palm of Heaven.tres index 013a62acc..b69a9fe4f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Palm of Heaven.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Palm of Heaven.tres @@ -6,7 +6,7 @@ [resource] script = ExtResource("1_pwwg7") AttackSpeed = 1.0 -WeaponElement = 7 +WeaponElement = 8 WeaponTag = 0 SelfDamage = 0 SoundEffect = 23 @@ -15,7 +15,7 @@ Description = "" SpawnRate = 0.01 BonusAttack = 8 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Persuader.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Persuader.tres index 15142a34f..1f31d080f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Persuader.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Persuader.tres @@ -11,11 +11,11 @@ WeaponTag = 12 SelfDamage = 0 SoundEffect = 23 Name = "Persuader" -Description = "" +Description = "A traveler's tool or path of extreme violence." SpawnRate = 0.1 -BonusAttack = 15 +BonusAttack = 0 BonusDefense = 0 -BonusLuck = 5 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/PlasmaSword.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/PlasmaSword.tres index 243f26570..0f8c06c6f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/PlasmaSword.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/PlasmaSword.tres @@ -11,9 +11,11 @@ WeaponTag = 7 SelfDamage = 0 SoundEffect = 25 Name = "Plasma Sword" -Description = "Has the power to occasionally instantly disintegrate an enemy" +Description = "Rare protorelic found in the tower. + +Has the power to occasionally instantly disintegrate an enemy." SpawnRate = 0.5 -BonusAttack = 0 +BonusAttack = 14 BonusDefense = 0 BonusLuck = 10 BonusHP = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/ShiningHalberd.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/ShiningHalberd.tres index 948e462dc..5b16c45ce 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/ShiningHalberd.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/ShiningHalberd.tres @@ -15,7 +15,7 @@ Description = "Weapon that gradually becomes weaker." SpawnRate = 0.3 BonusAttack = 8 BonusDefense = 0 -BonusLuck = 5 +BonusLuck = 0 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/SpadedStaff.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/SpadedStaff.tres index b1113cff0..92b35c1f4 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/SpadedStaff.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/SpadedStaff.tres @@ -11,7 +11,7 @@ WeaponTag = 0 SelfDamage = 0 SoundEffect = 24 Name = "Spaded Staff" -Description = "" +Description = "Heavy." SpawnRate = 0.3 BonusAttack = 8 BonusDefense = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Swan Sword Odette.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Swan Sword Odette.tres index a3cb73517..8327f69a8 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Swan Sword Odette.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Swan Sword Odette.tres @@ -16,7 +16,7 @@ The blade of a thousand faced heroine." SpawnRate = 0.01 BonusAttack = 10 BonusDefense = 0 -BonusLuck = 0.25 +BonusLuck = 20 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 diff --git a/Zennysoft.Game.Ma/src/map/Placeables/Stele B.tscn b/Zennysoft.Game.Ma/src/map/Placeables/Stele B.tscn index 1c28bf85d..742a2bba7 100644 --- a/Zennysoft.Game.Ma/src/map/Placeables/Stele B.tscn +++ b/Zennysoft.Game.Ma/src/map/Placeables/Stele B.tscn @@ -105,11 +105,11 @@ shadow_mesh = SubResource("ArrayMesh_vep6p") [sub_resource type="CylinderShape3D" id="CylinderShape3D_4nuqd"] height = 20.9375 -radius = 9.34375 +radius = 5.85645 [sub_resource type="CylinderShape3D" id="CylinderShape3D_1snst"] height = 15.5671 -radius = 15.1045 +radius = 10.4375 [sub_resource type="CylinderShape3D" id="CylinderShape3D_ochsp"] height = 3.86572 diff --git a/Zennysoft.Game.Ma/src/map/dungeon/code/Overworld.cs b/Zennysoft.Game.Ma/src/map/dungeon/code/Overworld.cs index ac144459e..ac385fc1b 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/code/Overworld.cs +++ b/Zennysoft.Game.Ma/src/map/dungeon/code/Overworld.cs @@ -33,75 +33,68 @@ public partial class Overworld : SpecialFloor, IDungeonFloor public override void InitializeDungeon() { - Show(); - Exit.AreaEntered += Exit_AreaEntered; - RestoreArea.AreaEntered += RestoreArea_AreaEntered; - RestoreArea.AreaExited += RestoreArea_AreaExited; - RestoreTimer = new Timer(); - RestoreTimer.WaitTime = 0.3f; - RestoreTimer.Timeout += RestoreTimer_Timeout; - AddChild(RestoreTimer); - FloorIsLoaded = true; + Show(); + Exit.AreaEntered += Exit_AreaEntered; + RestoreArea.AreaEntered += RestoreArea_AreaEntered; + RestoreArea.AreaExited += RestoreArea_AreaExited; + RestoreTimer = new Timer(); + RestoreTimer.WaitTime = 0.3f; + RestoreTimer.Timeout += RestoreTimer_Timeout; + AddChild(RestoreTimer); + FloorIsLoaded = true; - ItemRescueInteractZone.AreaEntered += ItemRescueInteractZone_AreaEntered; - var dimmableAudio = DimmableAudio.GetChildren().OfType(); - foreach (var dimmable in dimmableAudio) - dimmable.FadeIn(); + ItemRescueInteractZone.AreaEntered += ItemRescueInteractZone_AreaEntered; + var dimmableAudio = DimmableAudio.GetChildren().OfType(); + foreach (var dimmable in dimmableAudio) + dimmable.FadeIn(); } public void OnResolved() { - Game.ItemRescueMenu.MenuClosing += ItemRescueMenu_MenuClosing; + Game.ItemRescueMenu.MenuClosing += ItemRescueMenu_MenuClosing; } private void ItemRescueMenu_MenuClosing() { - GameRepo.Resume(); + GameRepo.Resume(); } private void ItemRescueInteractZone_AreaEntered(Area3D area) { - GameRepo.Pause(); - Game.ItemRescueMenu.Show(); - } - - public override void FadeOutAudio() - { - var dimmableAudio = DimmableAudio.GetChildren().OfType(); - foreach (var dimmable in dimmableAudio) - dimmable.FadeOut(); + GameRepo.Pause(); + Game.ItemRescueMenu.Show(); } private void RestoreTimer_Timeout() { - if (!Player.HealthComponent.AtFullHealth) - Player.HealthComponent.Heal(1); - if (!Player.VTComponent.AtFullVT) - Player.VTComponent.Restore(1); + if (!Player.HealthComponent.AtFullHealth) + Player.HealthComponent.Heal(1); + if (!Player.VTComponent.AtFullVT) + Player.VTComponent.Restore(1); } private void RestoreArea_AreaExited(Area3D area) { - if (area.GetOwner() is IPlayer) - { - RestoreTimer.Stop(); - Player.SetHealthTimerStatus(true); - } + if (area.GetOwner() is IPlayer) + { + RestoreTimer.Stop(); + Player.SetHealthTimerStatus(true); + } } private void RestoreArea_AreaEntered(Area3D area) { - if (area.GetOwner() is IPlayer) - { - RestoreTimer.Start(); - Player.SetHealthTimerStatus(false); - } + if (area.GetOwner() is IPlayer) + { + RestoreTimer.Start(); + Player.SetHealthTimerStatus(false); + } } private void Exit_AreaEntered(Area3D area) { - if (area.GetOwner() is IPlayer) - ExitReached(); + if (area.GetOwner() is IPlayer) + ExitReached(); } public void ExitReached() => Game.FloorExitReached(); @@ -110,10 +103,10 @@ public partial class Overworld : SpecialFloor, IDungeonFloor public void OnExitTree() { - Exit.AreaEntered -= Exit_AreaEntered; - RestoreArea.AreaEntered -= RestoreArea_AreaEntered; - RestoreArea.AreaExited -= RestoreArea_AreaExited; - RestoreTimer.Timeout -= RestoreTimer_Timeout; + Exit.AreaEntered -= Exit_AreaEntered; + RestoreArea.AreaEntered -= RestoreArea_AreaEntered; + RestoreArea.AreaExited -= RestoreArea_AreaExited; + RestoreTimer.Timeout -= RestoreTimer_Timeout; } } diff --git a/Zennysoft.Game.Ma/src/map/dungeon/code/SpecialFloor.cs b/Zennysoft.Game.Ma/src/map/dungeon/code/SpecialFloor.cs index 8b81ec70d..ac91cb305 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/code/SpecialFloor.cs +++ b/Zennysoft.Game.Ma/src/map/dungeon/code/SpecialFloor.cs @@ -19,11 +19,6 @@ public partial class SpecialFloor : Node3D, IDungeonFloor { FloorIsLoaded = true; } - - public virtual void FadeOutAudio() - { - } - public bool FloorIsLoaded { get; set; } public virtual (Vector3 Rotation, Vector3 Position) GetPlayerSpawnPoint() => (PlayerSpawnPoint.Rotation, new Vector3(PlayerSpawnPoint.Position.X, 0, PlayerSpawnPoint.Position.Z)); diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/00. Altar.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/00. Altar.tscn index d157e2f28..5024deebe 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/00. Altar.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/00. Altar.tscn @@ -101,12 +101,12 @@ script = ExtResource("1_5jip8") Dialogue = ExtResource("2_7xfp0") [node name="Model" type="Node3D" parent="."] -transform = Transform3D(1.9, 0, 0, 0, 1.9, 0, 0, 0, 1.9, 0, 5.85044, 0) +transform = Transform3D(1.75, 0, 0, 0, 1.75, 0, 0, 0, 1.75, 0, 5.42773, 0) [node name="02_ALTAR_FLOOR_ZER0_VER_1" parent="Model" instance=ExtResource("2_xpi6o")] [node name="Collision" type="Node3D" parent="."] -transform = Transform3D(1.9, 0, 0, 0, 1.9, 0, 0, 0, 1.9, 0, 5.85044, 0) +transform = Transform3D(1.75, 0, 0, 0, 1.75, 0, 0, 0, 1.75, 0, 5.42773, 0) visible = false [node name="StaticBody3D" type="StaticBody3D" parent="Collision"] @@ -154,14 +154,14 @@ shape = SubResource("BoxShape3D_aqomv") debug_color = Color(0.937255, 0, 0.623529, 1) [node name="Spawn Points" type="Node3D" parent="."] -transform = Transform3D(1.8, 0, 0, 0, 1.8, 0, 0, 0, 1.8, 0, 5.24512, 0) +transform = Transform3D(1.75, 0, 0, 0, 1.75, 0, 0, 0, 1.75, 0, 4.82241, 0) [node name="PlayerSpawnPoint" type="Marker3D" parent="Spawn Points"] unique_name_in_owner = true transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 39.3951, -2.89376, -1.035) [node name="Room" type="Node3D" parent="."] -transform = Transform3D(1.9, 0, 0, 0, 1.9, 0, 0, 0, 1.9, 0, 5.85044, 0) +transform = Transform3D(1.75, 0, 0, 0, 1.75, 0, 0, 0, 1.75, 0, 5.42773, 0) [node name="Room" type="Area3D" parent="Room"] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/player/Player.cs b/Zennysoft.Game.Ma/src/player/Player.cs index 611d43604..91c781df2 100644 --- a/Zennysoft.Game.Ma/src/player/Player.cs +++ b/Zennysoft.Game.Ma/src/player/Player.cs @@ -308,30 +308,47 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide return; } + if (equipable is Weapon && EquipmentComponent.EquippedWeapon.Value != null && !EquipmentComponent.EquippedWeapon.Value.Glued) + Unequip(EquipmentComponent.EquippedWeapon.Value); + if (equipable is Armor && EquipmentComponent.EquippedArmor.Value != null && !EquipmentComponent.EquippedArmor.Value.Glued) + Unequip(EquipmentComponent.EquippedArmor.Value); + if (equipable is Accessory && EquipmentComponent.EquippedAccessory.Value != null && !EquipmentComponent.EquippedAccessory.Value.Glued) + Unequip(EquipmentComponent.EquippedAccessory.Value); + if (equipable is Ammo && EquipmentComponent.EquippedAmmo.Value != null && !EquipmentComponent.EquippedAmmo.Value.Glued) + Unequip(EquipmentComponent.EquippedAmmo.Value); + + if (equipable.ItemTag == ItemTag.GlueOnEquip) + equipable.Glued = true; + HealthComponent.RaiseMaximumHP(equipable.BonusHP, false); VTComponent.RaiseMaximumVT(equipable.BonusVT, false); + LuckComponent.IncreaseLuck(equipable.BonusLuck); if (equipable is IAugmentableItem augmentable) if (augmentable.Augment != null) augmentable.Augment.AugmentType.Apply(); EquipmentComponent.Equip(equipable); - SfxDatabase.Instance.Play(SoundEffect.Equip); - if (equipable is Weapon weapon && weapon.WeaponTag == WeaponTag.KineticProjectile) - PersuaderCrosshair.Show(); + if (equipable is Weapon weapon) + { + if (weapon.WeaponTag == WeaponTag.KineticProjectile) + PersuaderCrosshair.Show(); + if (weapon.WeaponTag == WeaponTag.InverseHPAttackPower) + InverseHPToAttackPowerSync(HealthComponent.CurrentHP.Value); + } } public void Unequip(IEquipableItem equipable) { HealthComponent.SetMaximumHealth(HealthComponent.MaximumHP.Value - equipable.BonusHP); VTComponent.SetMaximumVT(VTComponent.MaximumVT.Value - equipable.BonusVT); + LuckComponent.DecreaseLuck(equipable.BonusLuck); if (equipable is IAugmentableItem augmentItem && augmentItem.Augment != null) augmentItem.Augment.AugmentType.Remove(); EquipmentComponent.Unequip(equipable); - SfxDatabase.Instance.Play(SoundEffect.Unequip); if (equipable is Weapon weapon && weapon.WeaponTag == WeaponTag.KineticProjectile) PersuaderCrosshair.Hide(); @@ -594,8 +611,10 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide } if (weapon.WeaponTag == WeaponTag.KineticProjectile) + { + PlayAttackAnimation(); fired = PersuaderBullet.Fire(); - + } if (!fired) return; diff --git a/Zennysoft.Game.Ma/src/player/Player.tscn b/Zennysoft.Game.Ma/src/player/Player.tscn index 84f54c947..8e2e57d21 100644 --- a/Zennysoft.Game.Ma/src/player/Player.tscn +++ b/Zennysoft.Game.Ma/src/player/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=1586 format=3 uid="uid://cfecvvav8kkp6"] +[gd_scene load_steps=1653 format=3 uid="uid://cfecvvav8kkp6"] [ext_resource type="Script" uid="uid://yxmiqy7i0t7r" path="res://src/player/Player.cs" id="1_xcol5"] [ext_resource type="PackedScene" uid="uid://dqvlemme0iwa" path="res://src/camera/ShakeCamera.tscn" id="2_jtmj1"] @@ -8,6 +8,7 @@ [ext_resource type="Texture2D" uid="uid://ddmjhevb5ksl" path="res://src/vfx/Items Etc/geomantic_reactor_AIR.png" id="5_bngr8"] [ext_resource type="Texture2D" uid="uid://b66pc64qac8g7" path="res://src/vfx/manualmessed.png" id="6_bj1ma"] [ext_resource type="AudioStream" uid="uid://bsprdc3ka6am0" path="res://src/audio/sfx/player_steps_concrete.ogg" id="6_v7rlw"] +[ext_resource type="AudioStream" uid="uid://dfwydlvy7gg4n" path="res://src/audio/sfx/ENEMY_PILLAR_FIRE.ogg" id="7_cqsul"] [ext_resource type="Texture2D" uid="uid://jgfksn01g0ht" path="res://src/vfx/Items Etc/salmon/salmon001.png" id="7_rmwaq"] [ext_resource type="Texture2D" uid="uid://drk8jp22p41f4" path="res://src/vfx/Items Etc/divinity/divinity000.png" id="8_majw8"] [ext_resource type="Texture2D" uid="uid://0hn71j06qb5l" path="res://src/vfx/Items Etc/salmon/salmon002.png" id="8_t3nc1"] @@ -503,6 +504,7 @@ [ext_resource type="Texture2D" uid="uid://b4a312uikmfou" path="res://src/vfx/Weapon Strikes/fire_slash.png" id="499_8cv7j"] [ext_resource type="Texture2D" uid="uid://fegm3min228k" path="res://src/vfx/Weapon Strikes/lovejudgementslash.png" id="500_p1un1"] [ext_resource type="Texture2D" uid="uid://ctt1hmh6qit2t" path="res://src/vfx/Weapon Strikes/hydric_attack/tile000.png" id="500_rhpvh"] +[ext_resource type="Texture2D" uid="uid://c1x4iaqgj2rur" path="res://src/vfx/Items Etc/smokepuff.png" id="501_04cm7"] [ext_resource type="Texture2D" uid="uid://eoemb5rx6bhb" path="res://src/vfx/Weapon Strikes/rondoslash.png" id="501_58m70"] [ext_resource type="Texture2D" uid="uid://2ig1arptr1e8" path="res://src/vfx/Weapon Strikes/slash_2.png" id="501_l7c4m"] [ext_resource type="Texture2D" uid="uid://dirw767lgemi5" path="res://src/vfx/Weapon Strikes/plasma_Sword.png" id="501_nb4cq"] @@ -951,97 +953,6 @@ _data = { &"revive": SubResource("Animation_sq73w") } -[sub_resource type="Animation" id="Animation_flmxu"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"Normal Slash"] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Weapon Animations:animation") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"earth_slash"] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Weapon Animations:frame") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_ua0fy"] -resource_name = "Normal Slash" -length = 1.23334 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("%Hitbox/HitboxCollision:disabled") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.166667, 0.233333), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 1, -"values": [true, false, true] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Weapon Animations:animation") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"normal_slash"] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Weapon Animations:frame") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 1), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [0, 30] -} - [sub_resource type="Animation" id="Animation_l7c4m"] resource_name = "Air Slash" length = 1.23334 @@ -1082,46 +993,6 @@ tracks/2/keys = { "values": [0, 30] } -[sub_resource type="Animation" id="Animation_04cm7"] -resource_name = "Fire Slash" -length = 1.23334 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("%Hitbox/HitboxCollision:disabled") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.166667, 0.233333), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 1, -"values": [true, false, true] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Weapon Animations:animation") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [&"fire_slash"] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Weapon Animations:frame") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.966667), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [0, 30] -} - [sub_resource type="Animation" id="Animation_cqsul"] resource_name = "Earth Slash" length = 1.23334 @@ -1162,8 +1033,8 @@ tracks/2/keys = { "values": [0, 30] } -[sub_resource type="Animation" id="Animation_ajbah"] -resource_name = "Water Slash" +[sub_resource type="Animation" id="Animation_04cm7"] +resource_name = "Fire Slash" length = 1.23334 tracks/0/type = "value" tracks/0/imported = false @@ -1187,7 +1058,7 @@ tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [&"water_slash"] +"values": [&"fire_slash"] } tracks/2/type = "value" tracks/2/imported = false @@ -1242,6 +1113,46 @@ tracks/2/keys = { "values": [0, 30] } +[sub_resource type="Animation" id="Animation_ua0fy"] +resource_name = "Normal Slash" +length = 1.23334 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("%Hitbox/HitboxCollision:disabled") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.233333), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, true] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Weapon Animations:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"normal_slash"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Weapon Animations:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0, 30] +} + [sub_resource type="Animation" id="Animation_w5dir"] resource_name = "Plasma Sword" length = 1.23334 @@ -1282,6 +1193,57 @@ tracks/2/keys = { "values": [0, 35] } +[sub_resource type="Animation" id="Animation_flmxu"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:animation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"Normal Slash"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("SubViewportContainer/SubViewport/WeaponAttack:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Weapon Animations:animation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"earth_slash"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Weapon Animations:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + [sub_resource type="Animation" id="Animation_34gm2"] resource_name = "Rondo" length = 1.33334 @@ -1362,6 +1324,89 @@ tracks/2/keys = { "values": [0, 30] } +[sub_resource type="Animation" id="Animation_ajbah"] +resource_name = "Water Slash" +length = 1.23334 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("%Hitbox/HitboxCollision:disabled") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.233333), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, true] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Weapon Animations:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"water_slash"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Weapon Animations:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.966667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0, 30] +} + +[sub_resource type="Animation" id="Animation_aodty"] +resource_name = "Persuader" +length = 1.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Weapon Animations:animation") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"persuader"] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Weapon Animations:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.333333), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [0, 63] +} +tracks/2/type = "audio" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("../Projectiles/PersuaderBullet/Bullet/ProjectileHitbox/BulletSFX") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"clips": [{ +"end_offset": 0.0, +"start_offset": 0.0, +"stream": ExtResource("7_cqsul") +}], +"times": PackedFloat32Array(0) +} +tracks/2/use_blend = true + [sub_resource type="AnimationLibrary" id="AnimationLibrary_ickvi"] _data = { &"Air Slash": SubResource("Animation_l7c4m"), @@ -1369,6 +1414,7 @@ _data = { &"Fire Slash": SubResource("Animation_04cm7"), &"Love Judgement": SubResource("Animation_7rguc"), &"Normal Slash": SubResource("Animation_ua0fy"), +&"Persuader": SubResource("Animation_aodty"), &"Plasma Sword": SubResource("Animation_w5dir"), &"RESET": SubResource("Animation_flmxu"), &"Rondo": SubResource("Animation_34gm2"), @@ -8674,6 +8720,262 @@ region = Rect2(14336, 0, 512, 512) atlas = ExtResource("501_l7c4m") region = Rect2(14848, 0, 512, 512) +[sub_resource type="AtlasTexture" id="AtlasTexture_k1a3d"] +atlas = ExtResource("501_04cm7") +region = Rect2(0, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_81aul"] +atlas = ExtResource("501_04cm7") +region = Rect2(512, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qlekh"] +atlas = ExtResource("501_04cm7") +region = Rect2(1024, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i2jpi"] +atlas = ExtResource("501_04cm7") +region = Rect2(1536, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wbulv"] +atlas = ExtResource("501_04cm7") +region = Rect2(2048, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7v8nt"] +atlas = ExtResource("501_04cm7") +region = Rect2(2560, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0g6dl"] +atlas = ExtResource("501_04cm7") +region = Rect2(3072, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5ww3y"] +atlas = ExtResource("501_04cm7") +region = Rect2(3584, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jamhf"] +atlas = ExtResource("501_04cm7") +region = Rect2(4096, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e7ba0"] +atlas = ExtResource("501_04cm7") +region = Rect2(4608, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sio05"] +atlas = ExtResource("501_04cm7") +region = Rect2(5120, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2fj84"] +atlas = ExtResource("501_04cm7") +region = Rect2(5632, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tqlbc"] +atlas = ExtResource("501_04cm7") +region = Rect2(6144, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m6nup"] +atlas = ExtResource("501_04cm7") +region = Rect2(6656, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v8buy"] +atlas = ExtResource("501_04cm7") +region = Rect2(7168, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4wrt3"] +atlas = ExtResource("501_04cm7") +region = Rect2(7680, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mk2jd"] +atlas = ExtResource("501_04cm7") +region = Rect2(8192, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a5wv6"] +atlas = ExtResource("501_04cm7") +region = Rect2(8704, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pagtp"] +atlas = ExtResource("501_04cm7") +region = Rect2(9216, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q8h85"] +atlas = ExtResource("501_04cm7") +region = Rect2(9728, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nsi15"] +atlas = ExtResource("501_04cm7") +region = Rect2(10240, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uhm0s"] +atlas = ExtResource("501_04cm7") +region = Rect2(10752, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jkawr"] +atlas = ExtResource("501_04cm7") +region = Rect2(11264, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5viw7"] +atlas = ExtResource("501_04cm7") +region = Rect2(11776, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fdyq1"] +atlas = ExtResource("501_04cm7") +region = Rect2(12288, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l5n0j"] +atlas = ExtResource("501_04cm7") +region = Rect2(12800, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eehta"] +atlas = ExtResource("501_04cm7") +region = Rect2(13312, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sem03"] +atlas = ExtResource("501_04cm7") +region = Rect2(13824, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ed3b3"] +atlas = ExtResource("501_04cm7") +region = Rect2(14336, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cfup3"] +atlas = ExtResource("501_04cm7") +region = Rect2(14848, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f6ar4"] +atlas = ExtResource("501_04cm7") +region = Rect2(15360, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_u6rkg"] +atlas = ExtResource("501_04cm7") +region = Rect2(15872, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jsxir"] +atlas = ExtResource("501_04cm7") +region = Rect2(0, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_topmo"] +atlas = ExtResource("501_04cm7") +region = Rect2(512, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_32h2j"] +atlas = ExtResource("501_04cm7") +region = Rect2(1024, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oc6fq"] +atlas = ExtResource("501_04cm7") +region = Rect2(1536, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p740s"] +atlas = ExtResource("501_04cm7") +region = Rect2(2048, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xowh6"] +atlas = ExtResource("501_04cm7") +region = Rect2(2560, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0wjci"] +atlas = ExtResource("501_04cm7") +region = Rect2(3072, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tff5r"] +atlas = ExtResource("501_04cm7") +region = Rect2(3584, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xi04g"] +atlas = ExtResource("501_04cm7") +region = Rect2(4096, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t4nu3"] +atlas = ExtResource("501_04cm7") +region = Rect2(4608, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_338pa"] +atlas = ExtResource("501_04cm7") +region = Rect2(5120, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kftek"] +atlas = ExtResource("501_04cm7") +region = Rect2(5632, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fbmsp"] +atlas = ExtResource("501_04cm7") +region = Rect2(6144, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0c2kp"] +atlas = ExtResource("501_04cm7") +region = Rect2(6656, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ht76h"] +atlas = ExtResource("501_04cm7") +region = Rect2(7168, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_usbdf"] +atlas = ExtResource("501_04cm7") +region = Rect2(7680, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3d6w1"] +atlas = ExtResource("501_04cm7") +region = Rect2(8192, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_negdy"] +atlas = ExtResource("501_04cm7") +region = Rect2(8704, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mlpmd"] +atlas = ExtResource("501_04cm7") +region = Rect2(9216, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6amug"] +atlas = ExtResource("501_04cm7") +region = Rect2(9728, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mjiiw"] +atlas = ExtResource("501_04cm7") +region = Rect2(10240, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cdqr"] +atlas = ExtResource("501_04cm7") +region = Rect2(10752, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nhn71"] +atlas = ExtResource("501_04cm7") +region = Rect2(11264, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pj1bu"] +atlas = ExtResource("501_04cm7") +region = Rect2(11776, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4gd5b"] +atlas = ExtResource("501_04cm7") +region = Rect2(12288, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nm3iu"] +atlas = ExtResource("501_04cm7") +region = Rect2(12800, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y6ydj"] +atlas = ExtResource("501_04cm7") +region = Rect2(13312, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1ahca"] +atlas = ExtResource("501_04cm7") +region = Rect2(13824, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1kesl"] +atlas = ExtResource("501_04cm7") +region = Rect2(14336, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ee281"] +atlas = ExtResource("501_04cm7") +region = Rect2(14848, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bv16y"] +atlas = ExtResource("501_04cm7") +region = Rect2(15360, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4mifj"] +atlas = ExtResource("501_04cm7") +region = Rect2(15872, 512, 512, 512) + [sub_resource type="AtlasTexture" id="AtlasTexture_b4tqc"] atlas = ExtResource("501_nb4cq") region = Rect2(0, 0, 512, 512) @@ -9609,6 +9911,203 @@ animations = [{ }, { "frames": [{ "duration": 1.0, +"texture": SubResource("AtlasTexture_k1a3d") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_81aul") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qlekh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i2jpi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wbulv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7v8nt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0g6dl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5ww3y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jamhf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_e7ba0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sio05") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2fj84") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tqlbc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m6nup") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v8buy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4wrt3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mk2jd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a5wv6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pagtp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q8h85") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nsi15") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uhm0s") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jkawr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5viw7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fdyq1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l5n0j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eehta") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sem03") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ed3b3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cfup3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_f6ar4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_u6rkg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jsxir") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_topmo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_32h2j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oc6fq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p740s") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xowh6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0wjci") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tff5r") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xi04g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_t4nu3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_338pa") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kftek") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fbmsp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0c2kp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ht76h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_usbdf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3d6w1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_negdy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mlpmd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6amug") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mjiiw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7cdqr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nhn71") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pj1bu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4gd5b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nm3iu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_y6ydj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1ahca") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1kesl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ee281") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bv16y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4mifj") +}], +"loop": true, +"name": &"persuader", +"speed": 30.0 +}, { +"frames": [{ +"duration": 1.0, "texture": SubResource("AtlasTexture_b4tqc") }, { "duration": 1.0, @@ -10368,4 +10867,12 @@ unique_name_in_owner = true unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.125) +[node name="ProjectileHitbox" parent="Projectiles/PersuaderBullet/Bullet" index="0"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0) + +[node name="BulletSFX" type="AudioStreamPlayer3D" parent="Projectiles/PersuaderBullet/Bullet/ProjectileHitbox" index="1"] +process_mode = 3 +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.1, 0) +bus = &"SFX" + [editable path="Projectiles/PersuaderBullet"] diff --git a/Zennysoft.Game.Ma/src/system/Projectile.cs b/Zennysoft.Game.Ma/src/system/Projectile.cs index 751c02e08..fa021fd86 100644 --- a/Zennysoft.Game.Ma/src/system/Projectile.cs +++ b/Zennysoft.Game.Ma/src/system/Projectile.cs @@ -26,9 +26,21 @@ public partial class Projectile : Node3D ProjectileHitbox.AreaEntered += Hitbox_AreaEntered; ProjectileHitbox.BodyEntered += ProjectileHitbox_BodyEntered1; ProjectileHitbox.BodyShapeEntered += ProjectileHitbox_BodyEntered; + AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished; } - private void ProjectileHitbox_BodyEntered1(Node3D body) => AnimationPlayer.Stop(); + private void AnimationPlayer_AnimationFinished(StringName animName) + { + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false); + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false); + } + + private void ProjectileHitbox_BodyEntered1(Node3D body) + { + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false); + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false); + AnimationPlayer.Play("RESET"); + } private void ProjectileHitbox_BodyEntered(Rid bodyRid, Node3D body, long bodyShapeIndex, long localShapeIndex) => AnimationPlayer.Stop(); @@ -39,6 +51,8 @@ public partial class Projectile : Node3D Reparent((Map)_map); GlobalPosition = _player.GlobalPosition; GlobalBasis = _player.GlobalBasis; + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, true); + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, true); AnimationPlayer.Play("Fire"); return true; } @@ -53,6 +67,8 @@ public partial class Projectile : Node3D var damageDealt = DamageCalculator.CalculateDamage(projectileDamage, enemy.DefenseComponent.CurrentDefense.Value, enemy.ElementalResistanceSet); enemy.HealthComponent.Damage(damageDealt); } + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false); + ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false); AnimationPlayer.Play("RESET"); } } \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs index 81648d44e..c9bc3c45d 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs @@ -37,12 +37,15 @@ public partial class InventoryMenu : Control, IInventoryMenu [Node] public Label StatusLabel { get; set; } + private Dictionary ItemSlotWithItem; + private List ItemSlots; private IItemSlot _currentlySelected; public void OnResolved() { + ItemSlotWithItem = []; ItemSlots = [.. Inventory.GetChildren().OfType()]; ItemSlots.ForEach(x => x.ItemPressed += ItemPressed); ItemSlots.ForEach(x => x.ItemSelected += ItemSelected); @@ -52,6 +55,7 @@ public partial class InventoryMenu : Control, IInventoryMenu ActionPanel.AugmentMenuRequested += ActionPanel_AugmentMenuRequested; AugmentMenu.AugmentMenuClosing += AugmentMenu_AugmentMenuClosing; AugmentMenu.FocusMode = FocusModeEnum.None; + _player.EquipmentComponent.EquipmentChanged += EquipmentChanged; _player.AttackComponent.CurrentAttack.Changed += AttackChanged; _player.AttackComponent.MaximumAttack.Changed += AttackChanged; _player.DefenseComponent.CurrentDefense.Changed += DefenseChanged; @@ -63,6 +67,12 @@ public partial class InventoryMenu : Control, IInventoryMenu Hide(); } + private void EquipmentChanged(IEquipableItem obj) + { + AttackChanged(0); + DefenseChanged(0); + } + private void AttackChanged(int obj) => PlayerATKLabel.Text = $"{_player.AttackComponent.CurrentAttack.Value:D2}/{_player.AttackComponent.MaximumAttack.Value:D2}+{_player.EquipmentComponent.BonusAttack}"; private void DefenseChanged(int obj) => PlayerDEFLabel.Text = $"{_player.DefenseComponent.CurrentDefense.Value:D2}/{_player.DefenseComponent.MaximumDefense.Value:D2}+{_player.EquipmentComponent.BonusDefense}"; @@ -120,9 +130,17 @@ public partial class InventoryMenu : Control, IInventoryMenu for (var i = 0; i < inventory.Count; i++) ItemSlots[i].SetItemToSlot(inventory[i]); - if (_currentlySelected == null && inventory.Any()) - _currentlySelected = ItemSlots.First(); - if (inventory.Any()) + var validSelectableItems = inventory.Except(inventory.OfType().Where(x => x.Glued)).ToList(); + + if (_currentlySelected != null && !validSelectableItems.Contains(_currentlySelected.Item.Value)) + _currentlySelected = null; + + if (_currentlySelected == null && validSelectableItems.Count > 0) + { + _currentlySelected = ItemSlots.FirstOrDefault(x => x.Item.Value == validSelectableItems.First()); + } + + if (validSelectableItems.Count > 0) _currentlySelected.FocusItem(); ActionPanel.Hide(); } diff --git a/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.cs b/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.cs index 747e8fbb9..7e1778ba7 100644 --- a/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.cs +++ b/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.cs @@ -99,7 +99,6 @@ public partial class LoadNextLevel : Control, IFloorClearMenu if (animName == "fade_in") { _fadingIn = true; - _map.CurrentFloor.FadeOutAudio(); ContinueButton.FocusMode = FocusModeEnum.None; ExitButton.FocusMode = FocusModeEnum.None; }