feat: Introduce core game systems for special tile effects, power-up management, player movement, and initial UI screens.

This commit is contained in:
Yogi Wiguna
2026-03-09 17:49:50 +08:00
parent 0fb1397d11
commit aaf246d873
9 changed files with 54 additions and 17 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ const IOS_STORE_URL := "https://apps.apple.com/app/tekton/id123456789"
enum Platform { WINDOWS, LINUX, MACOS, ANDROID, IOS, WEB }
# State
var current_version: String = "1.0.0"
var latest_version: String = "1.0.0"
var current_version: String = "0.9.0"
var latest_version: String = "0.9.0"
var manifest_data: Dictionary = {}
var http_request: HTTPRequest
var download_request: HTTPRequest
+3 -3
View File
@@ -156,10 +156,10 @@ func try_push(target_pos: Vector2i, direction: Vector2i) -> bool:
NotificationManager.send_message(player, "Target is Immune!", NotificationManager.MessageType.WARNING)
return false
# === NEW LOGIC: Only allow push if in ATTACK MODE ===
if not player.get("is_attack_mode"):
# === NEW LOGIC: Only allow push if in ATTACK MODE and NOT GHOST ===
if not player.get("is_attack_mode") or player.get("is_invisible"):
# Standard bumping effect (Visual only)
print("[Move] Push blocked: Not in attack mode (%s trying to push %s)" % [player.name, other_player.name])
print("[Move] Push blocked: Not in attack mode or is Ghost (%s trying to push %s)" % [player.name, other_player.name])
if _can_rpc():
player.rpc("sync_bump", target_pos, true) # Soft bump
elif player.has_method("sync_bump"):
+5 -1
View File
@@ -155,11 +155,15 @@ func use_special_effect() -> bool:
if not can_use_special():
return false
# Restriction: Cannot use attack mode while carrying a Tekton
# Restriction: Cannot use attack mode while carrying a Tekton or in Ghost mode
if player.is_carrying_tekton:
NotificationManager.send_message(player, "Cannot enter Attack Mode while carrying a Tekton!", NotificationManager.MessageType.WARNING)
return false
if player.get("is_invisible"):
NotificationManager.send_message(player, "Cannot enter Attack Mode while in Ghost mode!", NotificationManager.MessageType.WARNING)
return false
# Enable Attack Mode explicitly
player.is_attack_mode = true
# Do NOT consume boost here. Boost acts as "fuel" for the attacks.
+9 -4
View File
@@ -34,7 +34,7 @@ func get_skill_affected_area(effect: int, center_pos: Vector2i) -> Array[Vector2
match effect:
SpecialEffect.AREA_FREEZE:
# Preview 3 blocks ahead of current hover (if we ever re-enable targeting)
# Preview 2 blocks ahead of current hover (if we ever re-enable targeting)
area.append(center_pos)
SpecialEffect.BLOCK_FLOOR:
@@ -190,6 +190,11 @@ func activate_effect(effect: int, target_player: Node3D = null):
print("PowerUp %s on cooldown." % SpecialEffect.keys()[effect])
return
# Check Attack Mode Restriction
if player.get("is_attack_mode") and effect == SpecialEffect.INVISIBLE_MODE:
NotificationManager.send_message(player, "Cannot enter Ghost mode while in Attack Mode!", NotificationManager.MessageType.WARNING)
return
# Check Carrying Restriction
if player.get("is_carrying_tekton") and effect != SpecialEffect.FASTER_SPEED:
NotificationManager.send_message(player, "Cannot use this power while carrying a Tekton!", NotificationManager.MessageType.WARNING)
@@ -250,9 +255,9 @@ func _execute_area_freeze(target_pos: Vector2i = Vector2i.ZERO):
if center_pos == Vector2i.ZERO:
# Calculate distance ahead based on Level
# Gap of 3 floors = 4 tiles ahead
# Gap of 5 floors = 6 tiles ahead
var distance = 4 if current_lvl < 5 else 6
# Gap of 2 floors = 3 tiles ahead
# Gap of 4 floors = 5 tiles ahead
var distance = 3 if current_lvl < 5 else 5
var movement = player.movement_manager
if movement and movement.current_move_direction != Vector2i.ZERO: