diff options
Diffstat (limited to 'Unit.gd')
-rw-r--r-- | Unit.gd | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -4,11 +4,10 @@ extends Piece class_name Unit, "res://godot/Piece.png" func get_mp() -> int: - return 3 + return 2 func road_march_bonus() -> int: - return 3 + return 2 -func move_cost(src : Tile, dst : Tile, a : int) -> int: - print("from %d %d -> %d %d : %d" % [src.coords.x,src.coords.y,dst.coords.x,dst.coords.y,a]) - return dst.cost() +func move_cost(src : Tile, dst : Tile, o : int) -> int: + return (1 if (src.has_road(o) and dst.type != 3) else dst.cost()) |