瀏覽代碼

生成奖励的测试方法

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

+ 1 - 1
data/ltw/functions/state/6/generate_bonus.mcfunction

@@ -5,7 +5,7 @@ kill @e[type=item]
 kill @e[type=arrow]
 kill @e[type=trident]
 
-# 生成 玩家数+2 个奖励
+# 生成 玩家数+1 个奖励
 execute store result score #bonus_count mem if entity @a[team=playing]
 scoreboard players add #bonus_count mem 1
 execute if score #bonus_count mem matches 1.. positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/random

+ 34 - 0
data/test/functions/bonus/normal.mcfunction

@@ -0,0 +1,34 @@
+# 生成普通奖励物品
+
+# 设置轮数
+scoreboard players set $round mem 1
+
+# 清理残余实体
+kill @e[type=item]
+kill @e[type=arrow]
+kill @e[type=trident]
+
+# 生成奖励
+execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/random
+execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/random
+execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+
+# 生成拾取背景
+execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background
+execute positioned 19.0 10.0 1962.0 run function ltw:state/6/generate_background
+execute positioned 24.0 10.0 1960.0 run function ltw:state/6/generate_background
+execute positioned 29.0 10.0 1962.0 run function ltw:state/6/generate_background
+execute positioned 31.0 10.0 1967.0 run function ltw:state/6/generate_background
+execute positioned 29.0 10.0 1972.0 run function ltw:state/6/generate_background
+execute positioned 24.0 10.0 1974.0 run function ltw:state/6/generate_background
+execute positioned 19.0 10.0 1972.0 run function ltw:state/6/generate_background
+
+# 传送
+tp @a[team=!debugging] 24.5 11.0 1967.5
+
+tellraw @a ["",{"text": ">> ","color": "aqua","bold": true}, {"text": "已生成测试用奖励物品!","color": "aqua"}]

+ 34 - 0
data/test/functions/bonus/score.mcfunction

@@ -0,0 +1,34 @@
+# 生成分数奖励物品
+
+# 设置轮数
+scoreboard players set $round mem 5
+
+# 清理残余实体
+kill @e[type=item]
+kill @e[type=arrow]
+kill @e[type=trident]
+
+# 生成奖励
+execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/random
+execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/random
+execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+
+# 生成拾取背景
+execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background
+execute positioned 19.0 10.0 1962.0 run function ltw:state/6/generate_background
+execute positioned 24.0 10.0 1960.0 run function ltw:state/6/generate_background
+execute positioned 29.0 10.0 1962.0 run function ltw:state/6/generate_background
+execute positioned 31.0 10.0 1967.0 run function ltw:state/6/generate_background
+execute positioned 29.0 10.0 1972.0 run function ltw:state/6/generate_background
+execute positioned 24.0 10.0 1974.0 run function ltw:state/6/generate_background
+execute positioned 19.0 10.0 1972.0 run function ltw:state/6/generate_background
+
+# 传送
+tp @a[team=!debugging] 24.5 11.0 1967.5
+
+tellraw @a ["",{"text": ">> ","color": "aqua","bold": true}, {"text": "已生成测试用奖励分数!","color": "aqua"}]