瀏覽代碼

再次调整

LTCatt 5 年之前
父節點
當前提交
bb17aa4bc7

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

@@ -135,6 +135,10 @@ team add gold "金色"
 team modify gold color gold
 team modify gold friendlyFire false
 
+# 世界边界
+worldborder warning distance 0
+worldborder set 1000000
+
 # 进度
 advancement revoke @a only lib:damage_dealt
 advancement revoke @a only lib:damage_taken

+ 4 - 1
data/mini/functions/diamond/game_end.mcfunction

@@ -8,4 +8,7 @@ gamerule keepInventory true
 gamerule doTileDrops false
 
 # 计算得分
-execute as @a[team=playing] run scoreboard players operation @s mini_score += @s diamond
+execute as @a[team=playing] run scoreboard players operation @s mini_score += @s diamond
+
+# 世界边界
+worldborder set 1000000

+ 5 - 1
data/mini/functions/diamond/game_start.mcfunction

@@ -9,4 +9,8 @@ scoreboard players set $bossbar_color mem 4
 scoreboard players set $countdown_max mem 240
 scoreboard players set $bossbar_type mem 2
 function lib:bossbar/show
-bossbar set mini:blue name "剩余时间"
+bossbar set mini:blue name "剩余时间"
+
+# 世界边界
+worldborder center 1010.0 5010.0
+worldborder set 17.999

+ 1 - 1
data/mini/functions/diamond/player_death.mcfunction

@@ -2,7 +2,7 @@
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true
-effect give @s haste 1000000 2 true
+effect give @s haste 1000000 1 true
 gamerule naturalRegeneration false
 
 # 复活特效

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

@@ -13,6 +13,7 @@ effect clear @s blindness
 attribute @s generic.max_health base set 20
 
 # 计分板重置
+tag @s remove diamond_got
 scoreboard players reset @s diamond
 scoreboard players set @s[team=playing,tag=!rejoining] diamond 0
 

+ 1 - 1
data/mini/functions/diamond/player_intro.mcfunction

@@ -1,6 +1,6 @@
 # 向单个玩家展示小游戏介绍
 tp @s[team=!debugging] 990.34 245.81 5021.73 2043.85 13.77
-tellraw @s ["",{"text":"\n >> 钻石风暴 >>\n\n","color":"gold","bold":true}," 制作铁镐, 挖取钻石, 然后保住自己的小命!\n"]
+tellraw @s ["",{"text":"\n >> 钻石风暴 >>\n\n","color":"gold","bold":true}," 制作铁镐, 挖取钻石, 然后保住自己的小命!\n 但闪闪发光钻石也会暴露你的位置……\n"]
 tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"太阳落山时游戏即会结束, 然后根据物品栏中的钻石数决定排名。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP> ","color":"light_purple","bold": true}, {"text":"死亡会掉落所有物品, 被击杀后立即复活。","color":"gray"}]
 tellraw @s ["",{"text": " <早期测试> ","color":"dark_red","bold": true}, {"text":"此游戏目前尚在早期测试, 可能非常不稳定!","color":"dark_red"}]

+ 5 - 0
data/mini/functions/diamond/tick5.mcfunction

@@ -1,4 +1,9 @@
 
 # 更新钻石数量
 execute as @a[team=playing] store result score @s diamond run clear @s diamond 0
+effect give @a[scores={diamond=1..}] glowing 2 0 true
 
+# 显示提示
+execute as @a[scores={diamond=1..},tag=!diamond_got] run tellraw @a ["",{"text": ">> ","color":"blue","bold": true},{"selector": "@s","color":"blue"}," 已获得闪闪发光的钻石!"]
+execute as @a[scores={diamond=1..},tag=!diamond_got] as @a[distance=1..] run function lib:sounds/hit
+tag @a[scores={diamond=1..},tag=!diamond_got] add diamond_got