Просмотр исходного кода

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

HerobrineXia 5 лет назад
Родитель
Сommit
afdd979ee5

+ 11 - 3
data/mini/functions/trade/game/announce_upgrade.mcfunction

@@ -1,5 +1,13 @@
 tag @s add self
-tellraw @a[tag=!self] ["",{"text":">> ","color":"green","bold":true},{"selector":"@s"},"的村民升到了",{"nbt":"VillagerData.level","entity":"@e[type=villager,limit=1,tag=upgradeVillager]","color":"green"},{"text":"级","color":"green"}]
-tellraw @s ["",{"text":">> ","color":"green","bold":true},"你的村民升到了",{"nbt":"VillagerData.level","entity":"@e[type=villager,limit=1,tag=upgradeVillager]","color":"green"},{"text":"级","color":"green"}]
-execute at @s run playsound minecraft:entity.player.levelup player @a 0 1000000 0 1000000
+
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:3}}] run tellraw @a[tag=!self] ["",{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"gold"}," 的村民到达了 ",{"text":"老手级","color":"gold"}]
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:4}}] run tellraw @a[tag=!self] ["",{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"gold"}," 的村民到达了 ",{"text":"专家级","color":"gold"}]
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:5}}] run tellraw @a[tag=!self] ["",{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"gold"}," 的村民到达了 ",{"text":"大师级","color":"gold"}]
+execute as @a[tag=!self] at @s run function lib:sounds/error
+
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:3}}] run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你的村民到达了 ",{"text":"老手级","color":"green"}]
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:4}}] run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你的村民到达了 ",{"text":"专家级","color":"green"}]
+execute if entity @e[type=villager,limit=1,tag=upgradeVillager,nbt={VillagerData:{level:5}}] run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你的村民到达了 ",{"text":"大师级","color":"green"}]
+execute at @s run function lib:sounds/levelup
+
 tag @s remove self

+ 5 - 0
data/mini/functions/trade/tick20.mcfunction

@@ -25,3 +25,8 @@ execute as @a[scores={temp2=1..}] run scoreboard players operation @s total_scor
 execute as @a[scores={temp2=1..}] run scoreboard players operation @s total_score_disp += @s temp2
 execute as @a[scores={temp2=1..}] run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 从交易中获得了 ",{"score": {"name":"@s","objective": "temp2"},"color":"aqua"},{"text": " 分","color":"aqua"},", 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 分"]
 clear @a[team=playing] nether_star
+
+# 60s 提示
+execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text":"游戏将在 ","color": "gold"}, "60 秒 ",{"text": "后结束","color": "gold"}]
+execute if score $countdown mem matches 60 run scoreboard players set $bossbar_color mem 2
+execute if score $countdown mem matches 60 run function lib:bossbar/show