Files
Battle-for-Tismo/data/proto_unit.gd
T
adrien c49899a2fd Initial commit
Server-authoritative Godot 4.6 strategy game.

Includes the headless WebSocket game server, the browser client, and
Nix packaging (server and web-export derivations plus a NixOS module)
for deployment.
2026-09-15 14:48:34 +02:00

20 lines
663 B
GDScript

class_name ProtoUnit
extends Resource
## Template for a unit type. Concrete instances live under res://data/units.
## Units spawned from the same template share these values but track their own
## current HP and position.
@export var name : String
@export var max_hp : int = 100
## Production points needed to train the unit.
@export var cost : int = 0
## Production points consumed per game hour while the unit exists.
@export var upkeep : int = 0
@export var moveable : bool = true
## Tiles travelled per game hour.
@export var speed : float = 0.5
@export var traversable_terrains : PackedStringArray = PackedStringArray()
@export var sprites : SpriteFrames