Selaa lähdekoodia

更新方块效果

HerobrineXia 6 vuotta sitten
vanhempi
sitoutus
1a88175a47

+ 3 - 0
data/mini/functions/main/tick20.mcfunction

@@ -3,5 +3,8 @@
 execute if score $mini_type mem matches 1 run function mini:parkour/tick20
 execute if score $mini_type mem matches 5 run function mini:phantom/tick20
 
+# 特殊方块给予效果
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 1 true
+
 # 结束游戏判定
 function mini:main/check_game_end

+ 4 - 0
data/mini/functions/main/tick5.mcfunction

@@ -5,6 +5,10 @@ execute if score $mini_type mem matches 2 run function mini:tntrun/tick5
 execute if score $mini_type mem matches 3 run function mini:hotpm/tick5
 execute if score $mini_type mem matches 5 run function mini:phantom/tick5
 
+# 特殊方块给予效果
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 5 true
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
+
 # 同步生命值
 scoreboard players reset * temp
 scoreboard players set @a[gamemode=!spectator] temp 20