Mystery item implementation
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user