summaryrefslogtreecommitdiffstats
path: root/Piece.gd
blob: 1a9e35702539f85d9b73f65281413a3da829a6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#warning-ignore-all:unused_argument
extends Node2D

class_name Piece, "res://godot/Piece.png"

# movement points
func get_mp() -> int:
	print("Piece#get_mp() must be overriden in a subclass")
	return 0

# movement point bonus if you start your movement on a road and follow it
func road_march_bonus() -> int:
	print("Piece#road_march_bonus() must be overriden in a subclass")
	return 0

# movement cost from a Tile to another adjacent Tile
func move_cost(src : Tile, dst : Tile, orientation : int) -> int:
	print("Piece#move_cost() must be overriden in a subclass")
	return -1 # impracticable

# are you allowed to move into that Tile as only move even if you don't have enough movement points
func at_least_one_tile(dst : Tile) -> bool:
	print("Piece#at_least_one_tile() must be overriden in a subclass")
	return true