Explorar el Código

土豆使用 0.1s 作为显示间隙,会有苦力怕爆炸

LTCatt hace 6 años
padre
commit
2805125e9c

+ 0 - 0
data/lib/functions/sounds/ding.mcfunction → data/lib/functions/sounds/hit.mcfunction


+ 1 - 0
data/ltw/functions/init.mcfunction

@@ -10,6 +10,7 @@ gamerule doMobSpawning false
 gamerule keepInventory true
 gamerule doWeatherCycle false
 gamerule doImmediateRespawn true
+gamerule mobGriefing false
 
 # 记分板
 scoreboard objectives remove mem

+ 1 - 1
data/mini/functions/colormatch/player_failed.mcfunction → data/mini/functions/colormatch/player_lose_heart.mcfunction

@@ -1,5 +1,5 @@
 # 告知玩家
-tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":"yellow","bold": false},{"text":" 被掉入了陷阱!","color":"white","bold": false}]
+tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":"yellow","bold": false},{"text":" 掉入了陷阱!","color":"white","bold": false}]
 
 # 失去一颗心
 function mini:main/player_lose_heart

+ 1 - 1
data/mini/functions/colormatch/tick5.mcfunction

@@ -1 +1 @@
-execute as @a[tag=mini_running] at @s if block ~ ~ ~ lava run function mini:colormatch/player_failed
+execute as @a[tag=mini_running] at @s if block ~ ~ ~ lava run function mini:colormatch/player_lose_heart

+ 1 - 1
data/mini/functions/hotpm/game/damage_dealt2.mcfunction

@@ -1,7 +1,7 @@
 # 土豆持有者打到人时执行
 
 tag @s add pm_damage_dealt
-function lib:sounds/ding
+function lib:sounds/hit
 
 # 转移土豆
 function mini:hotpm/game/pm_lost

+ 12 - 8
data/mini/functions/hotpm/game/pm_boom.mcfunction

@@ -1,10 +1,14 @@
-#玩家失败
-function mini:hotpm/game/pm_lost
-# 告知玩家
+# 玩家失败
+
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":"yellow","bold": false},{"text":" 爆炸了!","color":"white","bold": false}]
-#记录位置
-execute at @s run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"]}
-#减少生命
-function mini:hotpm/player_failed
-#选新土豆
+# 玩家失去土豆
+function mini:hotpm/game/pm_lost
+# 特效
+summon minecraft:creeper ~ ~-1 ~ {ignited:1,ExplosionRadius:1,Fuse:0,Invulnerable:1}
+particle minecraft:explosion ~ ~1 ~ 0.4 0.4 0.4 0 5
+# 记录位置
+summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"]}
+# 减少生命
+function mini:hotpm/player_lose_heart
+# 选新土豆
 execute if score $alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] run function mini:hotpm/game/pm_init

+ 2 - 4
data/mini/functions/hotpm/game/pm_get.mcfunction

@@ -1,8 +1,6 @@
 # 玩家获得土豆时执行
 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
+effect clear @s speed
+effect give @s speed 1000000 2 true

+ 3 - 3
data/mini/functions/hotpm/game/pm_init.mcfunction

@@ -7,9 +7,9 @@ tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_ho
 # 强制观战
 execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
 
-# 土豆爆炸时间 = 4 * 存活人数 + 2
-scoreboard players set $countdown mem 2
-execute as @a[tag=mini_running] run scoreboard players add $countdown mem 4
+# 土豆爆炸时间 = 3.5 * 存活人数 + 3(秒)
+scoreboard players set $countdown_fast mem 3
+execute as @a[tag=mini_running] run scoreboard players add $countdown_fast mem 35
 
 # 删除效果云
 kill @s[type=area_effect_cloud,tag=pm_boom]

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

@@ -1,7 +1,6 @@
 # 玩家失去土豆时执行
 tag @s remove pm_hoding
+
 effect clear @s glowing
 effect clear @s speed
-effect clear @s jump_boost
-effect give @s speed 3 1 true
-effect give @s jump_boost 2 1 true
+effect give @s speed 2 3 true

+ 0 - 0
data/mini/functions/hotpm/player_failed.mcfunction → data/mini/functions/hotpm/player_lose_heart.mcfunction


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

@@ -0,0 +1,8 @@
+# 土豆倒计时
+execute if score $countdown_fast mem matches 1.. run title @a actionbar [{"text":"土豆爆炸: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]
+
+# 给持有者播放音效
+execute as @a[tag=pm_hoding] at @s run function lib:sounds/creeper
+
+# 爆炸
+execute if score $countdown_fast mem matches 0 as @a[tag=pm_hoding] run function mini:hotpm/game/pm_boom

+ 0 - 8
data/mini/functions/hotpm/tick20.mcfunction

@@ -1,8 +0,0 @@
-# 土豆倒计时
-execute if score $countdown mem matches 1.. run title @a actionbar [{"text":"土豆爆炸: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]
-
-# 给持有者播放音效
-execute as @a[tag=pm_hoding] at @s run function lib:sounds/creeper
-
-# 爆炸
-execute if score $countdown mem matches 0 as @a[tag=pm_hoding] run function mini:hotpm/game/pm_boom