game: Bewegung ohne Einzelbilder — Schritt-Hüpfer, NSC-Atmen, Ausfall im Kampf
This commit is contained in:
parent
eaeed90f8a
commit
b23eeb9eae
10 changed files with 169 additions and 5 deletions
|
|
@ -861,6 +861,8 @@ func _bewegen(ziel: Vector2i) -> void:
|
|||
var tween := create_tween()
|
||||
tween.tween_property(e["node"], "position", _position(e),
|
||||
0.08 * pfad.size())
|
||||
if e["node"].has_method("huepfen"):
|
||||
e["node"].call("huepfen", 0.08 * pfad.size())
|
||||
await tween.finished
|
||||
_ui_aktualisieren()
|
||||
_marker_neu()
|
||||
|
|
@ -1249,6 +1251,10 @@ func _angriff(angreifer_idx: int, ziel_idx: int) -> void:
|
|||
if abstand * 2 > reichweite:
|
||||
malus = -2
|
||||
var furcht := -2 if _hat_zustand(a, "flucht") else 0
|
||||
# Ausfall in Richtung Ziel, egal ob Treffer oder nicht.
|
||||
var richtung: Vector2 = z["node"].position - a["node"].position
|
||||
if a["node"].has_method("stoss"):
|
||||
a["node"].call("stoss", richtung)
|
||||
var aw := KAMPF_REGELN.angriff(int(a["bonus"]) + _bonus(a, "attack")
|
||||
+ _rudel_bonus(a, z) + furcht + malus, rk)
|
||||
if not bool(aw["treffer"]):
|
||||
|
|
@ -1463,6 +1469,8 @@ func _monster_zug() -> void:
|
|||
var tween := create_tween()
|
||||
tween.tween_property(e["node"], "position", _position(e),
|
||||
0.08 * pfad.size())
|
||||
if e["node"].has_method("huepfen"):
|
||||
e["node"].call("huepfen", 0.08 * pfad.size())
|
||||
await tween.finished
|
||||
_log("%s bewegt sich." % e["name"])
|
||||
if KAMPF_REGELN.abstand(e, p) <= 1 and _nicht_vorbei():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue