Przeglądaj źródła

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

夏可文 6 lat temu
rodzic
commit
d42deccfcd

+ 11 - 11
data/ltw/functions/main/game_end.mcfunction

@@ -17,6 +17,16 @@ function ltw:main/get_max_score
 execute as @a[tag=!max_uncounted] if score @s total_score = #score_max mem run tag @s add total_rank3
 tag @a[tag=max_uncounted] remove max_uncounted
 
+# 给予进度
+scoreboard players add @a[tag=!watcher] stat_total 1
+advancement grant @a[scores={stat_total=5..}] only ltw:story/total1
+advancement grant @a[scores={stat_total=20..}] only ltw:story/total2
+advancement grant @a[scores={stat_total=50..}] only ltw:story/total3
+scoreboard players add @a[tag=total_rank1] stat_win 1
+advancement grant @a[scores={stat_win=1..}] only ltw:story/win1
+advancement grant @a[scores={stat_win=5..}] only ltw:story/win2
+advancement grant @a[scores={stat_win=20..}] only ltw:story/win3
+
 # 计算金粒奖励
 scoreboard players set #total_gold mem 0
 execute as @a[tag=!watcher] run scoreboard players add #total_gold mem 400
@@ -45,7 +55,7 @@ execute if score #count mem matches ..2 run scoreboard players set #rank2_gold m
 execute if score #count mem matches ..2 run scoreboard players set #rank3_gold mem 0
 
 # 显示排名
-tellraw @a [" ",{"text":"\n\n\n\n----- 游戏结束 -----\n","color":"green","bold":true}]
+tellraw @a [" ",{"text":"\n----- 游戏结束 -----\n","color":"green","bold":true}]
 tellraw @a [" ",{"text": "第一名 - ","color":"green"},{"selector": "@a[tag=total_rank1]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank1]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
 execute if entity @a[tag=total_rank2] run tellraw @a [" ",{"text": "第二名 - ","color":"green"},{"selector": "@a[tag=total_rank2]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank2]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
 execute if entity @a[tag=total_rank3] run tellraw @a [" ",{"text": "第三名 - ","color":"green"},{"selector": "@a[tag=total_rank3]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank3]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
@@ -66,16 +76,6 @@ execute as @a run scoreboard players operation @s gold += @s temp
 execute as @a run scoreboard players operation @s gold_total += @s temp
 tellraw @a[tag=!watcher] [" ",{"text": "名次奖励: ","color":"gold"},{"score":{"name": "*","objective": "temp"}}," 金粒"]
 
-# 给予进度
-scoreboard players add @a[tag=!watcher] stat_total 1
-advancement grant @a[scores={stat_total=5..}] only ltw:story/total1
-advancement grant @a[scores={stat_total=20..}] only ltw:story/total2
-advancement grant @a[scores={stat_total=50..}] only ltw:story/total3
-scoreboard players add @a[tag=total_rank1] stat_win 1
-advancement grant @a[scores={stat_win=1..}] only ltw:story/win1
-advancement grant @a[scores={stat_win=5..}] only ltw:story/win2
-advancement grant @a[scores={stat_win=20..}] only ltw:story/win3
-
 # 奖励结束
 tellraw @a[tag=!watcher] ""
 

+ 3 - 2
data/ltw/functions/main/player_enter.mcfunction

@@ -24,5 +24,6 @@ function lib:bossbar/show
 
 # FIXME: [010] 在 init 的时候也重置随机数组
 # FIXME: [010] 已确认确实可以用钓鱼竿获得两个奖励
-# FIXME: [LTCat] 旁观者在游戏开局的时候似乎会看到 2 然后 ding
-# TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)
+# FIXME: [LTCat] 在游戏开局的时候可能会看到 2 然后 ding
+# TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)
+# FIXME: 物品可以丢给其他人

+ 1 - 1
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -27,7 +27,7 @@ function lib:bossbar/show
 bossbar set mini:red name "地板消失"
 
 # 给予进度
-execute if score $countdown_max mem matches 10 as @a[tag=!debug,gamemode=adventure] run advancement grant @s only ltw:parkour/colormatch1
+execute if score $color_match_time mem matches 10 as @a[tag=!debug,gamemode=adventure] run advancement grant @s only ltw:parkour/colormatch1
 
 # 更新地板方块
 scoreboard players operation $color_match_current mem = $color_match_floor mem

+ 2 - 2
data/mini/functions/hotpm/tick2.mcfunction

@@ -1,7 +1,7 @@
 
 # 随机时间
-scoreboard players set $random_min mem -5
-scoreboard players set $random_max mem 5
+scoreboard players set $random_min mem -4
+scoreboard players set $random_max mem 4
 function lib:random
 scoreboard players operation $countdown_fast mem += $random mem
 execute if score $countdown_fast mem matches ..0 run scoreboard players set $countdown_fast mem 0

+ 5 - 5
data/mini/functions/main/game_end.mcfunction

@@ -26,11 +26,11 @@ tag @a[tag=max_uncounted] remove max_uncounted
 tag @a[tag=!mini_rank1,tag=!mini_rank2,tag=!mini_rank3,tag=!watcher] add mini_rank4
 
 # 给予进度
-execute if score $mini_type mem matches 2 as @a[tag=mini_rank1] run advancement grant @s only ltw:parkour/tnt1
-execute if score $mini_type mem matches 2 as @a[tag=mini_rank1,scores={layer=3..}] run advancement grant @s only ltw:parkour/tnt2
-execute if score $mini_type mem matches 3 as @a[tag=mini_rank1] run advancement grant @s only ltw:vs/potato1
-execute if score $mini_type mem matches 3 as @a[tag=mini_rank1,scores={mini_heart=3..}] run advancement grant @s only ltw:vs/potato2
-execute if score $mini_type mem matches 4 if score $countdown_max mem matches 10 as @a[tag=mini_rank1] run advancement grant @s only ltw:parkour/colormatch2
+execute if score $mini_type mem matches 2 run advancement grant @a[tag=mini_rank1] only ltw:parkour/tnt1
+execute if score $mini_type mem matches 2 run advancement grant @a[tag=mini_rank1,scores={layer=3..}] only ltw:parkour/tnt2
+execute if score $mini_type mem matches 3 run advancement grant @a[tag=mini_rank1] only ltw:vs/potato1
+execute if score $mini_type mem matches 3 run advancement grant @a[tag=mini_rank1,scores={mini_heart=3..}] only ltw:vs/potato2
+execute if score $mini_type mem matches 4 if score $color_match_time mem matches 10 run advancement grant @a[tag=mini_rank1] only ltw:parkour/colormatch2
 
 # 进入状态 6
 function ltw:state/6/state_enter