66 lines
1.5 KiB
GDScript
66 lines
1.5 KiB
GDScript
#------------------------------------------------------------
|
|
# Script: Entity Template
|
|
# Author: NotDinoBits
|
|
# Contributers:
|
|
#
|
|
# Godot Version: 4.7
|
|
# Language: GDScript
|
|
#
|
|
# Interfaces: Combat_Actions (maybe)
|
|
#
|
|
# Description: Provides an easily-modifiable template for
|
|
# basic entities. Entities have combat mode and
|
|
# exploration mode functions.
|
|
#
|
|
# GENERAL
|
|
# General variables and functions need at any time
|
|
# Integers: HP, Attack Power (AP), Defense
|
|
# Card-List: Inventory
|
|
# Functions:
|
|
#
|
|
# COMBAT MODE
|
|
# Combat-mode specific variables and functions
|
|
# Integers: Mana
|
|
# Functions: damage, action, card, addMaxMana
|
|
#
|
|
# EXPLORATION MODE
|
|
# Exploration-mode specific variables and functions
|
|
# Functions: left, right, up, down
|
|
#------------------------------------------------------------
|
|
|
|
extends AnimatedSprite2D
|
|
|
|
# --- SETUP ---
|
|
const CARD_TEMPLATE = preload("uid://cfxt1fck3mng7")
|
|
|
|
# --- VARIABLES ---
|
|
# --- General
|
|
@export var hp = 0
|
|
@export var ap = 0
|
|
@export var defense = 0
|
|
|
|
# The inventory show only contain card objects derived from card_template.tscn
|
|
@export var inventory = []
|
|
|
|
# --- Combat
|
|
var mana_max = 1
|
|
var mana = 0
|
|
|
|
# --- Exploration
|
|
|
|
# --- FUNCTIONS ---
|
|
# --- General
|
|
|
|
# --- Combat
|
|
|
|
# --- Exploration
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|