Extensive work on VFX for the guild, assets for the world, and portrait variance. Work on quests. Extra work on User Flow completion and file saving.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
class_name Accessory extends Equipment
|
||||
|
||||
func can_equip_slot(slot : Slots) -> bool:
|
||||
return slot == Slots.ACCESSORY
|
||||
|
||||
func item_type_name() -> String:
|
||||
return "Accessory"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
class_name Armor extends Equipment
|
||||
|
||||
|
||||
func can_equip_slot(slot : Slots) -> bool:
|
||||
return slot == Slots.ARMOR
|
||||
|
||||
func item_type_name() -> String:
|
||||
return "Armor"
|
||||
#TODO: Add different armor classes
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class_name Equipment extends Item
|
||||
|
||||
@export var stats : StatBlock = StatBlock.new(0)
|
||||
|
||||
func item_type_name() -> String:
|
||||
return "Equipment"
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
class_name Item extends Resource
|
||||
|
||||
enum Slots{
|
||||
WEAPON,
|
||||
ARMOR,
|
||||
ACCESSORY
|
||||
}
|
||||
|
||||
@export var image : Texture2D
|
||||
@export var name : StringName
|
||||
@@ -10,5 +15,16 @@ class_name Item extends Resource
|
||||
@export var per : bool
|
||||
@export var grade : String = "F"
|
||||
|
||||
|
||||
func item_type_name() -> String:
|
||||
return "Item"
|
||||
|
||||
func can_equip_slot(slot : Slots) -> bool:
|
||||
return false
|
||||
|
||||
static func slot_name(slot : Slots) -> String:
|
||||
match(slot):
|
||||
Slots.WEAPON: return "Weapon"
|
||||
Slots.ARMOR: return "Armor"
|
||||
Slots.ACCESSORY: return "Accessory"
|
||||
return "ERROR"
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
[gd_resource type="Resource" script_class="Weapon" load_steps=3 format=3 uid="uid://8k1lnfoi4xww"]
|
||||
[gd_resource type="Resource" script_class="Weapon" load_steps=5 format=3 uid="uid://8k1lnfoi4xww"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://clrvwaqb61lpv" path="res://graphics/items/pitchfork.png" id="1_fpnr6"]
|
||||
[ext_resource type="Script" uid="uid://bgn8ipx38g28o" path="res://data/items/weapon.gd" id="1_qoils"]
|
||||
[ext_resource type="Script" uid="uid://727tgvtmq4nb" path="res://data/statblock.gd" id="3_hkspc"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hkspc"]
|
||||
script = ExtResource("3_hkspc")
|
||||
STR = 3
|
||||
DEX = -3
|
||||
CHA = 2
|
||||
PATK = 1
|
||||
metadata/_custom_type_script = "uid://727tgvtmq4nb"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_qoils")
|
||||
min_damage = 1
|
||||
max_damage = 2
|
||||
type = 2
|
||||
stats = SubResource("Resource_hkspc")
|
||||
image = ExtResource("1_fpnr6")
|
||||
brief = "A humble weapon for a humble beginning."
|
||||
metadata/_custom_type_script = "uid://bgn8ipx38g28o"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class_name Weapon extends Equipment
|
||||
|
||||
enum Type{
|
||||
enum Types{
|
||||
FIST,
|
||||
SWORD,
|
||||
SPEAR,
|
||||
@@ -12,21 +12,24 @@ enum Type{
|
||||
}
|
||||
@export var min_damage : int
|
||||
@export var max_damage : int
|
||||
@export var type : Type
|
||||
@export var type : Types
|
||||
|
||||
func item_type_name() -> String:
|
||||
return "Weapon (%s)" % weapon_type_name()
|
||||
|
||||
func can_equip_slot(slot : Slots) -> bool:
|
||||
return slot == Slots.WEAPON
|
||||
|
||||
func primary_stat() -> String:
|
||||
return "Deals %d-%d base damage." % [min_damage, max_damage]
|
||||
|
||||
func weapon_type_name() -> String:
|
||||
match(type):
|
||||
Type.FIST: return "Fist"
|
||||
Type.SWORD: return "Sword"
|
||||
Type.SPEAR: return "Spear"
|
||||
Type.STAFF: return ""
|
||||
Type.DAGGER: return ""
|
||||
Type.HAMMER: return ""
|
||||
Type.WHIP: return ""
|
||||
Types.FIST: return "Fist"
|
||||
Types.SWORD: return "Sword"
|
||||
Types.SPEAR: return "Spear"
|
||||
Types.STAFF: return "Staff"
|
||||
Types.DAGGER: return "Dagger"
|
||||
Types.HAMMER: return "Hammer"
|
||||
Types.WHIP: return "Whip"
|
||||
return "Unknown"
|
||||
|
||||
Reference in New Issue
Block a user