Przeglądaj źródła

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

LTCatt 6 lat temu
rodzic
commit
dc25c72eed

+ 6 - 2
data/ltw/functions/main/player_leave.mcfunction

@@ -2,8 +2,12 @@
 execute as @a at @s run function lib:sounds/error
 
 execute store result score $t_count mem if entity @a[tag=!watcher]
-execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..2 run function ltw:main/game_end
-execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..2 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
+execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run function ltw:main/game_end
+execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
+
+# 热土豆检测
+execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/game/check_potato
+
 
 # TODO : [LTCat] 优化跑酷,让它更有趣!
 # TODO : [HIM] 将 colormatch 的地图缩小到 20x20

+ 2 - 0
data/mini/functions/hotpm/game/check_potato.mcfunction

@@ -0,0 +1,2 @@
+execute unless entity @a[tag=pm_holding] run tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":" 有人带着土豆跑路了,正在选取新的土豆拥有者!","color":"white","bold":false}]
+execute unless entity @a[tag=pm_holding] run function mini:hotpm/game/pm_init_first

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

@@ -2,7 +2,7 @@
 advancement revoke @s only mini:hotpm/damage_dealt
 
 # 如果是土豆持有者在热土豆游戏中打到人,才执行下一步
-execute as @s[tag=pm_hoding] at @s if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/game/damage_dealt2
+execute as @s[tag=pm_holding] at @s if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/game/damage_dealt2
 
 # 结束伤害判断
 tag @a remove pm_damage_dealt

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

@@ -6,4 +6,4 @@ function lib:sounds/hit
 # 转移土豆
 function mini:hotpm/game/pm_lost
 execute as @p[tag=pm_damage_taken,tag=!pm_damage_dealt] run function mini:hotpm/game/pm_get
-tellraw @a [{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"yellow","bold":false},{"text":" 将土豆拍在了 ","color":"white","bold":false},{"selector":"@a[tag=pm_hoding]","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},{"selector":"@a[tag=pm_holding]","color":"yellow","bold":false},{"text":" 的脸上!","color":"white","bold":false}]

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

@@ -1,5 +1,5 @@
 # 玩家获得土豆时执行
-tag @s add pm_hoding
+tag @s add pm_holding
 
 function lib:sounds/hit2
 effect give @s glowing 1000000 0 true

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

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

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

@@ -11,7 +11,7 @@ effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 
 # 清理 Tag
-tag @s remove pm_hoding
+tag @s remove pm_holding
 tag @s remove pm_damage_dealt
 tag @s remove pm_damage_taken
 

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

@@ -13,4 +13,4 @@ function mini:main/player_lose_heart
 # 最远的人新土豆
 execute if score $player_alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_init
 # 强制观战
-execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
+execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_holding]

+ 5 - 5
data/mini/functions/hotpm/tick2.mcfunction

@@ -1,8 +1,8 @@
 # 土豆倒计时
-title @a[tag=pm_hoding] actionbar [{"text":"土豆爆炸: ","color":"red","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
-execute as @a[tag=pm_hoding] at @s run title @a[tag=!pm_hoding,distance=..8] actionbar [{"text":"土豆爆炸: ","color":"gold","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
-execute as @a[tag=pm_hoding] at @s run title @a[tag=!pm_hoding,distance=8..17] actionbar [{"text":"土豆爆炸: ","color":"yellow","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
-execute as @a[tag=pm_hoding] at @s run title @a[tag=!pm_hoding,distance=17..] actionbar [{"text":"土豆爆炸: ","color":"green","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
+title @a[tag=pm_holding] actionbar [{"text":"土豆爆炸: ","color":"red","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
+execute as @a[tag=pm_holding] at @s run title @a[tag=!pm_holding,distance=..8] actionbar [{"text":"土豆爆炸: ","color":"gold","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
+execute as @a[tag=pm_holding] at @s run title @a[tag=!pm_holding,distance=8..17] actionbar [{"text":"土豆爆炸: ","color":"yellow","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
+execute as @a[tag=pm_holding] at @s run title @a[tag=!pm_holding,distance=17..] actionbar [{"text":"土豆爆炸: ","color":"green","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
 
 # 爆炸
-execute if score $countdown_fast mem matches 0 as @a[tag=pm_hoding] at @s run function mini:hotpm/player_lose_heart
+execute if score $countdown_fast mem matches 0 as @a[tag=pm_holding] at @s run function mini:hotpm/player_lose_heart

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

@@ -3,4 +3,4 @@ execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ minecraft:barrier run
 execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ minecraft:barrier run function lib:sounds/teleport
 
 # 给持有者播放音效
-execute as @a[tag=pm_hoding] at @s run function lib:sounds/creeper
+execute as @a[tag=pm_holding] at @s run function lib:sounds/creeper