Jelajahi Sumber

重构土豆计分

HerobrineXia 5 tahun lalu
induk
melakukan
702427914c

+ 0 - 4
data/ltw/functions/main/player_enter.mcfunction

@@ -33,10 +33,6 @@ function lib:bossbar/show
 # TODO: {土豆} 按存活回合数记分(两个炸弹同时爆炸把两个人炸死可以并列)
 # TODO: {TNTRun} 有多人汇报存在严重卡顿,检查是否是场地的粒子造成,或者是游戏中的光照更新、实体、方块变化
 
-# HIM
-# FIXME: {色彩} 钻石刷新不出来,变成了洞
-# FIXME: {交易} 在缓慢旋转视角时能观察到村民前后抽搐
-
 # 010
 # TODO: 升级 1.16.5(不过得先等 OptiFine 更新)
 # TODO: {幻翼} 制作幻翼的成品地图

+ 1 - 0
data/mini/functions/hotpm/game_end.mcfunction

@@ -1,2 +1,3 @@
+execute as @a[team=playing] run scoreboard players operation @s mini_score = @s surviveRound
 # 结束热土豆
 forceload remove 1000 3000 1100 3100

+ 1 - 0
data/mini/functions/hotpm/game_init.mcfunction

@@ -3,6 +3,7 @@ forceload add 1000 3000 1100 3100
 
 scoreboard players set $finish_mode mem 0
 scoreboard players set $survival mem 0
+scoreboard players reset * surviveRound
 
 # 伤害管理
 scoreboard players set $remove_resistance mem 0

+ 2 - 0
data/mini/functions/hotpm/init.mcfunction

@@ -0,0 +1,2 @@
+scoreboard objectives remove surviveRound
+scoreboard objectives add surviveRound dummy "存活轮数"

+ 3 - 0
data/mini/functions/hotpm/tick2.mcfunction

@@ -9,6 +9,9 @@ execute if score $countdown_fast mem matches ..0 run scoreboard players set $cou
 # 爆炸
 execute if score $countdown_fast mem matches 0 if entity @a[tag=pm_holding] run function mini:hotpm/player_lose_heart
 
+# 存活加分
+execute if score $countdown_fast mem matches 0 run scoreboard players add @a[tag=mini_running] surviveRound 1
+
 # 检测土豆
 function mini:hotpm/game/pm_check
 

+ 1 - 0
data/mini/functions/main/init.mcfunction

@@ -1,6 +1,7 @@
 # 初始化
 function mini:tntrun/init
 function mini:parkour/init
+function mini:hotpm/init
 function mini:phantom/init
 function mini:diamond/init
 function mini:koth/init