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())
|
||||
|
||||
func _spend_rage(amount: int) -> bool:
|
||||
if is_berserker:
|
||||
return true # Während Berserker kostenlos
|
||||
if current_resource < amount:
|
||||
return false
|
||||
current_resource -= amount
|
||||
|
|
@ -713,21 +715,18 @@ func execute_skill(skill_id: String):
|
|||
if target == null or not is_instance_valid(target):
|
||||
print("Kein Ziel!")
|
||||
return
|
||||
# Wut-Check für Krieger-Skills
|
||||
if skill_id in ["tektonischer_schlag"]:
|
||||
if current_resource < TEKTONISCHER_SCHLAG_RAGE:
|
||||
# Wut-Check für Krieger-Skills (während Berserker gratis)
|
||||
if not is_berserker:
|
||||
if skill_id == "tektonischer_schlag" and current_resource < TEKTONISCHER_SCHLAG_RAGE:
|
||||
print("Zu wenig Wut!")
|
||||
return
|
||||
if skill_id == "blutrausch":
|
||||
if current_resource < BLUTRAUSCH_RAGE:
|
||||
if skill_id == "blutrausch" and current_resource < BLUTRAUSCH_RAGE:
|
||||
print("Zu wenig Wut!")
|
||||
return
|
||||
if skill_id == "wirbelwind":
|
||||
if current_resource < WIRBELWIND_RAGE:
|
||||
if skill_id == "wirbelwind" and current_resource < WIRBELWIND_RAGE:
|
||||
print("Zu wenig Wut!")
|
||||
return
|
||||
if skill_id == "zornfesseln":
|
||||
if current_resource < ZORNFESSELN_RAGE:
|
||||
if skill_id == "zornfesseln" and current_resource < ZORNFESSELN_RAGE:
|
||||
print("Zu wenig Wut!")
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue