Add tentacled boss planet encounter
This commit is contained in:
parent
0f7edff15a
commit
40f284dcdd
38 changed files with 1051 additions and 19 deletions
|
|
@ -1,6 +1,8 @@
|
|||
class_name GasBombEffect
|
||||
extends Node2D
|
||||
|
||||
const COMBAT_TARGET = preload("res://core/CombatTarget.gd")
|
||||
|
||||
# The gas bomb itself: the flight, the blast and the picture of both, with
|
||||
# nothing in it about who threw it.
|
||||
#
|
||||
|
|
@ -67,13 +69,11 @@ func _explode() -> void:
|
|||
exploded = true
|
||||
explosion_time = EXPLOSION_DURATION
|
||||
hit_count = 0
|
||||
# Asteroids too - a blast that clears everything around it but leaves the
|
||||
# rocks untouched would need explaining, and they take damage the same way.
|
||||
#
|
||||
# Every weapon target opts into the same damage contract: ordinary enemies,
|
||||
# asteroids, boss hatchlings and opened boss eyes all belong here.
|
||||
# #176: player weapons never damage player buildings. A bomb may be thrown
|
||||
# into a siege without punishing the structure it is meant to defend.
|
||||
for target_node in get_tree().get_nodes_in_group("enemies") \
|
||||
+ get_tree().get_nodes_in_group("asteroids"):
|
||||
for target_node in get_tree().get_nodes_in_group(COMBAT_TARGET.GROUP):
|
||||
if is_instance_valid(target_node) and target_node is Node2D \
|
||||
and target_node.global_position.distance_to(target) <= AOE_RADIUS:
|
||||
target_node.take_damage(damage)
|
||||
|
|
|
|||
Loading…
Reference in a new issue