Browse Source

添加倒计时

LTCatt 6 years ago
parent
commit
ad3f2d226c

+ 0 - 1
data/ltw/functions/state/4/player_enter.mcfunction

@@ -6,7 +6,6 @@ title @s actionbar ""
 effect clear @s
 effect give @s saturation 1000000 0 true
 gamerule naturalRegeneration true
-effect give @s night_vision 1000000 0 true
 
 # 显示小游戏介绍
 function mini:main/player_intro

+ 3 - 1
data/mini/functions/colormatch/player_intro.mcfunction

@@ -4,4 +4,6 @@ tellraw @s ["",{"text":"\n >> 陷阱迷阵 >>\n\n","color":"gold","bold":true},"
 tellraw @s ["",{"text": " <生命淘汰制> ","color":"red","bold": true}, {"text":"你有 3 条生命, 生命耗尽后即被淘汰。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP 干扰> ","color":"light_purple","bold": true}, {"text":"攻击其他玩家可以造成击退, 但没有伤害。","color":"gray"}]
 tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
-tellraw @s ""
+tellraw @s ""
+
+effect give @s night_vision 1000000 0 true

+ 3 - 1
data/mini/functions/hotpm/player_intro.mcfunction

@@ -5,4 +5,6 @@ tellraw @s ["",{"text": " <生命淘汰制> ","color":"red","bold": true}, {"tex
 tellraw @s ["",{"text": " <PVP> ","color":"light_purple","bold": true}, {"text":"攻击其他玩家可以转移土豆, 远程伤害同样有效。","color":"gray"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 2 个白色道具。","color":"gray"}]
 tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
-tellraw @s ""
+tellraw @s ""
+
+effect give @s night_vision 1000000 0 true

+ 3 - 1
data/mini/functions/parkour/player_intro.mcfunction

@@ -4,4 +4,6 @@ tellraw @s ["",{"text":"\n >> 旅途 >>\n\n","color":"red","bold":true}," 沿途
 tellraw @s ["",{"text": " <完成制> ","color":"red","bold": true}, {"text":"根据完成跑酷的速度快慢决定排名。","color":"gray"}]
 tellraw @s ["",{"text": " <和平环境> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家。","color":"gray"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个蓝色道具与 1 个白色道具。","color":"gray"}]
-tellraw @s ""
+tellraw @s ""
+
+effect give @s night_vision 1000000 0 true

+ 1 - 1
data/mini/functions/phantom/game_start.mcfunction

@@ -1,2 +1,2 @@
 gamerule doDaylightCycle true
-scoreboard players set $countdown mem 100
+scoreboard players set $countdown mem 105

+ 6 - 2
data/mini/functions/phantom/tick20.mcfunction

@@ -1,5 +1,9 @@
+# 显示倒计时
+execute if score $countdown mem matches ..10 run title @a times 3 14 2
+execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
+execute if score $countdown mem matches ..10 run title @a title [""]
 
-# 90s:提示游戏结束
+# -10s:提示游戏结束
 execute if score $countdown mem matches 10 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "太阳即将升起!","color":"aqua"}]
-# 100s:游戏结束
+# 0s:游戏结束
 execute if score $countdown mem matches 0 run function mini:main/game_end

+ 2 - 0
data/mini/functions/tntrun/player_intro.mcfunction

@@ -6,3 +6,5 @@ tellraw @s ["",{"text": " <PVP 干扰> ","color":"light_purple","bold": true}, {
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个白色道具。","color":"gray"}]
 tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
 tellraw @s ""
+
+effect give @s night_vision 1000000 0 true

+ 2 - 0
data/mini/functions/zombie/player_intro.mcfunction

@@ -6,3 +6,5 @@ tellraw @s ["",{"text": " <PVE> ","color":"light_purple","bold": true}, {"text":
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"将会随着时间推移生成 2 个白色道具。","color":"gray"}]
 tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
 tellraw @s ""
+
+effect give @s night_vision 1000000 0 true