Move files and folders to new repo format to enable multi-project format
218
Zennysoft.Game.Ma/src/items/EffectService.cs
Normal file
@@ -0,0 +1,218 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
using System;
|
||||
|
||||
namespace Zennysoft.Game.Ma.src.items;
|
||||
|
||||
public class EffectService
|
||||
{
|
||||
private readonly IGame _game;
|
||||
private readonly IPlayer _player;
|
||||
|
||||
public EffectService(IGame game, IPlayer player)
|
||||
{
|
||||
_game = game;
|
||||
_player = player;
|
||||
}
|
||||
|
||||
public void TeleportEnemiesToCurrentRoom()
|
||||
{
|
||||
var currentFloor = _game.CurrentFloor;
|
||||
var rooms = currentFloor.Rooms;
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var validRooms = rooms.OfType<MonsterRoom>().ToList();
|
||||
if (currentRoom is MonsterRoom monsterRoom)
|
||||
validRooms.Remove(monsterRoom);
|
||||
|
||||
var currentMonsterRoom = (MonsterRoom)currentRoom;
|
||||
|
||||
var enemyList = validRooms.SelectMany(x => x.GetEnemiesInCurrentRoom());
|
||||
|
||||
foreach (var enemy in enemyList)
|
||||
{
|
||||
var spawnPoints = currentMonsterRoom.EnemySpawnPoints.GetChildren().OfType<Marker3D>().ToList();
|
||||
var spawnPointsGodotCollection = new Godot.Collections.Array<Marker3D>(spawnPoints);
|
||||
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
|
||||
enemy.SetEnemyGlobalPosition(randomSpawnPoint.GlobalPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public void KillHalfEnemiesInRoom()
|
||||
{
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var currentMonsterRoom = (MonsterRoom)currentRoom;
|
||||
var enemyList = currentMonsterRoom.GetEnemiesInCurrentRoom().ToList();
|
||||
var enemiesToKill = enemyList.Count / 2;
|
||||
for (var i = 0; i < enemiesToKill; i++)
|
||||
enemyList[i].Die();
|
||||
}
|
||||
|
||||
public void TurnAllEnemiesInRoomIntoHealingItem()
|
||||
{
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
{
|
||||
enemy.Die();
|
||||
DropHealingItem(enemy.GetEnemyGlobalPosition());
|
||||
}
|
||||
}
|
||||
|
||||
public void DropHealingItem(Vector3 vector)
|
||||
{
|
||||
var consumableFolder = "res://src/items/consumable";
|
||||
var restorativeScene = GD.Load<PackedScene>($"{consumableFolder}/ConsumableItem.tscn");
|
||||
var consumable = restorativeScene.Instantiate<ConsumableItem>();
|
||||
var resourceFiles = DirAccess.GetFilesAt($"{consumableFolder}/resources");
|
||||
var rng = new RandomNumberGenerator();
|
||||
rng.Randomize();
|
||||
var randomResource = resourceFiles[rng.RandiRange(0, resourceFiles.Length - 1)];
|
||||
var randomFile = ResourceLoader.Load<ConsumableItemStats>($"{consumableFolder}/resources/{randomResource}");
|
||||
consumable.ItemStats = randomFile;
|
||||
_game.AddChild(consumable);
|
||||
consumable.GlobalPosition = vector;
|
||||
}
|
||||
|
||||
public void HealAllEnemiesAndPlayerInRoomToFull()
|
||||
{
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
enemy.SetCurrentHP(enemy.GetMaximumHP());
|
||||
_player.Stats.SetCurrentHP(_player.Stats.MaximumHP.Value);
|
||||
}
|
||||
|
||||
public void AbsorbHPFromAllEnemiesInRoom()
|
||||
{
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
var hpToAbsorb = 0.0;
|
||||
foreach (var enemy in currentEnemies)
|
||||
hpToAbsorb += enemy.CurrentHP * 0.05;
|
||||
_player.Stats.SetCurrentHP(_player.Stats.CurrentHP.Value + (int)hpToAbsorb);
|
||||
GD.Print("HP to absorb: " + hpToAbsorb);
|
||||
}
|
||||
|
||||
public void DealElementalDamageToAllEnemiesInRoom(ElementType elementType)
|
||||
{
|
||||
var currentRoom = _player.GetCurrentRoom();
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
enemy.TakeDamage(20, elementType);
|
||||
}
|
||||
|
||||
public void SwapHPandVT()
|
||||
{
|
||||
var oldHp = _player.Stats.CurrentHP.Value;
|
||||
var oldVt = _player.Stats.CurrentVT.Value;
|
||||
|
||||
_player.Stats.SetCurrentHP(oldVt);
|
||||
_player.Stats.SetCurrentVT(oldHp);
|
||||
}
|
||||
|
||||
public void RandomEffect(EffectItem item)
|
||||
{
|
||||
var itemEffects = Enum.GetValues<UsableItemTag>().ToList();
|
||||
itemEffects.Remove(UsableItemTag.RandomEffect);
|
||||
itemEffects.Remove(UsableItemTag.None);
|
||||
var randomEffect = new Godot.Collections.Array<UsableItemTag>(itemEffects).PickRandom();
|
||||
item.SetEffectTag(randomEffect);
|
||||
_game.UseItem(item);
|
||||
}
|
||||
|
||||
public void RaiseCurrentWeaponAttack()
|
||||
{
|
||||
if (_player.EquippedWeapon.Value.ItemName == string.Empty)
|
||||
return;
|
||||
|
||||
var currentWeapon = _player.EquippedWeapon.Value;
|
||||
currentWeapon.IncreaseWeaponAttack(1);
|
||||
}
|
||||
|
||||
public void RaiseCurrentArmorDefense()
|
||||
{
|
||||
if (_player.EquippedArmor.Value.ItemName == string.Empty)
|
||||
return;
|
||||
|
||||
var currentArmor = _player.EquippedArmor.Value;
|
||||
currentArmor.IncreaseArmorDefense(1);
|
||||
}
|
||||
|
||||
public void RaiseLevel()
|
||||
{
|
||||
_player.LevelUp();
|
||||
}
|
||||
|
||||
public void TeleportToRandomRoom(IEnemy enemy)
|
||||
{
|
||||
var currentFloor = _game.CurrentFloor;
|
||||
var rooms = currentFloor.Rooms;
|
||||
var currentRoom = enemy.GetCurrentRoom();
|
||||
var validRooms = rooms.OfType<MonsterRoom>().ToList();
|
||||
if (currentRoom is MonsterRoom currentMonsterRoom)
|
||||
validRooms.Remove(currentMonsterRoom);
|
||||
|
||||
if (validRooms.Count == 0)
|
||||
return;
|
||||
|
||||
var roomsGodotCollection = new Godot.Collections.Array<MonsterRoom>(validRooms);
|
||||
var randomRoom = roomsGodotCollection.PickRandom();
|
||||
var spawnPoints = randomRoom.EnemySpawnPoints.GetChildren().OfType<Marker3D>().ToList();
|
||||
var spawnPointsGodotCollection = new Godot.Collections.Array<Marker3D>(spawnPoints);
|
||||
var randomSpawnPoint = spawnPointsGodotCollection.PickRandom();
|
||||
|
||||
enemy.SetEnemyGlobalPosition(randomSpawnPoint.GlobalPosition);
|
||||
}
|
||||
|
||||
public void TeleportToRandomRoom(IPlayer player)
|
||||
{
|
||||
var currentFloor = _game.CurrentFloor;
|
||||
var rooms = currentFloor.Rooms;
|
||||
|
||||
var currentRoom = rooms.SingleOrDefault(x => x.IsPlayerInRoom);
|
||||
|
||||
var validRooms = rooms.OfType<MonsterRoom>().ToList();
|
||||
if (currentRoom is MonsterRoom currentMonsterRoom)
|
||||
validRooms.Remove(currentMonsterRoom);
|
||||
|
||||
if (validRooms.Count == 0)
|
||||
return;
|
||||
|
||||
var roomsGodotCollection = new Godot.Collections.Array<MonsterRoom>(validRooms);
|
||||
var randomRoom = roomsGodotCollection.PickRandom();
|
||||
var spawnPoint = randomRoom.PlayerSpawn;
|
||||
_game.ToggleInventory();
|
||||
player.TeleportPlayer(spawnPoint.Transform);
|
||||
}
|
||||
|
||||
public void ChangeAffinity(ThrowableItem throwableItem)
|
||||
{
|
||||
var maximumElements = Enum.GetNames(typeof(ElementType)).Length;
|
||||
throwableItem.SetElementType(throwableItem.ElementType + 1 % maximumElements);
|
||||
|
||||
// TODO: Make this an inventory animation to cycle through elements.
|
||||
throwableItem.SetDescription(
|
||||
$"Inflicts {throwableItem.ElementType} damage when thrown." +
|
||||
$"{System.Environment.NewLine}Use item to change Affinity.");
|
||||
}
|
||||
|
||||
public void WarpToExit(IPlayer player)
|
||||
{
|
||||
var exitRoom = _game.CurrentFloor.Rooms.OfType<ExitRoom>().Single();
|
||||
if (exitRoom.PlayerDiscoveredRoom)
|
||||
player.TeleportPlayer(exitRoom.PlayerSpawn.Transform);
|
||||
}
|
||||
|
||||
public void WarpToExit(IEnemy enemy)
|
||||
{
|
||||
var exitRoom = _game.CurrentFloor.Rooms.OfType<ExitRoom>().Single();
|
||||
enemy.SetEnemyGlobalPosition(exitRoom.PlayerSpawn.GlobalPosition);
|
||||
}
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/EffectService.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cnvyubmj6u7qw
|
||||
13
Zennysoft.Game.Ma/src/items/EquipableItem.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta]
|
||||
public abstract partial class EquipableItem : InventoryItem
|
||||
{
|
||||
public abstract ItemTag ItemTag { get; }
|
||||
|
||||
[Save("equipable_item_is_equipped")]
|
||||
public bool IsEquipped { get; set; }
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/EquipableItem.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cw8s4mjrde4no
|
||||
1
Zennysoft.Game.Ma/src/items/IEquipableItem.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cfbv1kgdexbun
|
||||
112
Zennysoft.Game.Ma/src/items/Inventory.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public interface IInventory : INode
|
||||
{
|
||||
public List<InventoryItem> Items { get; }
|
||||
|
||||
public bool TryAdd(InventoryItem inventoryItem);
|
||||
|
||||
public void Remove(InventoryItem inventoryItem);
|
||||
|
||||
public void Sort();
|
||||
}
|
||||
|
||||
[Meta(typeof(IAutoNode)), Id("inventory")]
|
||||
public partial class Inventory : Node, IInventory
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
// TODO: Constants class with export
|
||||
private const int _maxInventorySize = 20;
|
||||
|
||||
public Inventory()
|
||||
{
|
||||
Items = [];
|
||||
}
|
||||
|
||||
[Save("inventory_items")]
|
||||
public List<InventoryItem> Items { get; private set; }
|
||||
|
||||
public bool TryAdd(InventoryItem inventoryItem)
|
||||
{
|
||||
if (Items.Count >= _maxInventorySize)
|
||||
return false;
|
||||
|
||||
Items.Add(inventoryItem);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove(InventoryItem inventoryItem) => Items.Remove(inventoryItem);
|
||||
|
||||
|
||||
public void Sort()
|
||||
{
|
||||
var equippedWeapon = Items.OfType<Weapon>().Where(x => x.IsEquipped);
|
||||
var equippedArmor = Items.OfType<Armor>().Where(x => x.IsEquipped);
|
||||
var equippedAccessory = Items.OfType<Accessory>().Where(x => x.IsEquipped);
|
||||
var equippedItems = new List<InventoryItem>();
|
||||
equippedItems.AddRange(equippedWeapon);
|
||||
equippedItems.AddRange(equippedArmor);
|
||||
equippedItems.AddRange(equippedAccessory);
|
||||
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 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());
|
||||
Items = [.. equippedItems, .. weapons, .. armor, .. accessories, .. consumables, .. throwables];
|
||||
}
|
||||
|
||||
public class WeaponComparer : IComparer<Weapon>
|
||||
{
|
||||
public int Compare(Weapon x, Weapon y)
|
||||
{
|
||||
if (x.Damage == y.Damage)
|
||||
return x.ItemName.CompareTo(y.ItemName);
|
||||
|
||||
return x.Damage < y.Damage ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
public class ArmorComparer : IComparer<Armor>
|
||||
{
|
||||
public int Compare(Armor x, Armor y)
|
||||
{
|
||||
if (x.Defense == y.Defense)
|
||||
return x.ItemName.CompareTo(y.ItemName);
|
||||
|
||||
return x.Defense < y.Defense ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
public class AccessoryComparer : IComparer<Accessory>
|
||||
{
|
||||
public int Compare(Accessory x, Accessory y)
|
||||
{
|
||||
return x.ItemName.CompareTo(y.ItemName);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConsumableComparer : IComparer<ConsumableItem>
|
||||
{
|
||||
public int Compare(ConsumableItem x, ConsumableItem y)
|
||||
{
|
||||
return x.ItemName.CompareTo(y.ItemName);
|
||||
}
|
||||
}
|
||||
public class ThrowableComparer : IComparer<ThrowableItem>
|
||||
{
|
||||
public int Compare(ThrowableItem x, ThrowableItem y)
|
||||
{
|
||||
return x.ItemName.CompareTo(y.ItemName);
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/Inventory.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c4bc5kati3qut
|
||||
27
Zennysoft.Game.Ma/src/items/InventoryItem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta]
|
||||
public abstract partial class InventoryItem : Node3D
|
||||
{
|
||||
[Save("inventory_item_id")]
|
||||
public Guid ID => Guid.NewGuid();
|
||||
public abstract string ItemName { get; }
|
||||
public abstract string Description { get; }
|
||||
[Save("inventory_item_spawn_rate")]
|
||||
public abstract float SpawnRate { get; }
|
||||
[Save("inventory_item_throw_damage")]
|
||||
public abstract double ThrowDamage { get; }
|
||||
[Save("inventory_item_throw_speed")]
|
||||
public abstract float ThrowSpeed { get; }
|
||||
|
||||
[Save("inventory_item_stats")]
|
||||
public abstract InventoryItemStats ItemStats { get; set; }
|
||||
|
||||
public Sprite3D Sprite { get; set; }
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/InventoryItem.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://vep0v8opeglc
|
||||
24
Zennysoft.Game.Ma/src/items/InventoryItem.tscn
Normal file
@@ -0,0 +1,24 @@
|
||||
[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)
|
||||
|
||||
[node name="InventoryItem" type="Node3D"]
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[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.0322805, 0)
|
||||
pixel_size = 0.0003
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||
shape = SubResource("BoxShape3D_84bq1")
|
||||
38
Zennysoft.Game.Ma/src/items/InventoryItemStats.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("inventory_item_stats")]
|
||||
public partial class InventoryItemStats : Resource
|
||||
{
|
||||
[Export]
|
||||
[Save("inventory_item_name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Export(PropertyHint.MultilineText)]
|
||||
[Save("inventory_item_description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[Save("inventory_item_texture")]
|
||||
[Export] public Texture2D Texture { get; set; } = default!;
|
||||
|
||||
[Export(PropertyHint.Range, "0, 1, 0.01")]
|
||||
public float SpawnRate { get; set; } = 0.5f;
|
||||
|
||||
[Export(PropertyHint.Range, "0, 25, 0.1")]
|
||||
public float ThrowSpeed { get; set; } = 12.0f;
|
||||
|
||||
[Export(PropertyHint.Range, "0, 999, 1")]
|
||||
public int HealHPAmount { get; set; }
|
||||
|
||||
[Export(PropertyHint.Range, "0, 999, 1")]
|
||||
public int HealVTAmount { get; set; }
|
||||
|
||||
[Export(PropertyHint.Range, "0, 999, 1")]
|
||||
public int ThrowDamage { get; set; } = 5;
|
||||
|
||||
[Export]
|
||||
public ItemTag ItemTag { get; set; } = ItemTag.None;
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/InventoryItemStats.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b6vgwsjlshci
|
||||
@@ -0,0 +1,67 @@
|
||||
using Godot;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using System.Text.Json;
|
||||
using System;
|
||||
|
||||
/// <summary>Basis JSON converter.</summary>
|
||||
public class Texture2DConverter : JsonConverter<Texture2D>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override bool CanConvert(Type typeToConvert) =>
|
||||
typeToConvert == typeof(Texture2D);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Texture2D Read(
|
||||
ref Utf8JsonReader reader,
|
||||
Type typeToConvert,
|
||||
JsonSerializerOptions options)
|
||||
{
|
||||
var texture2D = new Texture2D();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.EndObject)
|
||||
{
|
||||
return texture2D;
|
||||
}
|
||||
|
||||
if (reader.TokenType != JsonTokenType.PropertyName)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var propertyName = reader.GetString();
|
||||
reader.Read();
|
||||
|
||||
switch (propertyName)
|
||||
{
|
||||
case "resource_path":
|
||||
var resourcePath = JsonSerializer.Deserialize<string>(ref reader, options);
|
||||
texture2D = GD.Load<Texture2D>(resourcePath);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
throw new JsonException("Unexpected end when reading Texture2D.");
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Write(
|
||||
Utf8JsonWriter writer,
|
||||
Texture2D value,
|
||||
JsonSerializerOptions options
|
||||
)
|
||||
{
|
||||
var resolver = options.TypeInfoResolver;
|
||||
var resourcePathType = resolver!.GetTypeInfo(typeof(string), options)!;
|
||||
|
||||
writer.WriteStartObject();
|
||||
writer.WritePropertyName("resource_path");
|
||||
JsonSerializer.Serialize(writer, value.ResourcePath, resourcePathType);
|
||||
writer.WriteEndObject();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bdc3xwj2b1oog
|
||||
84
Zennysoft.Game.Ma/src/items/ItemDatabase.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public partial class ItemDatabase : Node
|
||||
{
|
||||
[Export]
|
||||
public PackedScene WeaponScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ArmorScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene AccessoryScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ThrowableItemScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ConsumableItemScene { get; set; }
|
||||
|
||||
public InventoryItem[] Initialize()
|
||||
{
|
||||
var database = new List<InventoryItem>();
|
||||
var armorResources = DirAccess.GetFilesAt("res://src/items/armor/resources/");
|
||||
var weaponResources = DirAccess.GetFilesAt("res://src/items/weapons/resources/");
|
||||
var accessoryResources = DirAccess.GetFilesAt("res://src/items/accessory/resources/");
|
||||
var throwableResources = DirAccess.GetFilesAt("res://src/items/throwable/resources/");
|
||||
var consumableResources = DirAccess.GetFilesAt("res://src/items/consumable/resources/");
|
||||
|
||||
foreach (var armor in armorResources)
|
||||
{
|
||||
var armorInfo = GD.Load<ArmorStats>($"res://src/items/armor/resources/{armor}");
|
||||
var armorScene = ArmorScene.Instantiate<Armor>();
|
||||
armorScene.ItemStats = armorInfo;
|
||||
armorScene.Sprite = armorScene.GetNode<Sprite3D>("%Sprite");
|
||||
armorScene.Sprite.Texture = armorInfo.Texture;
|
||||
database.Add(armorScene);
|
||||
}
|
||||
|
||||
foreach (var weapon in weaponResources)
|
||||
{
|
||||
var weaponInfo = GD.Load<WeaponStats>($"res://src/items/weapons/resources/{weapon}");
|
||||
var weaponScene = WeaponScene.Instantiate<Weapon>();
|
||||
weaponScene.ItemStats = weaponInfo;
|
||||
weaponScene.Sprite = weaponScene.GetNode<Sprite3D>("%Sprite");
|
||||
weaponScene.Sprite.Texture = weaponInfo.Texture;
|
||||
database.Add(weaponScene);
|
||||
}
|
||||
|
||||
foreach (var accessory in accessoryResources)
|
||||
{
|
||||
var accessoryInfo = GD.Load<AccessoryStats>($"res://src/items/accessory/resources/{accessory}");
|
||||
var accessoryScene = AccessoryScene.Instantiate<Accessory>();
|
||||
accessoryScene.ItemStats = accessoryInfo;
|
||||
accessoryScene.Sprite = accessoryScene.GetNode<Sprite3D>("%Sprite");
|
||||
accessoryScene.Sprite.Texture = accessoryInfo.Texture;
|
||||
database.Add(accessoryScene);
|
||||
}
|
||||
|
||||
foreach (var throwable in throwableResources)
|
||||
{
|
||||
var throwableItemInfo = GD.Load<ThrowableItemStats>($"res://src/items/throwable/resources/{throwable}");
|
||||
var throwableItemScene = ThrowableItemScene.Instantiate<ThrowableItem>();
|
||||
throwableItemScene.ItemStats = throwableItemInfo;
|
||||
throwableItemScene.Sprite = throwableItemScene.GetNode<Sprite3D>("%Sprite");
|
||||
throwableItemScene.Sprite.Texture = throwableItemInfo.Texture;
|
||||
database.Add(throwableItemScene);
|
||||
}
|
||||
|
||||
foreach (var consumable in consumableResources)
|
||||
{
|
||||
var consumableItemInfo = GD.Load<ConsumableItemStats>($"res://src/items/consumable/resources/{consumable}");
|
||||
var consumableItemScene = ConsumableItemScene.Instantiate<ConsumableItem>();
|
||||
consumableItemScene.ItemStats = consumableItemInfo;
|
||||
consumableItemScene.Sprite = consumableItemScene.GetNode<Sprite3D>("%Sprite");
|
||||
consumableItemScene.Sprite.Texture = consumableItemInfo.Texture;
|
||||
database.Add(consumableItemScene);
|
||||
}
|
||||
|
||||
return [.. database];
|
||||
}
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/ItemDatabase.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://vdunjh1f4jry
|
||||
16
Zennysoft.Game.Ma/src/items/ItemDatabase.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://twrj4wixcbu7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://vdunjh1f4jry" path="res://src/items/ItemDatabase.cs" id="1_7b315"]
|
||||
[ext_resource type="PackedScene" uid="uid://db206brufi83s" path="res://src/items/weapons/Weapon.tscn" id="2_wq002"]
|
||||
[ext_resource type="PackedScene" uid="uid://dorr7v1tkeiy0" path="res://src/items/armor/Armor.tscn" id="3_8wlg5"]
|
||||
[ext_resource type="PackedScene" uid="uid://b07srt3lckt4e" path="res://src/items/accessory/Accessory.tscn" id="4_pr7ub"]
|
||||
[ext_resource type="PackedScene" uid="uid://1fl6s352e2ej" path="res://src/items/throwable/ThrowableItem.tscn" id="5_r5y4t"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6w7dpk0hurj0" path="res://src/items/consumable/ConsumableItem.tscn" id="6_yvger"]
|
||||
|
||||
[node name="ItemDatabase" type="Node"]
|
||||
script = ExtResource("1_7b315")
|
||||
WeaponScene = ExtResource("2_wq002")
|
||||
ArmorScene = ExtResource("3_8wlg5")
|
||||
AccessoryScene = ExtResource("4_pr7ub")
|
||||
ThrowableItemScene = ExtResource("5_r5y4t")
|
||||
ConsumableItemScene = ExtResource("6_yvger")
|
||||
36
Zennysoft.Game.Ma/src/items/accessory/Accessory.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("accessory")]
|
||||
public partial class Accessory : EquipableItem
|
||||
{
|
||||
[Export] private AccessoryStats _accessoryStats { get; set; } = new AccessoryStats();
|
||||
|
||||
public override string ItemName => _accessoryStats.Name;
|
||||
|
||||
public override string Description => _accessoryStats.Description;
|
||||
|
||||
public override float SpawnRate => _accessoryStats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => _accessoryStats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => _accessoryStats.ThrowSpeed;
|
||||
|
||||
public int MaxHPUp => _accessoryStats.MaxHPUp;
|
||||
|
||||
public int MaxVTUp => _accessoryStats.MaxVTUp;
|
||||
|
||||
public double LuckUp => _accessoryStats.LuckUp;
|
||||
|
||||
public int ATKUp => _accessoryStats.ATKUp;
|
||||
|
||||
public int DEFUp => _accessoryStats.DEFUp;
|
||||
|
||||
public AccessoryTag AccessoryTag => _accessoryStats.AccessoryTag;
|
||||
|
||||
public override ItemTag ItemTag => _accessoryStats.ItemTag;
|
||||
|
||||
public override InventoryItemStats ItemStats { get => _accessoryStats; set => _accessoryStats = (AccessoryStats)value; }
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/accessory/Accessory.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://2xddsc0pjykd
|
||||
25
Zennysoft.Game.Ma/src/items/accessory/Accessory.tscn
Normal file
@@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://b07srt3lckt4e"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2xddsc0pjykd" path="res://src/items/accessory/Accessory.cs" id="1_ikyk2"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1ceef"]
|
||||
radius = 0.470016
|
||||
|
||||
[node name="Accessory" type="Node3D"]
|
||||
script = ExtResource("1_ikyk2")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||
unique_name_in_owner = true
|
||||
pixel_size = 0.0005
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_1ceef")
|
||||
44
Zennysoft.Game.Ma/src/items/accessory/AccessoryStats.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[GlobalClass]
|
||||
[Meta, Id("accessory_stat_type")]
|
||||
public partial class AccessoryStats : InventoryItemStats
|
||||
{
|
||||
[Export]
|
||||
[Save("accessory_atk_up")]
|
||||
public int ATKUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_def_up")]
|
||||
public int DEFUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_luck_up")]
|
||||
public double LuckUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_max_hp_up")]
|
||||
public int MaxHPUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_max_vt_up")]
|
||||
public int MaxVTUp { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("accessory_tag")]
|
||||
public AccessoryTag AccessoryTag { get; set; } = AccessoryTag.None;
|
||||
}
|
||||
public enum AccessoryTag
|
||||
{
|
||||
None,
|
||||
HalfVTConsumption,
|
||||
StatusEffectImmunity
|
||||
}
|
||||
|
||||
[JsonSerializable(typeof(AccessoryTag))]
|
||||
public partial class AccessoryTagEnumContext : JsonSerializerContext;
|
||||
@@ -0,0 +1 @@
|
||||
uid://b8arlmivk68b
|
||||
BIN
Zennysoft.Game.Ma/src/items/accessory/accessory.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
35
Zennysoft.Game.Ma/src/items/accessory/accessory.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d0yqm7ars827b"
|
||||
path.s3tc="res://.godot/imported/accessory.png-04ec32093cb21658c9558ccc9e7c09b2.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/accessory/accessory.png"
|
||||
dest_files=["res://.godot/imported/accessory.png-04ec32093cb21658c9558ccc9e7c09b2.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://cvkwmart5y51r"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://hjyk3j24o48b" path="res://src/items/accessory/textures/MASK 03.PNG" id="1_q42cv"]
|
||||
[ext_resource type="Script" uid="uid://b8arlmivk68b" path="res://src/items/accessory/AccessoryStats.cs" id="1_xqaot"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xqaot")
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LuckUp = 0.1
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTag = 0
|
||||
Name = "Mask of the Goddess of Avarice"
|
||||
Description = "Raises Luck"
|
||||
Texture = ExtResource("1_q42cv")
|
||||
SpawnRate = 0.1
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 0
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://d4bcem2nup7ef"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_0p1ot"]
|
||||
[ext_resource type="Script" path="res://src/items/accessory/AccessoryStats.cs" id="1_vef66"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vef66")
|
||||
ATKUp = 3
|
||||
DEFUp = 0
|
||||
LUCKUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTags = [0]
|
||||
Name = "Mask of the Goddess of Destruction"
|
||||
Description = "Raises ATK."
|
||||
Texture = ExtResource("1_0p1ot")
|
||||
SpawnRate = 0.1
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://bejy3lpudgawg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_0k42r"]
|
||||
[ext_resource type="Script" path="res://src/items/accessory/AccessoryStats.cs" id="1_cgxkh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_cgxkh")
|
||||
ATKUp = 1
|
||||
DEFUp = 1
|
||||
LUCKUp = 0.0
|
||||
MaxHPUp = 30
|
||||
MaxVTUp = 30
|
||||
AccessoryTags = []
|
||||
Name = "Mask of the Goddess of Guilt"
|
||||
Description = "Raises MAX HP, MAX VT, ATK, DEF"
|
||||
Texture = ExtResource("1_0k42r")
|
||||
SpawnRate = 0.1
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://ddwyaxxqvk52h"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_1uw37"]
|
||||
[ext_resource type="Script" path="res://src/items/accessory/AccessoryStats.cs" id="1_kuyyj"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_kuyyj")
|
||||
ATKUp = 0
|
||||
DEFUp = 3
|
||||
LUCKUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTags = []
|
||||
Name = "Mask of the Goddess of Obstinance"
|
||||
Description = "Raises DEF."
|
||||
Texture = ExtResource("1_1uw37")
|
||||
SpawnRate = 0.1
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://c3v6r8s8yruag"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b8arlmivk68b" path="res://src/items/accessory/AccessoryStats.cs" id="1_co7sc"]
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_uwbei"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_co7sc")
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LuckUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTag = 2
|
||||
Name = "Mask of the Shunned Goddess"
|
||||
Description = "Status Effect Immunity"
|
||||
Texture = ExtResource("1_uwbei")
|
||||
SpawnRate = 0.1
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 0
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://ct8iply3dwssv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_t16cd"]
|
||||
[ext_resource type="Script" uid="uid://b8arlmivk68b" path="res://src/items/accessory/AccessoryStats.cs" id="1_vdb56"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vdb56")
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LuckUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTag = 1
|
||||
Name = "Mask of the Goddess of Sloth"
|
||||
Description = "Halves VT Depletion Rate"
|
||||
Texture = ExtResource("1_t16cd")
|
||||
SpawnRate = 0.1
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 0
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://d02kuxaus43mk"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/accessory/AccessoryStats.cs" id="1_3iw2y"]
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_vc77e"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3iw2y")
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LUCKUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 50
|
||||
AccessoryTags = []
|
||||
Name = "Mask of the Goddess of Suffering"
|
||||
Description = "Raises MAX VT"
|
||||
Texture = ExtResource("1_vc77e")
|
||||
SpawnRate = 0.1
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://b0bxwp55mcyyp"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/accessory/AccessoryStats.cs" id="1_0u4rq"]
|
||||
[ext_resource type="Texture2D" uid="uid://db7i7iy5gagae" path="res://src/items/accessory/textures/MASK 02.PNG" id="1_ggv41"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_0u4rq")
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LUCKUp = 0.0
|
||||
MaxHPUp = 50
|
||||
MaxVTUp = 0
|
||||
AccessoryTags = []
|
||||
Name = "Mask of the Goddess of Zeal"
|
||||
Description = "Raises MAX HP"
|
||||
Texture = ExtResource("1_ggv41")
|
||||
SpawnRate = 0.1
|
||||
BIN
Zennysoft.Game.Ma/src/items/accessory/textures/MASK 01.PNG
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://0r1dws4ajhdx"
|
||||
path.s3tc="res://.godot/imported/MASK 01.PNG-f5c8e97a66b237dfc19d02a72a3ef47a.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/accessory/textures/MASK 01.PNG"
|
||||
dest_files=["res://.godot/imported/MASK 01.PNG-f5c8e97a66b237dfc19d02a72a3ef47a.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/accessory/textures/MASK 02.PNG
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://db7i7iy5gagae"
|
||||
path.s3tc="res://.godot/imported/MASK 02.PNG-cc3b7cf23538b5c82ae62fe29757d8a4.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/accessory/textures/MASK 02.PNG"
|
||||
dest_files=["res://.godot/imported/MASK 02.PNG-cc3b7cf23538b5c82ae62fe29757d8a4.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/accessory/textures/MASK 03.PNG
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://hjyk3j24o48b"
|
||||
path.s3tc="res://.godot/imported/MASK 03.PNG-9ab390330efa1f35084ad56075377b4d.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/accessory/textures/MASK 03.PNG"
|
||||
dest_files=["res://.godot/imported/MASK 03.PNG-9ab390330efa1f35084ad56075377b4d.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
29
Zennysoft.Game.Ma/src/items/armor/Armor.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("armor")]
|
||||
public partial class Armor : EquipableItem
|
||||
{
|
||||
[Export]
|
||||
private ArmorStats _armorStats { get; set; } = new ArmorStats();
|
||||
|
||||
public override string ItemName => _armorStats.Name;
|
||||
|
||||
public override string Description => _armorStats.Description;
|
||||
|
||||
public override float SpawnRate => _armorStats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => _armorStats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => _armorStats.ThrowSpeed;
|
||||
|
||||
public int Defense => _armorStats.Defense;
|
||||
|
||||
public void IncreaseArmorDefense(int bonus) => _armorStats.Defense += bonus;
|
||||
|
||||
public override ItemTag ItemTag => _armorStats.ItemTag;
|
||||
|
||||
public override InventoryItemStats ItemStats { get => _armorStats; set => _armorStats = (ArmorStats)value; }
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/armor/Armor.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bxvre2y2caa3h
|
||||
29
Zennysoft.Game.Ma/src/items/armor/Armor.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dorr7v1tkeiy0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bxvre2y2caa3h" path="res://src/items/armor/Armor.cs" id="1_cmjpq"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_qdeu2"]
|
||||
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||
|
||||
[node name="Armor" type="Node3D"]
|
||||
script = ExtResource("1_cmjpq")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
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.0322805, 0)
|
||||
pixel_size = 0.0006
|
||||
billboard = 2
|
||||
shaded = true
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||
shape = SubResource("BoxShape3D_qdeu2")
|
||||
34
Zennysoft.Game.Ma/src/items/armor/ArmorStats.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[GlobalClass]
|
||||
[Meta, Id("armor_stats")]
|
||||
public partial class ArmorStats : InventoryItemStats
|
||||
{
|
||||
[Export]
|
||||
[Save("armor_defense")]
|
||||
public int Defense { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("armor_telluric_resistance")]
|
||||
public double TelluricResistance { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("armor_aeolic_resistance")]
|
||||
public double AeolicResistance { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("armor_hydric_resistance")]
|
||||
public double HydricResistance { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("armor_igneous_resistance")]
|
||||
public double IgneousResistance { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("armor_ferrum_resistance")]
|
||||
public double FerrumResistance { get; set; } = 0;
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/armor/ArmorStats.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dqtp6ewvttoyu
|
||||
17
Zennysoft.Game.Ma/src/items/armor/resources/Acceptance.tres
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://b8mjje06x6dl1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dbb3x4cbo8jc1" path="res://src/items/armor/textures/ACCEPTANCE.PNG" id="1_p85jd"]
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_si4wu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_si4wu")
|
||||
Defense = 9
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Acceptance"
|
||||
Description = "+9 DEF"
|
||||
Texture = ExtResource("1_p85jd")
|
||||
SpawnRate = 0.01
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://ce2vfa2t3io67"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="1_6r2bl"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckcn67d64mgke" path="res://src/items/armor/textures/atoners adornment.PNG" id="1_588l8"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_6r2bl")
|
||||
Defense = 1
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Atoner's Adornments"
|
||||
Description = "+1 DEF"
|
||||
Texture = ExtResource("1_588l8")
|
||||
SpawnRate = 0.25
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 0
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://dnu241lh47oqd"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_0qtvf"]
|
||||
[ext_resource type="Texture2D" uid="uid://vvhbibkslh57" path="res://src/items/armor/textures/CEREMONIAL.PNG" id="1_s4gpg"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_0qtvf")
|
||||
Defense = 2
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Ceremonial Vestments"
|
||||
Description = "+2 DEF"
|
||||
Texture = ExtResource("1_s4gpg")
|
||||
SpawnRate = 0.2
|
||||
17
Zennysoft.Game.Ma/src/items/armor/resources/DevicLayer.tres
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://4s7wjsb7eb6e"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://381ddynsa3gc" path="res://src/items/armor/textures/DEVIC.PNG" id="1_5ik54"]
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_w3lql"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_w3lql")
|
||||
Defense = 7
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Devic Layers"
|
||||
Description = "+7 DEF"
|
||||
Texture = ExtResource("1_5ik54")
|
||||
SpawnRate = 0.05
|
||||
17
Zennysoft.Game.Ma/src/items/armor/resources/GoddessRobe.tres
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://dc0qjer88chme"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_3mc7x"]
|
||||
[ext_resource type="Texture2D" uid="uid://c57kuugsc2lti" path="res://src/items/armor/textures/GODDESS.PNG" id="1_5vleh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3mc7x")
|
||||
Defense = 8
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Goddess' Robe"
|
||||
Description = "+8 DEF"
|
||||
Texture = ExtResource("1_5vleh")
|
||||
SpawnRate = 0.03
|
||||
17
Zennysoft.Game.Ma/src/items/armor/resources/IronCage.tres
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://ceqnyutl7y7t4"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_iqj2w"]
|
||||
[ext_resource type="Texture2D" uid="uid://cj5m8qkpqrcx4" path="res://src/items/armor/textures/IRON.PNG" id="1_jyoar"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_iqj2w")
|
||||
Defense = 4
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Iron Cage"
|
||||
Description = "+4 DEF"
|
||||
Texture = ExtResource("1_jyoar")
|
||||
SpawnRate = 0.15
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://chhxktntl4k8r"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_frqfh"]
|
||||
[ext_resource type="Texture2D" uid="uid://2qvbtq2obsac" path="res://src/items/armor/textures/LOGISTIAN.PNG" id="1_kh3n2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_frqfh")
|
||||
Defense = 5
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Logistician's Garb"
|
||||
Description = "+5 DEF"
|
||||
Texture = ExtResource("1_kh3n2")
|
||||
SpawnRate = 0.08
|
||||
17
Zennysoft.Game.Ma/src/items/armor/resources/Stoic.tres
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://d3l8aa87tevgt"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_dh6tr"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddtscpfj6nf6i" path="res://src/items/armor/textures/STOIC.PNG" id="1_xpphu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_dh6tr")
|
||||
Defense = 6
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Stoic"
|
||||
Description = "+6 DEF"
|
||||
Texture = ExtResource("1_xpphu")
|
||||
SpawnRate = 0.05
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://dq4c6an78qa4q"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_bkpin"]
|
||||
[ext_resource type="Texture2D" uid="uid://dghvd33w32q63" path="res://src/items/armor/textures/WOODEN.PNG" id="1_vs6ua"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_bkpin")
|
||||
Defense = 3
|
||||
TelluricResistance = 0.0
|
||||
AeolicResistance = 0.0
|
||||
HydricResistance = 0.0
|
||||
IgneousResistance = 0.0
|
||||
FerrumResistance = 0.0
|
||||
Name = "Wooden Armament"
|
||||
Description = "+3 DEF"
|
||||
Texture = ExtResource("1_vs6ua")
|
||||
SpawnRate = 0.3
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/ACCEPTANCE.PNG
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbb3x4cbo8jc1"
|
||||
path.s3tc="res://.godot/imported/ACCEPTANCE.PNG-4338a74eeefcd28a49daf08be189f282.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/ACCEPTANCE.PNG"
|
||||
dest_files=["res://.godot/imported/ACCEPTANCE.PNG-4338a74eeefcd28a49daf08be189f282.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/BESTIAL.PNG
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://sj4emgdbsfuh"
|
||||
path="res://.godot/imported/BESTIAL.PNG-4eafe934f47bb3f0f787a2d1d49c68b9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/BESTIAL.PNG"
|
||||
dest_files=["res://.godot/imported/BESTIAL.PNG-4eafe934f47bb3f0f787a2d1d49c68b9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/CEREMONIAL.PNG
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://vvhbibkslh57"
|
||||
path.s3tc="res://.godot/imported/CEREMONIAL.PNG-3af8f8ea317ae9459734d590fc5bba1f.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/CEREMONIAL.PNG"
|
||||
dest_files=["res://.godot/imported/CEREMONIAL.PNG-3af8f8ea317ae9459734d590fc5bba1f.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/DEVIC.PNG
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
35
Zennysoft.Game.Ma/src/items/armor/textures/DEVIC.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://381ddynsa3gc"
|
||||
path.s3tc="res://.godot/imported/DEVIC.PNG-4a3c0930337a49b79e8063f9fb5e59b2.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/DEVIC.PNG"
|
||||
dest_files=["res://.godot/imported/DEVIC.PNG-4a3c0930337a49b79e8063f9fb5e59b2.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/GODDESS.PNG
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c57kuugsc2lti"
|
||||
path.s3tc="res://.godot/imported/GODDESS.PNG-ad649cca57bcd75dac56bb57a736a249.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/GODDESS.PNG"
|
||||
dest_files=["res://.godot/imported/GODDESS.PNG-ad649cca57bcd75dac56bb57a736a249.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/IRON.PNG
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
35
Zennysoft.Game.Ma/src/items/armor/textures/IRON.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cj5m8qkpqrcx4"
|
||||
path.s3tc="res://.godot/imported/IRON.PNG-4a86ab5bb7ecd0d578d701afc239625c.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/IRON.PNG"
|
||||
dest_files=["res://.godot/imported/IRON.PNG-4a86ab5bb7ecd0d578d701afc239625c.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/LOGISTIAN.PNG
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://2qvbtq2obsac"
|
||||
path.s3tc="res://.godot/imported/LOGISTIAN.PNG-c44c4e4c939e5c5e7ff37e80921ca2bc.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/LOGISTIAN.PNG"
|
||||
dest_files=["res://.godot/imported/LOGISTIAN.PNG-c44c4e4c939e5c5e7ff37e80921ca2bc.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/STOIC.PNG
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
35
Zennysoft.Game.Ma/src/items/armor/textures/STOIC.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ddtscpfj6nf6i"
|
||||
path.s3tc="res://.godot/imported/STOIC.PNG-254d4b663f4366c683c07d8a74c29fb5.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/STOIC.PNG"
|
||||
dest_files=["res://.godot/imported/STOIC.PNG-254d4b663f4366c683c07d8a74c29fb5.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/WOODEN.PNG
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
35
Zennysoft.Game.Ma/src/items/armor/textures/WOODEN.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dghvd33w32q63"
|
||||
path.s3tc="res://.godot/imported/WOODEN.PNG-0766d4e4d870e479d67baff5f5602910.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/WOODEN.PNG"
|
||||
dest_files=["res://.godot/imported/WOODEN.PNG-0766d4e4d870e479d67baff5f5602910.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/atoners adornment.PNG
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ckcn67d64mgke"
|
||||
path.s3tc="res://.godot/imported/atoners adornment.PNG-29f74b368fc414ed7d2bce6b0ab68e5d.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/atoners adornment.PNG"
|
||||
dest_files=["res://.godot/imported/atoners adornment.PNG-29f74b368fc414ed7d2bce6b0ab68e5d.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
31
Zennysoft.Game.Ma/src/items/consumable/ConsumableItem.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("consumable_item")]
|
||||
public partial class ConsumableItem : InventoryItem
|
||||
{
|
||||
[Export]
|
||||
private ConsumableItemStats _consumableItemStats { get; set; } = new ConsumableItemStats();
|
||||
|
||||
public override string ItemName => _consumableItemStats.Name;
|
||||
|
||||
public override string Description => _consumableItemStats.Description;
|
||||
|
||||
public override float SpawnRate => _consumableItemStats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => _consumableItemStats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => _consumableItemStats.ThrowSpeed;
|
||||
|
||||
public int HealHPAmount => _consumableItemStats.HealHPAmount;
|
||||
|
||||
public int HealVTAmount => _consumableItemStats.HealVTAmount;
|
||||
|
||||
public int RaiseHPAmount => _consumableItemStats.RaiseHPAmount;
|
||||
|
||||
public int RaiseVTAmount => _consumableItemStats.RaiseVTAmount;
|
||||
|
||||
public override InventoryItemStats ItemStats { get => _consumableItemStats; set => _consumableItemStats = (ConsumableItemStats)value; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cyqibeq07rjr
|
||||
29
Zennysoft.Game.Ma/src/items/consumable/ConsumableItem.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c6w7dpk0hurj0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cyqibeq07rjr" path="res://src/items/consumable/ConsumableItem.cs" id="1_26bad"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7mh0f"]
|
||||
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||
|
||||
[node name="ConsumableItem" type="Node3D"]
|
||||
script = ExtResource("1_26bad")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
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.0322805, 0)
|
||||
pixel_size = 0.001
|
||||
billboard = 2
|
||||
shaded = true
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||
shape = SubResource("BoxShape3D_7mh0f")
|
||||
@@ -0,0 +1,18 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[GlobalClass]
|
||||
[Meta, Id("consumable_item_stats")]
|
||||
public partial class ConsumableItemStats : InventoryItemStats
|
||||
{
|
||||
[Export]
|
||||
[Save("consumable_item_raise_hp")]
|
||||
public int RaiseHPAmount { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("consumable_item_raise_vt")]
|
||||
public int RaiseVTAmount { get; set; } = 0;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cymeea1n4f04i
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://d0cxrf0nldona"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ttmu3vttq8yo" path="res://src/items/consumable/textures/amrit shard.PNG" id="1_f1n30"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="2_riwik"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_riwik")
|
||||
HealHPAmount = 60
|
||||
RaiseHPAmount = 16
|
||||
HealVTAmount = 0
|
||||
RaiseVTAmount = 0
|
||||
Name = "Amrit Shard"
|
||||
Description = "A droplet of the heavenly elixir, frozen in time.
|
||||
Restores 60 HP. If HP full, raises MAX HP by 16."
|
||||
Texture = ExtResource("1_f1n30")
|
||||
SpawnRate = 0.05
|
||||
@@ -0,0 +1,15 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://dns281deffo6q"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bg47n2tmintm0" path="res://src/items/consumable/textures/past self remnant.PNG" id="1_rc8t1"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="2_e61q8"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_e61q8")
|
||||
HealHPAmount = 1000
|
||||
RaiseHPAmount = 25
|
||||
HealVTAmount = 0
|
||||
RaiseVTAmount = 0
|
||||
Name = "Past Self's Fragment"
|
||||
Description = "Restores all HP. If HP full, raises MAX HP by 25."
|
||||
Texture = ExtResource("1_rc8t1")
|
||||
SpawnRate = 0.05
|
||||
@@ -0,0 +1,15 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://bnec53frgyue8"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cj0x1u7rknrvy" path="res://src/items/consumable/textures/past self spirit.PNG" id="1_jx43p"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="2_wmtl1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_wmtl1")
|
||||
HealHPAmount = 0
|
||||
RaiseHPAmount = 0
|
||||
HealVTAmount = 1000
|
||||
RaiseVTAmount = 20
|
||||
Name = "Past Self's Spirit"
|
||||
Description = "Restores all VT. If VT full, raises MAX VT by 20."
|
||||
Texture = ExtResource("1_jx43p")
|
||||
SpawnRate = 0.05
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://75fpkwfp0t0k"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="1_f8ogj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbl5v5i1s3m2u" path="res://src/items/consumable/textures/stelo fragment.PNG" id="1_ic5xm"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_f8ogj")
|
||||
HealHPAmount = 0
|
||||
RaiseHPAmount = 0
|
||||
HealVTAmount = 30
|
||||
RaiseVTAmount = 10
|
||||
Name = "Stelo Fragment"
|
||||
Description = "A small gathered piece of the former heavens.
|
||||
Restores 30 VT. If VT full, raises MAX VT by 10."
|
||||
Texture = ExtResource("1_ic5xm")
|
||||
SpawnRate = 0.5
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://ypw2yg10430p"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bqyjjdgub6iem" path="res://src/items/consumable/textures/suna fragment.PNG" id="1_ldd10"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="2_41hue"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_41hue")
|
||||
HealHPAmount = 0
|
||||
RaiseHPAmount = 0
|
||||
HealVTAmount = 60
|
||||
RaiseVTAmount = 20
|
||||
Name = "Suna Fragment"
|
||||
Description = "A large gathered piece of the former heavens.
|
||||
Restores 60 VT. If VT full, raises MAX VT by 20."
|
||||
Texture = ExtResource("1_ldd10")
|
||||
SpawnRate = 0.1
|
||||
@@ -0,0 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://lu0ddu3538p6"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dw06kkltgk3sv" path="res://src/items/consumable/textures/ydunic fragment.PNG" id="1_4llax"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemStats.cs" id="2_q4pyq"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_q4pyq")
|
||||
HealHPAmount = 30
|
||||
RaiseHPAmount = 8
|
||||
HealVTAmount = 0
|
||||
RaiseVTAmount = 0
|
||||
Name = "Ydunic Shard"
|
||||
Description = "A fragment of the divine fruit, frozen in time.
|
||||
Restores 30 HP. If HP full, raises MAX HP by 8."
|
||||
Texture = ExtResource("1_4llax")
|
||||
SpawnRate = 0.1
|
||||
BIN
Zennysoft.Game.Ma/src/items/consumable/textures/amrit shard.PNG
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ttmu3vttq8yo"
|
||||
path="res://.godot/imported/amrit shard.PNG-23a55a1bb7d06a5be7415aa697551420.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/amrit shard.PNG"
|
||||
dest_files=["res://.godot/imported/amrit shard.PNG-23a55a1bb7d06a5be7415aa697551420.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bg47n2tmintm0"
|
||||
path="res://.godot/imported/past self remnant.PNG-ea5a4a4ccf2107f35ad1f867c61e12ee.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/past self remnant.PNG"
|
||||
dest_files=["res://.godot/imported/past self remnant.PNG-ea5a4a4ccf2107f35ad1f867c61e12ee.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
After Width: | Height: | Size: 8.0 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cj0x1u7rknrvy"
|
||||
path="res://.godot/imported/past self spirit.PNG-75c61955a4c45cf77c3086abe5fb7c7f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/past self spirit.PNG"
|
||||
dest_files=["res://.godot/imported/past self spirit.PNG-75c61955a4c45cf77c3086abe5fb7c7f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbl5v5i1s3m2u"
|
||||
path.s3tc="res://.godot/imported/stelo fragment.PNG-87ebe2402340a8a359426101165d22a0.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/stelo fragment.PNG"
|
||||
dest_files=["res://.godot/imported/stelo fragment.PNG-87ebe2402340a8a359426101165d22a0.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
After Width: | Height: | Size: 7.2 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bqyjjdgub6iem"
|
||||
path="res://.godot/imported/suna fragment.PNG-549d5b874b83189bde36ace3c7ae46c7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/suna fragment.PNG"
|
||||
dest_files=["res://.godot/imported/suna fragment.PNG-549d5b874b83189bde36ace3c7ae46c7.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
|
After Width: | Height: | Size: 6.8 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dw06kkltgk3sv"
|
||||
path="res://.godot/imported/ydunic fragment.PNG-fc040e7fba1c332c8770eb9e76f5206b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/ydunic fragment.PNG"
|
||||
dest_files=["res://.godot/imported/ydunic fragment.PNG-fc040e7fba1c332c8770eb9e76f5206b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
85
Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public interface IDroppedItem : IRigidBody3D
|
||||
{
|
||||
void RescueItem();
|
||||
}
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class DroppedItem : RigidBody3D, IDroppedItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency] public IGame Game => this.DependOn<IGame>();
|
||||
|
||||
[Dependency] public IPlayer Player => this.DependOn<IPlayer>();
|
||||
|
||||
[Node] private Sprite2D Sprite { get; set; } = default!;
|
||||
|
||||
[Node] private Area3D Pickup { get; set; } = default!;
|
||||
|
||||
public InventoryItem Item { get; set; }
|
||||
|
||||
public void OnResolved()
|
||||
{
|
||||
ContactMonitor = true;
|
||||
Sprite.Texture = Item.ItemStats.Texture;
|
||||
}
|
||||
|
||||
public async void Drop()
|
||||
{
|
||||
AddCollisionExceptionWith((Node)Player);
|
||||
Pickup.Monitorable = false;
|
||||
Pickup.Monitoring = false;
|
||||
GlobalPosition = Player.CurrentPosition + Vector3.Up;
|
||||
ApplyCentralImpulse(-Player.CurrentBasis.Z.Normalized() * 5.0f);
|
||||
await ToSignal(GetTree().CreateTimer(1), "timeout");
|
||||
RemoveCollisionExceptionWith((Node)Player);
|
||||
Pickup.Monitorable = true;
|
||||
Pickup.Monitoring = true;
|
||||
}
|
||||
|
||||
public void RescueItem()
|
||||
{
|
||||
ContactMonitor = false;
|
||||
Pickup.Monitorable = false;
|
||||
Pickup.Monitoring = false;
|
||||
PlayRescueAnimation();
|
||||
Game.RescuedItems.Items.Add(Item);
|
||||
}
|
||||
|
||||
private void PlayRescueAnimation()
|
||||
{
|
||||
LoadShader("res://src/vfx/shaders/PixelMelt.gdshader");
|
||||
var tweener = GetTree().CreateTween();
|
||||
SetShaderValue(true);
|
||||
tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 0.3f, 2f);
|
||||
tweener.TweenCallback(Callable.From(QueueFree));
|
||||
}
|
||||
|
||||
private void LoadShader(string shaderPath)
|
||||
{
|
||||
var shader = GD.Load<Shader>(shaderPath);
|
||||
Sprite.Material = new ShaderMaterial();
|
||||
var shaderMaterial = (ShaderMaterial)Sprite.Material;
|
||||
shaderMaterial.Shader = shader;
|
||||
}
|
||||
|
||||
private void SetShaderValue(float shaderValue)
|
||||
{
|
||||
var shaderMaterial = (ShaderMaterial)Sprite.Material;
|
||||
shaderMaterial.SetShaderParameter("progress", shaderValue);
|
||||
}
|
||||
|
||||
private void SetShaderValue(bool shaderValue)
|
||||
{
|
||||
var shaderMaterial = (ShaderMaterial)Sprite.Material;
|
||||
shaderMaterial.SetShaderParameter("reverse", shaderValue);
|
||||
}
|
||||
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/dropped/DroppedItem.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c2sps6uamyyw2
|
||||
105
Zennysoft.Game.Ma/src/items/dropped/DroppedItem.tscn
Normal file
@@ -0,0 +1,105 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://brq11lswpqxei"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2sps6uamyyw2" path="res://src/items/dropped/DroppedItem.cs" id="1_67jk4"]
|
||||
[ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="2_cu1v3"]
|
||||
[ext_resource type="Material" uid="uid://x2bv1q51mcjq" path="res://src/enemy/PixelMelt.tres" id="2_eat5q"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_28r8g"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_x5q15"]
|
||||
resource_name = "ItemRescued"
|
||||
length = 2.0
|
||||
step = 0.0666667
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1.99543),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.0207178, 0.192374, 0), Vector3(0.0207178, 1.26338, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_eat5q"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite3D:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector3(0.0207178, 0.192374, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_eat5q"]
|
||||
_data = {
|
||||
&"ItemRescued": SubResource("Animation_x5q15"),
|
||||
&"RESET": SubResource("Animation_eat5q")
|
||||
}
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_x5q15"]
|
||||
viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport")
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eat5q"]
|
||||
radius = 0.47
|
||||
|
||||
[node name="DroppedItem" type="RigidBody3D"]
|
||||
collision_layer = 1024
|
||||
collision_mask = 5
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_y = true
|
||||
axis_lock_angular_z = true
|
||||
gravity_scale = 0.8
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 50
|
||||
script = ExtResource("1_67jk4")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_28r8g")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_eat5q")
|
||||
}
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.41, 0, 0, 0, 0.41, 0, 0, 0, 0.41, 0.0207178, 0.192374, 0)
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
texture = SubResource("ViewportTexture_x5q15")
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="Sprite3D"]
|
||||
visibility_layer = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="Sprite3D/SubViewportContainer"]
|
||||
disable_3d = true
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"]
|
||||
unique_name_in_owner = true
|
||||
material = ExtResource("2_eat5q")
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("2_cu1v3")
|
||||
centered = false
|
||||
offset = Vector2(2000, 2000)
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
shape = SubResource("CapsuleShape3D_eat5q")
|
||||
27
Zennysoft.Game.Ma/src/items/effect/EffectItem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("effect_item")]
|
||||
public partial class EffectItem : InventoryItem
|
||||
{
|
||||
[Export]
|
||||
private EffectItemStats _effectItemStats { get; set; } = new EffectItemStats();
|
||||
|
||||
public override string ItemName => _effectItemStats.Name;
|
||||
|
||||
public override string Description => _effectItemStats.Description;
|
||||
|
||||
public override float SpawnRate => _effectItemStats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => _effectItemStats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => _effectItemStats.ThrowSpeed;
|
||||
|
||||
public UsableItemTag UsableItemTag => _effectItemStats.UsableItemTag;
|
||||
|
||||
public void SetEffectTag(UsableItemTag effect) => _effectItemStats.UsableItemTag = effect;
|
||||
|
||||
public override InventoryItemStats ItemStats { get => _effectItemStats; set => _effectItemStats = (EffectItemStats)value; }
|
||||
}
|
||||
1
Zennysoft.Game.Ma/src/items/effect/EffectItem.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bl16bjcbosq5j
|
||||