summaryrefslogtreecommitdiffstats
path: root/Tile.gd
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-07-19 21:48:21 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-07-19 21:48:21 +0200
commitdc4c8275bf7fe7b22783b5ed366e3eb9c0b83a5b (patch)
treed8304166c647f39b564d078bf085bb31a45bc21b /Tile.gd
parentfcfcddfdae168cd42491210528ff51f476b4dfb8 (diff)
downloadgodot-hexgrid-dc4c8275bf7fe7b22783b5ed366e3eb9c0b83a5b.zip
godot-hexgrid-dc4c8275bf7fe7b22783b5ed366e3eb9c0b83a5b.tar.gz
implement range Of Influence
Diffstat (limited to 'Tile.gd')
-rw-r--r--Tile.gd15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tile.gd b/Tile.gd
index a3285e5..bee8b6a 100644
--- a/Tile.gd
+++ b/Tile.gd
@@ -35,6 +35,21 @@ func block_los(from : Tile, to : Tile, d : float, dt : float) -> bool:
print("Tile#block_los() must be overriden in a subclass")
return false
+# range value modifier when firing out of this tile with a given category of weapon
+func range_modifier(category : int) -> int:
+ print("Tile#range_modifier() must be overriden in a subclass")
+ return 0
+
+# attack value modifier when firing out of this tile with a given category of weapon with a given orientation
+func attack_modifier(category : int, orientation : int) -> int:
+ print("Tile#attack_modifier() must be overriden in a subclass")
+ return 0
+
+# defense value provided by this tile against a given category of weapon incoming from a given orientation
+func defense_value(category : int, orientation : int) -> int:
+ print("Tile#defense_value() must be overriden in a subclass")
+ return 0
+
func enable_overlay(i :int, v : bool) -> void:
get_child(i).visible = v
if v: visible = true