Mystery item implementation
This commit is contained in:
@@ -24,7 +24,7 @@ public partial class InGameAudioLogic
|
||||
gameRepo.UnequippedItem += OnUnequippedItem;
|
||||
gameEventDepot.InventorySorted += OnInventorySorted;
|
||||
gameEventDepot.HealingItemConsumed += OnHealingItemConsumed;
|
||||
gameEventDepot.RestorativePickedUp += OnRestorativePickedUp;
|
||||
gameRepo.RestorativePickedUp += OnRestorativePickedUp;
|
||||
gameEventDepot.TeleportEntered += OnTeleportEntered;
|
||||
gameRepo.PlayerAttack += OnPlayerAttack;
|
||||
gameRepo.PlayerAttackedWall += OnPlayerAttackWall;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -29,6 +30,8 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action<EquipableItem>? UnequippedItem;
|
||||
|
||||
event Action<IHealthPack>? RestorativePickedUp;
|
||||
|
||||
void Pause();
|
||||
|
||||
void Resume();
|
||||
@@ -51,6 +54,8 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
public void OnPlayerAttackedEnemy();
|
||||
|
||||
public void OnRestorativePickedUp(IHealthPack restorative);
|
||||
|
||||
public void CloseInventory();
|
||||
|
||||
public void GameEnded();
|
||||
@@ -76,7 +81,7 @@ public class GameRepo : IGameRepo
|
||||
public event Action? PlayerAttackedEnemy;
|
||||
public event Action<EquipableItem>? EquippedItem;
|
||||
public event Action<EquipableItem>? UnequippedItem;
|
||||
|
||||
public event Action<IHealthPack>? RestorativePickedUp;
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
|
||||
@@ -146,6 +151,11 @@ public class GameRepo : IGameRepo
|
||||
PlayerAttackedEnemy?.Invoke();
|
||||
}
|
||||
|
||||
public void OnRestorativePickedUp(IHealthPack restorative)
|
||||
{
|
||||
RestorativePickedUp?.Invoke(restorative);
|
||||
}
|
||||
|
||||
public void CloseInventory()
|
||||
{
|
||||
CloseInventoryEvent?.Invoke();
|
||||
|
||||
@@ -30,7 +30,4 @@ public interface IGameEventDepot : IDisposable
|
||||
|
||||
event Action<InventoryItem>? HealingItemConsumed;
|
||||
public void OnHealingItemConsumed(InventoryItem item);
|
||||
|
||||
event Action<IHealthPack>? RestorativePickedUp;
|
||||
public void OnRestorativePickedUp(IHealthPack restorative);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace Zennysoft.Ma.Adapter;
|
||||
[Meta, Id("equipable_item")]
|
||||
public abstract partial class EquipableItem : InventoryItem
|
||||
{
|
||||
public abstract ItemTag ItemTag { get; }
|
||||
|
||||
[Save("equipable_item_is_equipped")]
|
||||
public bool IsEquipped { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ public interface IInventory
|
||||
|
||||
public bool TryAdd(InventoryItem inventoryItem);
|
||||
|
||||
public bool TryInsert(InventoryItem inventoryItem, int index);
|
||||
|
||||
public void Remove(InventoryItem inventoryItem);
|
||||
|
||||
public void Sort();
|
||||
|
||||
@@ -19,6 +19,8 @@ public abstract partial class InventoryItem : Node3D
|
||||
public abstract double ThrowDamage { get; }
|
||||
[Save("inventory_item_throw_speed")]
|
||||
public abstract float ThrowSpeed { get; }
|
||||
[Save("inventory_item_tag")]
|
||||
public abstract ItemTag ItemTag { get; }
|
||||
|
||||
public abstract Texture2D GetTexture();
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
public enum ItemTag
|
||||
{
|
||||
None,
|
||||
BreaksOnChange
|
||||
BreaksOnChange,
|
||||
MysteryItem
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@ public interface IPlayer : IKillable
|
||||
|
||||
public Basis CurrentBasis { get; }
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedWeapon { get; }
|
||||
public AutoProp<EquipableItem> EquippedWeapon { get; }
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedArmor { get; }
|
||||
public AutoProp<EquipableItem> EquippedArmor { get; }
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedAccessory { get; }
|
||||
public AutoProp<EquipableItem> EquippedAccessory { get; }
|
||||
|
||||
public void Equip(EquipableItem equipable);
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ script = ExtResource("1_qwonp")
|
||||
|
||||
[node name="NavAgent" type="NavigationAgent3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
path_desired_distance = 2.0
|
||||
target_desired_distance = 2.5
|
||||
path_max_distance = 3.01
|
||||
avoidance_enabled = true
|
||||
radius = 1.5
|
||||
time_horizon_obstacles = 1.0
|
||||
|
||||
@@ -1,9 +1,28 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bs56ccgosmu47"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bs56ccgosmu47"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dssu6tgi8dapq" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.cs" id="1_xsluo"]
|
||||
[ext_resource type="Script" uid="uid://dnkmr0eq1sij0" path="res://src/enemy/EnemyStatResource.cs" id="2_p4gkk"]
|
||||
[ext_resource type="PackedScene" uid="uid://pbnsngx5jvrh" path="res://src/enemy/NavigationAgentClient.tscn" id="3_ut5m2"]
|
||||
[ext_resource type="PackedScene" uid="uid://bimjnsu52y3xi" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="4_o3b7p"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_drfkj"]
|
||||
script = ExtResource("2_p4gkk")
|
||||
CurrentHP = 50.0
|
||||
MaximumHP = 50
|
||||
CurrentAttack = 10
|
||||
CurrentDefense = 5
|
||||
MaxAttack = 10
|
||||
MaxDefense = 5
|
||||
ExpFromDefeat = 8
|
||||
Luck = 0.05
|
||||
_telluricResistance = 0.0
|
||||
_aeolicResistance = 0.0
|
||||
_hydricResistance = 0.0
|
||||
_igneousResistance = 0.0
|
||||
_ferrumResistance = 0.0
|
||||
DropsSoulGemChance = 0.75
|
||||
metadata/_custom_type_script = "uid://dnkmr0eq1sij0"
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
|
||||
radius = 0.106078
|
||||
height = 1.23076
|
||||
@@ -23,6 +42,7 @@ axis_lock_linear_y = true
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
script = ExtResource("1_xsluo")
|
||||
_enemyStatResource = SubResource("Resource_drfkj")
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
@@ -61,6 +81,7 @@ collision_mask = 3
|
||||
[node name="Visual" type="Node3D" parent="."]
|
||||
|
||||
[node name="EnemyModelView" parent="Visual" instance=ExtResource("4_o3b7p")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Timers" type="Node" parent="."]
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@startuml EnemyLogic
|
||||
state "EnemyLogic State" as Zennysoft_Game_Ma_EnemyLogic_State {
|
||||
state "Defeated" as Zennysoft_Game_Ma_EnemyLogic_State_Defeated
|
||||
state "Alive" as Zennysoft_Game_Ma_EnemyLogic_State_Alive {
|
||||
state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle
|
||||
state "Activated" as Zennysoft_Game_Ma_EnemyLogic_State_Activated {
|
||||
state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling
|
||||
state "Attacking" as Zennysoft_Game_Ma_EnemyLogic_State_Attacking
|
||||
state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer
|
||||
state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling
|
||||
}
|
||||
state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle
|
||||
}
|
||||
state "Defeated" as Zennysoft_Game_Ma_EnemyLogic_State_Defeated
|
||||
}
|
||||
|
||||
Zennysoft_Game_Ma_EnemyLogic_State_Alive --> Zennysoft_Game_Ma_EnemyLogic_State_Attacking : AttackTimer
|
||||
|
||||
@@ -179,7 +179,28 @@ public partial class Game : Node3D, IGame
|
||||
})
|
||||
.Handle((in GameLogic.Output.HidePauseMenu _) => { PauseMenu.Hide(); })
|
||||
.Handle((in GameLogic.Output.ExitPauseMenu _) => { PauseMenu.FadeOut(); Input.MouseMode = Input.MouseModeEnum.Visible; PauseMenu.SetProcessUnhandledInput(false); })
|
||||
.Handle((in GameLogic.Output.LoadNextFloor _) => { Map.SpawnNextFloor(); })
|
||||
.Handle((in GameLogic.Output.LoadNextFloor _) =>
|
||||
{
|
||||
Map.SpawnNextFloor();
|
||||
if (Player.EquippedWeapon.Value.ItemTag == ItemTag.BreaksOnChange)
|
||||
{
|
||||
var itemToDestroy = Player.EquippedWeapon.Value;
|
||||
Player.Unequip(itemToDestroy);
|
||||
Player.Inventory.Remove(itemToDestroy);
|
||||
}
|
||||
if (Player.EquippedArmor.Value.ItemTag == ItemTag.BreaksOnChange)
|
||||
{
|
||||
var itemToDestroy = Player.EquippedArmor.Value;
|
||||
Player.Unequip(itemToDestroy);
|
||||
Player.Inventory.Remove(itemToDestroy);
|
||||
}
|
||||
if (Player.EquippedAccessory.Value.ItemTag == ItemTag.BreaksOnChange)
|
||||
{
|
||||
var itemToDestroy = Player.EquippedAccessory.Value;
|
||||
Player.Unequip(itemToDestroy);
|
||||
Player.Inventory.Remove(itemToDestroy);
|
||||
}
|
||||
})
|
||||
.Handle((in GameLogic.Output.LoadMap _) => { Map.LoadMap(); })
|
||||
.Handle((in GameLogic.Output.ShowFloorClearMenu _) => { FloorClearMenu.Show(); FloorClearMenu.FadeIn(); })
|
||||
.Handle((in GameLogic.Output.ExitFloorClearMenu _) => { FloorClearMenu.FadeOut(); })
|
||||
@@ -211,7 +232,7 @@ public partial class Game : Node3D, IGame
|
||||
FloorClearMenu.SaveAndExit += FloorClearMenu_SaveAndExit;
|
||||
FloorClearMenu.TransitionCompleted += FloorClearMenu_TransitionCompleted;
|
||||
|
||||
GameEventDepot.RestorativePickedUp += GameEventDepot_RestorativePickedUp;
|
||||
GameRepo.RestorativePickedUp += GameEventDepot_RestorativePickedUp;
|
||||
|
||||
DoubleEXPTimer.Timeout += DoubleEXPTimer_Timeout;
|
||||
|
||||
@@ -236,6 +257,9 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
public async Task UseItem(InventoryItem item)
|
||||
{
|
||||
if (item.ItemTag == ItemTag.MysteryItem)
|
||||
item = RerollItem(item);
|
||||
|
||||
switch (item)
|
||||
{
|
||||
case ConsumableItem consumableItem:
|
||||
@@ -267,7 +291,7 @@ public partial class Game : Node3D, IGame
|
||||
{
|
||||
var thrownScene = GD.Load<PackedScene>("res://src/items/thrown/ThrownItem.tscn");
|
||||
var thrown = thrownScene.Instantiate<ThrownItem>();
|
||||
thrown.ItemThatIsThrown = (InventoryItem)item;
|
||||
thrown.ItemThatIsThrown = item;
|
||||
AddChild(thrown);
|
||||
thrown.Position += new Vector3(0, 1.5f, 0);
|
||||
thrown.Throw(_effectService);
|
||||
@@ -275,7 +299,37 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
public IDungeonFloor CurrentFloor => Map.CurrentFloor;
|
||||
|
||||
public void EnemyDefeated(Vector3 defeatedLocation, EnemyStatResource resource) => Player.GainExp(resource.ExpFromDefeat * GameRepo.ExpRate);
|
||||
public void EnemyDefeated(Vector3 defeatedLocation, EnemyStatResource resource)
|
||||
{
|
||||
Player.GainExp(resource.ExpFromDefeat * GameRepo.ExpRate);
|
||||
DropRestorative(defeatedLocation);
|
||||
}
|
||||
|
||||
public InventoryItem RerollItem(InventoryItem itemToReroll)
|
||||
{
|
||||
var itemDb = new ItemDatabase();
|
||||
|
||||
var currentIndex = Player.Inventory.Items.IndexOf(itemToReroll);
|
||||
Player.Inventory.Remove(itemToReroll);
|
||||
InventoryItem rolledItem = null;
|
||||
|
||||
if (itemToReroll is Weapon weapon)
|
||||
rolledItem = itemDb.PickItem(weapon);
|
||||
if (itemToReroll is Armor armor)
|
||||
rolledItem = itemDb.PickItem(armor);
|
||||
if (itemToReroll is Accessory accessory)
|
||||
rolledItem = itemDb.PickItem(accessory);
|
||||
if (itemToReroll is ThrowableItem throwableItem)
|
||||
rolledItem = itemDb.PickItem(throwableItem);
|
||||
if (itemToReroll is EffectItem effectItem)
|
||||
rolledItem = itemDb.PickItem(effectItem);
|
||||
if (itemToReroll is ConsumableItem consumableItem)
|
||||
rolledItem = itemDb.PickItem(consumableItem);
|
||||
|
||||
Player.Inventory.TryInsert(rolledItem, currentIndex);
|
||||
|
||||
return rolledItem;
|
||||
}
|
||||
|
||||
private void DropRestorative(Vector3 vector)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -18,7 +17,6 @@ public class GameEventDepot : IGameEventDepot
|
||||
public event Action? MenuBackedOut;
|
||||
public event Action? InventorySorted;
|
||||
public event Action<InventoryItem>? HealingItemConsumed;
|
||||
public event Action<IHealthPack>? RestorativePickedUp;
|
||||
|
||||
public void OnOverworldEntered() => OverworldEntered?.Invoke();
|
||||
public void OnDungeonAThemeAreaEntered() => DungeonAThemeAreaEntered?.Invoke();
|
||||
@@ -32,7 +30,6 @@ public class GameEventDepot : IGameEventDepot
|
||||
|
||||
public void OnInventorySorted() => InventorySorted?.Invoke();
|
||||
public void OnHealingItemConsumed(InventoryItem item) => HealingItemConsumed?.Invoke(item);
|
||||
public void OnRestorativePickedUp(IHealthPack restorative) => RestorativePickedUp?.Invoke(restorative);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.SaveFileBuilder;
|
||||
using Godot;
|
||||
using System.Threading.Tasks;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvide<IGame>, IProvide<IPlayer>, IProvide<IMap>, IProvide<ISaveChunk<GameData>>, INode3D
|
||||
@@ -32,4 +31,6 @@ public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvid
|
||||
public void EnemyDefeated(Vector3 defeatedLocation, EnemyStatResource enemyStatResource);
|
||||
|
||||
public void TogglePause();
|
||||
|
||||
public InventoryItem RerollItem(InventoryItem itemToReroll);
|
||||
}
|
||||
|
||||
@@ -214,6 +214,8 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
if (@event.IsActionPressed(GameInputs.InventorySort))
|
||||
{
|
||||
inventory.Sort();
|
||||
if (_currentIndex > inventory.Items.Count - 1)
|
||||
_currentIndex = inventory.Items.Count - 1;
|
||||
GameEventDepot.OnInventorySorted();
|
||||
RefreshInventoryScreen();
|
||||
}
|
||||
@@ -377,6 +379,8 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
ItemEffectLabel.Text = $"{itemSlot.Item.GetType()} unequipped.";
|
||||
Player.Unequip(equipableItem);
|
||||
itemSlot.SetSelectedItemStyle();
|
||||
if (equipableItem.ItemTag == ItemTag.BreaksOnChange)
|
||||
Player.Inventory.Remove(equipableItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -391,16 +395,15 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
private async void UseButtonPressed()
|
||||
{
|
||||
UseButton.Disabled = true;
|
||||
var currentItem = ItemSlots[_currentIndex].Item;
|
||||
if (currentItem is EquipableItem)
|
||||
await EquipOrUnequipItem();
|
||||
else
|
||||
{
|
||||
await Game.UseItem(currentItem);
|
||||
//DestroyItem(currentItem);
|
||||
}
|
||||
|
||||
RefreshUIAfterUserSelection();
|
||||
UseButton.Disabled = false;
|
||||
}
|
||||
|
||||
private async void ThrowButtonPressed()
|
||||
|
||||
@@ -60,6 +60,10 @@ public class EffectService
|
||||
public void TurnAllEnemiesInRoomIntoHealingItem()
|
||||
{
|
||||
var currentRoom = _map.GetPlayersCurrentRoom();
|
||||
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
{
|
||||
@@ -86,6 +90,10 @@ public class EffectService
|
||||
public void HealAllEnemiesAndPlayerInRoomToFull()
|
||||
{
|
||||
var currentRoom = _map.GetPlayersCurrentRoom();
|
||||
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
enemy.SetCurrentHP(enemy.GetMaximumHP());
|
||||
@@ -95,6 +103,10 @@ public class EffectService
|
||||
public void AbsorbHPFromAllEnemiesInRoom()
|
||||
{
|
||||
var currentRoom = _map.GetPlayersCurrentRoom();
|
||||
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
var hpToAbsorb = 0.0;
|
||||
foreach (var enemy in currentEnemies)
|
||||
@@ -106,6 +118,10 @@ public class EffectService
|
||||
public void DealElementalDamageToAllEnemiesInRoom(ElementType elementType)
|
||||
{
|
||||
var currentRoom = _map.GetPlayersCurrentRoom();
|
||||
|
||||
if (currentRoom is not MonsterRoom)
|
||||
return;
|
||||
|
||||
var currentEnemies = currentRoom.EnemiesInRoom;
|
||||
foreach (var enemy in currentEnemies)
|
||||
enemy.TakeDamage(20, elementType);
|
||||
@@ -132,20 +148,22 @@ public class EffectService
|
||||
|
||||
public void RaiseCurrentWeaponAttack()
|
||||
{
|
||||
if (_player.EquippedWeapon.Value.ItemName == string.Empty)
|
||||
if (string.IsNullOrEmpty(_player.EquippedWeapon.Value.ItemName))
|
||||
return;
|
||||
|
||||
var currentWeapon = (Weapon)_player.EquippedWeapon.Value;
|
||||
currentWeapon.IncreaseWeaponAttack(1);
|
||||
_player.ModifyBonusAttack(1);
|
||||
}
|
||||
|
||||
public void RaiseCurrentArmorDefense()
|
||||
{
|
||||
if (_player.EquippedArmor.Value.ItemName == string.Empty)
|
||||
if (string.IsNullOrEmpty(_player.EquippedArmor.Value.ItemName))
|
||||
return;
|
||||
|
||||
var currentArmor = (Armor)_player.EquippedArmor.Value;
|
||||
currentArmor.IncreaseArmorDefense(1);
|
||||
_player.ModifyBonusDefense(1);
|
||||
}
|
||||
|
||||
public void RaiseLevel()
|
||||
@@ -197,12 +215,15 @@ public class EffectService
|
||||
public void ChangeAffinity(ThrowableItem throwableItem)
|
||||
{
|
||||
var maximumElements = Enum.GetNames(typeof(ElementType)).Length;
|
||||
throwableItem.SetElementType(throwableItem.ElementType + 1 % maximumElements);
|
||||
var newElement = ((int)throwableItem.ElementType + 1) % maximumElements;
|
||||
throwableItem.SetElementType((ElementType)newElement);
|
||||
|
||||
// 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.");
|
||||
|
||||
throwableItem.SetCount(throwableItem.Count + 1);
|
||||
}
|
||||
|
||||
public void WarpToExit(IPlayer player)
|
||||
|
||||
@@ -34,6 +34,15 @@ public partial class Inventory : Node, IInventory
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryInsert(InventoryItem inventoryItem, int index)
|
||||
{
|
||||
if (Items.Count >= _maxInventorySize || index >= _maxInventorySize || index < 0)
|
||||
return false;
|
||||
|
||||
Items.Insert(index, inventoryItem);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove(InventoryItem inventoryItem) => Items.Remove(inventoryItem);
|
||||
|
||||
|
||||
|
||||
@@ -1,30 +1,36 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public partial class ItemDatabase : Node
|
||||
{
|
||||
[Export]
|
||||
public PackedScene WeaponScene { get; set; }
|
||||
public ImmutableList<InventoryItem> Items { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ArmorScene { get; set; }
|
||||
public InventoryItem PickItem<T>(T itemToExclude = null)
|
||||
where T : InventoryItem
|
||||
{
|
||||
var rng = new RandomNumberGenerator();
|
||||
rng.Randomize();
|
||||
|
||||
[Export]
|
||||
public PackedScene AccessoryScene { get; set; }
|
||||
var itemsToSelectFrom = Items;
|
||||
|
||||
[Export]
|
||||
public PackedScene ThrowableItemScene { get; set; }
|
||||
if (itemToExclude is not null)
|
||||
itemsToSelectFrom = [.. itemsToSelectFrom.OfType<T>().Where(x => x.ItemName != itemToExclude.ItemName)];
|
||||
|
||||
[Export]
|
||||
public PackedScene ConsumableItemScene { get; set; }
|
||||
var weights = itemsToSelectFrom.Select(x => x.SpawnRate).ToArray();
|
||||
var selectedItem = itemsToSelectFrom.ToArray()[rng.RandWeighted(weights)];
|
||||
|
||||
[Export]
|
||||
public PackedScene EffectItemScene { get; set; }
|
||||
if (selectedItem is ThrowableItem throwableItem)
|
||||
throwableItem.SetCount(rng.RandiRange(throwableItem.Stats.MinimumCount, throwableItem.Stats.MaximumCount));
|
||||
|
||||
public InventoryItem[] Initialize()
|
||||
return selectedItem;
|
||||
}
|
||||
|
||||
public ItemDatabase()
|
||||
{
|
||||
var database = new List<InventoryItem>();
|
||||
var armorResources = DirAccess.GetFilesAt("res://src/items/armor/resources/");
|
||||
@@ -37,7 +43,7 @@ public partial class ItemDatabase : Node
|
||||
foreach (var armor in armorResources)
|
||||
{
|
||||
var armorInfo = GD.Load<ArmorStats>($"res://src/items/armor/resources/{armor}");
|
||||
var armorScene = ArmorScene.Instantiate<Armor>();
|
||||
var armorScene = ResourceLoader.Load<PackedScene>("res://src/items/armor/Armor.tscn").Instantiate<Armor>();
|
||||
armorScene.Stats = armorInfo;
|
||||
database.Add(armorScene);
|
||||
}
|
||||
@@ -45,7 +51,7 @@ public partial class ItemDatabase : Node
|
||||
foreach (var weapon in weaponResources)
|
||||
{
|
||||
var weaponInfo = GD.Load<WeaponStats>($"res://src/items/weapons/resources/{weapon}");
|
||||
var weaponScene = WeaponScene.Instantiate<Weapon>();
|
||||
var weaponScene = ResourceLoader.Load<PackedScene>("res://src/items/weapons/Weapon.tscn").Instantiate<Weapon>();
|
||||
weaponScene.Stats = weaponInfo;
|
||||
database.Add(weaponScene);
|
||||
}
|
||||
@@ -53,7 +59,7 @@ public partial class ItemDatabase : Node
|
||||
foreach (var accessory in accessoryResources)
|
||||
{
|
||||
var accessoryInfo = GD.Load<AccessoryStats>($"res://src/items/accessory/resources/{accessory}");
|
||||
var accessoryScene = AccessoryScene.Instantiate<Accessory>();
|
||||
var accessoryScene = ResourceLoader.Load<PackedScene>("res://src/items/accessory/Accessory.tscn").Instantiate<Accessory>();
|
||||
accessoryScene.Stats = accessoryInfo;
|
||||
database.Add(accessoryScene);
|
||||
}
|
||||
@@ -61,7 +67,7 @@ public partial class ItemDatabase : Node
|
||||
foreach (var throwable in throwableResources)
|
||||
{
|
||||
var throwableItemInfo = GD.Load<ThrowableItemStats>($"res://src/items/throwable/resources/{throwable}");
|
||||
var throwableItemScene = ThrowableItemScene.Instantiate<ThrowableItem>();
|
||||
var throwableItemScene = ResourceLoader.Load<PackedScene>("res://src/items/throwable/ThrowableItem.tscn").Instantiate<ThrowableItem>();
|
||||
throwableItemScene.Stats = throwableItemInfo;
|
||||
database.Add(throwableItemScene);
|
||||
}
|
||||
@@ -69,7 +75,7 @@ public partial class ItemDatabase : Node
|
||||
foreach (var consumable in consumableResources)
|
||||
{
|
||||
var consumableItemInfo = GD.Load<ConsumableItemStats>($"res://src/items/consumable/resources/{consumable}");
|
||||
var consumableItemScene = ConsumableItemScene.Instantiate<ConsumableItem>();
|
||||
var consumableItemScene = ResourceLoader.Load<PackedScene>("res://src/items/consumable/ConsumableItem.tscn").Instantiate<ConsumableItem>();
|
||||
consumableItemScene.Stats = consumableItemInfo;
|
||||
database.Add(consumableItemScene);
|
||||
}
|
||||
@@ -77,11 +83,11 @@ public partial class ItemDatabase : Node
|
||||
foreach (var effectItem in effectResources)
|
||||
{
|
||||
var effectItemInfo = GD.Load<EffectItemStats>($"res://src/items/effect/resources/{effectItem}");
|
||||
var effectItemScene = EffectItemScene.Instantiate<EffectItem>();
|
||||
var effectItemScene = ResourceLoader.Load<PackedScene>("res://src/items/effect/EffectItem.tscn").Instantiate<EffectItem>();
|
||||
effectItemScene.Stats = effectItemInfo;
|
||||
database.Add(effectItemScene);
|
||||
}
|
||||
|
||||
return [.. database];
|
||||
Items = [.. database];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="AccessoryStats" load_steps=3 format=3 uid="uid://ecmjxvihuahv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://brvxh7iiurnem" path="res://src/items/accessory/textures/MASK 04.png" id="1_fbxyn"]
|
||||
[ext_resource type="Script" uid="uid://b8arlmivk68b" path="res://src/items/accessory/AccessoryStats.cs" id="1_xc7fh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xc7fh")
|
||||
Name = "Mask"
|
||||
Description = "Unknown mask."
|
||||
ATKUp = 0
|
||||
DEFUp = 0
|
||||
LuckUp = 0.0
|
||||
MaxHPUp = 0
|
||||
MaxVTUp = 0
|
||||
AccessoryTag = 0
|
||||
Name = "Mask"
|
||||
Description = "Unknown mask."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 2
|
||||
Texture = ExtResource("1_fbxyn")
|
||||
metadata/_custom_type_script = "uid://b8arlmivk68b"
|
||||
BIN
Zennysoft.Game.Ma/src/items/accessory/textures/MASK 04.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/accessory/textures/MASK 04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://brvxh7iiurnem"
|
||||
path="res://.godot/imported/MASK 04.png-914661f8104473279933392df3169ef1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/accessory/textures/MASK 04.png"
|
||||
dest_files=["res://.godot/imported/MASK 04.png-914661f8104473279933392df3169ef1.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
|
||||
@@ -23,9 +23,12 @@ public partial class Armor : EquipableItem
|
||||
|
||||
public override float ThrowSpeed => Stats.ThrowSpeed;
|
||||
|
||||
public int Defense => Stats.Defense;
|
||||
public int Defense => Stats.Defense + _bonusDefense;
|
||||
|
||||
public void IncreaseArmorDefense(int bonus) => Stats.Defense += bonus;
|
||||
[Save("armor_bonus_defense")]
|
||||
private int _bonusDefense { get; set; } = 0;
|
||||
|
||||
public void IncreaseArmorDefense(int bonus) => _bonusDefense += bonus;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
|
||||
@@ -15,15 +15,12 @@ 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")
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://05hilwkmrs7a"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cics3txmkkloh" path="res://src/items/armor/textures/MYSTERY.png" id="1_rp3e6"]
|
||||
[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="1_s5wnf"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_s5wnf")
|
||||
Name = "Coat"
|
||||
Description = "Unidentified coat."
|
||||
Defense = 0
|
||||
_telluricResistance = 0.0
|
||||
_aeolicResistance = 0.0
|
||||
_hydricResistance = 0.0
|
||||
_igneousResistance = 0.0
|
||||
_ferrumResistance = 0.0
|
||||
Name = "Coat"
|
||||
Description = "Unidentified coat."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 2
|
||||
Texture = ExtResource("1_rp3e6")
|
||||
metadata/_custom_type_script = "uid://dqtp6ewvttoyu"
|
||||
BIN
Zennysoft.Game.Ma/src/items/armor/textures/MYSTERY.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/armor/textures/MYSTERY.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cics3txmkkloh"
|
||||
path="res://.godot/imported/MYSTERY.png-17d813137e6c64f71109fe85ac9d2857.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/armor/textures/MYSTERY.png"
|
||||
dest_files=["res://.godot/imported/MYSTERY.png-17d813137e6c64f71109fe85ac9d2857.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
|
||||
@@ -36,6 +36,8 @@ public partial class ConsumableItem : InventoryItem
|
||||
|
||||
public int RaiseVTAmount => Stats.RaiseVTAmount;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
[Export]
|
||||
[Save("consumable_item_stats")]
|
||||
public ConsumableItemStats Stats { get; set; } = new ConsumableItemStats();
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemStats" load_steps=3 format=3 uid="uid://bjwbx3ymt8o7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cymeea1n4f04i" path="res://src/items/consumable/ConsumableItemStats.cs" id="1_51ovu"]
|
||||
[ext_resource type="Texture2D" uid="uid://b5s0sr6ddpjp4" path="res://src/items/consumable/textures/Mystery.png" id="1_g5ngs"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_51ovu")
|
||||
Name = "Fragment"
|
||||
Description = "Unidentified fragment."
|
||||
RaiseHPAmount = 0
|
||||
RaiseVTAmount = 0
|
||||
Name = "Fragment"
|
||||
Description = "Unidentified fragment."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 2
|
||||
Texture = ExtResource("1_g5ngs")
|
||||
metadata/_custom_type_script = "uid://cymeea1n4f04i"
|
||||
BIN
Zennysoft.Game.Ma/src/items/consumable/textures/Mystery.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/consumable/textures/Mystery.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b5s0sr6ddpjp4"
|
||||
path="res://.godot/imported/Mystery.png-c83e5746610e0656fa2a5584a2f1b51d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/Mystery.png"
|
||||
dest_files=["res://.godot/imported/Mystery.png-c83e5746610e0656fa2a5584a2f1b51d.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
|
||||
@@ -30,6 +30,8 @@ public partial class EffectItem : InventoryItem
|
||||
|
||||
public UsableItemTag UsableItemTag => Stats.UsableItemTag;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
public void SetEffectTag(UsableItemTag effect) => Stats.UsableItemTag = effect;
|
||||
|
||||
[Export]
|
||||
|
||||
21
Zennysoft.Game.Ma/src/items/effect/resources/MysteryTag.tres
Normal file
21
Zennysoft.Game.Ma/src/items/effect/resources/MysteryTag.tres
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_resource type="Resource" script_class="EffectItemStats" load_steps=3 format=3 uid="uid://2ymi6ooyqyox"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b5w4iw4iqmxtn" path="res://src/items/effect/EffectItemStats.cs" id="1_eeb8x"]
|
||||
[ext_resource type="Texture2D" uid="uid://hcnit28wyhwq" path="res://src/items/effect/textures/mystery seal.png" id="1_yerq2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_eeb8x")
|
||||
Name = "Seal"
|
||||
Description = "Mystery seal."
|
||||
UsableItemTag = 0
|
||||
ElementalDamageType = 0
|
||||
Name = "Seal"
|
||||
Description = "Mystery seal."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 2
|
||||
Texture = ExtResource("1_yerq2")
|
||||
metadata/_custom_type_script = "uid://b5w4iw4iqmxtn"
|
||||
BIN
Zennysoft.Game.Ma/src/items/effect/textures/mystery seal.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/effect/textures/mystery seal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://hcnit28wyhwq"
|
||||
path="res://.godot/imported/mystery seal.png-a1e02d59d178b9e4c4e9836dba36e1fc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/effect/textures/mystery seal.png"
|
||||
dest_files=["res://.godot/imported/mystery seal.png-a1e02d59d178b9e4c4e9836dba36e1fc.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
|
||||
@@ -16,16 +16,4 @@ public partial class Restorative : Node3D, IHealthPack
|
||||
[Node] public Area3D Pickup { get; set; } = default!;
|
||||
|
||||
public double RestoreAmount => 4;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
Pickup.BodyEntered += OnEntered;
|
||||
}
|
||||
|
||||
public void OnEntered(Node3D body)
|
||||
{
|
||||
GameEventDepot.OnRestorativePickedUp(this);
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,14 +8,12 @@ radius = 0.13613
|
||||
height = 1.09613
|
||||
|
||||
[node name="Restorative" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
script = ExtResource("1_3beyl")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.363669, 0)
|
||||
pixel_size = 0.001
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
texture = ExtResource("1_1rwq6")
|
||||
|
||||
@@ -37,6 +37,8 @@ public partial class ThrowableItem : InventoryItem, IStackable
|
||||
|
||||
public int HealVTAmount => Stats.HealVTAmount;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
public void SetElementType(ElementType elementType) => Stats.ElementType = elementType;
|
||||
|
||||
public void SetDescription(string description) => Stats.Description = description;
|
||||
|
||||
@@ -14,14 +14,12 @@ collision_layer = 4
|
||||
collision_mask = 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_03cqg")
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(0.999973, 0.00489444, -0.00548299, -0.00488109, 0.999985, 0.00244357, 0.00549488, -0.00241672, 0.999982, 0, 0, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
||||
pixel_size = 0.0005
|
||||
billboard = 2
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
render_priority = 100
|
||||
|
||||
@@ -28,4 +28,10 @@ public partial class ThrowableItemStats : InventoryItemStats
|
||||
[Export]
|
||||
[Save("throwable_item_usable_tag")]
|
||||
public UsableItemTag UsableItemTag { get; set; } = UsableItemTag.None;
|
||||
|
||||
[Export]
|
||||
public int MinimumCount { get; set; } = 1;
|
||||
|
||||
[Export]
|
||||
public int MaximumCount { get; set; } = 8;
|
||||
}
|
||||
|
||||
@@ -5,16 +5,21 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ewck5")
|
||||
ThrowableItemTags = Array[int]([1])
|
||||
ElementType = 0
|
||||
UsableItemTags = Array[int]([])
|
||||
Name = "Geomantic Dice"
|
||||
Description = "Inflicts base damage when thrown.
|
||||
Use item to change Affinity."
|
||||
Texture = ExtResource("1_jhits")
|
||||
SpawnRate = 0.1
|
||||
ThrowableItemTag = 3
|
||||
ElementType = 0
|
||||
UsableItemTag = 0
|
||||
MinimumCount = 1
|
||||
MaximumCount = 8
|
||||
Name = "Geomantic Dice"
|
||||
Description = "Inflicts base damage when thrown.
|
||||
Use item to change Affinity."
|
||||
SpawnRate = 1.0
|
||||
ThrowSpeed = 20.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 20
|
||||
ItemTags = Array[int]([])
|
||||
ItemTag = 0
|
||||
Texture = ExtResource("1_jhits")
|
||||
|
||||
@@ -5,9 +5,13 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_m680r")
|
||||
Name = "Gospel of Dimension"
|
||||
Description = "Teleports target to a random location."
|
||||
ThrowableItemTag = 0
|
||||
ElementType = 0
|
||||
UsableItemTag = 0
|
||||
MinimumCount = 1
|
||||
MaximumCount = 8
|
||||
Name = "Gospel of Dimension"
|
||||
Description = "Teleports target to a random location."
|
||||
SpawnRate = 0.1
|
||||
|
||||
@@ -5,9 +5,13 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pn8sr")
|
||||
Name = "Gospel of Escape"
|
||||
Description = "Warps target to the exit. No effect on player if exit has not been found."
|
||||
ThrowableItemTag = 0
|
||||
ElementType = 0
|
||||
UsableItemTag = 0
|
||||
MinimumCount = 1
|
||||
MaximumCount = 8
|
||||
Name = "Gospel of Escape"
|
||||
Description = "Warps target to the exit. No effect on player if exit has not been found."
|
||||
SpawnRate = 0.5
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[gd_resource type="Resource" script_class="ThrowableItemStats" load_steps=3 format=3 uid="uid://b12mgrqpki54y"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dit865t330r1e" path="res://src/items/throwable/textures/MysteryDice.png" id="1_r4wv3"]
|
||||
[ext_resource type="Script" uid="uid://d3wlunkcuv2w2" path="res://src/items/throwable/ThrowableItemStats.cs" id="1_xaank"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xaank")
|
||||
Name = "Mystery Dice"
|
||||
Description = "Mystery dice."
|
||||
ThrowableItemTag = 0
|
||||
ElementType = 0
|
||||
UsableItemTag = 0
|
||||
MinimumCount = 1
|
||||
MaximumCount = 8
|
||||
Name = "Mystery Dice"
|
||||
Description = "Mystery dice."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 0
|
||||
Texture = ExtResource("1_r4wv3")
|
||||
metadata/_custom_type_script = "uid://d3wlunkcuv2w2"
|
||||
BIN
Zennysoft.Game.Ma/src/items/throwable/textures/MysteryDice.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/throwable/textures/MysteryDice.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dit865t330r1e"
|
||||
path="res://.godot/imported/MysteryDice.png-2f382950a7e0406a57e80258738116c4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/throwable/textures/MysteryDice.png"
|
||||
dest_files=["res://.godot/imported/MysteryDice.png-2f382950a7e0406a57e80258738116c4.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
|
||||
@@ -24,8 +24,6 @@ public partial class Weapon : EquipableItem
|
||||
|
||||
public override float SpawnRate => Stats.SpawnRate;
|
||||
|
||||
public int Damage => Stats.Damage;
|
||||
|
||||
public override double ThrowDamage => Stats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => Stats.ThrowSpeed;
|
||||
@@ -42,7 +40,12 @@ public partial class Weapon : EquipableItem
|
||||
|
||||
public double ElementalDamageBonus => Stats.ElementalDamageBonus;
|
||||
|
||||
public void IncreaseWeaponAttack(int bonus) => Stats.Damage += bonus;
|
||||
public int Damage => Stats.Damage + _bonusDamage;
|
||||
|
||||
public void IncreaseWeaponAttack(int bonus) => _bonusDamage += bonus;
|
||||
|
||||
[Save("weapon_bonus_damage")]
|
||||
private int _bonusDamage { get; set; } = 0;
|
||||
|
||||
[Export]
|
||||
[Save("weapon_stats")]
|
||||
|
||||
@@ -15,10 +15,9 @@ collision_mask = 0
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(0.0978955, 0, 0.995197, 0, 1, 0, -0.995197, 0, 0.0978955, 0, 0.271026, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
||||
pixel_size = 0.0006
|
||||
billboard = 2
|
||||
shaded = true
|
||||
double_sided = false
|
||||
alpha_antialiasing_mode = 1
|
||||
texture_filter = 0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://cfhwlpa0d7wb4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cpwwr4elpbo6i" path="res://src/items/weapons/textures/mystery rod.png" id="1_8fklg"]
|
||||
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_iran7"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_iran7")
|
||||
Name = "Mystery rod"
|
||||
Description = "Unidentified rod."
|
||||
Damage = 0
|
||||
Luck = 0.05
|
||||
AttackSpeed = 1.0
|
||||
WeaponElement = 0
|
||||
ElementalDamageBonus = 1.0
|
||||
WeaponTag = 0
|
||||
Name = "Mystery rod"
|
||||
Description = "Unidentified rod."
|
||||
SpawnRate = 0.5
|
||||
ThrowSpeed = 12.0
|
||||
HealHPAmount = 0
|
||||
HealVTAmount = 0
|
||||
ThrowDamage = 5
|
||||
ItemTag = 2
|
||||
Texture = ExtResource("1_8fklg")
|
||||
metadata/_custom_type_script = "uid://cc7byqeolw5y4"
|
||||
BIN
Zennysoft.Game.Ma/src/items/weapons/textures/mystery rod.png
Normal file
BIN
Zennysoft.Game.Ma/src/items/weapons/textures/mystery rod.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpwwr4elpbo6i"
|
||||
path="res://.godot/imported/mystery rod.png-2c7d466030a42082bd4ef4c9910f5943.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/weapons/textures/mystery rod.png"
|
||||
dest_files=["res://.godot/imported/mystery rod.png-2c7d466030a42082bd4ef4c9910f5943.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
|
||||
@@ -16,6 +16,6 @@
|
||||
|
||||
[node name="Map" type="Node3D"]
|
||||
script = ExtResource("1_bw70o")
|
||||
_floors = Array[PackedScene]([ExtResource("2_0m8h8"), ExtResource("3_y74f3"), ExtResource("2_merfv"), ExtResource("4_8y0oy"), ExtResource("5_uag72"), ExtResource("6_55rmo"), ExtResource("7_f6kwn"), ExtResource("8_ne2vg"), ExtResource("9_abpbr"), ExtResource("10_caf7v"), ExtResource("11_y74f3"), ExtResource("3_caf7v")])
|
||||
_floors = Array[PackedScene]([ExtResource("2_0m8h8"), ExtResource("2_merfv"), ExtResource("4_8y0oy"), ExtResource("5_uag72"), ExtResource("6_55rmo"), ExtResource("7_f6kwn"), ExtResource("8_ne2vg"), ExtResource("9_abpbr"), ExtResource("10_caf7v"), ExtResource("11_y74f3"), ExtResource("3_caf7v"), ExtResource("3_y74f3")])
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
@@ -48,17 +49,16 @@ public partial class MonsterRoom : DungeonRoom
|
||||
rng.Randomize();
|
||||
var numberOfItemsToSpawn = rng.RandiRange(1, itemSpawnPoints.Count);
|
||||
itemSpawnPoints.Shuffle();
|
||||
var database = ItemDatabase.Initialize();
|
||||
var database = new ItemDatabase();
|
||||
foreach (var spawnPoint in itemSpawnPoints.Cast<Marker3D>())
|
||||
{
|
||||
if (numberOfItemsToSpawn <= 0)
|
||||
break;
|
||||
numberOfItemsToSpawn--;
|
||||
|
||||
var weights = database.Select(x => x.SpawnRate).ToArray();
|
||||
var selectedItem = database[rng.RandWeighted(weights)];
|
||||
var selectedItem = database.PickItem<InventoryItem>();
|
||||
var duplicated = selectedItem.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D;
|
||||
duplicated.Position = new Vector3(spawnPoint.Position.X, -1.5f, spawnPoint.Position.Z);
|
||||
duplicated.Position = new Vector3(spawnPoint.Position.X, -0.5f, spawnPoint.Position.Z);
|
||||
AddChild(duplicated);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=64 format=4 uid="uid://dl6h1djc27ddl"]
|
||||
[gd_scene load_steps=73 format=4 uid="uid://dl6h1djc27ddl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c1nhqlem1ew3m" path="res://src/map/dungeon/code/Floor0.cs" id="1_db2o3"]
|
||||
[ext_resource type="Texture2D" uid="uid://b27ksiyfefb33" path="res://src/map/dungeon/models/Set A/02. Altar/02_ALTAR_FLOOR_ZER0_VER_outside_desert.png" id="2_xh2ej"]
|
||||
@@ -15,9 +15,18 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dyufabjcwlago" path="res://src/map/dungeon/models/Set A/02. Altar/02_ALTAR_FLOOR_ZER0_VER_HAND_CYCLE_MOTIF.png" id="13_1i307"]
|
||||
[ext_resource type="Texture2D" uid="uid://4k6vtn4oip5f" path="res://src/map/dungeon/models/Set A/02. Altar/02_ALTAR_FLOOR_ZER0_VER_TILE4.png" id="14_qqc7i"]
|
||||
[ext_resource type="Texture2D" uid="uid://cururtxtgylxf" path="res://src/map/dungeon/models/Set A/02. Altar/02_ALTAR_FLOOR_ZER0_VER_COLUMN.jpg" id="15_ojbcg"]
|
||||
[ext_resource type="PackedScene" uid="uid://db206brufi83s" path="res://src/items/weapons/Weapon.tscn" id="16_aqomv"]
|
||||
[ext_resource type="PackedScene" uid="uid://1fl6s352e2ej" path="res://src/items/throwable/ThrowableItem.tscn" id="16_db2o3"]
|
||||
[ext_resource type="Resource" uid="uid://qqg0gdcb8fwg" path="res://src/items/throwable/resources/SpellSignKnowledge.tres" id="17_ntxe5"]
|
||||
[ext_resource type="Resource" uid="uid://cfhwlpa0d7wb4" path="res://src/items/weapons/resources/MysteryRod.tres" id="17_db2o3"]
|
||||
[ext_resource type="Resource" uid="uid://bph8c6by4s047" path="res://src/items/throwable/resources/GeomanticDice.tres" id="18_ntxe5"]
|
||||
[ext_resource type="PackedScene" uid="uid://b07srt3lckt4e" path="res://src/items/accessory/Accessory.tscn" id="18_qlp0t"]
|
||||
[ext_resource type="Resource" uid="uid://ecmjxvihuahv" path="res://src/items/accessory/resources/MysteryAccessory.tres" id="19_7d58j"]
|
||||
[ext_resource type="PackedScene" uid="uid://dorr7v1tkeiy0" path="res://src/items/armor/Armor.tscn" id="20_ofv7i"]
|
||||
[ext_resource type="Resource" uid="uid://05hilwkmrs7a" path="res://src/items/armor/resources/MysteryArmor.tres" id="21_mi7rk"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6w7dpk0hurj0" path="res://src/items/consumable/ConsumableItem.tscn" id="22_he1ou"]
|
||||
[ext_resource type="Resource" uid="uid://bjwbx3ymt8o7" path="res://src/items/consumable/resources/MysteryConsumable.tres" id="23_rufnk"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0pl1n1jf77jm" path="res://src/items/effect/EffectItem.tscn" id="24_t3xa0"]
|
||||
[ext_resource type="Resource" uid="uid://cx8kpmyhl5vkj" path="res://src/items/effect/resources/FerrousResolution.tres" id="25_qqc7i"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3ubi4"]
|
||||
shading_mode = 0
|
||||
@@ -900,22 +909,26 @@ shape = SubResource("BoxShape3D_db2o3")
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.00384, 1.80761, 11.3571)
|
||||
|
||||
[node name="Weapon" parent="." instance=ExtResource("16_aqomv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.00425, -2.90864, 0)
|
||||
Stats = ExtResource("17_db2o3")
|
||||
|
||||
[node name="Accessory" parent="." instance=ExtResource("18_qlp0t")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98595, -1.56419, 0)
|
||||
Stats = ExtResource("19_7d58j")
|
||||
|
||||
[node name="Armor" parent="." instance=ExtResource("20_ofv7i")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98595, -1.56419, 0)
|
||||
Stats = ExtResource("21_mi7rk")
|
||||
|
||||
[node name="ConsumableItem" parent="." instance=ExtResource("22_he1ou")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98595, -1.56419, 0)
|
||||
Stats = ExtResource("23_rufnk")
|
||||
|
||||
[node name="EffectItem" parent="." instance=ExtResource("24_t3xa0")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98595, -1.56419, 0)
|
||||
Stats = ExtResource("25_qqc7i")
|
||||
|
||||
[node name="ThrowableItem" parent="." instance=ExtResource("16_db2o3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.78811, -3.32789, 0)
|
||||
Stats = ExtResource("17_ntxe5")
|
||||
|
||||
[node name="ThrowableItem2" parent="." instance=ExtResource("16_db2o3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.78811, -3.32789, 0)
|
||||
Stats = ExtResource("17_ntxe5")
|
||||
|
||||
[node name="ThrowableItem3" parent="." instance=ExtResource("16_db2o3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.78811, -3.32789, 0)
|
||||
Stats = ExtResource("17_ntxe5")
|
||||
|
||||
[node name="ThrowableItem4" parent="." instance=ExtResource("16_db2o3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.78811, -3.32789, 0)
|
||||
Stats = ExtResource("17_ntxe5")
|
||||
|
||||
[node name="DifferentThrowable" parent="." instance=ExtResource("16_db2o3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.2442, -2.60258, -2.96088)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.98595, -1.56419, 0)
|
||||
Stats = ExtResource("18_ntxe5")
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b0gwivt7cw7nd" path="res://src/enemy/enemy_types/02. michael/Michael.tscn" id="14_gkkr3"]
|
||||
|
||||
[sub_resource type="NavigationMesh" id="NavigationMesh_xw4dv"]
|
||||
vertices = PackedVector3Array(38, -0.588592, 22.75, 38, -0.588592, 23.75, 39.5, -0.588592, 23.75, 19.75, -0.588592, 25, 17, -0.588592, 25, 17, -0.588592, 26, 16.5, -0.588592, 26.25, 16.75, -0.588592, 30.5, 33.5, -0.588592, -20.75, 33.5, -0.588592, -17.5, 36.5, -0.588592, -17.5, -20.5, -0.588592, -29.5, -17.25, -0.588592, -29.5, -17.25, -0.588592, -32.75, -11.5, -0.588592, -23, -14.5, -0.588592, -23, -14.75, -0.588592, -19.25, 16.75, -0.588592, 13.5, 16.5, -0.588592, 18, 17.25, -0.588592, 18.5, 30.75, -0.588592, 18.5, 37.5, -0.588592, -16.75, 39.5, -0.588592, -39.5, -10.5, -0.588592, -23.5, -0.75, -0.588592, -15, -1.25, -0.588592, -15.5, 4.5, -0.588592, -33.5, 5.5, -0.588592, -32.75, 32.5, -0.588592, -21.5, -28.5, -0.588592, -25.5, -21.25, -0.588592, -25.5, -21.25, -0.588592, -28.75, 16.25, -0.588592, 32.5, 19.75, -0.588592, 39.5, -0.75, -0.588592, 11.5, -22.75, -0.588592, -11.25, -28.75, -0.588592, -11, -39.5, -0.588592, 39.5, -0.75, -0.588592, 32.25, -1.25, -0.588592, -27, -10.5, -0.588592, -27, -22.5, -0.588592, -19, -29.25, -0.588592, -24.75, -39.5, -0.588592, -39.5, -16.5, -0.588592, -33.5, -29.25, -0.588592, -11.5, 16.25, -0.588592, 11.25, 30.75, -0.588592, -11, 27.25, -0.588592, -11, 37.5, -0.588592, 22.5, 26.75, -0.588592, -11.5, 26.75, -0.588592, -15, 5.5, -0.588592, -21.5, 13.75, -0.588592, 13.5, 15, -0.588592, 13.25, 15, -0.588592, 12.75, 0.75, -0.588592, 12.75, 0.75, -0.588592, 13.25, 2.25, -0.588592, 13.5, 2.25, -0.588592, 30.25, 0.75, -0.588592, 30.5, 0.75, -0.588592, 31, 15, -0.588592, 31, 13.75, -0.588592, 30.5, 15, -0.588592, 27.5, 15, -0.588592, 26.25, 14.25, -0.588592, 26, 13.75, -0.588592, 27.75, 6.75, -0.588592, 23.5, 6.5, -0.588592, 20.75, 2.25, -0.588592, 16, 0.75, -0.588592, 16.25, 0.75, -0.588592, 27.5, 2.25, -0.588592, 27.75, 9.5, -0.588592, 23.25, 14.25, -0.588592, 18.25, 15, -0.588592, 18, 15, -0.588592, 16.25, 13.75, -0.588592, 16, 9.25, -0.588592, 20.5, 14.75, -0.588592, 21.5, 14.25, -0.588592, 21.25, 20.5, 6.66141, 24.75, 20.5, 6.66141, 27.25, 23.25, 6.66141, 27.25, 23.25, 6.66141, 24.75, 36.75, 6.66141, 24.75, 36.75, 6.66141, 27.25, 39.25, 6.66141, 27.25, 39.25, 6.66141, 24.75, 21, -0.588592, 25, 21, -0.588592, 27, 23, -0.588592, 27, 23, -0.588592, 25, 25.25, -0.588592, 38.5, 25.25, -0.588592, 39.5, 26.75, -0.588592, 39.5, 27, -0.588592, 38.25, 35.75, -0.588592, 36, 36, -0.588592, 28.25, 35.75, -0.588592, 25.25, 24.25, -0.588592, 38.25, 24, -0.588592, 35.75, 39.25, -0.588592, 35.75, 39.25, -0.588592, 28.25, 29.75, -0.588592, 38.25, 30, -0.588592, 39.25, 35.75, -0.588592, 39.25, 24.25, -0.588592, 25, 24, -0.588592, 28.25, 21, -0.588592, 28.25, 21, -0.588592, 35.75, 20.75, 6.66141, 36.75, 20.75, 6.66141, 39.25, 23.25, 6.66141, 39.25, 23.25, 6.66141, 36.75, 36.75, 6.66141, 36.75, 36.75, 6.66141, 39.25, 39.25, 6.66141, 39.25, 39.25, 6.66141, 36.75, 37, -0.588592, 37, 37, -0.588592, 39, 39, -0.588592, 39, 39, -0.588592, 37)
|
||||
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(5, 4, 3), PackedInt32Array(5, 3, 6), PackedInt32Array(6, 3, 7), PackedInt32Array(10, 9, 8), PackedInt32Array(13, 12, 11), PackedInt32Array(16, 15, 14), PackedInt32Array(18, 17, 19), PackedInt32Array(19, 17, 20), PackedInt32Array(10, 8, 21), PackedInt32Array(21, 8, 22), PackedInt32Array(14, 23, 16), PackedInt32Array(16, 23, 25), PackedInt32Array(16, 25, 24), PackedInt32Array(27, 26, 28), PackedInt32Array(28, 26, 22), PackedInt32Array(31, 30, 29), PackedInt32Array(7, 3, 32), PackedInt32Array(32, 3, 33), PackedInt32Array(35, 34, 36), PackedInt32Array(36, 34, 38), PackedInt32Array(36, 38, 37), PackedInt32Array(11, 31, 29), PackedInt32Array(40, 39, 23), PackedInt32Array(23, 39, 25), PackedInt32Array(41, 16, 35), PackedInt32Array(35, 16, 24), PackedInt32Array(22, 8, 28), PackedInt32Array(43, 29, 42), PackedInt32Array(13, 11, 29), PackedInt32Array(13, 29, 44), PackedInt32Array(44, 29, 43), PackedInt32Array(0, 21, 2), PackedInt32Array(2, 21, 22), PackedInt32Array(45, 36, 37), PackedInt32Array(17, 46, 20), PackedInt32Array(20, 46, 48), PackedInt32Array(20, 48, 47), PackedInt32Array(32, 33, 38), PackedInt32Array(38, 33, 37), PackedInt32Array(0, 49, 21), PackedInt32Array(42, 45, 43), PackedInt32Array(43, 45, 37), PackedInt32Array(44, 43, 26), PackedInt32Array(26, 43, 22), PackedInt32Array(50, 48, 46), PackedInt32Array(50, 46, 51), PackedInt32Array(51, 46, 34), PackedInt32Array(51, 34, 24), PackedInt32Array(24, 34, 35), PackedInt32Array(28, 52, 27), PackedInt32Array(54, 53, 55), PackedInt32Array(55, 53, 58), PackedInt32Array(55, 58, 57), PackedInt32Array(55, 57, 56), PackedInt32Array(60, 59, 61), PackedInt32Array(61, 59, 63), PackedInt32Array(61, 63, 62), PackedInt32Array(65, 64, 66), PackedInt32Array(66, 64, 67), PackedInt32Array(73, 72, 68), PackedInt32Array(68, 72, 69), PackedInt32Array(69, 72, 70), PackedInt32Array(70, 72, 71), PackedInt32Array(73, 68, 59), PackedInt32Array(59, 68, 74), PackedInt32Array(59, 74, 67), PackedInt32Array(59, 67, 63), PackedInt32Array(76, 75, 77), PackedInt32Array(77, 75, 78), PackedInt32Array(78, 79, 53), PackedInt32Array(53, 79, 69), PackedInt32Array(53, 69, 70), PackedInt32Array(53, 70, 58), PackedInt32Array(81, 80, 66), PackedInt32Array(78, 75, 81), PackedInt32Array(66, 67, 81), PackedInt32Array(81, 67, 74), PackedInt32Array(81, 74, 79), PackedInt32Array(81, 79, 78), PackedInt32Array(85, 84, 82), PackedInt32Array(82, 84, 83), PackedInt32Array(89, 88, 86), PackedInt32Array(86, 88, 87), PackedInt32Array(93, 92, 90), PackedInt32Array(90, 92, 91), PackedInt32Array(95, 94, 96), PackedInt32Array(96, 94, 97), PackedInt32Array(100, 99, 98), PackedInt32Array(94, 101, 97), PackedInt32Array(97, 101, 102), PackedInt32Array(104, 103, 99), PackedInt32Array(99, 103, 98), PackedInt32Array(106, 105, 107), PackedInt32Array(107, 105, 98), PackedInt32Array(105, 97, 102), PackedInt32Array(109, 108, 102), PackedInt32Array(102, 108, 105), PackedInt32Array(105, 108, 98), PackedInt32Array(98, 108, 100), PackedInt32Array(109, 102, 110), PackedInt32Array(110, 102, 111), PackedInt32Array(115, 114, 112), PackedInt32Array(112, 114, 113), PackedInt32Array(119, 118, 116), PackedInt32Array(116, 118, 117), PackedInt32Array(123, 122, 120), PackedInt32Array(120, 122, 121)]
|
||||
vertices = PackedVector3Array(-22.2629, -1.58859, -34.1964, -20.7629, -1.58859, -34.4464, -20.7629, -1.58859, -34.9464, -35.0129, -1.58859, -34.9464, -33.7629, -1.58859, -34.4464, -35.0129, -1.58859, -31.6964, -35.0129, -1.58859, -30.1964, -34.2629, -1.58859, -29.9464, -33.7629, -1.58859, -31.9464, 34.4871, -1.58859, -1.44641, 35.2371, -1.58859, -1.69641, 35.2371, -1.58859, -3.19641, 15.2371, -1.58859, -2.94641, 29.9871, -1.58859, -1.69641, 32.9871, -1.58859, -1.44641, 25.2371, -1.58859, 14.3036, 25.2371, -1.58859, 15.5536, 26.7371, -1.58859, 15.5536, 26.9871, -1.58859, 14.3036, -12.7629, -1.58859, -12.9464, 0.737064, -1.58859, -12.9464, -4.76294, -1.58859, -14.9464, -7.76294, -1.58859, -14.9464, -37.2629, -1.58859, -22.1964, -39.2629, -1.58859, -27.1964, -39.2629, -1.58859, -12.9464, -36.7629, -1.58859, -14.9464, -34.2629, -1.58859, -22.1964, -35.0129, -1.58859, -21.9464, -35.0129, -1.58859, -20.1964, -33.7629, -1.58859, -19.9464, -7.01294, -1.58859, -15.4464, -5.01294, -1.58859, -16.6964, -7.26294, -1.58859, -19.1964, 3.23706, -1.58859, -6.94641, 0.737064, -1.58859, -4.94641, 12.7371, -1.58859, -4.94641, 15.2371, -1.58859, -7.19641, 3.73706, -1.58859, -16.9464, 3.73706, -1.58859, -18.9464, 3.23706, -1.58859, -19.1964, 0.737064, -1.58859, -16.9464, 2.98706, -1.58859, -16.6964, -1.01294, -1.58859, -16.6964, -3.26294, -1.58859, -16.9464, -3.01294, -1.58859, -15.4464, -0.762936, -1.58859, -14.9464, -15.0129, -1.58859, -11.4464, -16.7629, -1.58859, -10.9464, -17.0129, -1.58859, -8.69641, -37.0129, -1.58859, -25.4464, -34.2629, -1.58859, -25.1964, 24.2371, -1.58859, 14.0536, -17.0129, -1.58859, -12.6964, -19.2629, -1.58859, -12.9464, -19.0129, -1.58859, -3.44641, 35.7371, -1.58859, 4.05359, 35.7371, -1.58859, 1.30359, 34.4871, -1.58859, 1.05359, -16.7629, -1.58859, -0.946411, 23.9871, -1.58859, 11.8036, 29.7371, -1.58859, 14.3036, -15.2629, -1.58859, -12.9464, -29.5129, -1.58859, -27.1964, -34.2629, -1.58859, -27.1964, -29.2629, -1.58859, -24.4464, -19.7629, -1.58859, -2.94641, -23.2629, -1.58859, -3.19641, -23.0129, -1.58859, 0.553589, -31.0129, -1.58859, 7.55359, -28.7629, -1.58859, 7.30359, -28.7629, -1.58859, 3.05359, -21.0129, -1.58859, -0.696411, -12.7629, -1.58859, -8.94641, 29.9871, -1.58859, 15.0536, 35.7371, -1.58859, 15.0536, 35.9871, -1.58859, 11.8036, -28.7629, -1.58859, 1.05359, -29.0129, -1.58859, -12.6964, -31.0129, -1.58859, -12.6964, 32.7371, -1.58859, 1.05359, -23.7629, -1.58859, 1.05359, -20.7629, -1.58859, 3.05359, 0.987064, -1.58859, -15.4464, -36.7629, -1.58859, -21.9464, 12.7371, -1.58859, -0.946411, 20.9871, -1.58859, 4.30359, 20.9871, -1.58859, 11.8036, 24.2371, -1.58859, 4.05359, 39.2371, -1.58859, 11.8036, 39.2371, -1.58859, 4.30359, -26.7629, -1.58859, -27.4464, -22.2629, -1.58859, -31.6964, 24.2371, -1.58859, 0.803589, -33.7629, -1.58859, -17.4464, -22.2629, -1.58859, -17.4464, -22.2629, -1.58859, -19.9464, -26.5129, -1.58859, -24.6964, -20.7629, -1.58859, -20.1964, -20.7629, -1.58859, -31.4464, 29.7371, -1.58859, -0.946411, -35.0129, -1.58859, -16.9464, -20.7629, -1.58859, -16.9464, 20.4871, 6.66141, 0.803589, 20.4871, 6.66141, 3.30359, 23.2371, 6.66141, 3.30359, 23.2371, 6.66141, 0.803589, 36.7371, 6.66141, 0.803589, 36.7371, 6.66141, 3.30359, 39.2371, 6.66141, 3.30359, 39.2371, 6.66141, 0.803589, 20.9871, -1.58859, 1.05359, 20.9871, -1.58859, 3.05359, 22.9871, -1.58859, 3.05359, 22.9871, -1.58859, 1.05359, 20.7371, 6.66141, 12.8036, 20.7371, 6.66141, 15.5536, 23.2371, 6.66141, 15.3036, 23.2371, 6.66141, 12.8036, 36.7371, 6.66141, 12.8036, 36.7371, 6.66141, 15.3036, 39.2371, 6.66141, 15.3036, 39.2371, 6.66141, 12.8036, 36.9871, -1.58859, 13.0536, 36.9871, -1.58859, 15.0536, 38.9871, -1.58859, 15.0536, 38.9871, -1.58859, 13.0536)
|
||||
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 4), PackedInt32Array(2, 4, 3), PackedInt32Array(6, 5, 7), PackedInt32Array(7, 5, 8), PackedInt32Array(10, 9, 11), PackedInt32Array(11, 9, 14), PackedInt32Array(11, 14, 13), PackedInt32Array(11, 13, 12), PackedInt32Array(16, 15, 17), PackedInt32Array(17, 15, 18), PackedInt32Array(22, 21, 19), PackedInt32Array(19, 21, 20), PackedInt32Array(26, 25, 23), PackedInt32Array(23, 25, 24), PackedInt32Array(28, 27, 29), PackedInt32Array(29, 27, 30), PackedInt32Array(21, 31, 32), PackedInt32Array(32, 31, 33), PackedInt32Array(35, 34, 36), PackedInt32Array(36, 34, 37), PackedInt32Array(39, 38, 40), PackedInt32Array(40, 38, 42), PackedInt32Array(40, 42, 41), PackedInt32Array(44, 43, 45), PackedInt32Array(45, 43, 46), PackedInt32Array(49, 48, 47), PackedInt32Array(24, 51, 50), PackedInt32Array(18, 15, 52), PackedInt32Array(21, 22, 31), PackedInt32Array(53, 48, 54), PackedInt32Array(54, 48, 49), PackedInt32Array(54, 49, 55), PackedInt32Array(58, 57, 56), PackedInt32Array(49, 59, 55), PackedInt32Array(52, 60, 18), PackedInt32Array(18, 60, 61), PackedInt32Array(53, 54, 62), PackedInt32Array(62, 54, 22), PackedInt32Array(43, 44, 41), PackedInt32Array(41, 44, 40), PackedInt32Array(40, 44, 33), PackedInt32Array(45, 46, 21), PackedInt32Array(21, 46, 20), PackedInt32Array(44, 32, 33), PackedInt32Array(7, 8, 64), PackedInt32Array(64, 8, 63), PackedInt32Array(64, 63, 65), PackedInt32Array(68, 67, 66), PackedInt32Array(71, 70, 69), PackedInt32Array(27, 51, 30), PackedInt32Array(30, 51, 65), PackedInt32Array(55, 72, 66), PackedInt32Array(66, 72, 68), PackedInt32Array(19, 47, 62), PackedInt32Array(19, 73, 47), PackedInt32Array(47, 73, 49), PackedInt32Array(74, 61, 75), PackedInt32Array(75, 61, 76), PackedInt32Array(24, 50, 23), PackedInt32Array(62, 22, 19), PackedInt32Array(71, 69, 77), PackedInt32Array(77, 69, 78), PackedInt32Array(78, 69, 79), PackedInt32Array(9, 58, 14), PackedInt32Array(14, 58, 80), PackedInt32Array(77, 81, 71), PackedInt32Array(71, 81, 82), PackedInt32Array(46, 83, 20), PackedInt32Array(83, 41, 42), PackedInt32Array(23, 84, 26), PackedInt32Array(85, 36, 12), PackedInt32Array(12, 36, 37), PackedInt32Array(87, 86, 60), PackedInt32Array(60, 86, 88), PackedInt32Array(68, 72, 81), PackedInt32Array(81, 72, 82), PackedInt32Array(89, 76, 90), PackedInt32Array(90, 76, 56), PackedInt32Array(59, 72, 55), PackedInt32Array(92, 91, 0), PackedInt32Array(0, 91, 63), PackedInt32Array(0, 63, 8), PackedInt32Array(0, 8, 4), PackedInt32Array(83, 42, 20), PackedInt32Array(20, 42, 34), PackedInt32Array(20, 34, 35), PackedInt32Array(88, 93, 80), PackedInt32Array(30, 65, 94), PackedInt32Array(94, 65, 97), PackedInt32Array(94, 97, 96), PackedInt32Array(94, 96, 95), PackedInt32Array(25, 26, 79), PackedInt32Array(79, 26, 78), PackedInt32Array(78, 26, 54), PackedInt32Array(54, 26, 22), PackedInt32Array(24, 64, 51), PackedInt32Array(51, 64, 65), PackedInt32Array(58, 56, 76), PackedInt32Array(92, 99, 91), PackedInt32Array(91, 99, 97), PackedInt32Array(97, 99, 96), PackedInt32Array(96, 99, 98), PackedInt32Array(80, 58, 88), PackedInt32Array(88, 58, 60), PackedInt32Array(60, 58, 61), PackedInt32Array(61, 58, 76), PackedInt32Array(13, 100, 12), PackedInt32Array(12, 100, 85), PackedInt32Array(94, 95, 101), PackedInt32Array(101, 95, 102), PackedInt32Array(106, 105, 103), PackedInt32Array(103, 105, 104), PackedInt32Array(110, 109, 107), PackedInt32Array(107, 109, 108), PackedInt32Array(114, 113, 111), PackedInt32Array(111, 113, 112), PackedInt32Array(118, 117, 115), PackedInt32Array(115, 117, 116), PackedInt32Array(122, 121, 119), PackedInt32Array(119, 121, 120), PackedInt32Array(126, 125, 123), PackedInt32Array(123, 125, 124)]
|
||||
sample_partition_type = 2
|
||||
geometry_parsed_geometry_type = 1
|
||||
geometry_collision_mask = 2147483648
|
||||
@@ -43,130 +43,137 @@ corridor_cost_multiplier = 0.1
|
||||
show_debug_in_editor = false
|
||||
hide_debug_visuals_for_all_generated_rooms = false
|
||||
|
||||
[node name="BasinRoom_0" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")]
|
||||
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 8, 0, 22)
|
||||
[node name="Floor Exit A_0" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")]
|
||||
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 22, 0, -18)
|
||||
|
||||
[node name="Antechamber A_1" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 32)
|
||||
[node name="Item Transfer Room_1" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 16)
|
||||
|
||||
[node name="Floor Exit A_2" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")]
|
||||
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 22, 0, -30)
|
||||
[node name="BasinRoom_2" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -28, 0, -26)
|
||||
|
||||
[node name="Item Transfer Room_3" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -16, 0, -14)
|
||||
[node name="Antechamber A_3" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 8)
|
||||
|
||||
[node name="Corridor_4" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 22)
|
||||
|
||||
[node name="Corridor_5" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, 22)
|
||||
|
||||
[node name="Corridor_6" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26, 0, 22)
|
||||
|
||||
[node name="Corridor_7" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 22)
|
||||
|
||||
[node name="Corridor_8" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 22)
|
||||
|
||||
[node name="Corridor_9" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 18)
|
||||
|
||||
[node name="Corridor_10" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 14)
|
||||
|
||||
[node name="Corridor_11" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 10)
|
||||
|
||||
[node name="Corridor_12" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 6)
|
||||
|
||||
[node name="Corridor_13" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, 2)
|
||||
|
||||
[node name="Corridor_14" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, -2)
|
||||
|
||||
[node name="Corridor_15" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, -6)
|
||||
|
||||
[node name="Corridor_16" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, -10)
|
||||
|
||||
[node name="Corridor_17" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, -14)
|
||||
|
||||
[node name="Corridor_18" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -14)
|
||||
|
||||
[node name="Corridor_19" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -18)
|
||||
|
||||
[node name="Corridor_20" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26, 0, -18)
|
||||
|
||||
[node name="Corridor_21" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, -18)
|
||||
|
||||
[node name="Corridor_22" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, -18)
|
||||
|
||||
[node name="Corridor_23" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, -18)
|
||||
|
||||
[node name="Corridor_24" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, -18)
|
||||
|
||||
[node name="Corridor_25" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, -18)
|
||||
|
||||
[node name="Corridor_26" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -18)
|
||||
|
||||
[node name="Corridor_5" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, -18)
|
||||
|
||||
[node name="Corridor_6" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -18)
|
||||
|
||||
[node name="Corridor_7" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -14)
|
||||
|
||||
[node name="Corridor_8" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -14)
|
||||
|
||||
[node name="Corridor_9" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -14)
|
||||
|
||||
[node name="Corridor_10" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -10)
|
||||
|
||||
[node name="Corridor_11" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -10)
|
||||
|
||||
[node name="Corridor_12" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -6)
|
||||
|
||||
[node name="Corridor_13" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -2)
|
||||
|
||||
[node name="Corridor_14" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 0, -2)
|
||||
|
||||
[node name="Corridor_15" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 0, 2)
|
||||
|
||||
[node name="Corridor_16" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26, 0, 2)
|
||||
|
||||
[node name="Corridor_17" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 2)
|
||||
|
||||
[node name="Corridor_18" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 6)
|
||||
|
||||
[node name="Corridor_19" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -2)
|
||||
|
||||
[node name="Corridor_20" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -6)
|
||||
|
||||
[node name="Corridor_21" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -10)
|
||||
|
||||
[node name="Corridor_22" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -14)
|
||||
|
||||
[node name="Corridor_23" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -34, 0, -14)
|
||||
|
||||
[node name="Corridor_24" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38, 0, -14)
|
||||
|
||||
[node name="Corridor_25" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38, 0, -18)
|
||||
|
||||
[node name="Corridor_26" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38, 0, -22)
|
||||
|
||||
[node name="Corridor_27" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -22)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -38, 0, -26)
|
||||
|
||||
[node name="Corridor_28" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -26)
|
||||
|
||||
[node name="Corridor_29" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -30)
|
||||
|
||||
[node name="Corridor_30" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, -30)
|
||||
|
||||
[node name="Corridor_31" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -30)
|
||||
|
||||
[node name="Corridor_32" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -30)
|
||||
|
||||
[node name="Corridor_33" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -30)
|
||||
|
||||
[node name="Corridor_34" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -26)
|
||||
|
||||
[node name="Corridor_35" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -26)
|
||||
|
||||
[node name="Corridor_36" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -22)
|
||||
|
||||
[node name="Corridor_37" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 0, -22)
|
||||
|
||||
[node name="Corridor_38" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26, 0, -22)
|
||||
|
||||
[node name="Corridor_39" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26, 0, -18)
|
||||
|
||||
[node name="Corridor_40" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -26, 0, -14)
|
||||
|
||||
[node name="RoomsContainer" type="Node3D" parent="NavigationRegion3D/DungeonGenerator"]
|
||||
[node name="Corridor_29" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -22, 0, -14)
|
||||
|
||||
[node name="Corridor_30" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -14)
|
||||
|
||||
[node name="Corridor_31" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, -14)
|
||||
|
||||
[node name="Corridor_32" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -14)
|
||||
|
||||
[node name="Corridor_33" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -10)
|
||||
|
||||
[node name="Corridor_34" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, -6)
|
||||
|
||||
[node name="Corridor_35" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, -6)
|
||||
|
||||
[node name="Corridor_36" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, -6)
|
||||
|
||||
[node name="Corridor_37" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, -6)
|
||||
|
||||
[node name="Corridor_38" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, -2)
|
||||
|
||||
[node name="Corridor_39" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, -2)
|
||||
|
||||
[node name="Corridor_40" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, -2)
|
||||
|
||||
[node name="Corridor_41" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 26, 0, -2)
|
||||
|
||||
[node name="Corridor_42" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -2)
|
||||
|
||||
[node name="Corridor_43" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 34, 0, -2)
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="NavigationRegion3D"]
|
||||
collision_layer = 2147483648
|
||||
@@ -175,6 +182,7 @@ collision_mask = 2147483648
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.5, 0)
|
||||
shape = SubResource("BoxShape3D_xw4dv")
|
||||
disabled = true
|
||||
|
||||
[node name="EnemyDatabase" parent="." instance=ExtResource("12_aw26s")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=83 format=4 uid="uid://i781lbf2wb22"]
|
||||
[gd_scene load_steps=84 format=4 uid="uid://i781lbf2wb22"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_owolg"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3sg8oamch2i1" path="res://src/map/dungeon/models/Set A/04. Antechamber B/TREE_ROOM_VER2_STONE_PANEL_2png.png" id="2_q760f"]
|
||||
@@ -1087,6 +1087,9 @@ size = Vector3(20, 8, 16)
|
||||
material = ExtResource("22_3xjct")
|
||||
size = Vector2(20, 16)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_n7s5m"]
|
||||
size = Vector3(19.9911, 1, 15.9615)
|
||||
|
||||
[node name="Antechamber B" type="Node3D"]
|
||||
script = ExtResource("1_owolg")
|
||||
size_in_voxels = Vector3i(5, 1, 4)
|
||||
@@ -1292,3 +1295,9 @@ visible = false
|
||||
layers = 2
|
||||
mesh = SubResource("PlaneMesh_qpvag")
|
||||
skeleton = NodePath("../../Model/Antechamber B")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.044342, -2.14287, 0.0457458)
|
||||
shape = SubResource("BoxShape3D_n7s5m")
|
||||
|
||||
@@ -502,7 +502,7 @@ blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_p4f4g")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_gbjb2"]
|
||||
size = Vector3(4.40063, 4, 1.72632)
|
||||
size = Vector3(4.40063, 4, 0.195191)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lepkf"]
|
||||
transparency = 1
|
||||
@@ -722,6 +722,7 @@ mesh = SubResource("ArrayMesh_pjk1a")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="Collision" type="Node3D" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="Collision"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.88616, -2.025, -0.989241)
|
||||
@@ -766,7 +767,7 @@ collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Doors/DOOR?_F_CUT/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0286865, 0, 0.439088)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0286865, 0, 0.0675668)
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="Doors"]
|
||||
@@ -785,6 +786,7 @@ collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Doors/DOOR?_R_CUT/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.45058e-09, 0, -0.217697)
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="Doors"]
|
||||
|
||||
@@ -35,13 +35,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
|
||||
public IInventory Inventory { get; private set; } = default!;
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedWeapon => _equippedWeapon;
|
||||
public AutoProp<EquipableItem> EquippedWeapon => _equippedWeapon;
|
||||
private AutoProp<EquipableItem> _equippedWeapon { get; set; } = new AutoProp<EquipableItem>(new Weapon());
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedArmor => _equippedArmor;
|
||||
public AutoProp<EquipableItem> EquippedArmor => _equippedArmor;
|
||||
private AutoProp<EquipableItem> _equippedArmor { get; set; } = new AutoProp<EquipableItem>(new Armor());
|
||||
|
||||
public IAutoProp<EquipableItem> EquippedAccessory => _equippedAccessory;
|
||||
public AutoProp<EquipableItem> EquippedAccessory => _equippedAccessory;
|
||||
private AutoProp<EquipableItem> _equippedAccessory { get; set; } = new AutoProp<EquipableItem>(new Accessory());
|
||||
|
||||
private PlayerLogic.Settings Settings { get; set; } = default!;
|
||||
@@ -385,6 +385,13 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
|
||||
public void Equip(EquipableItem equipable)
|
||||
{
|
||||
if (equipable.ItemTag == ItemTag.MysteryItem)
|
||||
{
|
||||
var rerolledItem = Game.RerollItem(equipable) as EquipableItem;
|
||||
Equip(rerolledItem);
|
||||
return;
|
||||
}
|
||||
|
||||
if (equipable is Weapon weapon)
|
||||
{
|
||||
Unequip(_equippedWeapon.Value);
|
||||
@@ -433,9 +440,6 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
}
|
||||
else
|
||||
throw new NotImplementedException("Item type is not supported.");
|
||||
|
||||
if (equipable.ItemTag == ItemTag.BreaksOnChange)
|
||||
Inventory.Remove(equipable);
|
||||
}
|
||||
|
||||
private static Vector3 GlobalInputVector
|
||||
@@ -592,6 +596,11 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<ISaveChunk<Play
|
||||
else
|
||||
_gameRepo.AnnounceMessageOnMainScreen($"Could not pick up {droppedItem.Item.ItemName}.");
|
||||
}
|
||||
if (area.GetParent() is Restorative restorative)
|
||||
{
|
||||
_gameRepo.OnRestorativePickedUp(restorative);
|
||||
restorative.QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
private bool PlayerIsHittingGeometry()
|
||||
|
||||
Reference in New Issue
Block a user