Entropic seal implemented
This commit is contained in:
@@ -55,6 +55,9 @@ public partial class EffectItem : Node3D, IUsableItem
|
|||||||
if (_effectItemStats.UsableItemTags.Contains(UsableItemTag.SwapHPAndVT))
|
if (_effectItemStats.UsableItemTags.Contains(UsableItemTag.SwapHPAndVT))
|
||||||
SwapHPandVT();
|
SwapHPandVT();
|
||||||
|
|
||||||
|
if (_effectItemStats.UsableItemTags.Contains(UsableItemTag.RandomEffect))
|
||||||
|
RandomEffect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetItemStats(InventoryItemStats inventoryItemStats)
|
public void SetItemStats(InventoryItemStats inventoryItemStats)
|
||||||
@@ -176,4 +179,14 @@ public partial class EffectItem : Node3D, IUsableItem
|
|||||||
Player.Stats.SetCurrentHP(oldVt);
|
Player.Stats.SetCurrentHP(oldVt);
|
||||||
Player.Stats.SetCurrentVT(oldHp);
|
Player.Stats.SetCurrentVT(oldHp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RandomEffect()
|
||||||
|
{
|
||||||
|
var itemEffects = Enum.GetValues<UsableItemTag>().ToList();
|
||||||
|
itemEffects.Remove(UsableItemTag.RandomEffect);
|
||||||
|
var randomEffect = new Godot.Collections.Array<UsableItemTag>(itemEffects).PickRandom();
|
||||||
|
_effectItemStats.UsableItemTags.Clear();
|
||||||
|
_effectItemStats.UsableItemTags.Add(randomEffect);
|
||||||
|
Use();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
19
src/items/effect/resources/EntropicSeal.tres
Normal file
19
src/items/effect/resources/EntropicSeal.tres
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[gd_resource type="Resource" script_class="EffectItemStats" load_steps=3 format=3 uid="uid://c6ecr2cquav3"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b5w4iw4iqmxtn" path="res://src/items/effect/EffectItemStats.cs" id="1_3l06v"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c7v5pm32sedkg" path="res://src/items/effect/textures/entropic seal.PNG" id="1_dbua5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_3l06v")
|
||||||
|
UsableItemTags = Array[int]([10])
|
||||||
|
ElementalDamageType = 0
|
||||||
|
Name = "Entropic Seal"
|
||||||
|
Description = "Random effect."
|
||||||
|
Texture = ExtResource("1_dbua5")
|
||||||
|
SpawnRate = 0.5
|
||||||
|
ThrowSpeed = 12.0
|
||||||
|
HealHPAmount = 0
|
||||||
|
HealVTAmount = 0
|
||||||
|
ThrowDamage = 5
|
||||||
|
ItemTags = Array[int]([])
|
||||||
|
metadata/_custom_type_script = "uid://b5w4iw4iqmxtn"
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
[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://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://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="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://1fl6s352e2ej" path="res://src/items/throwable/ThrowableItem.tscn" id="16_db2o3"]
|
[ext_resource type="PackedScene" uid="uid://d0pl1n1jf77jm" path="res://src/items/effect/EffectItem.tscn" id="16_aqomv"]
|
||||||
[ext_resource type="Resource" uid="uid://35ag8vp8kvtx" path="res://src/items/throwable/resources/GospelOfEscape.tres" id="17_ntxe5"]
|
[ext_resource type="Resource" uid="uid://c6ecr2cquav3" path="res://src/items/effect/resources/EntropicSeal.tres" id="17_db2o3"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3ubi4"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3ubi4"]
|
||||||
shading_mode = 0
|
shading_mode = 0
|
||||||
@@ -888,6 +888,6 @@ collision_mask = 8
|
|||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 149.05, -4.02862, -1.76389)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 149.05, -4.02862, -1.76389)
|
||||||
shape = SubResource("BoxShape3D_ntxe5")
|
shape = SubResource("BoxShape3D_ntxe5")
|
||||||
|
|
||||||
[node name="ThrowableItem" parent="." instance=ExtResource("16_db2o3")]
|
[node name="EffectItem" parent="." instance=ExtResource("16_aqomv")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.51612, -2.51226, -4.10995)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.25212, -2.42406, 0)
|
||||||
_throwableItemStats = ExtResource("17_ntxe5")
|
_effectItemStats = ExtResource("17_db2o3")
|
||||||
|
|||||||
Reference in New Issue
Block a user