Răsfoiți Sursa

土豆爆炸时间动态改变

LTCatt 6 ani în urmă
părinte
comite
5ff77df34b

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

@@ -1,6 +1,8 @@
 # 玩家获得土豆时执行
 tag @s add pm_hoding
 
+effect clear @s speed
+effect clear @s jump_boost
 effect give @s glowing 1000000 0 true
 effect give @s speed 1000000 1 true
 effect give @s jump_boost 1000000 2 true

+ 6 - 5
data/mini/functions/hotpm/pm_init.mcfunction

@@ -1,11 +1,12 @@
-#清理残余tag
+# 清理残余tag
 tag @a[tag=pm_hoding] remove pm_hoding
 
-#刷新土豆
+# 刷新土豆
 execute as @r[tag=mini_running] run function mini:hotpm/pm_get
 
-#告知玩家
+# 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
 
-#初始土豆计分(土豆爆炸时间)
-scoreboard players set $countdown mem 30
+# 土豆爆炸时间 = 5 * (存活人数 + 1)
+scoreboard players set $countdown mem 5
+execute as @a[tag=mini_running] run scoreboard players add $countdown mem 5

+ 2 - 2
data/mini/functions/hotpm/pm_lost.mcfunction

@@ -4,5 +4,5 @@ tag @s remove pm_hoding
 effect clear @s glowing
 effect clear @s speed
 effect clear @s jump_boost
-effect give @s speed 2 1 true
-effect give @s jump_boost 2 2 true
+effect give @s speed 3 1 true
+effect give @s jump_boost 2 1 true