Ver Fonte

跑酷系统更改

LTCatt há 6 anos atrás
pai
commit
4c2766e1f3

+ 1 - 0
data/item/functions/bonus_item/add_score.mcfunction

@@ -36,4 +36,5 @@ execute if score #bonus_add_score mem matches 200 if entity @s[tag=!highest] run
 
 # 300:金粒 +1
 execute if score #bonus_add_score mem matches 300 run scoreboard players add @s gold 1
+execute if score #bonus_add_score mem matches 300 run scoreboard players add @s gold_total 1
 execute if score #bonus_add_score mem matches 300 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 1 金粒"]

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

@@ -9,5 +9,6 @@ execute if score $state mem matches 1.. if score $game_type mem matches 1 if sco
 # 如果携带热土豆的玩家掉线,则重新生成土豆
 execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/player_leave
 
-# FIXME : [010] 物品依然很偶尔给不了 [尝试过5tick改模式]
+# FIXME : [010] 物品依然偶尔给不了 [尝试过5tick改模式]
 # TODO : 摸新的大厅
+# TODO : [LTCat] 跑酷计时结束

+ 0 - 1
data/mini/functions/parkour/game/marker_spawn.mcfunction

@@ -13,7 +13,6 @@ summon armor_stand 1010 10 1033 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b
 summon armor_stand 1010 12 1030 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
 
 summon armor_stand 1010 11 1030 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
-summon armor_stand 1010 11 1033 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
 summon armor_stand 1012 11 1032 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
 summon armor_stand 1009 9 1036 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
 summon armor_stand 1015 10 1035 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}

+ 0 - 14
data/mini/functions/parkour/game/open_the_door.mcfunction

@@ -1,14 +0,0 @@
-# 开门
-# 由踩下灯的玩家执行
-
-fill 1013 23 1057 1013 21 1056 air
-execute as @s[type=player] run tellraw @a ["",{"text": ">> ","color":"green","bold": true},{"selector": "@s","color":"green"}," 打开了大门!"]
-scoreboard players set $parkour_door mem 1
-execute as @a at @s run function lib:sounds/teleport
-
-summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
-summon minecraft:falling_block 1014 21 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
-summon minecraft:falling_block 1014 22 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
-summon minecraft:falling_block 1014 22 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
-summon minecraft:falling_block 1014 23 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
-summon minecraft:falling_block 1014 23 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}

+ 8 - 4
data/mini/functions/parkour/game_init.mcfunction

@@ -23,11 +23,15 @@ kill @e[type=trident]
 function mini:parkour/game/marker_spawn
 
 # 生成奖励物品
-execute positioned 1004.5 18.5 1043.5 run function item:bonus_item/gameparty/auto/white
-execute positioned 1024.5 30.5 1038.5 run function item:bonus_item/gameparty/auto/blue
+execute positioned 1024.5 30.5 1038.5 run function item:bonus_item/gameparty/auto/green
 
-# 初始化开门变量
-scoreboard players set $parkour_door mem 0
+# 生成传送门实体
+summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 21 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 22 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 22 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 23 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 23 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
 
 # 伤害管理
 scoreboard players set $remove_resistance mem 0

+ 2 - 2
data/mini/functions/parkour/game_start.mcfunction

@@ -1,2 +1,2 @@
-# 强制开门倒计时
-scoreboard players set $countdown mem 80
+# 游戏结束倒计时
+scoreboard players set $countdown mem 200

+ 3 - 3
data/mini/functions/parkour/player_intro.mcfunction

@@ -1,7 +1,7 @@
 # 向单个玩家展示小游戏介绍
 tp @s[tag=!debug] 1010.96 26.83 1032.37 -385.24 16.67
-tellraw @s ["",{"text":"\n >> 旅途 >>\n\n","color":"gold","bold":true}," 沿途前进, 到达终点, 获得胜利!\n"]
-tellraw @s ["",{"text": " <完成制> ","color":"red","bold": true}, {"text":"根据完成跑酷的速度快慢决定排名。","color":"gray"}]
+tellraw @s ["",{"text":"\n >> 遗迹寻宝 >>\n\n","color":"gold","bold":true}," 遗迹中共有 8 处宝藏, 赶在遗迹关闭前尽量收集吧!\n"]
+tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"根据寻得的宝藏数量进行排名。","color":"gray"}]
 tellraw @s ["",{"text": " <和平环境> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家。","color":"gray"}]
-tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个蓝色道具与 1 个白色道具。","color":"gray"}]
+tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个绿色道具。","color":"gray"}]
 tellraw @s ""

+ 1 - 2
data/mini/functions/parkour/tick2.mcfunction

@@ -1,3 +1,2 @@
 # 传送门粒子
-execute if score $parkour_door mem matches 0 run particle reverse_portal 1009 28 1031 1 2 1 0.1 50
-execute if score $parkour_door mem matches 1 run particle portal 1014.5 21.5 1057.0 0 1.5 1 1 15
+particle portal 1014.5 21.5 1057.0 0 1.5 1 1 15

+ 10 - 11
data/mini/functions/parkour/tick20.mcfunction

@@ -2,16 +2,15 @@
 scoreboard players set $random_max mem 3
 scoreboard players set $random_min mem 1
 function lib:random
-execute if score $random mem matches 2 if score $parkour_door mem matches 1 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5
+execute if score $random mem matches 2 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5
 
-# 强制开门:全部到达触发
-function mini:main/update_player_count
-execute store result score #arrived mem if entity @a[x=1014.0,y=20.0,z=1055.0,dx=4,dy=4,dz=4,tag=mini_running,tag=!watcher,scores={mini_score=-10..}]
-scoreboard players operation #not_arrive mem = $player_alive mem
-scoreboard players operation #not_arrive mem -= #arrived mem
-execute if score #not_arrive mem matches 0 if score $parkour_door mem matches 0 run tellraw @a ["",{"text": ">> ","color":"green","bold": true},{"text": "众人合力推开了大门!","color":"green"}]
-execute if score #not_arrive mem matches 0 if score $parkour_door mem matches 0 run function mini:parkour/game/open_the_door
+# 显示倒计时
+execute if score $countdown mem matches ..15 run title @a times 3 14 2
+execute if score $countdown mem matches ..15 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
+execute if score $countdown mem matches ..15 run title @a title [""]
+execute if score $countdown mem matches ..15 as @a at @s run function lib:sounds/hit2
 
-# 强制开门:倒计时 80s 触发
-execute if score $countdown mem matches 0 if score $parkour_door mem matches 0 run tellraw @a ["",{"text": ">> ","color":"green","bold": true},{"text": "一股神秘的力量推开了大门!","color":"green"}]
-execute if score $countdown mem matches 0 if score $parkour_door mem matches 0 run function mini:parkour/game/open_the_door
+# -15s:提示游戏结束
+execute if score $countdown mem matches 15 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "遗迹即将关闭!","color":"aqua"}]
+# 0s:游戏结束
+execute if score $countdown mem matches 0 run function mini:main/game_end

+ 4 - 5
data/mini/functions/parkour/tick5.mcfunction

@@ -1,12 +1,11 @@
-# 玩家获胜判断
-execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] run function mini:parkour/player_finished
+# 回城营火
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run tag @s remove parkour_portal
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run function lib:sounds/teleport
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run tp ~5 ~-4 ~-12
 
 # 掉落方块保持
 execute as @e[type=falling_block,tag=parkour_block] run data modify entity @s Time set value 1
 
-# 开门判断
-execute positioned 1009 28 1031 if score $parkour_door mem matches 0 as @p[tag=mini_running,distance=..4] run function mini:parkour/game/open_the_door
-
 # 标记是否通过传送门
 tag @a[x=1015.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] remove parkour_portal
 tag @a[x=1011.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] add parkour_portal