Quellcode durchsuchen

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

HerobrineXia vor 5 Jahren
Ursprung
Commit
95def6ed56

+ 1 - 0
data/lib/functions/sounds/music/tick20.mcfunction

@@ -1,5 +1,6 @@
 
 scoreboard players remove @a music_time 1
+stopsound @a[scores={music_time=..0}] music
 
 # lobby (循环)
 execute if score $music_id mem matches 1 run playsound minecraft:music_disc.stal music @a[scores={music_time=..0}] 0 1000000 0 1000000

+ 3 - 3
data/ltw/advancements/parkour/tnt3.json

@@ -10,15 +10,15 @@
       "description": [
         {"text": "从地陷圣坛的最底层返回最顶层\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
-        {"text": "3 绿宝石","color":"white"}
+        {"text": "2 绿宝石","color":"white"}
       ],
-      "frame": "challenge",
+      "frame": "task",
       "show_toast": true,
       "announce_to_chat": true,
       "hidden": false
     },
     "rewards": {
-      "function": "ltw:advancement/bonus_3"
+      "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
       "get_score":{

+ 1 - 1
data/ltw/advancements/story/score1.json

@@ -5,7 +5,7 @@
         "item": "minecraft:paper"
       },
       "title": {
-        "text": "分数猎手      "
+        "text": "两位数的突破  "
       },
       "description": [
         {"text": "在单局游戏中达到 10 分\n", "color":"gray"},

+ 1 - 1
data/ltw/advancements/story/score2.json

@@ -5,7 +5,7 @@
         "item": "minecraft:map"
       },
       "title": {
-        "text": "双六          "
+        "text": "分数猎手      "
       },
       "description": [
         {"text": "在单局游戏中达到 25 分\n", "color":"gray"},

+ 1 - 1
data/ltw/advancements/vs/potato3.json

@@ -5,7 +5,7 @@
         "item": "minecraft:enchanted_golden_apple"
       },
       "title": {
-        "text": "苹果炸弹      "
+        "text": "君临天下      "
       },
       "description": [
         {"text": "在炸弹狂魔中获胜, 且剩余 5 心或更多的生命值\n", "color":"gray"},

+ 0 - 1
data/ltw/functions/clock/tick20.mcfunction

@@ -4,7 +4,6 @@ schedule function ltw:clock/tick20 20t replace
 # 调用其他模块
 function item:tick20
 function lib:bossbar/tick20
-execute if score $state mem matches 0 run function ltw:state/0/tick20
 execute if score $state mem matches 3 run function ltw:state/3/tick20
 execute if score $state mem matches 4 run function ltw:state/4/tick20
 execute if score $state mem matches 5 run function ltw:state/5/tick20

+ 1 - 5
data/ltw/functions/main/player_enter.mcfunction

@@ -24,9 +24,5 @@ function lib:bossbar/show
 # TODO: https://shimo.im/docs/8dQtWhYp8rJhRRWG
 # FIXME: <! 重要> [010] 已确认确实可以用钓鱼竿获得两个奖励
 # TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)
-# FIXME: 旁观者在一轮开始时会被切换为冒险模式又切回去,这会造成游戏模式变更提示,鬼知道为啥
-# FIXME: <! 重要> [010] 如果有人没领取奖励,可以一直站在上面,在奖励领取阶段结束时再拿到一次
-# FIXME: 准备倒计时与 Tooltip 降低不一致
-# FIXME: 修复 钻石风暴 spreadplayers 无效
 # FIXME: [HIM] 死亡复活后可能会捡到已经在地上待了很久的 “老物品”
-# FIXME: [HIM] <! 重要> 锁定格子的物品会被带进生存小游戏
+# FIXME: <! 重要> [HIM] 锁定格子的物品会被带进其他小游戏

+ 1 - 0
data/ltw/functions/state/0/state_enter.mcfunction

@@ -1,5 +1,6 @@
 # 加载地图
 forceload add -32 -17 31 -80
+kill @e[type=item]
 
 # 要求系统进入状态 0(等待大厅)
 scoreboard players set $state mem 0

+ 0 - 3
data/ltw/functions/state/0/tick20.mcfunction

@@ -1,3 +0,0 @@
-
-# 播放倒计时音效
-execute if score #start_sec mem matches 1..10 run execute as @a at @s run function lib:sounds/hit2

+ 9 - 6
data/ltw/functions/state/0/tick5.mcfunction

@@ -28,20 +28,23 @@ execute if score $count mem matches ..2 if score #start_countdown mem matches ..
 execute if score $count mem matches ..2 if score #start_countdown mem matches ..999 as @a at @s run function lib:sounds/error
 execute if score $count mem matches ..2 if score #start_countdown mem matches ..999 run scoreboard players set #start_countdown mem 9999
 
-# 计算实际时间
+# 播放音效
 scoreboard players remove #start_countdown mem 1
 scoreboard players operation #start_sec mem = #start_countdown mem
 scoreboard players operation #start_sec mem /= #const_4 mem
+scoreboard players operation #start_div mem = #start_countdown mem
+scoreboard players operation #start_div mem %= #const_4 mem
+execute if score #start_sec mem matches 1..10 if score #start_div mem matches 0 run execute as @a at @s run function lib:sounds/hit2
 
 # 20s:提示未准备
-execute if score #start_sec mem matches 20 run tellraw @a[team=watching] [{"text":"","color":"red"},{"text":">> ","bold": true},"你还没有准备, 如果要参加游戏, 请丢出快捷栏最后一格的物品!"]
+execute if score #start_countdown mem matches 80 run tellraw @a[team=watching] [{"text":"","color":"red"},{"text":">> ","bold": true},"你还没有准备, 如果要参加游戏, 请丢出快捷栏最后一格的物品!"]
 
 # 10s:提示玩家数量过多
-execute if score #start_sec mem matches 10 if score $count mem matches 9.. run tellraw @a [{"text":"","color":"gold"},{"text":">> ","bold": true},"已超出游戏最多支持的 8 人人数上限, 将随机抽取 8 人开始游戏!"]
+execute if score #start_countdown mem matches 40 if score $count mem matches 9.. run tellraw @a [{"text":"","color":"gold"},{"text":">> ","bold": true},"已超出游戏最多支持的 8 人人数上限, 将随机抽取 8 人开始游戏!"]
 
 # 0s:开始游戏
-execute if score #start_sec mem matches 0 run function ltw:state/0/start_game
+execute if score #start_countdown mem matches 0 run function ltw:state/0/start_game
 
 # 显示信息
-execute if score #start_sec mem matches 1..99 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
-execute if score #start_sec mem matches 100.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]
+execute if score #start_countdown mem matches 1..99 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
+execute if score #start_countdown mem matches 100.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]

+ 1 - 1
data/ltw/functions/state/7/continue_gameparty.mcfunction

@@ -3,7 +3,7 @@ scoreboard players set $bossbar_type mem 0
 function lib:bossbar/show
 
 # 继续下一轮小游戏
-gamemode adventure @a[team=!debugging]
+gamemode adventure @a[team=playing]
 scoreboard players add $round mem 1
 schedule function ltw:state/3/state_enter 2t replace
 forceload remove 0 1900 50 2000

+ 4 - 4
data/mini/functions/diamond/game/respawn1.mcfunction

@@ -4,12 +4,12 @@ effect clear @s
 effect give @s saturation 1000000 0 true
 effect give @s night_vision 1000000 0 true
 effect give @s haste 1000000 1 true
-effect give @s levitation 6 253
-effect give @s weakness 7 10 true
-effect give @s resistance 7 10 true
+effect give @s slow_falling 4
+effect give @s weakness 5 10 true
+effect give @s resistance 5 10 true
 gamerule naturalRegeneration false
 
 # 传送玩家
-spreadplayers 1016 5016 6 8 under 255 false @s[team=playing,tag=!rejoining]
+tp @s 1016 280 5016
 tag @s add respawning
 schedule function mini:diamond/game/respawn2 1t append

+ 0 - 1
data/mini/functions/diamond/game/respawn2.mcfunction

@@ -1,4 +1,3 @@
-tp @a[tag=respawning] ~ 265 ~
 execute as @e[type=item,tag=death_drop] run function item:disable_throw
 tag @e[type=item,tag=death_drop] remove death_drop
 tag @a remove respawning

+ 2 - 1
data/mini/functions/diamond/game_init3.mcfunction

@@ -17,4 +17,5 @@ execute if score $random mem matches 2 run setblock 1027 254 5029 redstone_block
 execute if score $random mem matches 3 run setblock 1027 254 5028 redstone_block
 execute if score $random mem matches 4 run setblock 1027 254 5027 redstone_block
 
-schedule function mini:diamond/game_init4 1t
+# 清理区域
+fill 1025 255 5031 1029 251 5025 air

+ 0 - 3
data/mini/functions/diamond/game_init4.mcfunction

@@ -1,3 +0,0 @@
-
-# 清理区域
-fill 1025 255 5031 1029 251 5025 air