fix: Berserker — Skills kosten keine Wut während aktiv
- _spend_rage() gibt direkt true zurück wenn is_berserker - Wut-Checks in execute_skill() nur wenn nicht is_berserker Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7ccc0ef8e7
commit
7468a2d5e4
1 changed files with 8 additions and 9 deletions
17
player.gd
17
player.gd
|
|
@ -553,6 +553,8 @@ func _gain_rage(amount: int):
|
||||||
hud.update_resource(current_resource, max_resource, get_resource_name())
|
hud.update_resource(current_resource, max_resource, get_resource_name())
|
||||||
|
|
||||||
func _spend_rage(amount: int) -> bool:
|
func _spend_rage(amount: int) -> bool:
|
||||||
|
if is_berserker:
|
||||||
|
return true # Während Berserker kostenlos
|
||||||
if current_resource < amount:
|
if current_resource < amount:
|
||||||
return false
|
return false
|
||||||
current_resource -= amount
|
current_resource -= amount
|
||||||
|
|
@ -713,21 +715,18 @@ func execute_skill(skill_id: String):
|
||||||
if target == null or not is_instance_valid(target):
|
if target == null or not is_instance_valid(target):
|
||||||
print("Kein Ziel!")
|
print("Kein Ziel!")
|
||||||
return
|
return
|
||||||
# Wut-Check für Krieger-Skills
|
# Wut-Check für Krieger-Skills (während Berserker gratis)
|
||||||
if skill_id in ["tektonischer_schlag"]:
|
if not is_berserker:
|
||||||
if current_resource < TEKTONISCHER_SCHLAG_RAGE:
|
if skill_id == "tektonischer_schlag" and current_resource < TEKTONISCHER_SCHLAG_RAGE:
|
||||||
print("Zu wenig Wut!")
|
print("Zu wenig Wut!")
|
||||||
return
|
return
|
||||||
if skill_id == "blutrausch":
|
if skill_id == "blutrausch" and current_resource < BLUTRAUSCH_RAGE:
|
||||||
if current_resource < BLUTRAUSCH_RAGE:
|
|
||||||
print("Zu wenig Wut!")
|
print("Zu wenig Wut!")
|
||||||
return
|
return
|
||||||
if skill_id == "wirbelwind":
|
if skill_id == "wirbelwind" and current_resource < WIRBELWIND_RAGE:
|
||||||
if current_resource < WIRBELWIND_RAGE:
|
|
||||||
print("Zu wenig Wut!")
|
print("Zu wenig Wut!")
|
||||||
return
|
return
|
||||||
if skill_id == "zornfesseln":
|
if skill_id == "zornfesseln" and current_resource < ZORNFESSELN_RAGE:
|
||||||
if current_resource < ZORNFESSELN_RAGE:
|
|
||||||
print("Zu wenig Wut!")
|
print("Zu wenig Wut!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue