$scoreboard players operation #time game$(map_id) = .time settings


$scoreboard players set #tick_time game$(map_id) 20

execute as @a[team=blue,distance=..32] at @s run function pctf:logic/player/respawn with storage pctf:map input
execute as @a[team=red,distance=..32] at @s run function pctf:logic/player/respawn with storage pctf:map input

function pctf:create_game_object/flag/spawn_all_flags with storage pctf:map input

function pctf:logic/shop/set_costs

$execute as @e[type=marker,tag=shop_location,scores={map_id=$(map_id)}] at @s run kill @e[tag=end_delete,distance=..8]
$execute as @e[type=marker,tag=shop_location,scores={map_id=$(map_id)}] at @s run function pctf:logic/shop/summon
$execute as @e[type=marker,tag=powerup_location,scores={map_id=$(map_id)}] run scoreboard players set @s generic_timer2 1900
$execute as @e[tag=new] run scoreboard players set @s map_id $(map_id)
execute as @e[tag=new] run tag @s remove new

kill @e[type=item]

scoreboard players set #mod temp 0
execute if score .pvp_version settings matches 1 run scoreboard players set #mod temp 1
execute if score .apocalypse settings matches 1 run scoreboard players set #mod temp 1
execute if score .lucky_blocks settings matches 1 run scoreboard players set #mod temp 1
execute if score .coin_rain settings matches 1 run scoreboard players set #mod temp 1
execute if score .elimination settings matches 1 run scoreboard players set #mod temp 1
execute if score .wizard_battle settings matches 1 run scoreboard players set #mod temp 1

execute if score #mod temp matches 0 run return 0

kill @e[tag=check_proj]

tellraw @a[distance=..250] ["",{"text":"Active Modifiers:","bold":true,"underlined":true,"color":"yellow"},{"text":"\n "}]
execute if score .pvp_version settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- 1.8 Style PvP","color":"green"}]
execute if score .apocalypse settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- Apocalypse","color":"green"}]
execute if score .lucky_blocks settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- Lucky Blocks","color":"green"}]
execute if score .coin_rain settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- Coin Rain","color":"green"}]
execute if score .elimination settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- Elimination","color":"green"}]
execute if score .wizard_battle settings matches 1 run tellraw @a[distance=..250] ["",{"text":"- Wizard Battle","color":"green"}]