From 92b4e8662f49bb65d4bae1cfe1450c91535dc2cf Mon Sep 17 00:00:00 2001 From: Zenny Date: Tue, 10 Feb 2026 18:03:53 -0800 Subject: [PATCH] Add projectiles --- .../Components/IEquipmentComponent.cs | 2 + .../Equipment/Tags/WeaponTag.cs | 3 +- .../Item/IInventory.cs | 2 +- Zennysoft.Game.Ma/project.godot | 1 + .../src/Components/EquipmentComponent.cs | 13 +- .../enemy_types/16. demon wall/DemonWall.cs | 3 +- Zennysoft.Game.Ma/src/items/Inventory.cs | 15 +- .../src/items/InventoryItem.tscn | 5 +- Zennysoft.Game.Ma/src/items/ItemDatabase.cs | 20 + Zennysoft.Game.Ma/src/items/ammo/Ammo.cs | 49 ++ Zennysoft.Game.Ma/src/items/ammo/Ammo.cs.uid | 1 + Zennysoft.Game.Ma/src/items/ammo/Ammo.tscn | 38 + Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs | 19 + .../src/items/ammo/AmmoStats.cs.uid | 1 + .../src/items/ammo/resources/AeolicAmmo.tres | 30 + .../src/items/ammo/resources/HydricAmmo.tres | 30 + .../src/items/ammo/resources/IgneousAmmo.tres | 30 + .../items/{Icons => ammo/textures}/AirGeo.png | Bin .../textures}/AirGeo.png.import | 6 +- .../items/{Icons => ammo/textures}/WATER.png | Bin .../{Icons => ammo/textures}/WATER.png.import | 6 +- .../items/{Icons => ammo/textures}/ammo1.png | Bin .../{Icons => ammo/textures}/ammo1.png.import | 6 +- .../items/{Icons => ammo/textures}/earth.png | Bin .../{Icons => ammo/textures}/earth.png.import | 6 +- .../{Icons => ammo/textures}/firegeo.png | Bin .../textures}/firegeo.png.import | 6 +- .../src/items/jewels/JewelStats.cs | 10 + .../src/items/jewels/JewelStats.cs.uid | 1 + Zennysoft.Game.Ma/src/items/jewels/Jewels.cs | 18 + .../src/items/jewels/Jewels.cs.uid | 1 + .../items/weapons/AirReactorProjectile.tscn | 552 +++++++++++++++ .../items/weapons/FireReactorProjectile.tscn | 583 ++++++++++++++++ .../items/weapons/WaterReactorProjectile.tscn | 657 ++++++++++++++++++ .../src/items/weapons/Weapon.tscn | 5 +- .../weapons/resources/GeomanticReactor.tres | 6 +- Zennysoft.Game.Ma/src/player/Player.cs | 40 +- Zennysoft.Game.Ma/src/player/Player.tscn | 18 +- .../src/system/PlayerProjectile.cs.uid | 1 + Zennysoft.Game.Ma/src/system/Projectile.cs | 26 +- .../src/ui/inventory_menu/InventoryMenu.cs | 2 +- 41 files changed, 2170 insertions(+), 42 deletions(-) create mode 100644 Zennysoft.Game.Ma/src/items/ammo/Ammo.cs create mode 100644 Zennysoft.Game.Ma/src/items/ammo/Ammo.cs.uid create mode 100644 Zennysoft.Game.Ma/src/items/ammo/Ammo.tscn create mode 100644 Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs create mode 100644 Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs.uid create mode 100644 Zennysoft.Game.Ma/src/items/ammo/resources/AeolicAmmo.tres create mode 100644 Zennysoft.Game.Ma/src/items/ammo/resources/HydricAmmo.tres create mode 100644 Zennysoft.Game.Ma/src/items/ammo/resources/IgneousAmmo.tres rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/AirGeo.png (100%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/AirGeo.png.import (71%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/WATER.png (100%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/WATER.png.import (71%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/ammo1.png (100%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/ammo1.png.import (72%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/earth.png (100%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/earth.png.import (72%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/firegeo.png (100%) rename Zennysoft.Game.Ma/src/items/{Icons => ammo/textures}/firegeo.png.import (71%) create mode 100644 Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs create mode 100644 Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs.uid create mode 100644 Zennysoft.Game.Ma/src/items/jewels/Jewels.cs create mode 100644 Zennysoft.Game.Ma/src/items/jewels/Jewels.cs.uid create mode 100644 Zennysoft.Game.Ma/src/items/weapons/AirReactorProjectile.tscn create mode 100644 Zennysoft.Game.Ma/src/items/weapons/FireReactorProjectile.tscn create mode 100644 Zennysoft.Game.Ma/src/items/weapons/WaterReactorProjectile.tscn create mode 100644 Zennysoft.Game.Ma/src/system/PlayerProjectile.cs.uid diff --git a/Zennysoft.Game.Ma.Implementation/Components/IEquipmentComponent.cs b/Zennysoft.Game.Ma.Implementation/Components/IEquipmentComponent.cs index 50532db4a..b03ee985d 100644 --- a/Zennysoft.Game.Ma.Implementation/Components/IEquipmentComponent.cs +++ b/Zennysoft.Game.Ma.Implementation/Components/IEquipmentComponent.cs @@ -11,6 +11,8 @@ public interface IEquipmentComponent : IEntityComponent public IAutoProp EquippedAccessory { get; } + public IAutoProp EquippedAmmo { get; } + public void Equip(EquipableItem equipable); public void Unequip(EquipableItem equipable); diff --git a/Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs b/Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs index c3f1514cb..96313888c 100644 --- a/Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs +++ b/Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs @@ -12,5 +12,6 @@ public enum WeaponTag Instakill, DegradeOnSwing, DoubleAttack, - TripleAttack + TripleAttack, + ElementalProjectile } diff --git a/Zennysoft.Game.Ma.Implementation/Item/IInventory.cs b/Zennysoft.Game.Ma.Implementation/Item/IInventory.cs index b8a3970c9..9e050a09a 100644 --- a/Zennysoft.Game.Ma.Implementation/Item/IInventory.cs +++ b/Zennysoft.Game.Ma.Implementation/Item/IInventory.cs @@ -12,7 +12,7 @@ public interface IInventory public void Remove(InventoryItem inventoryItem); - public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory); + public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory, EquipableItem ammo); public event Action BroadcastMessage; public event Action InventoryChanged; diff --git a/Zennysoft.Game.Ma/project.godot b/Zennysoft.Game.Ma/project.godot index 5aad5e4b2..f2b53ad91 100644 --- a/Zennysoft.Game.Ma/project.godot +++ b/Zennysoft.Game.Ma/project.godot @@ -14,6 +14,7 @@ config/name="Ma" run/main_scene="uid://d1gjaijijd5ot" config/features=PackedStringArray("4.4", "C#", "GL Compatibility") run/max_fps=60 +boot_splash/show_image=false [autoload] diff --git a/Zennysoft.Game.Ma/src/Components/EquipmentComponent.cs b/Zennysoft.Game.Ma/src/Components/EquipmentComponent.cs index 757a0eb71..5b0a29f78 100644 --- a/Zennysoft.Game.Ma/src/Components/EquipmentComponent.cs +++ b/Zennysoft.Game.Ma/src/Components/EquipmentComponent.cs @@ -1,5 +1,4 @@ using Chickensoft.Collections; -using Godot; using System; using Zennysoft.Ma.Adapter; using Zennysoft.Ma.Adapter.Entity; @@ -13,12 +12,16 @@ public class EquipmentComponent : IEquipmentComponent public IAutoProp EquippedAccessory => _equippedAccessory; + public IAutoProp EquippedAmmo => _equippedAmmo; + public AutoProp _equippedWeapon; public AutoProp _equippedArmor; public AutoProp _equippedAccessory; + public AutoProp _equippedAmmo; + public event Action EquipmentChanged; public int BonusAttack => _equippedWeapon.Value.BonusAttack + _equippedArmor.Value.BonusAttack + _equippedAccessory.Value.BonusAttack; @@ -38,6 +41,7 @@ public class EquipmentComponent : IEquipmentComponent _equippedWeapon = new AutoProp(new Weapon()); _equippedArmor = new AutoProp(new Armor()); _equippedAccessory = new AutoProp(new Accessory()); + _equippedAmmo = new AutoProp(new Ammo()); } public void Reset() @@ -45,6 +49,7 @@ public class EquipmentComponent : IEquipmentComponent _equippedWeapon.OnNext(new Weapon()); _equippedArmor.OnNext(new Armor()); _equippedAccessory.OnNext(new Accessory()); + _equippedAmmo.OnNext(new Ammo()); } public void Equip(EquipableItem equipable) @@ -55,6 +60,8 @@ public class EquipmentComponent : IEquipmentComponent _equippedArmor.OnNext(armor); if (equipable is Accessory accessory) _equippedAccessory.OnNext(accessory); + if (equipable is Ammo ammo) + _equippedAmmo.OnNext(ammo); EquipmentChanged?.Invoke(equipable); } @@ -66,6 +73,8 @@ public class EquipmentComponent : IEquipmentComponent _equippedArmor.OnNext(new Armor()); if (equipable is Accessory accessory) _equippedAccessory.OnNext(new Accessory()); + if (equipable is Ammo ammo) + _equippedAmmo.OnNext(new Ammo()); EquipmentChanged?.Invoke(equipable); } @@ -74,7 +83,7 @@ public class EquipmentComponent : IEquipmentComponent if (item is not EquipableItem) return false; - return item == _equippedWeapon.Value || item == _equippedArmor.Value || item == _equippedAccessory.Value; + return item == _equippedWeapon.Value || item == _equippedArmor.Value || item == _equippedAccessory.Value || item == _equippedAmmo.Value; } public void UpdateEquipment(EquipableItem equipable) => EquipmentChanged?.Invoke(equipable); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.cs index 79b215a50..1bf56daaa 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.cs @@ -53,8 +53,9 @@ public partial class DemonWall : Enemy3D EnemyModelView.Attack(_maximumWallMoveAmount); } - public void OnExitTree() + public new void OnExitTree() { + base.OnExitTree(); _attackTimer.Timeout -= AttackTimer_Timeout; } } diff --git a/Zennysoft.Game.Ma/src/items/Inventory.cs b/Zennysoft.Game.Ma/src/items/Inventory.cs index 0e258063f..82bc8a8f5 100644 --- a/Zennysoft.Game.Ma/src/items/Inventory.cs +++ b/Zennysoft.Game.Ma/src/items/Inventory.cs @@ -69,24 +69,27 @@ public partial class Inventory : Node, IInventory InventoryChanged?.Invoke(); } - public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory) + public bool Sort(EquipableItem currentWeapon, EquipableItem currentArmor, EquipableItem currentAccessory, EquipableItem currentAmmo) { var initialList = Items; var equippedWeapon = Items.OfType().Where(x => x == currentWeapon); var equippedArmor = Items.OfType().Where(x => x == currentArmor); var equippedAccessory = Items.OfType().Where(x => x == currentAccessory); + var equippedAmmo = Items.OfType().Where(x => x == currentAmmo); var equippedItems = new List(); equippedItems.AddRange(equippedWeapon); equippedItems.AddRange(equippedArmor); equippedItems.AddRange(equippedAccessory); + equippedItems.AddRange(equippedAmmo); var listToSort = Items.Except(equippedItems); var weapons = listToSort.Where(x => x is Weapon).OrderBy(x => x as Weapon, new WeaponComparer()); var armor = listToSort.Where(x => x is Armor).OrderBy(x => x as Armor, new ArmorComparer()); var accessories = listToSort.Where(x => x is Accessory).OrderBy(x => x as Accessory, new AccessoryComparer()); + var ammo = listToSort.Where(x => x is Ammo).OrderBy(x => x as Ammo, new AmmoComparer()); var consumables = listToSort.Where(x => x is ConsumableItem).OrderBy(x => x as ConsumableItem, new ConsumableComparer()); var throwables = listToSort.Where(x => x is ThrowableItem).OrderBy(x => x as ThrowableItem, new ThrowableComparer()); var effectItems = listToSort.Where(x => x is EffectItem).OrderBy(x => x as EffectItem, new EffectComparer()); - Items = [.. equippedItems, .. weapons, .. armor, .. accessories, .. consumables, .. throwables, .. effectItems]; + Items = [.. equippedItems, .. weapons, .. armor, .. accessories, .. ammo, .. consumables, .. throwables, .. effectItems]; var stackableItems = Items.OfType(); var itemsToStack = stackableItems.GroupBy(x => ((InventoryItem)x).ItemName).Where(x => x.Count() > 1); @@ -131,6 +134,14 @@ public partial class Inventory : Node, IInventory } } + public class AmmoComparer : IComparer + { + public int Compare(Ammo x, Ammo y) + { + return x.ItemName.CompareTo(y.ItemName); + } + } + public class ConsumableComparer : IComparer { public int Compare(ConsumableItem x, ConsumableItem y) diff --git a/Zennysoft.Game.Ma/src/items/InventoryItem.tscn b/Zennysoft.Game.Ma/src/items/InventoryItem.tscn index 0b3947805..14ba51ce4 100644 --- a/Zennysoft.Game.Ma/src/items/InventoryItem.tscn +++ b/Zennysoft.Game.Ma/src/items/InventoryItem.tscn @@ -1,6 +1,4 @@ -[gd_scene load_steps=3 format=3 uid="uid://dme37m7q60um4"] - -[ext_resource type="Texture2D" uid="uid://dymrg1fmwho35" path="res://src/items/weapons/textures/Cross Sword.png" id="1_babd4"] +[gd_scene load_steps=2 format=3 uid="uid://dme37m7q60um4"] [sub_resource type="BoxShape3D" id="BoxShape3D_84bq1"] size = Vector3(0.778381, 0.929947, 0.731567) @@ -20,7 +18,6 @@ billboard = 2 double_sided = false alpha_cut = 1 texture_filter = 0 -texture = ExtResource("1_babd4") [node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481) diff --git a/Zennysoft.Game.Ma/src/items/ItemDatabase.cs b/Zennysoft.Game.Ma/src/items/ItemDatabase.cs index ea25a9620..55e25a1ab 100644 --- a/Zennysoft.Game.Ma/src/items/ItemDatabase.cs +++ b/Zennysoft.Game.Ma/src/items/ItemDatabase.cs @@ -65,6 +65,8 @@ public class ItemDatabase var consumableResources = DirAccess.GetFilesAt("res://src/items/consumable/resources/"); var effectResources = DirAccess.GetFilesAt("res://src/items/effect/resources/"); var boxResources = DirAccess.GetFilesAt("res://src/items/box/resources/"); + var ammoResources = DirAccess.GetFilesAt("res://src/items/ammo/resources/"); + var jewelResources = DirAccess.GetFilesAt("res://src/items/jewels/resources/"); foreach (var armor in armorResources) { @@ -129,6 +131,24 @@ public class ItemDatabase database.Add(boxItemScene); } + foreach (var ammoItem in ammoResources) + { + var ammoItemInfo = GD.Load($"res://src/items/ammo/resources/{ammoItem}".TrimSuffix(".remap")); + var ammoItemScene = ResourceLoader.Load("res://src/items/ammo/Ammo.tscn").Instantiate(); + ammoItemScene.Stats = ammoItemInfo; + if (!database.Contains(ammoItemScene)) + database.Add(ammoItemScene); + } + + //foreach (var jewelItem in jewelResources) + //{ + // var jewelItemInfo = GD.Load($"res://src/items/jewel/resources/{jewelItem}".TrimSuffix(".remap")); + // var jewelItemScene = ResourceLoader.Load("res://src/items/jewel/Jewel.tscn").Instantiate(); + // jewelItemScene.Stats = jewelItemInfo; + // if (!database.Contains(jewelItemScene)) + // database.Add(jewelItemScene); + //} + Items = [.. database]; } } diff --git a/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs b/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs new file mode 100644 index 000000000..e27d3c1b1 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs @@ -0,0 +1,49 @@ +using Chickensoft.AutoInject; +using Chickensoft.Introspection; +using Chickensoft.Serialization; +using Godot; +using Zennysoft.Game.Abstractions; +using Zennysoft.Game.Ma; +using Zennysoft.Ma.Adapter; + +[Meta(typeof(IAutoNode)), Id("ammo")] +public partial class Ammo : EquipableItem, IStackable +{ + public override void _Notification(int what) => this.Notify(what); + + private int _count; + + [Node] private Sprite3D _sprite { get; set; } + + public void OnReady() + { + _count = Stats.InitialCount; + _sprite.Texture = Stats.Texture; + } + + + public override string ItemName => Stats.Name; + + public override string Description => Stats.Description; + + public override float SpawnRate => Stats.SpawnRate; + + public override int ThrowDamage => Stats.ThrowDamage; + + public override float ThrowSpeed => Stats.ThrowSpeed; + + public override ItemTag ItemTag => Stats.ItemTag; + + public override Texture2D GetTexture() => Stats.Texture; + + [Save("ammo_item_count")] + public int Count { get => _count; } + public void SetCount(int count) => _count = count; + + [Save("ammo_element")] + public ElementType AmmoElement => Stats.AmmoElement; + + [Export] + [Save("ammo_stats")] + public AmmoStats Stats { get; set; } = new AmmoStats(); +} diff --git a/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs.uid b/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs.uid new file mode 100644 index 000000000..eedf4ff47 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/Ammo.cs.uid @@ -0,0 +1 @@ +uid://dsvj25b1dd8ml diff --git a/Zennysoft.Game.Ma/src/items/ammo/Ammo.tscn b/Zennysoft.Game.Ma/src/items/ammo/Ammo.tscn new file mode 100644 index 000000000..d7a0472d7 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/Ammo.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=4 format=3 uid="uid://dgwaspx08qg8w"] + +[ext_resource type="Script" uid="uid://dsvj25b1dd8ml" path="res://src/items/ammo/Ammo.cs" id="1_40de3"] + +[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_40de3"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_qdeu2"] +size = Vector3(0.898941, 2.34974, 0.86676) + +[node name="Ammo" type="RigidBody3D"] +collision_layer = 0 +axis_lock_linear_x = true +axis_lock_linear_z = true +axis_lock_angular_x = true +axis_lock_angular_y = true +axis_lock_angular_z = true +script = ExtResource("1_40de3") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.720724, 0) +shape = SubResource("CapsuleShape3D_40de3") + +[node name="Pickup" type="Area3D" parent="."] +unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.49274, 0) +collision_layer = 4 +collision_mask = 0 + +[node name="Sprite" type="Sprite3D" parent="Pickup"] +unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.370004, 0) +pixel_size = 0.025 +billboard = 2 +texture_filter = 0 + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804907, 0.709896, 0.0675965) +shape = SubResource("BoxShape3D_qdeu2") diff --git a/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs b/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs new file mode 100644 index 000000000..b67f211ae --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs @@ -0,0 +1,19 @@ +using Chickensoft.Introspection; +using Chickensoft.Serialization; +using Godot; +using Zennysoft.Ma.Adapter; + +namespace Zennysoft.Game.Ma; + +[GlobalClass] +[Meta, Id("ammo_stat_type")] +public partial class AmmoStats : InventoryItemStats +{ + [Export] + [Save("ammo_element")] + public ElementType AmmoElement { get; set; } = ElementType.None; + + [Export] + [Save("ammo_initial_count")] + public int InitialCount { get; set; } = 0; +} diff --git a/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs.uid b/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs.uid new file mode 100644 index 000000000..0b090b4b8 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/AmmoStats.cs.uid @@ -0,0 +1 @@ +uid://cmfwvjjargi0s diff --git a/Zennysoft.Game.Ma/src/items/ammo/resources/AeolicAmmo.tres b/Zennysoft.Game.Ma/src/items/ammo/resources/AeolicAmmo.tres new file mode 100644 index 000000000..54c6e0442 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/resources/AeolicAmmo.tres @@ -0,0 +1,30 @@ +[gd_resource type="Resource" script_class="AmmoStats" load_steps=3 format=3 uid="uid://kbialkqo0ibs"] + +[ext_resource type="Texture2D" uid="uid://d07kcaqe682l1" path="res://src/items/ammo/textures/AirGeo.png" id="1_llp80"] +[ext_resource type="Script" uid="uid://cmfwvjjargi0s" path="res://src/items/ammo/AmmoStats.cs" id="1_y5266"] + +[resource] +script = ExtResource("1_y5266") +AmmoElement = 1 +InitialCount = 5 +Name = "Aeolic Ammo" +Description = "Aeolic ammo. +Can be used with a Geomantic Reactor." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 0 +BonusLuck = 5 +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_llp80") +metadata/_custom_type_script = "uid://cmfwvjjargi0s" diff --git a/Zennysoft.Game.Ma/src/items/ammo/resources/HydricAmmo.tres b/Zennysoft.Game.Ma/src/items/ammo/resources/HydricAmmo.tres new file mode 100644 index 000000000..c735c0d87 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/resources/HydricAmmo.tres @@ -0,0 +1,30 @@ +[gd_resource type="Resource" script_class="AmmoStats" load_steps=3 format=3 uid="uid://cpyosjclxlh88"] + +[ext_resource type="Texture2D" uid="uid://dhl6pwp71y8qm" path="res://src/items/ammo/textures/WATER.png" id="1_mv5fs"] +[ext_resource type="Script" uid="uid://cmfwvjjargi0s" path="res://src/items/ammo/AmmoStats.cs" id="2_tu38n"] + +[resource] +script = ExtResource("2_tu38n") +AmmoElement = 3 +InitialCount = 5 +Name = "Hydric Ammo" +Description = "Hydric ammo. +Can be used with a Geomantic Reactor." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 0 +BonusLuck = 5 +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_mv5fs") +metadata/_custom_type_script = "uid://cmfwvjjargi0s" diff --git a/Zennysoft.Game.Ma/src/items/ammo/resources/IgneousAmmo.tres b/Zennysoft.Game.Ma/src/items/ammo/resources/IgneousAmmo.tres new file mode 100644 index 000000000..cf1b1ed4f --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/ammo/resources/IgneousAmmo.tres @@ -0,0 +1,30 @@ +[gd_resource type="Resource" script_class="AmmoStats" load_steps=3 format=3 uid="uid://bltcy30dohjrf"] + +[ext_resource type="Texture2D" uid="uid://fv4oewtohgnc" path="res://src/items/ammo/textures/firegeo.png" id="1_6lwo5"] +[ext_resource type="Script" uid="uid://cmfwvjjargi0s" path="res://src/items/ammo/AmmoStats.cs" id="2_p60hg"] + +[resource] +script = ExtResource("2_p60hg") +AmmoElement = 4 +InitialCount = 5 +Name = "Igneous Ammo" +Description = "Igneous ammo. +Can be used with a Geomantic Reactor." +SpawnRate = 0.5 +BonusAttack = 0 +BonusDefense = 0 +BonusLuck = 5 +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_6lwo5") +metadata/_custom_type_script = "uid://cmfwvjjargi0s" diff --git a/Zennysoft.Game.Ma/src/items/Icons/AirGeo.png b/Zennysoft.Game.Ma/src/items/ammo/textures/AirGeo.png similarity index 100% rename from Zennysoft.Game.Ma/src/items/Icons/AirGeo.png rename to Zennysoft.Game.Ma/src/items/ammo/textures/AirGeo.png diff --git a/Zennysoft.Game.Ma/src/items/Icons/AirGeo.png.import b/Zennysoft.Game.Ma/src/items/ammo/textures/AirGeo.png.import similarity index 71% rename from Zennysoft.Game.Ma/src/items/Icons/AirGeo.png.import rename to Zennysoft.Game.Ma/src/items/ammo/textures/AirGeo.png.import index 015c0c34e..71b4ed1e6 100644 --- a/Zennysoft.Game.Ma/src/items/Icons/AirGeo.png.import +++ b/Zennysoft.Game.Ma/src/items/ammo/textures/AirGeo.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://d07kcaqe682l1" -path="res://.godot/imported/AirGeo.png-ca6078f5bcfba245d2df28cba83b675c.ctex" +path="res://.godot/imported/AirGeo.png-e873d044dab8a5ca7182624c0d3c0a6a.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://src/items/Icons/AirGeo.png" -dest_files=["res://.godot/imported/AirGeo.png-ca6078f5bcfba245d2df28cba83b675c.ctex"] +source_file="res://src/items/ammo/textures/AirGeo.png" +dest_files=["res://.godot/imported/AirGeo.png-e873d044dab8a5ca7182624c0d3c0a6a.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/items/Icons/WATER.png b/Zennysoft.Game.Ma/src/items/ammo/textures/WATER.png similarity index 100% rename from Zennysoft.Game.Ma/src/items/Icons/WATER.png rename to Zennysoft.Game.Ma/src/items/ammo/textures/WATER.png diff --git a/Zennysoft.Game.Ma/src/items/Icons/WATER.png.import b/Zennysoft.Game.Ma/src/items/ammo/textures/WATER.png.import similarity index 71% rename from Zennysoft.Game.Ma/src/items/Icons/WATER.png.import rename to Zennysoft.Game.Ma/src/items/ammo/textures/WATER.png.import index 39d340e55..9caa8ba3c 100644 --- a/Zennysoft.Game.Ma/src/items/Icons/WATER.png.import +++ b/Zennysoft.Game.Ma/src/items/ammo/textures/WATER.png.import @@ -3,7 +3,7 @@ importer="texture" type="CompressedTexture2D" uid="uid://dhl6pwp71y8qm" -path.s3tc="res://.godot/imported/WATER.png-081a033bb13bf2199df538c6f97ad417.s3tc.ctex" +path.s3tc="res://.godot/imported/WATER.png-32a77fe0c80fb86759ee73e99a0ca4f4.s3tc.ctex" metadata={ "imported_formats": ["s3tc_bptc"], "vram_texture": true @@ -11,8 +11,8 @@ metadata={ [deps] -source_file="res://src/items/Icons/WATER.png" -dest_files=["res://.godot/imported/WATER.png-081a033bb13bf2199df538c6f97ad417.s3tc.ctex"] +source_file="res://src/items/ammo/textures/WATER.png" +dest_files=["res://.godot/imported/WATER.png-32a77fe0c80fb86759ee73e99a0ca4f4.s3tc.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/items/Icons/ammo1.png b/Zennysoft.Game.Ma/src/items/ammo/textures/ammo1.png similarity index 100% rename from Zennysoft.Game.Ma/src/items/Icons/ammo1.png rename to Zennysoft.Game.Ma/src/items/ammo/textures/ammo1.png diff --git a/Zennysoft.Game.Ma/src/items/Icons/ammo1.png.import b/Zennysoft.Game.Ma/src/items/ammo/textures/ammo1.png.import similarity index 72% rename from Zennysoft.Game.Ma/src/items/Icons/ammo1.png.import rename to Zennysoft.Game.Ma/src/items/ammo/textures/ammo1.png.import index 1f592e916..4d7cf7a82 100644 --- a/Zennysoft.Game.Ma/src/items/Icons/ammo1.png.import +++ b/Zennysoft.Game.Ma/src/items/ammo/textures/ammo1.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://br8bo6b52q3lh" -path="res://.godot/imported/ammo1.png-0adf62554c06bbf05f7649b4d645da25.ctex" +path="res://.godot/imported/ammo1.png-06763d467a08becf4c1fff96699f83ac.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://src/items/Icons/ammo1.png" -dest_files=["res://.godot/imported/ammo1.png-0adf62554c06bbf05f7649b4d645da25.ctex"] +source_file="res://src/items/ammo/textures/ammo1.png" +dest_files=["res://.godot/imported/ammo1.png-06763d467a08becf4c1fff96699f83ac.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/items/Icons/earth.png b/Zennysoft.Game.Ma/src/items/ammo/textures/earth.png similarity index 100% rename from Zennysoft.Game.Ma/src/items/Icons/earth.png rename to Zennysoft.Game.Ma/src/items/ammo/textures/earth.png diff --git a/Zennysoft.Game.Ma/src/items/Icons/earth.png.import b/Zennysoft.Game.Ma/src/items/ammo/textures/earth.png.import similarity index 72% rename from Zennysoft.Game.Ma/src/items/Icons/earth.png.import rename to Zennysoft.Game.Ma/src/items/ammo/textures/earth.png.import index 3b9504035..144d4d680 100644 --- a/Zennysoft.Game.Ma/src/items/Icons/earth.png.import +++ b/Zennysoft.Game.Ma/src/items/ammo/textures/earth.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://vxajas4napo0" -path="res://.godot/imported/earth.png-9c49063ae236e0b4346ee67886ff4f3b.ctex" +path="res://.godot/imported/earth.png-936a4bae3599693c89b44a4663411cd7.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://src/items/Icons/earth.png" -dest_files=["res://.godot/imported/earth.png-9c49063ae236e0b4346ee67886ff4f3b.ctex"] +source_file="res://src/items/ammo/textures/earth.png" +dest_files=["res://.godot/imported/earth.png-936a4bae3599693c89b44a4663411cd7.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/items/Icons/firegeo.png b/Zennysoft.Game.Ma/src/items/ammo/textures/firegeo.png similarity index 100% rename from Zennysoft.Game.Ma/src/items/Icons/firegeo.png rename to Zennysoft.Game.Ma/src/items/ammo/textures/firegeo.png diff --git a/Zennysoft.Game.Ma/src/items/Icons/firegeo.png.import b/Zennysoft.Game.Ma/src/items/ammo/textures/firegeo.png.import similarity index 71% rename from Zennysoft.Game.Ma/src/items/Icons/firegeo.png.import rename to Zennysoft.Game.Ma/src/items/ammo/textures/firegeo.png.import index 8a09d47d0..9e8800a6a 100644 --- a/Zennysoft.Game.Ma/src/items/Icons/firegeo.png.import +++ b/Zennysoft.Game.Ma/src/items/ammo/textures/firegeo.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://fv4oewtohgnc" -path="res://.godot/imported/firegeo.png-bf1c805200b8182047db9ef5c6e9d5ef.ctex" +path="res://.godot/imported/firegeo.png-345a11c3605f17539d8d173c23b330d5.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://src/items/Icons/firegeo.png" -dest_files=["res://.godot/imported/firegeo.png-bf1c805200b8182047db9ef5c6e9d5ef.ctex"] +source_file="res://src/items/ammo/textures/firegeo.png" +dest_files=["res://.godot/imported/firegeo.png-345a11c3605f17539d8d173c23b330d5.ctex"] [params] diff --git a/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs b/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs new file mode 100644 index 000000000..1d5461b5e --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs @@ -0,0 +1,10 @@ +using Chickensoft.Introspection; +using Godot; + +namespace Zennysoft.Game.Ma; + +[GlobalClass] +[Meta, Id("jewel_stat_type")] +public partial class JewelStats : InventoryItemStats +{ +} diff --git a/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs.uid b/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs.uid new file mode 100644 index 000000000..a68cd169a --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/jewels/JewelStats.cs.uid @@ -0,0 +1 @@ +uid://btikba31yb0tl diff --git a/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs b/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs new file mode 100644 index 000000000..a1faf8047 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs @@ -0,0 +1,18 @@ +using Godot; +using System; +using Zennysoft.Game.Ma; +using Zennysoft.Ma.Adapter; + +public partial class Jewels : InventoryItem +{ + public override string ItemName { get; } + public override string Description { get; } + public override float SpawnRate { get; } + public override int ThrowDamage { get; } + public override float ThrowSpeed { get; } + public override ItemTag ItemTag { get; } + + public override Texture2D GetTexture() => throw new NotImplementedException(); + + public JewelStats Stats { get; set; } = new JewelStats(); +} diff --git a/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs.uid b/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs.uid new file mode 100644 index 000000000..58d42165f --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/jewels/Jewels.cs.uid @@ -0,0 +1 @@ +uid://bou7fk1evvet diff --git a/Zennysoft.Game.Ma/src/items/weapons/AirReactorProjectile.tscn b/Zennysoft.Game.Ma/src/items/weapons/AirReactorProjectile.tscn new file mode 100644 index 000000000..4ad3dabd2 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/weapons/AirReactorProjectile.tscn @@ -0,0 +1,552 @@ +[gd_scene load_steps=63 format=3 uid="uid://nnns2ade62al"] + +[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_xt24t"] +[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_yf47k"] +[ext_resource type="Texture2D" uid="uid://ddmjhevb5ksl" path="res://src/vfx/Items Etc/geomantic_reactor_AIR.png" id="3_c0ubq"] + +[sub_resource type="Resource" id="Resource_kcnxw"] +script = ExtResource("2_yf47k") +Damage = 10 +ElementType = 1 +metadata/_custom_type_script = "uid://ctshiyffvt4y5" + +[sub_resource type="AtlasTexture" id="AtlasTexture_wsimg"] +atlas = ExtResource("3_c0ubq") +region = Rect2(0, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ljyb8"] +atlas = ExtResource("3_c0ubq") +region = Rect2(512, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ipk3e"] +atlas = ExtResource("3_c0ubq") +region = Rect2(1024, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rxwhr"] +atlas = ExtResource("3_c0ubq") +region = Rect2(1536, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ullk8"] +atlas = ExtResource("3_c0ubq") +region = Rect2(2048, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8uf3p"] +atlas = ExtResource("3_c0ubq") +region = Rect2(2560, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_exjpi"] +atlas = ExtResource("3_c0ubq") +region = Rect2(3072, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0nkfw"] +atlas = ExtResource("3_c0ubq") +region = Rect2(3584, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iumst"] +atlas = ExtResource("3_c0ubq") +region = Rect2(4096, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oe6xh"] +atlas = ExtResource("3_c0ubq") +region = Rect2(4608, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p531c"] +atlas = ExtResource("3_c0ubq") +region = Rect2(5120, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gcxuo"] +atlas = ExtResource("3_c0ubq") +region = Rect2(5632, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hky73"] +atlas = ExtResource("3_c0ubq") +region = Rect2(6144, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tpmpx"] +atlas = ExtResource("3_c0ubq") +region = Rect2(6656, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tcduc"] +atlas = ExtResource("3_c0ubq") +region = Rect2(7168, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0da0v"] +atlas = ExtResource("3_c0ubq") +region = Rect2(7680, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7sxse"] +atlas = ExtResource("3_c0ubq") +region = Rect2(8192, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4qc46"] +atlas = ExtResource("3_c0ubq") +region = Rect2(8704, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5cmlr"] +atlas = ExtResource("3_c0ubq") +region = Rect2(9216, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1f8xk"] +atlas = ExtResource("3_c0ubq") +region = Rect2(9728, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1lb2o"] +atlas = ExtResource("3_c0ubq") +region = Rect2(10240, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oadyu"] +atlas = ExtResource("3_c0ubq") +region = Rect2(10752, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_trhxg"] +atlas = ExtResource("3_c0ubq") +region = Rect2(11264, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ixg4u"] +atlas = ExtResource("3_c0ubq") +region = Rect2(11776, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0tmv5"] +atlas = ExtResource("3_c0ubq") +region = Rect2(12288, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_redlx"] +atlas = ExtResource("3_c0ubq") +region = Rect2(12800, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xes8d"] +atlas = ExtResource("3_c0ubq") +region = Rect2(13312, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7kyi8"] +atlas = ExtResource("3_c0ubq") +region = Rect2(13824, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4hf3e"] +atlas = ExtResource("3_c0ubq") +region = Rect2(14336, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n2vjn"] +atlas = ExtResource("3_c0ubq") +region = Rect2(14848, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ikh30"] +atlas = ExtResource("3_c0ubq") +region = Rect2(15360, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ecgiq"] +atlas = ExtResource("3_c0ubq") +region = Rect2(15872, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qymw1"] +atlas = ExtResource("3_c0ubq") +region = Rect2(0, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ib7ul"] +atlas = ExtResource("3_c0ubq") +region = Rect2(512, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gewiu"] +atlas = ExtResource("3_c0ubq") +region = Rect2(1024, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2vk3m"] +atlas = ExtResource("3_c0ubq") +region = Rect2(1536, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bei7s"] +atlas = ExtResource("3_c0ubq") +region = Rect2(2048, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_630i4"] +atlas = ExtResource("3_c0ubq") +region = Rect2(2560, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5oiox"] +atlas = ExtResource("3_c0ubq") +region = Rect2(3072, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lpauy"] +atlas = ExtResource("3_c0ubq") +region = Rect2(3584, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3joed"] +atlas = ExtResource("3_c0ubq") +region = Rect2(4096, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2wr7g"] +atlas = ExtResource("3_c0ubq") +region = Rect2(4608, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nec7r"] +atlas = ExtResource("3_c0ubq") +region = Rect2(5120, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_46yrx"] +atlas = ExtResource("3_c0ubq") +region = Rect2(5632, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_idp2y"] +atlas = ExtResource("3_c0ubq") +region = Rect2(6144, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_peodj"] +atlas = ExtResource("3_c0ubq") +region = Rect2(6656, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ww1ia"] +atlas = ExtResource("3_c0ubq") +region = Rect2(7168, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xd6bq"] +atlas = ExtResource("3_c0ubq") +region = Rect2(7680, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kbpk0"] +atlas = ExtResource("3_c0ubq") +region = Rect2(8192, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gtxb5"] +atlas = ExtResource("3_c0ubq") +region = Rect2(8704, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_c6owo"] +atlas = ExtResource("3_c0ubq") +region = Rect2(9216, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6ufhd"] +atlas = ExtResource("3_c0ubq") +region = Rect2(9728, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ue5be"] +atlas = ExtResource("3_c0ubq") +region = Rect2(10240, 512, 512, 512) + +[sub_resource type="SpriteFrames" id="SpriteFrames_1yaxx"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_wsimg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ljyb8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ipk3e") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rxwhr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ullk8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8uf3p") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_exjpi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0nkfw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iumst") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oe6xh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p531c") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gcxuo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hky73") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tpmpx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tcduc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0da0v") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7sxse") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4qc46") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5cmlr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1f8xk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1lb2o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oadyu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_trhxg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ixg4u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0tmv5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_redlx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xes8d") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7kyi8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4hf3e") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_n2vjn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ikh30") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ecgiq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qymw1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ib7ul") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gewiu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2vk3m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bei7s") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_630i4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5oiox") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lpauy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3joed") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2wr7g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nec7r") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_46yrx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_idp2y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_peodj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ww1ia") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xd6bq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kbpk0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gtxb5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_c6owo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6ufhd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ue5be") +}], +"loop": false, +"name": &"geomantic_fire", +"speed": 24.0 +}] + +[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"] + +[sub_resource type="Animation" id="Animation_xrn7e"] +resource_name = "fire" +length = 1.11667 +step = 0.0166667 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector3(0, 2.1, 0), Vector3(0, 2.1, -20)] +} +tracks/1/type = "audio" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("../AudioStreamPlayer3D") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"clips": [{ +"end_offset": 0.0, +"start_offset": 0.0, +"stream": null +}], +"times": PackedFloat32Array(0.0333333) +} +tracks/1/use_blend = true +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:animation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath(".:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [1, 67] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("../ProjectileHitbox/CollisionShape3D:disabled") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.783333), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, 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("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 2.1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [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] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_q8n6h"] +_data = { +&"Fire": SubResource("Animation_xrn7e"), +&"RESET": SubResource("Animation_8qeb2") +} + +[node name="AirReactor" type="Node3D"] +script = ExtResource("1_xt24t") +AttackData = SubResource("Resource_kcnxw") + +[node name="Bullet" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0) + +[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Bullet"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0) +offset = Vector2(0, 150) +pixel_size = 0.005 +billboard = 1 +sprite_frames = SubResource("SpriteFrames_1yaxx") +animation = &"geomantic_fire" + +[node name="ProjectileHitbox" type="Area3D" parent="Bullet"] +unique_name_in_owner = true +collision_layer = 0 +collision_mask = 2048 +monitorable = false + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Bullet/ProjectileHitbox"] +shape = SubResource("SphereShape3D_kct8n") +disabled = true + +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Bullet"] +unique_name_in_owner = true + +[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/FireReactorProjectile.tscn b/Zennysoft.Game.Ma/src/items/weapons/FireReactorProjectile.tscn new file mode 100644 index 000000000..8aef4e0ae --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/weapons/FireReactorProjectile.tscn @@ -0,0 +1,583 @@ +[gd_scene load_steps=67 format=3 uid="uid://igpvnbi8qi6e"] + +[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_pk6yq"] +[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_d874y"] +[ext_resource type="Texture2D" uid="uid://pirfu8nw05gk" path="res://src/vfx/Items Etc/geomantic reactor - fire.png" id="3_6hnq4"] + +[sub_resource type="Resource" id="Resource_14f5p"] +script = ExtResource("2_d874y") +Damage = 10 +ElementType = 4 +metadata/_custom_type_script = "uid://ctshiyffvt4y5" + +[sub_resource type="AtlasTexture" id="AtlasTexture_na8n6"] +atlas = ExtResource("3_6hnq4") +region = Rect2(0, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jmyp4"] +atlas = ExtResource("3_6hnq4") +region = Rect2(512, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_knrx4"] +atlas = ExtResource("3_6hnq4") +region = Rect2(1024, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rf24x"] +atlas = ExtResource("3_6hnq4") +region = Rect2(1536, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lhlyq"] +atlas = ExtResource("3_6hnq4") +region = Rect2(2048, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i8wsu"] +atlas = ExtResource("3_6hnq4") +region = Rect2(2560, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jtp65"] +atlas = ExtResource("3_6hnq4") +region = Rect2(3072, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5k54x"] +atlas = ExtResource("3_6hnq4") +region = Rect2(3584, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b52uh"] +atlas = ExtResource("3_6hnq4") +region = Rect2(4096, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rucep"] +atlas = ExtResource("3_6hnq4") +region = Rect2(4608, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dckm0"] +atlas = ExtResource("3_6hnq4") +region = Rect2(5120, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jxml1"] +atlas = ExtResource("3_6hnq4") +region = Rect2(5632, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_m024w"] +atlas = ExtResource("3_6hnq4") +region = Rect2(6144, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q6m37"] +atlas = ExtResource("3_6hnq4") +region = Rect2(6656, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kas34"] +atlas = ExtResource("3_6hnq4") +region = Rect2(7168, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h24tt"] +atlas = ExtResource("3_6hnq4") +region = Rect2(7680, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k8mub"] +atlas = ExtResource("3_6hnq4") +region = Rect2(8192, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3m3k7"] +atlas = ExtResource("3_6hnq4") +region = Rect2(8704, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lsm1l"] +atlas = ExtResource("3_6hnq4") +region = Rect2(9216, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_puv8e"] +atlas = ExtResource("3_6hnq4") +region = Rect2(9728, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l2mrb"] +atlas = ExtResource("3_6hnq4") +region = Rect2(10240, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tpm5i"] +atlas = ExtResource("3_6hnq4") +region = Rect2(10752, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dodoi"] +atlas = ExtResource("3_6hnq4") +region = Rect2(11264, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nlnrh"] +atlas = ExtResource("3_6hnq4") +region = Rect2(11776, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fgwyb"] +atlas = ExtResource("3_6hnq4") +region = Rect2(12288, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dbeta"] +atlas = ExtResource("3_6hnq4") +region = Rect2(12800, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1cjhh"] +atlas = ExtResource("3_6hnq4") +region = Rect2(13312, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ya6jq"] +atlas = ExtResource("3_6hnq4") +region = Rect2(13824, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bxdwp"] +atlas = ExtResource("3_6hnq4") +region = Rect2(14336, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g8ywy"] +atlas = ExtResource("3_6hnq4") +region = Rect2(14848, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lq5u4"] +atlas = ExtResource("3_6hnq4") +region = Rect2(15360, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6v1bm"] +atlas = ExtResource("3_6hnq4") +region = Rect2(15872, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fl0ij"] +atlas = ExtResource("3_6hnq4") +region = Rect2(0, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jim64"] +atlas = ExtResource("3_6hnq4") +region = Rect2(512, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vpwbm"] +atlas = ExtResource("3_6hnq4") +region = Rect2(1024, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bskte"] +atlas = ExtResource("3_6hnq4") +region = Rect2(1536, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s4j2o"] +atlas = ExtResource("3_6hnq4") +region = Rect2(2048, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_urilo"] +atlas = ExtResource("3_6hnq4") +region = Rect2(3072, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_37bll"] +atlas = ExtResource("3_6hnq4") +region = Rect2(3584, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cy8mr"] +atlas = ExtResource("3_6hnq4") +region = Rect2(5120, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fshft"] +atlas = ExtResource("3_6hnq4") +region = Rect2(5632, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6o8c5"] +atlas = ExtResource("3_6hnq4") +region = Rect2(6656, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d55sk"] +atlas = ExtResource("3_6hnq4") +region = Rect2(7168, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gkylq"] +atlas = ExtResource("3_6hnq4") +region = Rect2(7680, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ee7kd"] +atlas = ExtResource("3_6hnq4") +region = Rect2(8192, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b3qih"] +atlas = ExtResource("3_6hnq4") +region = Rect2(8704, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1lt3o"] +atlas = ExtResource("3_6hnq4") +region = Rect2(9216, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v6dro"] +atlas = ExtResource("3_6hnq4") +region = Rect2(9728, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l4r0x"] +atlas = ExtResource("3_6hnq4") +region = Rect2(10240, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_drcv7"] +atlas = ExtResource("3_6hnq4") +region = Rect2(10752, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b8o3i"] +atlas = ExtResource("3_6hnq4") +region = Rect2(11264, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6yl5j"] +atlas = ExtResource("3_6hnq4") +region = Rect2(11776, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wydvp"] +atlas = ExtResource("3_6hnq4") +region = Rect2(12288, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3qmsi"] +atlas = ExtResource("3_6hnq4") +region = Rect2(12800, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j6cu8"] +atlas = ExtResource("3_6hnq4") +region = Rect2(13312, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_li3kr"] +atlas = ExtResource("3_6hnq4") +region = Rect2(13824, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5wcly"] +atlas = ExtResource("3_6hnq4") +region = Rect2(14336, 512, 512, 512) + +[sub_resource type="SpriteFrames" id="SpriteFrames_brsyt"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_na8n6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jmyp4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_knrx4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rf24x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lhlyq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i8wsu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jtp65") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5k54x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b52uh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rucep") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dckm0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jxml1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_m024w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q6m37") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kas34") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h24tt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_k8mub") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3m3k7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lsm1l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_puv8e") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l2mrb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tpm5i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dodoi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nlnrh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fgwyb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dbeta") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1cjhh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ya6jq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bxdwp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g8ywy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lq5u4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6v1bm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fl0ij") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jim64") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vpwbm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bskte") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s4j2o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_urilo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_37bll") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cy8mr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fshft") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6o8c5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d55sk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gkylq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ee7kd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b3qih") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1lt3o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v6dro") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l4r0x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_drcv7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b8o3i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6yl5j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wydvp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3qmsi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j6cu8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_li3kr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5wcly") +}, { +"duration": 1.0, +"texture": null +}], +"loop": false, +"name": &"geomantic_fire", +"speed": 24.0 +}] + +[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"] + +[sub_resource type="Animation" id="Animation_xrn7e"] +resource_name = "fire" +length = 1.11667 +step = 0.0166667 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector3(0, 2.1, 0), Vector3(0, 2.1, -20)] +} +tracks/1/type = "audio" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("../AudioStreamPlayer3D") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"clips": [{ +"end_offset": 0.0, +"start_offset": 0.0, +"stream": null +}], +"times": PackedFloat32Array(0.0333333) +} +tracks/1/use_blend = true +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:animation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath(".:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [1, 67] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("../ProjectileHitbox/CollisionShape3D:disabled") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.933333), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, 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("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 2.1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [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] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_q8n6h"] +_data = { +&"Fire": SubResource("Animation_xrn7e"), +&"RESET": SubResource("Animation_8qeb2") +} + +[node name="FireReactor" type="Node3D"] +script = ExtResource("1_pk6yq") +AttackData = SubResource("Resource_14f5p") + +[node name="Bullet" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0) + +[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Bullet"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0) +offset = Vector2(0, 150) +pixel_size = 0.005 +billboard = 1 +sprite_frames = SubResource("SpriteFrames_brsyt") +animation = &"geomantic_fire" + +[node name="ProjectileHitbox" type="Area3D" parent="Bullet"] +unique_name_in_owner = true +collision_layer = 0 +collision_mask = 2048 +monitorable = false + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Bullet/ProjectileHitbox"] +shape = SubResource("SphereShape3D_kct8n") +disabled = true + +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Bullet"] +unique_name_in_owner = true + +[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/WaterReactorProjectile.tscn b/Zennysoft.Game.Ma/src/items/weapons/WaterReactorProjectile.tscn new file mode 100644 index 000000000..3c93e50f6 --- /dev/null +++ b/Zennysoft.Game.Ma/src/items/weapons/WaterReactorProjectile.tscn @@ -0,0 +1,657 @@ +[gd_scene load_steps=78 format=3 uid="uid://7p2sh52lj42o"] + +[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_n88a7"] +[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_er0le"] +[ext_resource type="Texture2D" uid="uid://dykncj5nomejo" path="res://src/vfx/Items Etc/GEOMANTIC_REACTOR_WATER.png" id="3_csu6k"] + +[sub_resource type="Resource" id="Resource_k6pkx"] +script = ExtResource("2_er0le") +Damage = 10 +ElementType = 3 +metadata/_custom_type_script = "uid://ctshiyffvt4y5" + +[sub_resource type="AtlasTexture" id="AtlasTexture_1yaxx"] +atlas = ExtResource("3_csu6k") +region = Rect2(0, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yjyav"] +atlas = ExtResource("3_csu6k") +region = Rect2(512, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mtb23"] +atlas = ExtResource("3_csu6k") +region = Rect2(1024, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2ntku"] +atlas = ExtResource("3_csu6k") +region = Rect2(1536, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rislv"] +atlas = ExtResource("3_csu6k") +region = Rect2(2048, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3lbfl"] +atlas = ExtResource("3_csu6k") +region = Rect2(2560, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p8bo1"] +atlas = ExtResource("3_csu6k") +region = Rect2(3072, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_iyyyb"] +atlas = ExtResource("3_csu6k") +region = Rect2(3584, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4gp8m"] +atlas = ExtResource("3_csu6k") +region = Rect2(4096, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ku3m1"] +atlas = ExtResource("3_csu6k") +region = Rect2(4608, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b4tqc"] +atlas = ExtResource("3_csu6k") +region = Rect2(5120, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1yod2"] +atlas = ExtResource("3_csu6k") +region = Rect2(5632, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qknof"] +atlas = ExtResource("3_csu6k") +region = Rect2(6144, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v0s2u"] +atlas = ExtResource("3_csu6k") +region = Rect2(6656, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s86wq"] +atlas = ExtResource("3_csu6k") +region = Rect2(7168, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_20xiu"] +atlas = ExtResource("3_csu6k") +region = Rect2(7680, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_r1e0i"] +atlas = ExtResource("3_csu6k") +region = Rect2(8192, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d2xqf"] +atlas = ExtResource("3_csu6k") +region = Rect2(8704, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ltyos"] +atlas = ExtResource("3_csu6k") +region = Rect2(9216, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_crepd"] +atlas = ExtResource("3_csu6k") +region = Rect2(9728, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8hc42"] +atlas = ExtResource("3_csu6k") +region = Rect2(10240, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_toj62"] +atlas = ExtResource("3_csu6k") +region = Rect2(10752, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k3pa4"] +atlas = ExtResource("3_csu6k") +region = Rect2(11264, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_34r5x"] +atlas = ExtResource("3_csu6k") +region = Rect2(11776, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nr606"] +atlas = ExtResource("3_csu6k") +region = Rect2(12288, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_njyfy"] +atlas = ExtResource("3_csu6k") +region = Rect2(12800, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jbdn7"] +atlas = ExtResource("3_csu6k") +region = Rect2(13312, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nh4uk"] +atlas = ExtResource("3_csu6k") +region = Rect2(13824, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_a2nh7"] +atlas = ExtResource("3_csu6k") +region = Rect2(14336, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cenfr"] +atlas = ExtResource("3_csu6k") +region = Rect2(14848, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p5eo0"] +atlas = ExtResource("3_csu6k") +region = Rect2(15360, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i0gdu"] +atlas = ExtResource("3_csu6k") +region = Rect2(15872, 0, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_88q6d"] +atlas = ExtResource("3_csu6k") +region = Rect2(0, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_utgkt"] +atlas = ExtResource("3_csu6k") +region = Rect2(512, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fqxh1"] +atlas = ExtResource("3_csu6k") +region = Rect2(1024, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_64146"] +atlas = ExtResource("3_csu6k") +region = Rect2(1536, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_prion"] +atlas = ExtResource("3_csu6k") +region = Rect2(2048, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ejegh"] +atlas = ExtResource("3_csu6k") +region = Rect2(2560, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fwr6t"] +atlas = ExtResource("3_csu6k") +region = Rect2(3072, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hvbv7"] +atlas = ExtResource("3_csu6k") +region = Rect2(3584, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gnoh1"] +atlas = ExtResource("3_csu6k") +region = Rect2(4096, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kr73e"] +atlas = ExtResource("3_csu6k") +region = Rect2(4608, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_urdnm"] +atlas = ExtResource("3_csu6k") +region = Rect2(5120, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s0qi8"] +atlas = ExtResource("3_csu6k") +region = Rect2(5632, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8a8lr"] +atlas = ExtResource("3_csu6k") +region = Rect2(6144, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xqhgw"] +atlas = ExtResource("3_csu6k") +region = Rect2(6656, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q48a1"] +atlas = ExtResource("3_csu6k") +region = Rect2(7168, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_egx34"] +atlas = ExtResource("3_csu6k") +region = Rect2(7680, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yhovx"] +atlas = ExtResource("3_csu6k") +region = Rect2(8192, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ndapr"] +atlas = ExtResource("3_csu6k") +region = Rect2(8704, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h00b0"] +atlas = ExtResource("3_csu6k") +region = Rect2(9216, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k0pb3"] +atlas = ExtResource("3_csu6k") +region = Rect2(9728, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tdp1m"] +atlas = ExtResource("3_csu6k") +region = Rect2(10240, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ryw32"] +atlas = ExtResource("3_csu6k") +region = Rect2(10752, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g6ajp"] +atlas = ExtResource("3_csu6k") +region = Rect2(11264, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nxxmq"] +atlas = ExtResource("3_csu6k") +region = Rect2(11776, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2xvlb"] +atlas = ExtResource("3_csu6k") +region = Rect2(12288, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aab6t"] +atlas = ExtResource("3_csu6k") +region = Rect2(12800, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g6q78"] +atlas = ExtResource("3_csu6k") +region = Rect2(13312, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_inqic"] +atlas = ExtResource("3_csu6k") +region = Rect2(13824, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tnto8"] +atlas = ExtResource("3_csu6k") +region = Rect2(14336, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3jy0b"] +atlas = ExtResource("3_csu6k") +region = Rect2(14848, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qqkdj"] +atlas = ExtResource("3_csu6k") +region = Rect2(15360, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wft45"] +atlas = ExtResource("3_csu6k") +region = Rect2(15872, 512, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bsh20"] +atlas = ExtResource("3_csu6k") +region = Rect2(0, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ngmuc"] +atlas = ExtResource("3_csu6k") +region = Rect2(512, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7fsqh"] +atlas = ExtResource("3_csu6k") +region = Rect2(1024, 1024, 512, 512) + +[sub_resource type="AtlasTexture" id="AtlasTexture_3arwt"] +atlas = ExtResource("3_csu6k") +region = Rect2(1536, 1024, 512, 512) + +[sub_resource type="SpriteFrames" id="SpriteFrames_bldyj"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1yaxx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yjyav") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mtb23") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2ntku") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rislv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3lbfl") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p8bo1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_iyyyb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4gp8m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ku3m1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b4tqc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1yod2") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qknof") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v0s2u") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s86wq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_20xiu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_r1e0i") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d2xqf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ltyos") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_crepd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8hc42") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_toj62") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_k3pa4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_34r5x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nr606") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_njyfy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jbdn7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nh4uk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_a2nh7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cenfr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p5eo0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_i0gdu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_88q6d") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_utgkt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fqxh1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_64146") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_prion") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ejegh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fwr6t") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hvbv7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gnoh1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kr73e") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_urdnm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s0qi8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8a8lr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xqhgw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q48a1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_egx34") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yhovx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ndapr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h00b0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_k0pb3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tdp1m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ryw32") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g6ajp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nxxmq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_2xvlb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aab6t") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g6q78") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_inqic") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tnto8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3jy0b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qqkdj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wft45") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bsh20") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ngmuc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7fsqh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_3arwt") +}], +"loop": false, +"name": &"geomantic_fire", +"speed": 24.0 +}] + +[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"] + +[sub_resource type="Animation" id="Animation_xrn7e"] +resource_name = "fire" +length = 1.11667 +step = 0.0166667 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Vector3(0, 2.1, 0), Vector3(0, 2.1, -20)] +} +tracks/1/type = "audio" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("../AudioStreamPlayer3D") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"clips": [{ +"end_offset": 0.0, +"start_offset": 0.0, +"stream": null +}], +"times": PackedFloat32Array(0.0333333) +} +tracks/1/use_blend = true +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:animation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath(".:frame") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 1.11667), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [1, 67] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("../ProjectileHitbox/CollisionShape3D:disabled") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.916667), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 1, +"values": [true, false, 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("..:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 2.1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:animation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [&"geomantic_fire"] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath(".:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [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] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_q8n6h"] +_data = { +&"Fire": SubResource("Animation_xrn7e"), +&"RESET": SubResource("Animation_8qeb2") +} + +[node name="WaterReactor" type="Node3D"] +script = ExtResource("1_n88a7") +AttackData = SubResource("Resource_k6pkx") + +[node name="Bullet" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0) + +[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Bullet"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0) +offset = Vector2(0, 150) +pixel_size = 0.005 +billboard = 1 +sprite_frames = SubResource("SpriteFrames_bldyj") +animation = &"geomantic_fire" + +[node name="ProjectileHitbox" type="Area3D" parent="Bullet"] +unique_name_in_owner = true +collision_layer = 0 +collision_mask = 2048 +monitorable = false + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Bullet/ProjectileHitbox"] +shape = SubResource("SphereShape3D_kct8n") +disabled = true + +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Bullet"] +unique_name_in_owner = true + +[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.tscn b/Zennysoft.Game.Ma/src/items/weapons/Weapon.tscn index 512386a58..cc56d895f 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/Weapon.tscn +++ b/Zennysoft.Game.Ma/src/items/weapons/Weapon.tscn @@ -8,7 +8,7 @@ height = 0.725098 [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_wll7p"] radius = 0.470016 -[node name="Weapon" type="RigidBody3D"] +[node name="Ammo" type="RigidBody3D"] collision_layer = 0 axis_lock_linear_x = true axis_lock_linear_z = true @@ -30,10 +30,7 @@ collision_mask = 0 unique_name_in_owner = true pixel_size = 0.025 billboard = 2 -double_sided = false -alpha_antialiasing_mode = 1 texture_filter = 0 -render_priority = 100 [node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"] shape = SubResource("CapsuleShape3D_wll7p") diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres index 1c49796a6..8e2778cd3 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/GeomanticReactor.tres @@ -7,14 +7,15 @@ script = ExtResource("2_ysg84") AttackSpeed = 1.0 WeaponElement = 0 -WeaponTag = 0 +WeaponTag = 11 +SelfDamage = 0 SoundEffect = 22 Name = "Geomantic Reactor" Description = "" SpawnRate = 0.1 BonusAttack = 15 BonusDefense = 0 -BonusLuck = 0.05 +BonusLuck = 5 BonusHP = 0 BonusVT = 0 AeolicResistance = 0 @@ -23,6 +24,7 @@ HydricResistance = 0 IgneousResistance = 0 FerrumResistance = 0 HolyResistance = 0 +CurseResistance = 0 ThrowSpeed = 12.0 ThrowDamage = 5 ItemTag = 0 diff --git a/Zennysoft.Game.Ma/src/player/Player.cs b/Zennysoft.Game.Ma/src/player/Player.cs index 24c477b10..8fda50c62 100644 --- a/Zennysoft.Game.Ma/src/player/Player.cs +++ b/Zennysoft.Game.Ma/src/player/Player.cs @@ -92,6 +92,10 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide [Node] private ShakeCamera _camera3D { get; set; } = default!; + [Node] private Projectile FireReactor { get; set; } = default!; + [Node] private Projectile AirReactor { get; set; } = default!; + [Node] private Projectile WaterReactor { get; set; } = default!; + #endregion public bool CanEquipState { get; set; } = true; @@ -319,6 +323,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide private void Attack() { + var weapon = EquipmentComponent.EquippedWeapon.Value as Weapon; + if (weapon.WeaponTag == WeaponTag.ElementalProjectile) + { + HandleProjectile(weapon); + return; + } + if (PlayerIsHittingGeometry()) WeaponAnimations.Play("hit_wall"); else if (!WeaponAnimations.IsPlaying()) @@ -326,13 +337,40 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide else return; - var weapon = EquipmentComponent.EquippedWeapon.Value as Weapon; if (weapon.WeaponTag == WeaponTag.DegradeOnSwing) _playerEffectService.Degrade(); else if (weapon.WeaponTag == WeaponTag.SelfDamage) _playerEffectService.TakeSelfDamage(5); } + private void HandleProjectile(Weapon weapon) + { + var ammo = EquipmentComponent.EquippedAmmo.Value as Ammo; + if (ammo == null || ammo.Count <= 0) + return; + + if (weapon.WeaponTag != WeaponTag.ElementalProjectile) + return; + + var fired = false; + if (ammo.AmmoElement == ElementType.Igneous) + fired = FireReactor.Fire(); + if (ammo.AmmoElement == ElementType.Aeolic) + fired = AirReactor.Fire(); + if (ammo.AmmoElement == ElementType.Hydric) + fired = WaterReactor.Fire(); + + if (!fired) + return; + + ammo.SetCount(ammo.Count - 1); + if (ammo.Count <= 0) + { + EquipmentComponent.Unequip(ammo); + Inventory.Remove(ammo); + } + } + private void ThrowItem() { var itemScene = GD.Load("res://src/items/throwable/ThrowableItem.tscn"); diff --git a/Zennysoft.Game.Ma/src/player/Player.tscn b/Zennysoft.Game.Ma/src/player/Player.tscn index f68c8e8a3..59471880c 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=1580 format=3 uid="uid://cfecvvav8kkp6"] +[gd_scene load_steps=1583 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://didc6vnf5ftlg" path="res://src/camera/ShakeCamera.tscn" id="2_jtmj1"] @@ -508,6 +508,9 @@ [ext_resource type="Texture2D" uid="uid://bvqsilbdfyqd1" path="res://src/vfx/Items Etc/persiko/persiko125.png" id="399_b1hpb"] [ext_resource type="Texture2D" uid="uid://bwoccwmlevwm1" path="res://src/vfx/Items Etc/persiko/persiko126.png" id="400_nmop6"] [ext_resource type="Texture2D" uid="uid://dwfqyfjsj8nro" path="res://src/vfx/Items Etc/persiko/persiko127.png" id="401_28ame"] +[ext_resource type="PackedScene" uid="uid://igpvnbi8qi6e" path="res://src/items/weapons/FireReactorProjectile.tscn" id="509_14f5p"] +[ext_resource type="PackedScene" uid="uid://nnns2ade62al" path="res://src/items/weapons/AirReactorProjectile.tscn" id="510_k6pkx"] +[ext_resource type="PackedScene" uid="uid://7p2sh52lj42o" path="res://src/items/weapons/WaterReactorProjectile.tscn" id="511_sq73w"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw45s"] radius = 1.0 @@ -10364,7 +10367,7 @@ shape = SubResource("SphereShape3D_g641l") [node name="Hitbox" type="Area3D" parent="Collision"] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.12691, -1) -collision_layer = 2048 +collision_layer = 0 collision_mask = 2048 [node name="HitboxCollision" type="CollisionShape3D" parent="Collision/Hitbox"] @@ -10495,3 +10498,14 @@ bus = &"SFX" [node name="WalkSFX" type="AudioStreamPlayer3D" parent="."] unique_name_in_owner = true stream = ExtResource("6_v7rlw") + +[node name="Projectiles" type="Node3D" parent="."] + +[node name="FireReactor" parent="Projectiles" instance=ExtResource("509_14f5p")] +unique_name_in_owner = true + +[node name="AirReactor" parent="Projectiles" instance=ExtResource("510_k6pkx")] +unique_name_in_owner = true + +[node name="WaterReactor" parent="Projectiles" instance=ExtResource("511_sq73w")] +unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/system/PlayerProjectile.cs.uid b/Zennysoft.Game.Ma/src/system/PlayerProjectile.cs.uid new file mode 100644 index 000000000..2ee3178be --- /dev/null +++ b/Zennysoft.Game.Ma/src/system/PlayerProjectile.cs.uid @@ -0,0 +1 @@ +uid://cytefxt38q6r7 diff --git a/Zennysoft.Game.Ma/src/system/Projectile.cs b/Zennysoft.Game.Ma/src/system/Projectile.cs index 312a1e61e..d3c6ff6d4 100644 --- a/Zennysoft.Game.Ma/src/system/Projectile.cs +++ b/Zennysoft.Game.Ma/src/system/Projectile.cs @@ -1,16 +1,18 @@ using Chickensoft.AutoInject; using Chickensoft.Introspection; using Godot; -using System.Linq; using Zennysoft.Game.Ma; using Zennysoft.Ma.Adapter; +using Zennysoft.Ma.Adapter.Entity; [Meta(typeof(IAutoNode))] public partial class Projectile : Node3D { public override void _Notification(int what) => this.Notify(what); - [Dependency] protected IPlayer _player => this.DependOn(() => GetParent().GetChildren().OfType().Single()); + [Dependency] protected IMap _map => this.DependOn(); + + [Dependency] protected IPlayer _player => this.DependOn(); [Node] public Area3D ProjectileHitbox { get; set; } @@ -29,15 +31,27 @@ public partial class Projectile : Node3D AnimationPlayer.Play("RESET"); } - public void Fire() + public bool Fire() { + if (AnimationPlayer.IsPlaying()) + return false; + Reparent((Map)_map); + GlobalPosition = _player.GlobalPosition; + GlobalBasis = _player.GlobalBasis; AnimationPlayer.Play("Fire"); + return true; } private void Hitbox_AreaEntered(Area3D area) { - if (area.GetOwner() is IPlayer) - _player.TakeDamage(new AttackData(AttackData.Damage, AttackData.ElementType)); + if (area.GetOwner() is IPlayer player) + player.TakeDamage(new AttackData(AttackData.Damage, AttackData.ElementType)); + if (area.GetOwner() is IEnemy enemy) + { + var projectileDamage = new AttackData(AttackData.Damage, AttackData.ElementType, false, false); + var damageDealt = DamageCalculator.CalculateDamage(projectileDamage, enemy.DefenseComponent.CurrentDefense.Value, enemy.ElementalResistanceSet); + enemy.HealthComponent.Damage(damageDealt); + } 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 88f66e721..cc2a04bc0 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs @@ -116,7 +116,7 @@ public partial class InventoryMenu : Control, IInventoryMenu if (Input.IsActionJustPressed(GameInputs.InventorySort)) { - var isChanged = _player.Inventory.Sort(_player.EquipmentComponent.EquippedWeapon.Value, _player.EquipmentComponent.EquippedArmor.Value, _player.EquipmentComponent.EquippedAccessory.Value); + var isChanged = _player.Inventory.Sort(_player.EquipmentComponent.EquippedWeapon.Value, _player.EquipmentComponent.EquippedArmor.Value, _player.EquipmentComponent.EquippedAccessory.Value, _player.EquipmentComponent.EquippedAmmo.Value); if (!isChanged) return;