Преглед на файлове

新的村民交易成就

龙腾猫跃 преди 3 години
родител
ревизия
48bc69a16d
променени са 33 файла, в които са добавени 115 реда и са изтрити 243 реда
  1. 2 7
      data/ltw/advancements/combat/phantom1.json
  2. 2 7
      data/ltw/advancements/combat/phantom2.json
  3. 2 2
      data/ltw/advancements/parkour/tnt1.json
  4. 2 2
      data/ltw/advancements/parkour/tnt2.json
  5. 2 7
      data/ltw/advancements/parkour/tnt3.json
  6. 2 7
      data/ltw/advancements/parkour/treasure1.json
  7. 2 7
      data/ltw/advancements/parkour/treasure2.json
  8. 2 7
      data/ltw/advancements/parkour/treasure3.json
  9. 2 7
      data/ltw/advancements/parkour/treasure4.json
  10. 2 7
      data/ltw/advancements/story/score1.json
  11. 2 7
      data/ltw/advancements/story/score2.json
  12. 2 7
      data/ltw/advancements/story/score3.json
  13. 2 7
      data/ltw/advancements/story/win1.json
  14. 2 7
      data/ltw/advancements/story/win2.json
  15. 2 7
      data/ltw/advancements/story/win3.json
  16. 2 7
      data/ltw/advancements/story/win4.json
  17. 2 7
      data/ltw/advancements/vs/colormatch1.json
  18. 2 7
      data/ltw/advancements/vs/colormatch2.json
  19. 2 7
      data/ltw/advancements/vs/colormatch3.json
  20. 4 9
      data/ltw/advancements/vs/emerald1.json
  21. 5 10
      data/ltw/advancements/vs/emerald2.json
  22. 6 13
      data/ltw/advancements/vs/emerald3.json
  23. 2 7
      data/ltw/advancements/vs/potato1.json
  24. 2 7
      data/ltw/advancements/vs/potato2.json
  25. 2 7
      data/ltw/advancements/vs/potato3.json
  26. 6 6
      data/mini/functions/trade/document.txt
  27. 5 0
      data/mini/functions/trade/game/get_score.mcfunction
  28. 18 33
      data/mini/functions/trade/game/remove_trade.mcfunction
  29. 7 6
      data/mini/functions/trade/game/villager_level_up.mcfunction
  30. 0 4
      data/mini/functions/trade/game/villager_try_level_up.mcfunction
  31. 11 9
      data/mini/functions/trade/tick20.mcfunction
  32. 3 3
      data/mini/loot_tables/trade_b.json
  33. 6 6
      data/mini/loot_tables/trade_e.json

+ 2 - 7
data/ltw/advancements/combat/phantom1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/combat/phantom2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 2
data/ltw/advancements/parkour/tnt1.json

@@ -21,13 +21,13 @@
     "function": "ltw:advancement/bonus_1"
   },
   "criteria": {
-    "get_score":{
+    "a":{
         "trigger": "minecraft:impossible"
     }
   },
   "requirements": [
     [
-        "get_score"
+        "a"
     ]
   ]
 }

+ 2 - 2
data/ltw/advancements/parkour/tnt2.json

@@ -21,13 +21,13 @@
     "function": "ltw:advancement/bonus_2"
   },
   "criteria": {
-    "get_score":{
+    "a":{
         "trigger": "minecraft:impossible"
     }
   },
   "requirements": [
     [
-        "get_score"
+        "a"
     ]
   ]
 }

+ 2 - 7
data/ltw/advancements/parkour/tnt3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/parkour/treasure1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/parkour/treasure2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/parkour/treasure3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/parkour/treasure4.json

@@ -18,13 +18,8 @@
       "hidden": true
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/score1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/score2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/score3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/win1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
 }

+ 2 - 7
data/ltw/advancements/story/win2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/win3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/story/win4.json

@@ -17,13 +17,8 @@
       "hidden": true
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/vs/colormatch1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/vs/colormatch2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/vs/colormatch3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 4 - 9
data/ltw/advancements/vs/emerald1.json

@@ -5,10 +5,10 @@
         "item": "minecraft:emerald"
       },
       "title": {
-        "text": "商业鬼才        "
+        "text": " 商业奇迹 · α "
       },
       "description": [
-        {"text": "在贸易专家中获得 8 个绿宝石\n", "color":"gray"},
+        {"text": "【贸易专家】持有 8 个绿宝石\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "1 绿宝石","color":"white"}
       ],
@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 5 - 10
data/ltw/advancements/vs/emerald2.json

@@ -2,13 +2,13 @@
     "parent": "ltw:vs/emerald1",
     "display": {
       "icon": {
-        "item": "minecraft:emerald_block"
+        "item": "minecraft:nether_star"
       },
       "title": {
-        "text": "商业奇迹        "
+        "text": " 商业奇迹 · β "
       },
       "description": [
-        {"text": "在贸易专家中获得 12 个绿宝石\n", "color":"gray"},
+        {"text": "【贸易专家】完成一项获得 2 积分的交易\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "2 绿宝石","color":"white"}
       ],
@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 6 - 13
data/ltw/advancements/vs/emerald3.json

@@ -2,13 +2,13 @@
     "parent": "ltw:vs/emerald2",
     "display": {
       "icon": {
-        "item": "minecraft:obsidian"
+        "item": "minecraft:emerald_block"
       },
       "title": {
-        "text": "冰桶挑战        "
+        "text": " 商业奇迹 · γ "
       },
       "description": [
-        {"text": "挖掘一块黑曜石\n", "color":"gray"},
+        {"text": "【贸易专家】清空整个交易列表\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "3 绿宝石","color":"white"}
       ],
@@ -21,15 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-        "obsidian": {
-          "trigger": "minecraft:inventory_changed",
-          "conditions": {
-            "items": [
-              {
-                "items": ["minecraft:obsidian"]
-              }
-            ]
-          }
-        }
+      "a":{
+          "trigger": "minecraft:impossible"
+      }
     }
   }

+ 2 - 7
data/ltw/advancements/vs/potato1.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_1"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/vs/potato2.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 2 - 7
data/ltw/advancements/vs/potato3.json

@@ -21,13 +21,8 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
+      "a":{
           "trigger": "minecraft:impossible"
       }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+    }
   }

+ 6 - 6
data/mini/functions/trade/document.txt

@@ -10,7 +10,7 @@ a/木
 6沙砾 - 2
 
 b/石
-1石镐 - 1
+1石斧 - 1
 4火把 - 1
 2石头 - 1
 1熔炉 - 1
@@ -43,11 +43,11 @@ e/钻+
 1铁胸甲 - 1
 12藤蔓 - 1
 1熔炉矿车 - 1
-1钻石靴子 - 1
-64石头 - 1积分
-1钻石护腿 - 1积分
-32苔石 - 1积分
-1黑曜石 - 1积分
+1钻石镐 - 1
+64石头 - 2积分
+1钻石护腿 - 2积分
+32苔石 - 2积分
+1黑曜石 - 2积分
 
 s
 1 - 3煤炭块

+ 5 - 0
data/mini/functions/trade/game/get_score.mcfunction

@@ -0,0 +1,5 @@
+scoreboard players operation @s total_score += @s temp2
+scoreboard players operation @s total_score_disp += @s temp2
+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"}}, " 积分"]
+
+advancement grant @s[scores={temp2=2}] only ltw:vs/emerald2

+ 18 - 33
data/mini/functions/trade/game/remove_trade.mcfunction

@@ -1,64 +1,49 @@
+scoreboard players set @s temp2 0
+
 execute store result score @s temp2 run data get entity @s Offers.Recipes[15].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[15].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[15]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[15]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[14].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[14].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[14]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[14]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[13].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[13].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[13]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[13]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[12].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[12].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[12]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[12]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[11].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[11].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[11]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[11]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[10].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[10].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[10]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[10]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[9].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[9].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[9]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[9]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[8].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[8].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[8]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[8]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[7].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[7].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[7]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[7]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[6].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[6].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[6]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[6]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[5].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[5].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[5]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[5]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[4].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[4].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[4]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[4]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[3].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[3].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[3]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[3]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[2].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[2].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[2]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[2]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[1].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[1].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[1]
+data remove entity @s[scores={temp2=1}] Offers.Recipes[1]
 
 execute store result score @s temp2 run data get entity @s Offers.Recipes[0].uses
-execute store result score @s temp run data get entity @s Offers.Recipes[0].maxUses
-execute if score @s temp = @s temp2 run data remove entity @s Offers.Recipes[0]
-
+data remove entity @s[scores={temp2=1}] Offers.Recipes[0]

+ 7 - 6
data/mini/functions/trade/game/villager_level_up.mcfunction

@@ -1,7 +1,8 @@
+execute store result score @s temp run data get entity @s VillagerData.level
 execute store result score @s temp2 run data get entity @s Xp
-execute if entity @s[nbt={VillagerData:{level:4}}] if score @s temp2 matches 250.. run tag @s add upgradeVillager
-execute if entity @s[nbt={VillagerData:{level:4}}] if score @s temp2 matches 250.. run data modify entity @s VillagerData.level set value 5
-execute if entity @s[nbt={VillagerData:{level:3}}] if score @s temp2 matches 150.. run tag @s add upgradeVillager
-execute if entity @s[nbt={VillagerData:{level:3}}] if score @s temp2 matches 150.. run data modify entity @s VillagerData.level set value 4
-execute if entity @s[nbt={VillagerData:{level:2}}] if score @s temp2 matches 70.. run tag @s add upgradeVillager
-execute if entity @s[nbt={VillagerData:{level:2}}] if score @s temp2 matches 70.. run data modify entity @s VillagerData.level set value 3
+execute if score @s temp matches 4 if score @s temp2 matches 250.. run tag @s add upgradeVillager
+execute if score @s temp matches 4 if score @s temp2 matches 250.. run data modify entity @s VillagerData.level set value 5
+execute if score @s temp matches 3 if score @s temp2 matches 150.. run tag @s add upgradeVillager
+execute if score @s temp matches 3 if score @s temp2 matches 150.. run data modify entity @s VillagerData.level set value 4
+execute if score @s temp matches 2 if score @s temp2 matches 70.. run tag @s add upgradeVillager
+execute if score @s temp matches 2 if score @s temp2 matches 70.. run data modify entity @s VillagerData.level set value 3

+ 0 - 4
data/mini/functions/trade/game/villager_update_trade.mcfunction → data/mini/functions/trade/game/villager_try_level_up.mcfunction

@@ -1,6 +1,3 @@
-# 判断空交易
-execute if entity @s[nbt={Offers:{Recipes:[{uses:1,maxUses:1}]}}] run function mini:trade/game/remove_trade
-
 # 判断村民是否升级
 function mini:trade/game/villager_level_up
 
@@ -9,4 +6,3 @@ execute as @a[team=playing] if score @s player_id = @e[type=villager,tag=upgrade
 
 # 判断是否增加交易
 execute if entity @s[tag=upgradeVillager] run function mini:trade/game/villager_new_trade
-

+ 11 - 9
data/mini/functions/trade/tick20.mcfunction

@@ -2,15 +2,18 @@
 # 更新绿宝石数量
 execute as @a[team=playing] store result score @s emerald run clear @s emerald 0
 
-# 刷新交易
-execute as @e[type=villager,tag=TradePlayer] run function mini:trade/game/villager_update_trade
-
 # 显示倒计时
 execute if score $countdown mem matches ..10 run title @a times 3 14 2
 execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
 execute if score $countdown mem matches ..10 run title @a title [""]
 execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
 
+# 升级
+execute as @e[tag=TradePlayer] run function mini:trade/game/villager_try_level_up
+
+# 移除空交易
+execute as @e[tag=TradePlayer,x=999,y=0,z=4999,dx=500,dy=200,dz=500,nbt={Offers:{Recipes:[{uses:1}]}}] run function mini:trade/game/remove_trade
+
 # 0s:游戏结束
 execute if score $countdown mem matches 0 run function mini:main/game_end
 
@@ -20,11 +23,8 @@ execute if score $foursec mem matches 1 run schedule function mini:trade/game/cl
 
 # 更新下界之星,转换为积分
 scoreboard players reset * temp2
-execute as @a[team=playing] store result score @s temp2 run clear @s nether_star 0
-execute as @a[scores={temp2=1..}] run scoreboard players operation @s total_score += @s temp2
-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
+execute as @a[team=playing] store result score @s temp2 run clear @s nether_star
+execute as @a[scores={temp2=1..}] at @s run function mini:trade/game/get_score
 
 # 60s 提示
 execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text":"游戏将在 ","color": "gold"}, "60 秒 ",{"text": "后结束","color": "gold"}]
@@ -33,4 +33,6 @@ execute if score $countdown mem matches 60 run function lib:bossbar/show
 
 # 给予进度
 execute as @a[team=playing] if score @s emerald matches 8.. run advancement grant @s only ltw:vs/emerald1
-execute as @a[team=playing] if score @s emerald matches 12.. run advancement grant @s only ltw:vs/emerald2
+execute as @e[tag=TradePlayer,tag=!adv3_checked] store success score @s temp run data get entity @s Offers.Recipes[0]
+execute as @a[team=playing] if score @s player_id = @e[tag=TradePlayer,scores={temp=0},tag=!adv3_checked,limit=1] player_id run advancement grant @s only ltw:vs/emerald3
+tag @e[tag=TradePlayer,scores={temp=0},tag=!adv3_checked] add adv3_checked

+ 3 - 3
data/mini/loot_tables/trade_b.json

@@ -9,11 +9,11 @@
     "pools": [{"rolls": 1,"entries": [
         {
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
-                "tag": "{buy:{id:\"stone_pickaxe\",Count:1}}"
+                "tag": "{buy:{id:\"stone_axe\",Count:1}}"
             }, { "function": "set_nbt",
                 "tag":"{sell:{id:\"emerald\",Count:1}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
-                "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:stone_pickaxe\"}}]}}"
+                "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:stone_axe\"}}]}}"
             }}}]
         },
         {
@@ -45,7 +45,7 @@
         },
         {
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
-                "tag": "{buy:{id:\"coal\",Count:3}}"
+                "tag": "{buy:{id:\"coal\",Count:1}}"
             }, { "function": "set_nbt",
                 "tag":"{sell:{id:\"emerald\",Count:1}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {

+ 6 - 6
data/mini/loot_tables/trade_e.json

@@ -36,18 +36,18 @@
         },
         {
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
-                "tag": "{buy:{id:\"diamond_boots\",Count:1}}"
+                "tag": "{buy:{id:\"diamond_pickaxe\",Count:1}}"
             }, { "function": "set_nbt",
                 "tag":"{sell:{id:\"emerald\",Count:1}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
-                "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:diamond_boots\"}}]}}"
+                "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:diamond_pickaxe\"}}]}}"
             }}}]
         },
         {
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
                 "tag": "{buy:{id:\"stone\",Count:64}}"
             }, { "function": "set_nbt",
-                "tag":"{sell:{id:\"nether_star\",Count:1,tag:{display:{Name:'{\"text\":\"1 积分\",\"color\":\"white\",\"italic\":false}'}}}}"
+                "tag":"{sell:{id:\"nether_star\",Count:2,tag:{display:{Name:'{\"text\":\"2 积分\",\"color\":\"aqua\",\"italic\":false}'}}}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
                 "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:stone\"}}]}}"
             }}}]
@@ -56,7 +56,7 @@
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
                 "tag": "{buy:{id:\"diamond_leggings\",Count:1}}"
             }, { "function": "set_nbt",
-                "tag":"{sell:{id:\"nether_star\",Count:1,tag:{display:{Name:'{\"text\":\"1 积分\",\"color\":\"white\",\"italic\":false}'}}}}"
+                "tag":"{sell:{id:\"nether_star\",Count:2,tag:{display:{Name:'{\"text\":\"2 积分\",\"color\":\"aqua\",\"italic\":false}'}}}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
                 "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:diamond_leggings\"}}]}}"
             }}}]
@@ -65,7 +65,7 @@
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
                 "tag": "{buy:{id:\"mossy_cobblestone\",Count:32}}"
             }, { "function": "set_nbt",
-                "tag":"{sell:{id:\"nether_star\",Count:1,tag:{display:{Name:'{\"text\":\"1 积分\",\"color\":\"white\",\"italic\":false}'}}}}"
+                "tag":"{sell:{id:\"nether_star\",Count:2,tag:{display:{Name:'{\"text\":\"2 积分\",\"color\":\"aqua\",\"italic\":false}'}}}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
                 "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:mossy_cobblestone\"}}]}}"
             }}}]
@@ -74,7 +74,7 @@
             "type": "item", "name": "stone", "functions": [{ "function": "set_nbt",
                 "tag": "{buy:{id:\"obsidian\",Count:1}}"
             }, { "function": "set_nbt",
-                "tag":"{sell:{id:\"nether_star\",Count:1,tag:{display:{Name:'{\"text\":\"1 积分\",\"color\":\"white\",\"italic\":false}'}}}}"
+                "tag":"{sell:{id:\"nether_star\",Count:2,tag:{display:{Name:'{\"text\":\"2 积分\",\"color\":\"aqua\",\"italic\":false}'}}}}"
             }], "conditions": [{ "condition": "inverted", "term": { "condition": "minecraft:entity_properties", "entity": "this", "predicate": {
                 "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:obsidian\"}}]}}"
             }}}]