class_name StatBlock extends Resource

@export var STR : int = 0
@export var DEX : int = 0
@export var INT : int = 0
@export var CHA : int = 0
@export var FAI : int = 0
@export var LUK : int = 0
@export var PATK : int = 0
@export var PDEF : int = 0
@export var MATK : int = 0
@export var MDEF : int = 0

func _init(start : int = 0) -> void:
	STR = start
	DEX = start
	INT = start
	CHA = start
	FAI = start
	LUK = start
	PATK = start
	PDEF = start
	MATK = start
	MDEF = start

func _to_string() -> String:
	var string = "%s {" % [resource_scene_unique_id]
	string += str(STR) + ", "
	string += str(DEX) + ", "
	string += str(INT) + ", "
	string += str(CHA) + ", "
	string += str(FAI) + ", "
	string += str(LUK) + ", "
	string += str(PATK) + ", "
	string += str(PDEF) + ", "
	string += str(MATK) + ", "
	string += str(MDEF) + "}"
	return string
	
static func copy(block : StatBlock) -> StatBlock:
	var b = StatBlock.new()
	b.STR = block.STR
	b.DEX = block.DEX
	b.INT = block.INT
	b.CHA = block.CHA
	b.FAI = block.FAI
	b.LUK = block.LUK
	b.PATK = block.PATK
	b.PDEF = block.PDEF
	b.MATK = block.MATK
	b.MDEF = block.MDEF
	return b
