36 lines
844 B
GDScript
36 lines
844 B
GDScript
class_name BattleMove
|
|
|
|
enum MoveType {
|
|
PHYSICAL,
|
|
ABILITY,
|
|
MAGICAL,
|
|
}
|
|
|
|
var name:String
|
|
var power:int
|
|
var mpCost:int
|
|
var speedModifier:float
|
|
var accuracy:float
|
|
var moveType:MoveType
|
|
var fieldUse:bool
|
|
|
|
func _init(params:Dictionary) -> void:
|
|
self.name = params.get("name", "Unknown Move")
|
|
self.power = params.get("power", 0)
|
|
self.mpCost = params.get("mpCost", 0)
|
|
self.speedModifier = params.get("speedModifier", 1.0)
|
|
self.accuracy = params.get("accuracy", 1.0)
|
|
self.moveType = params.get("moveType", MoveType.PHYSICAL)
|
|
self.fieldUse = params.get("fieldUse", false)
|
|
|
|
func start(_params:Dictionary) -> void:
|
|
# Implement move execution logic here
|
|
await UI.TEXTBOX.setTextAndWait("Action")
|
|
|
|
# Moves
|
|
static var MOVE_PUNCH = BattleMove.new({
|
|
"name": "Punch",
|
|
"power": 15,
|
|
"accuracy": 0.95,
|
|
"moveType": MoveType.PHYSICAL
|
|
}) |