update bot experimental

This commit is contained in:
2025-01-28 16:34:46 +08:00
parent 5a9092adfc
commit f3d720d91d
16 changed files with 272 additions and 375 deletions
+12
View File
@@ -1,6 +1,18 @@
extends ConditionLeaf
func tick(actor: Node, blackboard: Blackboard) -> int:
var main = get_tree().get_root().get_node_or_null("Main")
if not main:
return FAILURE
# Always return SUCCESS for bots in non-turn-based mode
if actor.is_bot and not main.turn_based_mode:
return SUCCESS
# Update action points in blackboard
blackboard.set_value("action_points", actor.action_points)
# Check if we have enough AP
if actor.action_points >= 1:
return SUCCESS
return FAILURE