Files
tekton/scripts/models/scarcity_model.gd
T

63 lines
1.3 KiB
GDScript

extends RefCounted
class_name ScarcityModel
# ScarcityModel - Data definitions for tile scarcity
# Standard tiles
const TILE_HEART = 7
const TILE_DIAMOND = 8
const TILE_STAR = 9
const TILE_COIN = 10
# Special tiles (Holo)
const TILE_SPEED = 11
const TILE_FREEZE = 12
const TILE_WALL = 13
const TILE_INVISIBLE = 14
const STANDARD_TILES = [
TILE_HEART, TILE_DIAMOND, TILE_STAR, TILE_COIN
]
const SPECIAL_TILES = [
TILE_SPEED, TILE_FREEZE, TILE_WALL, TILE_INVISIBLE
]
# Weights (higher = more common)
const STANDARD_WEIGHT = 100
const SPECIAL_WEIGHT = 5
# Configuration
static var current_mode: String = "Normal"
# Mode Weights (Special Tile Weight)
const WEIGHTS = {
"Normal": 5, # 5% chance relative to 100
"Aggressive": 25, # 25% chance
"Chaos": 50 # 50% chance
}
static func set_mode(mode: String):
if mode in WEIGHTS:
current_mode = mode
static func get_tile_weights() -> Dictionary:
var weights = {}
var special_weight = WEIGHTS.get(current_mode, 5)
# Standard tiles
for tile in STANDARD_TILES:
weights[tile] = STANDARD_WEIGHT
# Special tiles
var mode = LobbyManager.get_game_mode()
var is_restricted = GameMode.is_restricted(mode)
for tile in SPECIAL_TILES:
if is_restricted and tile == TILE_WALL:
continue # Hide Wall Block only in restricted modes
weights[tile] = special_weight
return weights