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