This commit is contained in:
Marek Lenczewski
2026-04-02 16:02:24 +02:00
parent e76c66eda6
commit 47f4fe3d90
106 changed files with 434 additions and 204 deletions

View File

@@ -24,30 +24,19 @@ Der User kommuniziert auf Deutsch. Code und Variablen auf Englisch. Kommentare n
- **Resources** für Basiswerte (Stats, Abilities), **Stats Autoload** für Laufzeitwerte
## Projektstruktur
- `scenes/` — .tscn Dateien
- `world.tscn` — Hauptszene (100x100m, Taverne, 10 Systeme)
- `player/player.tscn` — Spieler
- `enemy/enemy.tscn` — Gegner
- `enemy/boss.tscn` — Boss
- `portal/portal.tscn` — Portal
- `portal/gate.tscn` — Gate (Teleporter)
- `dungeon/dungeon.tscn` — Dungeon (15x90m, 10 Systeme)
- `hud/hud.tscn` — HUD
- `scripts/systems/` — 10 Systeme (health, shield, damage, ability, cooldown, aggro, enemy_ai, respawn, spawn, buff)
- `scripts/player/` — Spieler-Skripte (player, camera, movement, combat, targeting, role, hud)
- `scripts/enemy/` — Gegner-Skripte (enemy, enemy_movement, boss)
- `scripts/portal/` — Portal + Gate (portal, gate)
- `scripts/dungeon/` — Dungeon-Logik (dungeon_manager)
- `scripts/components/` — Healthbar (healthbar)
- `scripts/abilities/` — Ability-Daten (ability, ability_set)
- `scripts/resources/` — Resource-Klassen (base_stats, player_stats, enemy_stats, boss_stats, portal_stats)
- `scripts/event_bus.gd` — Globale Signals
- `scripts/stats.gd` — Zentrale Entity-Datenhaltung
- `scripts/game_state.gd` — Szene + Position zwischen Szenenwechseln
- `scripts/world/portal_spawner.gd` — Portal-Spawning
- `resources/stats/` — Stats .tres (player_stats, enemy_stats, portal_stats, boss_stats)
- `resources/abilities/` — Ability .tres pro Rolle
- `resources/ability_sets/` — AbilitySet .tres pro Rolle (tank_set, damage_set, healer_set)
- `player/` — Spieler (.tscn + .gd): player, camera, movement, combat, targeting, role
- `enemy/` — Gegner (.tscn + .gd): enemy, enemy_movement, boss
- `portal/` — Portal + Gate (.tscn + .gd): portal, gate
- `dungeon/` — Dungeon (.tscn + .gd): dungeon, dungeon_manager
- `hud/` — HUD (.tscn + .gd): hud
- `world/` — Hauptszene (.tscn + .gd): world, portal_spawner
- `systems/` — 10 Systeme: health, shield, damage, ability, cooldown, aggro, enemy_ai, respawn, spawn, buff
- `autoload/` — EventBus (event_bus), Stats (stats), GameState (game_state)
- `components/` — Shared Components: healthbar
- `resources/stats/` — Stats-Klassen (.gd) + Daten (.tres): base_stats, player_stats, enemy_stats, boss_stats, portal_stats
- `resources/roles/` — Ability/AbilitySet-Klassen (.gd) + pro Rolle (damage, tank, healer):
- `{rolle}/set.tres` — AbilitySet der Rolle
- `{rolle}/abilities/` — Abilities (single, aoe, utility, ult, passive)
## Planungsdokument
`plan.md` enthält die vollständige Projektstruktur: Szenenbaum, Szenen mit Nodes, Skripte, Components, Stats, Aggro-Regeln, Abilities und Events. Dieses Dokument ist die Wahrheit für den Soll-Zustand.

View File

@@ -1,21 +1,21 @@
[gd_scene format=3]
[ext_resource type="PackedScene" path="res://scenes/player/player.tscn" id="player"]
[ext_resource type="PackedScene" path="res://scenes/hud/hud.tscn" id="hud"]
[ext_resource type="PackedScene" path="res://scenes/enemy/enemy.tscn" id="enemy"]
[ext_resource type="PackedScene" path="res://scenes/enemy/boss.tscn" id="boss"]
[ext_resource type="Script" path="res://scripts/dungeon/dungeon_manager.gd" id="dungeon_manager"]
[ext_resource type="PackedScene" path="res://scenes/portal/gate.tscn" id="gate"]
[ext_resource type="Script" path="res://scripts/systems/health_system.gd" id="health_system"]
[ext_resource type="Script" path="res://scripts/systems/shield_system.gd" id="shield_system"]
[ext_resource type="Script" path="res://scripts/systems/damage_system.gd" id="damage_system"]
[ext_resource type="Script" path="res://scripts/systems/ability_system.gd" id="ability_system"]
[ext_resource type="Script" path="res://scripts/systems/cooldown_system.gd" id="cooldown_system"]
[ext_resource type="Script" path="res://scripts/systems/aggro_system.gd" id="aggro_system"]
[ext_resource type="Script" path="res://scripts/systems/enemy_ai_system.gd" id="enemy_ai_system"]
[ext_resource type="Script" path="res://scripts/systems/respawn_system.gd" id="respawn_system"]
[ext_resource type="Script" path="res://scripts/systems/spawn_system.gd" id="spawn_system"]
[ext_resource type="Script" path="res://scripts/systems/buff_system.gd" id="buff_system"]
[ext_resource type="PackedScene" path="res://player/player.tscn" id="player"]
[ext_resource type="PackedScene" path="res://hud/hud.tscn" id="hud"]
[ext_resource type="PackedScene" path="res://enemy/enemy.tscn" id="enemy"]
[ext_resource type="PackedScene" path="res://enemy/boss.tscn" id="boss"]
[ext_resource type="Script" path="res://dungeon/dungeon_manager.gd" id="dungeon_manager"]
[ext_resource type="PackedScene" path="res://portal/gate.tscn" id="gate"]
[ext_resource type="Script" path="res://systems/health_system.gd" id="health_system"]
[ext_resource type="Script" path="res://systems/shield_system.gd" id="shield_system"]
[ext_resource type="Script" path="res://systems/damage_system.gd" id="damage_system"]
[ext_resource type="Script" path="res://systems/ability_system.gd" id="ability_system"]
[ext_resource type="Script" path="res://systems/cooldown_system.gd" id="cooldown_system"]
[ext_resource type="Script" path="res://systems/aggro_system.gd" id="aggro_system"]
[ext_resource type="Script" path="res://systems/enemy_ai_system.gd" id="enemy_ai_system"]
[ext_resource type="Script" path="res://systems/respawn_system.gd" id="respawn_system"]
[ext_resource type="Script" path="res://systems/spawn_system.gd" id="spawn_system"]
[ext_resource type="Script" path="res://systems/buff_system.gd" id="buff_system"]
[sub_resource type="NavigationMesh" id="NavigationMesh_1"]
vertices = PackedVector3Array(-7.0, 0.5, -7.0, -7.0, 0.5, 87.0, 7.0, 0.5, 87.0, 7.0, 0.5, -7.0)
@@ -192,7 +192,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 75)
[node name="ExitGate" parent="." instance=ExtResource("gate")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -4)
target_scene = "res://scenes/world.tscn"
target_scene = "res://world/world.tscn"
is_exit = true
[node name="DungeonManager" type="Node" parent="."]

View File

@@ -13,4 +13,4 @@ func _on_entity_died(entity: Node) -> void:
GameState.returning_from_dungeon = false
GameState.clear()
EventBus.dungeon_cleared.emit()
get_tree().change_scene_to_file("res://scenes/world.tscn")
get_tree().change_scene_to_file("res://world/world.tscn")

View File

@@ -1,4 +1,4 @@
extends "res://scripts/enemy/enemy.gd"
extends "res://enemy/enemy.gd"
func _ready() -> void:
super._ready()

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=6 format=3]
[ext_resource type="Script" path="res://scripts/enemy/boss.gd" id="1"]
[ext_resource type="Script" path="res://scripts/components/healthbar.gd" id="4"]
[ext_resource type="Script" path="res://scripts/enemy/enemy_movement.gd" id="5"]
[ext_resource type="Script" path="res://enemy/boss.gd" id="1"]
[ext_resource type="Script" path="res://components/healthbar.gd" id="4"]
[ext_resource type="Script" path="res://enemy/enemy_movement.gd" id="5"]
[ext_resource type="Resource" path="res://resources/stats/boss_stats.tres" id="8"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=6 format=3]
[ext_resource type="Script" path="res://scripts/enemy/enemy.gd" id="1"]
[ext_resource type="Script" path="res://scripts/components/healthbar.gd" id="4"]
[ext_resource type="Script" path="res://scripts/enemy/enemy_movement.gd" id="5"]
[ext_resource type="Script" path="res://enemy/enemy.gd" id="1"]
[ext_resource type="Script" path="res://components/healthbar.gd" id="4"]
[ext_resource type="Script" path="res://enemy/enemy_movement.gd" id="5"]
[ext_resource type="Resource" path="res://resources/stats/enemy_stats.tres" id="8"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]

189
flow.md Normal file
View File

@@ -0,0 +1,189 @@
# Datenflows
## 1. Kampf-Flow (Schaden)
```
Spieler drückt 1-4 Gegner im ATTACK-State
│ │
combat.gd enemy_ai_system.gd
│ │
▼ ▼
ability_use_requested ──► AbilitySystem ◄── _process (Auto-Attack)
damage_requested(attacker, target, amount)
HealthSystem
├── ShieldSystem.absorb() → Schild reduzieren
│ └── shield_changed / shield_broken
├── damage_dealt ──► AggroSystem (Aggro aufbauen)
├── health_changed ──► Healthbar, HUD, SpawnSystem
└── falls HP=0: entity_died
┌───────────┼───────────┐
▼ ▼ ▼
AggroSystem RespawnSystem SpawnSystem
(Tabelle (Spieler: (Portal:
aufräumen) 3s → Taverne) Daten löschen)
```
## 2. Kampf-Flow (Heilung)
```
Heiler drückt 1/2/4 (is_heal) oder Auto-Attack (aa_is_heal)
AbilitySystem
heal_requested(healer, target, amount)
├──► HealthSystem → HP erhöhen → health_changed → HUD
└──► AggroSystem → 0.5x Aggro auf ALLE Gegner die Heiler kennen
```
## 3. Aggro-Flow
```
damage_dealt ──► AggroSystem._on_damage_dealt()
│ Tank-Rolle → 2x Multiplikator
aggro_tables[enemy][player] += amount
heal_requested ──► AggroSystem._on_heal_requested()
│ 0.5x auf ALLE Gegner mit Heiler in Tabelle
aggro_tables[enemy][healer] += amount * 0.5
enemy_detected ──► AggroSystem._on_enemy_detected()
│ +1 Aggro, State → CHASE
└──► _alert_nearby() → Nachbarn im alert_radius auch aktivieren
_process(delta):
├── Aggro decay: -aggro_decay/s
├── Außerhalb Portal-Radius: exponentieller Decay (+1%·2^sekunden)
├── Innerhalb Portal-Radius: Minimum 1.0 Aggro
└── _update_target(): Höchster Aggro-Wert → enemy.target + State
```
## 4. Portal → Dungeon Flow
```
Portal wird angegriffen
health_changed ──► SpawnSystem
│ └── HP-Schwellen (85/70/55/40/25/10%) → Gegner spawnen
│ └── portal_spawn Signal
Portal HP = 0 → entity_died
portal.gd: _on_entity_died()
├── Mesh → grün (Gate-Look)
├── Gegner mit Portal löschen
└── Gate instanzieren an Portal-Position
└── portal_defeated Signal
Spieler betritt Gate
gate.gd: _on_gate_area_body_entered()
├── GameState.save_player() → Rolle speichern
├── Stats.deregister() → player_cache befüllen
└── change_scene → dungeon.tscn
dungeon_manager.gd _ready()
├── Stats.register() → player_cache wiederherstellen
└── GameState.restore_player() → Rolle setzen
```
## 5. Dungeon → Welt Flow
```
Boss stirbt → entity_died
dungeon_manager.gd: _on_entity_died()
├── 2s warten
├── GameState.dungeon_cleared = true
├── GameState.clear() → Stats.clear_player_cache()
├── dungeon_cleared Signal
└── change_scene → world.tscn
Spieler spawnt bei Taverne (0, 1, -5)
volle HP + Schild (durch clear_player_cache)
Exit-Gate (zurück zur Welt ohne Boss-Kill):
├── GameState.returning_from_dungeon = true
└── change_scene → world.tscn
└── Spieler bei portal_position, Stats aus Cache
```
## 6. Rollen-Flow
```
Spieler drückt ALT+1/2/3
role.gd: set_role()
role_changed(player, role_type)
├──► BuffSystem: Passive-Buffs berechnen
│ ├── buff_damage/buff_heal/buff_shield in Stats setzen
│ ├── max_shield anpassen (Tank-Passive)
│ └── buff_changed + shield_changed Signals
└──► CooldownSystem: Alle Cooldowns zurücksetzen
```
## 7. Cooldown-Flow
```
AbilitySystem führt Ability aus
CooldownSystem.set_cooldown(player, index, cd, gcd)
_process(delta): Alle Timer runterzählen
cooldown_tick(cds, max_cds, gcd_timer) ──► HUD (Ability-Icons updaten)
AbilitySystem fragt vor Ausführung:
├── is_ready(player, index) — Ability-CD abgelaufen?
├── is_gcd_ready(player) — GCD abgelaufen?
└── is_aa_ready(player) — Auto-Attack bereit?
```
## 8. Respawn-Flow
```
entity_died (Spieler)
RespawnSystem._on_entity_died()
├── Mesh/Collision/Input deaktivieren
└── dead_players[player] = 3.0s
_process(delta):
├── Timer runterzählen
├── respawn_tick → HUD (Countdown anzeigen)
└── Timer ≤ 0: _respawn()
├── Position → Taverne (0, 1, -5)
├── HP/Schild auf Max
├── Mesh/Collision/Input reaktivieren
├── health_changed + shield_changed
└── player_respawned
```
## Signalübersicht
| Signal | Sender | Empfänger |
|---|---|---|
| `ability_use_requested` | Combat | AbilitySystem |
| `damage_requested` | AbilitySystem, EnemyAI | HealthSystem |
| `heal_requested` | AbilitySystem | HealthSystem, AggroSystem |
| `damage_dealt` | HealthSystem | AggroSystem, Targeting |
| `health_changed` | HealthSystem, RespawnSystem | SpawnSystem, Healthbar, HUD |
| `shield_changed` | ShieldSystem, AbilitySystem, BuffSystem, RespawnSystem | Healthbar, HUD |
| `entity_died` | HealthSystem | AggroSystem, RespawnSystem, SpawnSystem, Targeting, DungeonManager, Portal |
| `role_changed` | Role | BuffSystem, CooldownSystem |
| `enemy_detected` | Enemy (DetectionArea) | AggroSystem |
| `enemy_engaged` | AggroSystem | Targeting |
| `cooldown_tick` | CooldownSystem | HUD |
| `respawn_tick` | RespawnSystem | HUD |
| `dungeon_cleared` | DungeonManager | Gate |
| `portal_defeated` | Portal | — |
| `player_respawned` | RespawnSystem | — |

View File

@@ -1,6 +1,6 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://scripts/player/hud.gd" id="1"]
[ext_resource type="Script" path="res://hud/hud.gd" id="1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ability_active"]
bg_color = Color(0.2, 0.2, 0.2, 0.8)

150
plan.md
View File

@@ -1,92 +1,116 @@
# Projektstruktur
## Ordnerstruktur
```
player/ — Spieler (.tscn + .gd)
enemy/ — Gegner + Boss (.tscn + .gd)
portal/ — Portal + Gate (.tscn + .gd)
dungeon/ — Dungeon (.tscn + .gd)
hud/ — HUD (.tscn + .gd)
world/ — Hauptszene (.tscn + .gd)
systems/ — 10 Gameplay-Systeme (.gd)
autoload/ — EventBus, Stats, GameState (.gd)
components/ — Shared UI: healthbar (.gd)
resources/
stats/ — Stats-Klassen (.gd) + Daten (.tres)
roles/ — Ability/AbilitySet-Klassen (.gd) + Rollen-Daten
damage/ — set.tres + abilities/
tank/ — set.tres + abilities/
healer/ — set.tres + abilities/
```
## Szenenbaum
- Welt
- Systems (HealthSystem, ShieldSystem, RespawnSystem, AbilitySystem, BuffSystem, CooldownSystem, DamageSystem, AggroSystem, EnemyAISystem, SpawnSystem)
- Systems (10 Systeme als Child-Nodes)
- Taverne
- Player
- Portale (dynamisch)
- Gegner
- HUD
## Architektur
- Entities (Stats) mit einer Resource - Model mit DB-Tabelle
- Systeme (Healthsystem) - Controller mit Service
- Szenen (Dungeon) - Views
- Eventbus (Signals) - Events / Listener
- Entities mit Resourcen werden später zu Model mit DB-Tabelle in Go
- Flow: Szene -> Input -> System -> Output -> Szene
- Resources (stats/, roles/) — Datenmodelle + Basiswerte, werden später zu Go-Structs + DB
- Autoload (Stats) — Laufzeit-Datenhaltung, wird später zu Server-API-Client
- Systeme — Spiellogik, lesen/schreiben über Stats
- Szenen — Views, rendern + Input, kein Gameplay-State
- EventBus — Signale zwischen Szenen und Systemen
- Flow: Szene Input → EventBus → System → Stats → EventBus → Szene
- Szenen kennen sich nicht
- Innerhalb einer Szene: direkter Zugriff auf Geschwister erlaubt
# Autoload
## GameState
- game_state.gd
- Speichert aktuelle Szene und Position
# Stats
- stats.gd
- Speichert aktuelle Attribute aller Entities
- Basiswerte aus BaseStats Resource
## EventBus
- event_bus.gd — Autoload-Singleton, globale Signals
## EventBus (autoload/event_bus.gd)
- Intentionen (Input → System):
- ability_use_requested(player, ability_index) — Spieler will Ability nutzen
- enemy_detected(enemy, player) — Spieler in Detection-Area
- ability_use_requested(player, ability_index)
- enemy_detected(enemy, player)
- Kampf:
- attack_executed(attacker, position, direction, damage) — Angriff wurde ausgeführt
- damage_dealt(attacker, target, damage) — Schaden wurde verteilt
- damage_requested(attacker, target, amount) — Schaden anfordern
- heal_requested(healer, target, amount) — Heilung anfordern
- attack_executed(attacker, position, direction, damage)
- damage_dealt(attacker, target, damage)
- damage_requested(attacker, target, amount)
- heal_requested(healer, target, amount)
- Entity:
- entity_died(entity) — Entity ist gestorben
- health_changed(entity, current, max) — Leben hat sich verändert
- shield_changed(entity, current, max) — Schild hat sich verändert
- shield_broken(entity) — Schild ist auf 0 gefallen
- shield_regenerated(entity) — Schild ist wieder voll
- entity_died(entity)
- health_changed(entity, current, max)
- shield_changed(entity, current, max)
- shield_broken(entity)
- shield_regenerated(entity)
- Spieler:
- target_changed(player, target) — Spieler hat neues Ziel anvisiert
- player_respawned(player) — Spieler ist respawnt
- role_changed(player, role_type) — Spieler hat Rolle gewechselt
- respawn_tick(timer) — Respawn-Countdown Update
- cooldown_tick(cooldowns, max_cooldowns, gcd_timer) — Cooldown-Update für HUD
- target_changed(player, target)
- player_respawned(player)
- role_changed(player, role_type)
- respawn_tick(timer)
- cooldown_tick(cooldowns, max_cooldowns, gcd_timer)
- Buff:
- buff_changed(entity, stat, value) — Buff hat sich verändert
- buff_changed(entity, stat, value)
- Gegner:
- enemy_engaged(enemy, target) — Gegner hat Spieler anvisiert
- enemy_engaged(enemy, target)
- Portal:
- portal_spawn(portal, enemies) — Portal hat Gegner gespawnt
- portal_defeated(portal) — Portal besiegt, wird Gate
- portal_spawn(portal, enemies)
- portal_defeated(portal)
- Dungeon:
- dungeon_cleared() — Boss tot, Dungeon gesäubert
- Reserviert (definiert, noch nicht genutzt):
- dungeon_cleared()
- Reserviert:
- auto_attack_tick, target_requested, combat_state_changed, enemy_state_changed, enemy_target_changed, regeneration_changed
## Stats (autoload/stats.gd)
- Speichert aktuelle Attribute aller Entities
- Basiswerte aus BaseStats Resource
- player_cache für Szenenwechsel
## GameState (autoload/game_state.gd)
- Speichert Rolle + Position zwischen Szenenwechseln
# Resources
## BaseStats
## resources/stats/
### BaseStats (base_stats.gd)
- max_health, health_regen, max_shield, shield_regen_delay, shield_regen_time
## PlayerStats (extends BaseStats)
### PlayerStats (player_stats.gd, extends BaseStats)
- speed, jump_velocity, target_range, combat_timeout, respawn_time, gcd_time, aa_cooldown
## EnemyStats (extends BaseStats)
### EnemyStats (enemy_stats.gd, extends BaseStats)
- speed, attack_range, attack_cooldown, attack_damage, regen_fast, regen_slow, aggro_decay, portal_radius, alert_radius
## BossStats (extends EnemyStats)
## PortalStats (extends BaseStats)
### BossStats (boss_stats.gd, extends EnemyStats)
### PortalStats (portal_stats.gd, extends BaseStats)
- spawn_count, thresholds
## Role
- name, icon, mesh/material
- ability_set (AbilitySet)
## AbilitySet
- abilities (Array[Ability]), aa_damage, aa_range, aa_is_heal
- damage_set.tres → Rolle Damage
- tank_set.tres → Rolle Tank
- healer_set.tres → Rolle Healer
## Ability
## resources/roles/
### Ability (ability.gd)
- ability_name, type, damage, ability_range, cooldown, uses_gcd, aoe_radius, icon, is_heal, passive_stat
- Typen: Single, AOE, Utility, Ult, Passive
## AbilityModifier
### AbilitySet (ability_set.gd)
- abilities (Array[Ability]), aa_damage, aa_range, aa_is_heal
### AbilityModifier (geplant)
- Verändert Ability (Element, Beruf, Prestige)
### Rollen-Ordner (damage/, tank/, healer/)
- set.tres — AbilitySet der Rolle
- abilities/ — 5 Ability .tres pro Rolle (single, aoe, utility, ult, passive)
# Systeme
# Systeme (systems/)
- In jeder Root-Szene instanziert (world.tscn, dungeon.tscn)
- Entities registrieren/deregistrieren sich bei Stats
- Systeme lesen/schreiben über Stats
### HealthSystem (health_system.gd)
- Leben und Lebensregeneration berechnen, Tod bei 0 HP
- Listener: damage_requested, heal_requested
@@ -132,7 +156,7 @@
- Entities registrieren sich bei Stats in _ready(), deregistrieren in _exit_tree()
- Stats cached Spieler-Werte automatisch bei Szenenwechsel (player_cache)
## Welt
## Welt (world/)
- world.tscn — Hauptszene (100x100m)
- Systems (alle 10 Systeme als Child-Nodes)
- NavigationRegion3D
@@ -144,7 +168,7 @@
- HUD (Instanz von hud.tscn)
- PortalSpawner (Node, portal_spawner.gd)
## Spieler
## Spieler (player/)
- player.tscn — CharacterBody3D
- Gruppe (player)
- Kollision (CapsuleShape3D, 1.8m x 0.3m)
@@ -158,7 +182,7 @@
- player.gd — Registriert bei Stats mit PlayerStats Resource, Sichtbarkeit bei Tod/Respawn
- camera.gd — LMB freies Umsehen, RMB Kamera + Laufrichtung
## Gegner
## Gegner (enemy/)
- enemy.tscn — CharacterBody3D
- Gruppe (enemies)
- Kollision (CapsuleShape3D)
@@ -179,12 +203,12 @@
- Ohne Aggro: Gegner kehrt zum Portal zurück, regeneriert
- Bei Spieler-Tod → Aggro auf 0
## Boss
## Boss (enemy/)
- boss.tscn — wie enemy.tscn aber größer (Mesh lila, 1.5x)
- Gruppe (enemies, boss)
- boss.gd — Erbt von enemy.gd, registriert bei Stats mit BossStats Resource
## Portal
## Portal (portal/)
- portal.tscn — StaticBody3D
- Gruppe (portals)
- Kollision (CylinderShape3D)
@@ -195,14 +219,14 @@
- portal.gd — Registriert bei Stats mit PortalStats Resource
- Spawnt Gegner bei HP-Schwellen (→ SpawnSystem)
## Gate
## Gate (portal/)
- gate.tscn — StaticBody3D (keine Kollision)
- Mesh (CylinderMesh, grün, leuchtend)
- GateArea (Area3D, 3m Radius)
- gate.gd — Konfigurierbar: target_scene, is_exit
- Beide Gates bestehen solange Boss lebt, verschwinden bei dungeon_cleared
## Dungeon
## Dungeon (dungeon/)
- dungeon.tscn — Geschlossener Raum (15x90m, Wände, dunkles Licht)
- Systems (alle 10 Systeme, temporär bis Welt parallel läuft)
- NavigationRegion3D
@@ -215,7 +239,7 @@
- DungeonManager (Node, dungeon_manager.gd)
- Eigene Systems bis Welt parallel läuft (geplant: Reparenting)
## HUD
## HUD (hud/)
- hud.tscn — CanvasLayer
- HealthBar (ProgressBar, Label)
- ShieldBar (ProgressBar, Label)
@@ -223,7 +247,7 @@
- AbilityBar (HBoxContainer, RoleIcon + Abilities 1-4 + Passive)
- hud.gd — Reagiert auf Events, liest Werte von Stats
## Abilities (Werte)
# Abilities (Werte)
- Schadens-Klasse:
- AA: 10 Schaden, 10m
- 1 Single: 30 Schaden, 20m Range, 2s CD, GCD

View File

@@ -1,14 +1,14 @@
[gd_scene format=3 uid="uid://cdnkbt1f0db7e"]
[ext_resource type="Script" uid="uid://bfpt2p7uucfyb" path="res://scripts/player/player.gd" id="1"]
[ext_resource type="Script" uid="uid://cohjyjge1kqxb" path="res://scripts/player/camera.gd" id="2"]
[ext_resource type="Script" uid="uid://fg87dh8fbc8" path="res://scripts/player/movement.gd" id="3"]
[ext_resource type="Script" uid="uid://d15til6fsxw5b" path="res://scripts/player/combat.gd" id="4"]
[ext_resource type="Script" uid="uid://b05nkuryipwny" path="res://scripts/player/targeting.gd" id="8"]
[ext_resource type="Script" path="res://scripts/player/role.gd" id="10"]
[ext_resource type="Resource" uid="uid://cgxtn7dfs40bh" path="res://resources/ability_sets/tank_set.tres" id="11"]
[ext_resource type="Resource" uid="uid://beodknb6i1pm4" path="res://resources/ability_sets/damage_set.tres" id="12"]
[ext_resource type="Resource" uid="uid://kcwuhnqy34mj" path="res://resources/ability_sets/healer_set.tres" id="13"]
[ext_resource type="Script" uid="uid://bfpt2p7uucfyb" path="res://player/player.gd" id="1"]
[ext_resource type="Script" uid="uid://cohjyjge1kqxb" path="res://player/camera.gd" id="2"]
[ext_resource type="Script" uid="uid://fg87dh8fbc8" path="res://player/movement.gd" id="3"]
[ext_resource type="Script" uid="uid://d15til6fsxw5b" path="res://player/combat.gd" id="4"]
[ext_resource type="Script" uid="uid://b05nkuryipwny" path="res://player/targeting.gd" id="8"]
[ext_resource type="Script" path="res://player/role.gd" id="10"]
[ext_resource type="Resource" uid="uid://cgxtn7dfs40bh" path="res://resources/roles/tank/set.tres" id="11"]
[ext_resource type="Resource" uid="uid://beodknb6i1pm4" path="res://resources/roles/damage/set.tres" id="12"]
[ext_resource type="Resource" uid="uid://kcwuhnqy34mj" path="res://resources/roles/healer/set.tres" id="13"]
[ext_resource type="Resource" path="res://resources/stats/player_stats.tres" id="14"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]

View File

@@ -1,6 +1,6 @@
extends StaticBody3D
@export var target_scene: String = "res://scenes/dungeon/dungeon.tscn"
@export var target_scene: String = "res://dungeon/dungeon.tscn"
@export var is_exit: bool = false
var active := false

View File

@@ -1,6 +1,6 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://scripts/portal/gate.gd" id="1"]
[ext_resource type="Script" path="res://portal/gate.gd" id="1"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
albedo_color = Color(0.1, 0.9, 0.3, 1)

View File

@@ -2,7 +2,7 @@ extends StaticBody3D
@export var stats: BaseStats
const GATE_SCENE: PackedScene = preload("res://scenes/portal/gate.tscn")
const GATE_SCENE: PackedScene = preload("res://portal/gate.tscn")
func _ready() -> void:
add_to_group("portals")
@@ -15,8 +15,11 @@ func _exit_tree() -> void:
func _on_entity_died(entity: Node) -> void:
if entity != self:
return
if not is_inside_tree():
return
var pos: Vector3 = global_position
var gate: Node3D = GATE_SCENE.instantiate()
gate.global_position = global_position
gate.global_position = pos
get_parent().add_child(gate)
var enemies := get_tree().get_nodes_in_group("enemies")
for enemy in enemies:

View File

@@ -1,7 +1,7 @@
[gd_scene format=3]
[ext_resource type="Script" path="res://scripts/portal/portal.gd" id="1"]
[ext_resource type="Script" path="res://scripts/components/healthbar.gd" id="3"]
[ext_resource type="Script" path="res://portal/portal.gd" id="1"]
[ext_resource type="Script" path="res://components/healthbar.gd" id="3"]
[ext_resource type="Resource" path="res://resources/stats/portal_stats.tres" id="6"]
[sub_resource type="SphereShape3D" id="SphereShape3D_1"]

View File

@@ -11,15 +11,15 @@ config_version=5
[application]
config/name="mmo"
run/main_scene="res://scenes/world.tscn"
run/main_scene="res://world/world.tscn"
config/features=PackedStringArray("4.6", "Forward Plus")
config/icon="res://icon.svg"
[autoload]
EventBus="*res://scripts/event_bus.gd"
Stats="*res://scripts/stats.gd"
GameState="*res://scripts/game_state.gd"
EventBus="*res://autoload/event_bus.gd"
Stats="*res://autoload/stats.gd"
GameState="*res://autoload/game_state.gd"
[dotnet]

View File

@@ -1,16 +0,0 @@
[gd_resource type="Resource" script_class="AbilitySet" format=3 uid="uid://kcwuhnqy34mj"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://scripts/abilities/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1_ability"]
[ext_resource type="Resource" path="res://resources/abilities/healer_single.tres" id="2"]
[ext_resource type="Resource" path="res://resources/abilities/healer_aoe.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/abilities/utility_shield_reset.tres" id="4"]
[ext_resource type="Resource" path="res://resources/abilities/healer_ult.tres" id="5"]
[ext_resource type="Resource" path="res://resources/abilities/healer_passive.tres" id="6"]
[resource]
script = ExtResource("1")
abilities = Array[ExtResource("1_ability")]([ExtResource("2"), ExtResource("3"), ExtResource("4"), ExtResource("5"), ExtResource("6")])
aa_damage = 1.0
aa_range = 20.0
aa_is_heal = true

View File

@@ -1,15 +0,0 @@
[gd_resource type="Resource" script_class="AbilitySet" format=3 uid="uid://cgxtn7dfs40bh"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://scripts/abilities/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1_ability"]
[ext_resource type="Resource" path="res://resources/abilities/tank_single.tres" id="2"]
[ext_resource type="Resource" path="res://resources/abilities/tank_aoe.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/abilities/utility_shield_reset.tres" id="4"]
[ext_resource type="Resource" path="res://resources/abilities/tank_ult.tres" id="5"]
[ext_resource type="Resource" path="res://resources/abilities/tank_passive.tres" id="6"]
[resource]
script = ExtResource("1")
abilities = Array[ExtResource("1_ability")]([ExtResource("2"), ExtResource("3"), ExtResource("4"), ExtResource("5"), ExtResource("6")])
aa_damage = 5.0
aa_range = 3.0

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://bpx3l13iuynfv"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://dadpl32yujwhe"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://dwvc8b3cmce8l"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://s32wvlww2ls2"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://du0hyuuj26ea0"]
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,12 +1,12 @@
[gd_resource type="Resource" script_class="AbilitySet" format=3 uid="uid://beodknb6i1pm4"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://scripts/abilities/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1_ability"]
[ext_resource type="Resource" uid="uid://dwvc8b3cmce8l" path="res://resources/abilities/single_attack.tres" id="2"]
[ext_resource type="Resource" uid="uid://bpx3l13iuynfv" path="res://resources/abilities/aoe_attack.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/abilities/utility_shield_reset.tres" id="4"]
[ext_resource type="Resource" uid="uid://s32wvlww2ls2" path="res://resources/abilities/ult_burst.tres" id="5"]
[ext_resource type="Resource" uid="uid://dadpl32yujwhe" path="res://resources/abilities/passive_damage_boost.tres" id="6"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://resources/roles/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1_ability"]
[ext_resource type="Resource" uid="uid://dwvc8b3cmce8l" path="res://resources/roles/damage/abilities/single.tres" id="2"]
[ext_resource type="Resource" uid="uid://bpx3l13iuynfv" path="res://resources/roles/damage/abilities/aoe.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/roles/damage/abilities/utility.tres" id="4"]
[ext_resource type="Resource" uid="uid://s32wvlww2ls2" path="res://resources/roles/damage/abilities/ult.tres" id="5"]
[ext_resource type="Resource" uid="uid://dadpl32yujwhe" path="res://resources/roles/damage/abilities/passive.tres" id="6"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://m1kgk2uugnex"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://cqw1jy6kqvmnj"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3 uid="uid://d04nu1leyki16"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")
ability_name = "Shield Reset"
type = 2
ability_range = 0.0
cooldown = 5.0
uses_gcd = false
icon = "3"

View File

@@ -0,0 +1,16 @@
[gd_resource type="Resource" script_class="AbilitySet" format=3 uid="uid://kcwuhnqy34mj"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://resources/roles/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1_ability"]
[ext_resource type="Resource" path="res://resources/roles/healer/abilities/single.tres" id="2"]
[ext_resource type="Resource" path="res://resources/roles/healer/abilities/aoe.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/roles/healer/abilities/utility.tres" id="4"]
[ext_resource type="Resource" path="res://resources/roles/healer/abilities/ult.tres" id="5"]
[ext_resource type="Resource" path="res://resources/roles/healer/abilities/passive.tres" id="6"]
[resource]
script = ExtResource("1")
abilities = Array[ExtResource("1_ability")]([ExtResource("2"), ExtResource("3"), ExtResource("4"), ExtResource("5"), ExtResource("6")])
aa_damage = 1.0
aa_range = 20.0
aa_is_heal = true

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://scripts/abilities/ability.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Ability" format=3]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1"]
[resource]
script = ExtResource("1")
ability_name = "Shield Reset"
type = 2
ability_range = 0.0
cooldown = 5.0
uses_gcd = false
icon = "3"

View File

@@ -0,0 +1,15 @@
[gd_resource type="Resource" script_class="AbilitySet" format=3 uid="uid://cgxtn7dfs40bh"]
[ext_resource type="Script" uid="uid://voedgs25cwrb" path="res://resources/roles/ability_set.gd" id="1"]
[ext_resource type="Script" uid="uid://c03xbbf3yhfl3" path="res://resources/roles/ability.gd" id="1_ability"]
[ext_resource type="Resource" path="res://resources/roles/tank/abilities/single.tres" id="2"]
[ext_resource type="Resource" path="res://resources/roles/tank/abilities/aoe.tres" id="3"]
[ext_resource type="Resource" uid="uid://du0hyuuj26ea0" path="res://resources/roles/tank/abilities/utility.tres" id="4"]
[ext_resource type="Resource" path="res://resources/roles/tank/abilities/ult.tres" id="5"]
[ext_resource type="Resource" path="res://resources/roles/tank/abilities/passive.tres" id="6"]
[resource]
script = ExtResource("1")
abilities = Array[ExtResource("1_ability")]([ExtResource("2"), ExtResource("3"), ExtResource("4"), ExtResource("5"), ExtResource("6")])
aa_damage = 5.0
aa_range = 3.0

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="BossStats" load_steps=2 format=3]
[ext_resource type="Script" path="res://scripts/resources/boss_stats.gd" id="1"]
[ext_resource type="Script" path="res://resources/stats/boss_stats.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="EnemyStats" format=3 uid="uid://cj1shmjwf0xeo"]
[ext_resource type="Script" uid="uid://bh2uuuvl30y0x" path="res://scripts/resources/enemy_stats.gd" id="1"]
[ext_resource type="Script" uid="uid://bh2uuuvl30y0x" path="res://resources/stats/enemy_stats.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="PlayerStats" format=3 uid="uid://btd0g0oiulssq"]
[ext_resource type="Script" uid="uid://ypyntbavbsto" path="res://scripts/resources/player_stats.gd" id="1"]
[ext_resource type="Script" uid="uid://ypyntbavbsto" path="res://resources/stats/player_stats.gd" id="1"]
[resource]
script = ExtResource("1")

View File

@@ -1,6 +1,6 @@
[gd_resource type="Resource" script_class="PortalStats" format=3 uid="uid://be2vv5u0jw0yw"]
[ext_resource type="Script" uid="uid://bioid3s5oftxs" path="res://scripts/resources/portal_stats.gd" id="1"]
[ext_resource type="Script" uid="uid://bioid3s5oftxs" path="res://resources/stats/portal_stats.gd" id="1"]
[resource]
script = ExtResource("1")

Some files were not shown because too many files have changed in this diff Show More