fix(candy-survival): disable special tiles spawning in arena, reward ghost charge every 2 completed missions
This commit is contained in:
@@ -252,6 +252,10 @@ func _process(delta: float) -> void:
|
|||||||
func on_blueprint_completed(pid: int, primary_tile_id: int, off_color: bool) -> void:
|
func on_blueprint_completed(pid: int, primary_tile_id: int, off_color: bool) -> void:
|
||||||
player_blueprints[pid] = player_blueprints.get(pid, 0) + 1
|
player_blueprints[pid] = player_blueprints.get(pid, 0) + 1
|
||||||
|
|
||||||
|
if player_blueprints[pid] % 2 == 0:
|
||||||
|
if multiplayer.is_server():
|
||||||
|
add_ghost_charge(pid)
|
||||||
|
|
||||||
var target_tile_id = primary_tile_id
|
var target_tile_id = primary_tile_id
|
||||||
var player_node: Node = null
|
var player_node: Node = null
|
||||||
if main_scene:
|
if main_scene:
|
||||||
@@ -500,7 +504,7 @@ func setup_mission_tiles() -> void:
|
|||||||
if sticky_cells.has(Vector2i(x, y)):
|
if sticky_cells.has(Vector2i(x, y)):
|
||||||
continue
|
continue
|
||||||
if randf() < 0.6:
|
if randf() < 0.6:
|
||||||
var tile = 14 if randf() < 0.15 else tile_ids[randi() % tile_ids.size()]
|
var tile = tile_ids[randi() % tile_ids.size()]
|
||||||
gridmap.set_cell_item(Vector3i(x, 1, y), tile)
|
gridmap.set_cell_item(Vector3i(x, 1, y), tile)
|
||||||
count += 1
|
count += 1
|
||||||
print("[CandySurvival] Spawned %d mission tiles" % count)
|
print("[CandySurvival] Spawned %d mission tiles" % count)
|
||||||
|
|||||||
Reference in New Issue
Block a user