Procházet zdrojové kódy

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

HerobrineXia před 6 roky
rodič
revize
06063a6dcc

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

@@ -28,4 +28,8 @@ execute if score #bonus_add_score mem matches 200 if entity @s[tag=!highest] run
 execute if score #bonus_add_score mem matches 200 run scoreboard players add @s total_score 1
 execute if score #bonus_add_score mem matches 200 run scoreboard players add @s total_score_disp 1
 execute if score #bonus_add_score mem matches 200 run scoreboard players remove @a[tag=highest,limit=1,sort=furthest] total_score 1
-execute if score #bonus_add_score mem matches 200 run scoreboard players remove @a[tag=highest,limit=1,sort=furthest] total_score_disp 1
+execute if score #bonus_add_score mem matches 200 run scoreboard players remove @a[tag=highest,limit=1,sort=furthest] total_score_disp 1
+
+# 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 tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"text": "1 金粒","color":"aqua"}]

+ 11 - 0
data/item/loot_tables/gameparty/last/white.json

@@ -32,6 +32,17 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"极小概率得分 +5\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":5}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 2,
+    "name": "minecraft:gold_nugget",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"金粒 +1\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":300}"
+        }
+    ]
 }
 
 ]}]}

+ 1 - 1
data/item/loot_tables/gameparty/normal/green.json

@@ -18,7 +18,7 @@
 {
     "type": "minecraft:item",
     "weight": 7,
-    "name": "minecraft:gold_ingot",
+    "name": "minecraft:ender_eye",
     "functions": [
         {
             "function": "minecraft:set_nbt",

+ 12 - 1
data/item/loot_tables/gameparty/normal/white.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 72,
+    "weight": 80,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -33,6 +33,17 @@
         }
     ]
 },
+{
+    "type": "minecraft:item",
+    "weight": 8,
+    "name": "minecraft:gold_nugget",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"金粒 +1\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":300}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 8,

+ 2 - 1
data/item/tags/items/bonus.json

@@ -1,6 +1,7 @@
 {
     "values": [
-        "minecraft:gold_ingot",
+        "minecraft:gold_nugget",
+        "minecraft:ender_eye",
         "minecraft:paper",
         "minecraft:target",
         "minecraft:emerald",

+ 0 - 4
data/lib/functions/sounds/music/main.mcfunction

@@ -1,4 +0,0 @@
-# 播放主阶段 BGM
-
-function lib:sounds/music/stop
-playsound minecraft:music_disc.strad music @s 0 1000000 0 1000000

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

@@ -3,8 +3,8 @@ execute as @a at @s run function lib:sounds/error
 
 # 由于玩家人数不足,强制结束游戏
 execute store result score #count mem if entity @a[tag=!watcher]
-execute if score $state mem matches 1.. if score $game_type mem matches 1 if score #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 #count mem matches ..1 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
+execute if score $state mem matches 1.. if score $game_type mem matches 1 if score #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 #count mem matches ..2 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
 
 # 如果携带热土豆的玩家掉线,则重新生成土豆
 execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/player_leave

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

@@ -4,9 +4,9 @@
 execute store result score $count mem if entity @a[tag=hub_ready]
 
 # 判断玩家数量过少
-execute if score $count mem matches ..1 as @a at @s run function lib:sounds/error
-execute if score $count mem matches ..1 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "需要至少 2 人以开始游戏, 当前人数不足!","color":"red"}]
-execute if score $count mem matches ..1 run scoreboard players set $countdown mem 0
+execute if score $count mem matches ..2 as @a at @s run function lib:sounds/error
+execute if score $count mem matches ..2 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "需要至少 3 人以开始游戏, 当前人数不足!","color":"red"}]
+execute if score $count mem matches ..2 run scoreboard players set $countdown mem 0
 
 # 判断玩家数量过多
 execute if score $count mem matches 9.. if score $countdown mem matches 10 run tellraw @a [{"text":"","color":"gold"},{"text":">> ","bold": true},"游戏最多支持 8 人, 当前已有 ",{"score": { "name": "$count","objective": "mem"}}, " 人, 将随机抽取 8 人开始游戏!"]

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

@@ -4,7 +4,7 @@ tellraw @s ["",{"text":"\n >> 猪海寻路 >>\n\n","color":"gold","bold":true},"
 tellraw @s ["",{"text": " <死亡淘汰制> ","color":"red","bold": true}, {"text":"生命无法自然恢复, 被猪灵杀死时即被淘汰。","color":"gray"}]
 tellraw @s ["",{"text": " <PVE> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家, 但可以杀死猪灵。","color":"gray"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"将会随着时间推移生成 2 个白色道具。","color":"gray"}]
-tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
+tellraw @s ["",{"text": " <即将移除> ","color":"dark_red","bold": true}, {"text":"这个小游戏将在不久后被移除。","color":"dark_red"}]
 tellraw @s ""
 
 effect give @s night_vision 1000000 0 true