龙腾猫跃 3 лет назад
Родитель
Сommit
f14c2909f0

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

@@ -4,7 +4,8 @@ execute store result score #bonus_add_score mem run data get storage item:bonus
 # 正常的加分
 execute if score #bonus_add_score mem matches ..10 run scoreboard players operation @s total_score += #bonus_add_score mem
 execute if score #bonus_add_score mem matches ..10 run scoreboard players operation @s total_score_disp += #bonus_add_score mem
-execute if score #bonus_add_score mem matches ..10 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"score": {"name":"#bonus_add_score","objective": "mem"},"color":"aqua"},{"text": " 积分","color":"aqua"},", 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 积分"]
+execute if score #bonus_add_score mem matches ..0 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"selector": "@s","color":"red"}," 没能获得积分……"]
+execute if score #bonus_add_score mem matches 1..10 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"score": {"name":"#bonus_add_score","objective": "mem"},"color":"aqua"},{"text": " 积分","color":"aqua"},", 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 积分"]
 
 # 100:普通硬币 / 101:高级硬币
 scoreboard players set $random_max mem 1

+ 1 - 2
data/item/functions/tick20.mcfunction

@@ -2,5 +2,4 @@
 # 检测容器
 function item:container/check/call
 
-# 物品特效
-execute as @e[tag=item_white] at @s run particle minecraft:electric_spark ~ ~0.3 ~ 0.2 0.2 0.2 0 1 normal
+# 物品特效

+ 3 - 0
data/item/functions/tick5.mcfunction

@@ -0,0 +1,3 @@
+# 物品特效
+execute as @e[tag=item_white] at @s run particle minecraft:electric_spark ~ ~0.3 ~ 0.15 0.15 0.15 0 1 normal
+execute as @e[tag=item_green] at @s run particle minecraft:glow ~ ~0.3 ~ 0.2 0.2 0.2 0 1 normal

+ 7 - 7
data/item/loot_tables/score/blue.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -17,7 +17,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -32,22 +32,22 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
-    "name": "minecraft:gold_nugget",
+    "weight": 7,
+    "name": "minecraft:shulker_shell",
     "functions": [
         {
             "function": "minecraft:set_count",
-            "count": 8
+            "count": 9
         },
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"8 金粒\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_gold\":8}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"4 积分 + 4 金粒\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4,\"bonus_gold\":4}"
         }
     ]
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 5,
     "name": "minecraft:gold_nugget",
     "functions": [
         {

+ 19 - 4
data/item/loot_tables/score/green.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -17,7 +17,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -32,7 +32,22 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 7,
+    "name": "minecraft:shulker_shell",
+    "functions": [
+        {
+            "function": "minecraft:set_count",
+            "count": 2
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"2 积分 + 2 金粒\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":2,\"bonus_gold\":2}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 2,
     "name": "minecraft:gold_nugget",
     "functions": [
         {
@@ -63,7 +78,7 @@
 {
     "type": "minecraft:item",
     "weight": 8,
-    "name": "minecraft:ender_eye",
+    "name": "minecraft:ender_pearl",
     "functions": [
         {
             "function": "minecraft:set_count",

+ 19 - 12
data/item/loot_tables/score/purple.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -17,7 +17,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 10,
+    "weight": 7,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -32,31 +32,38 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
-    "name": "minecraft:gold_nugget",
+    "weight": 7,
+    "name": "minecraft:shulker_shell",
     "functions": [
         {
             "function": "minecraft:set_count",
-            "count": 12
+            "count": 6
         },
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"12 金粒\\\",\\\"color\\\":\\\"gold\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_gold\":12}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"6 积分 + 6 金粒\\\",\\\"color\\\":\\\"gold\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":6,\"bonus_gold\":6}"
         }
     ]
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
-    "name": "minecraft:gold_nugget",
+    "weight": 2,
+    "name": "minecraft:map",
     "functions": [
         {
-            "function": "minecraft:set_count",
-            "count": 14
-        },
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"80% 概率获得 10 积分\\\",\\\"color\\\":\\\"gold\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":0}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 8,
+    "name": "minecraft:map",
+    "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"14 金粒\\\",\\\"color\\\":\\\"gold\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_gold\":14}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"80% 概率获得 10 积分\\\",\\\"color\\\":\\\"gold\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":10}"
         }
     ]
 }

+ 3 - 3
data/ltw/advancements/vs/emerald1.json

@@ -2,13 +2,13 @@
     "parent": "ltw:vs/root",
     "display": {
       "icon": {
-        "item": "minecraft:villager_spawn_egg"
+        "item": "minecraft:emerald"
       },
       "title": {
-        "text": "商业新星        "
+        "text": "商业鬼才        "
       },
       "description": [
-        {"text": "在贸易专家中获得 7 个绿宝石\n", "color":"gray"},
+        {"text": "在贸易专家中获得 8 个绿宝石\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "1 绿宝石","color":"white"}
       ],

+ 3 - 3
data/ltw/advancements/vs/emerald2.json

@@ -2,13 +2,13 @@
     "parent": "ltw:vs/emerald1",
     "display": {
       "icon": {
-        "item": "minecraft:emerald"
+        "item": "minecraft:emerald_block"
       },
       "title": {
-        "text": "商业鬼才        "
+        "text": "商业奇迹        "
       },
       "description": [
-        {"text": "在贸易专家中获得 10 个绿宝石\n", "color":"gray"},
+        {"text": "在贸易专家中获得 12 个绿宝石\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "2 绿宝石","color":"white"}
       ],

+ 14 - 12
data/ltw/advancements/vs/emerald3.json

@@ -2,13 +2,13 @@
     "parent": "ltw:vs/emerald2",
     "display": {
       "icon": {
-        "item": "minecraft:emerald_block"
+        "item": "minecraft:obsidian"
       },
       "title": {
-        "text": "商业奇迹        "
+        "text": "冰桶挑战        "
       },
       "description": [
-        {"text": "在贸易专家中获得 13 个绿宝石\n", "color":"gray"},
+        {"text": "挖掘一块黑曜石\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "3 绿宝石","color":"white"}
       ],
@@ -21,13 +21,15 @@
       "function": "ltw:advancement/bonus_3"
     },
     "criteria": {
-      "get_score":{
-          "trigger": "minecraft:impossible"
-      }
-    },
-    "requirements": [
-      [
-          "get_score"
-      ]
-    ]
+        "obsidian": {
+          "trigger": "minecraft:inventory_changed",
+          "conditions": {
+            "items": [
+              {
+                "items": ["minecraft:obsidian"]
+              }
+            ]
+          }
+        }
+    }
   }

+ 3 - 0
data/ltw/functions/clock/tick5.mcfunction

@@ -5,3 +5,6 @@ schedule function ltw:clock/tick5 5t replace
 execute if score $state mem matches 0 run function ltw:state/0/tick5
 execute if score $state mem matches 5 run function ltw:state/5/tick5
 function ltw:main/tick5
+
+# 调用粒子模块
+function item:tick5

+ 2 - 3
data/mini/functions/trade/tick20.mcfunction

@@ -32,6 +32,5 @@ execute if score $countdown mem matches 60 run scoreboard players set $bossbar_c
 execute if score $countdown mem matches 60 run function lib:bossbar/show
 
 # 给予进度
-execute as @a[team=playing] if score @s emerald matches 7.. run advancement grant @s only ltw:vs/emerald1
-execute as @a[team=playing] if score @s emerald matches 10.. run advancement grant @s only ltw:vs/emerald2
-execute as @a[team=playing] if score @s emerald matches 13.. run advancement grant @s only ltw:vs/emerald3
+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