Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt 6 anni fa
parent
commit
ca29f3648f

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

@@ -24,6 +24,7 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining]
 
 # 设置玩家生命数量
 scoreboard players set @s mini_heart 3
+function mini:main/player_max_health
 
 # 3秒后给予土豆
 execute if entity @s[tag=!watcher,tag=!rejoining] run schedule function mini:hotpm/pm_init_first 3s replace

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

@@ -1,8 +1,10 @@
 #玩家失败
 function mini:hotpm/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"]}
-#去除tag
+#减少生命
 function mini:hotpm/player_failed
 #选新土豆
 execute if score $t_alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] run function mini:hotpm/pm_init

+ 1 - 1
data/mini/functions/hotpm/pm_get.mcfunction

@@ -5,4 +5,4 @@ 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 give @s jump_boost 1000000 2 true

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

@@ -1,11 +1,12 @@
 # 将土豆刷新给离自己最远的人
 execute at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/pm_get
-# 强制观战
-execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
 
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
 
+# 强制观战
+execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
+
 # 土豆爆炸时间 = 5 * (存活人数 + 1)
 scoreboard players set $countdown mem 5
 execute as @a[tag=mini_running] run scoreboard players add $countdown mem 5

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

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

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

@@ -23,5 +23,8 @@ execute as @a[tag=!mini_rank1,tag=!mini_rank2] unless entity @a[tag=mini_rank3]
 # 4
 tag @a[tag=!mini_rank1,tag=!mini_rank2,tag=!mini_rank3,tag=!watcher] add mini_rank4
 
+# 重置玩家血量上限
+execute as @a run attribute @s generic.max_health base set 20
+
 # 进入状态 6
 function ltw:state/6/state_enter