Quellcode durchsuchen

修改金苹果提示

LTCatt vor 6 Jahren
Ursprung
Commit
e0c8a93809

+ 3 - 1
data/item/functions/special/clear_effect.mcfunction

@@ -9,4 +9,6 @@ execute if score $t_remove_resistance mem matches 1 run effect clear @a[tag=cons
 
 # 重置tag和分数
 tag @a[tag=consume_apple] remove consume_apple
-scoreboard players reset $t_remove_resistance mem
+scoreboard players reset $t_remove_resistance mem
+
+# TODO : 为小游戏留出重置效果接口

+ 2 - 1
data/item/functions/special/enchanted_apple.mcfunction

@@ -4,9 +4,10 @@ advancement revoke @s only item:special/consume_enchanted_apple
 # 计算生命值
 execute if score $state mem matches 5 if score @s mini_heart matches 1.. run scoreboard players operation @s mini_heart += @s mini_heart
 execute if score $state mem matches 5 if score @s mini_heart matches 1.. run function mini:main/player_max_health
+execute if score $state mem matches 5 if score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 食用了附魔生命果, 生命值加倍!"]
 
 # 归还苹果
-execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run tellraw @s ["",{"text": ">> ","color":"gold","bold": true},"附魔金苹果目前无法使用!"]
+execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run tellraw @s ["",{"text": ">> ","color":"aqua","bold": true},{"text":"你只能在存在生命计数的小游戏中食用生命果!","color":"aqua"}]
 execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run give @s enchanted_golden_apple
 
 # 检测小游戏是否去除特殊效果

+ 2 - 1
data/item/functions/special/golden_apple.mcfunction

@@ -4,9 +4,10 @@ advancement revoke @s only item:special/consume_golden_apple
 # 计算生命值
 execute if score $state mem matches 5 if score @s mini_heart matches 1.. run scoreboard players add @s mini_heart 1
 execute if score $state mem matches 5 if score @s mini_heart matches 1.. run function mini:main/player_max_health
+execute if score $state mem matches 5 if score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 食用了生命果, 生命值 +1!"]
 
 # 归还苹果
-execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run tellraw @s ["",{"text": ">> ","color":"gold","bold": true},"金苹果目前无法使用!"]
+execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run tellraw @s ["",{"text": ">> ","color":"aqua","bold": true},{"text":"你只能在存在生命计数的小游戏中食用生命果!","color":"aqua"}]
 execute if score $state mem matches 5 unless score @s mini_heart matches 1.. run give @s golden_apple
 
 # 检测小游戏是否去除特殊效果

+ 1 - 1
data/item/loot_tables/gameparty/blue.json

@@ -33,7 +33,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"italic\\\":0}\"}}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"italic\\\":0,\\\"Lore\\\":[\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"小游戏中生命值加倍\\\\\\\",\\\\\\\"italic\\\\\\\":0,\\\\\\\"color\\\\\\\":\\\\\\\"gray\\\\\\\"}\\\"]}\"}}"
         }
     ]
 }

+ 18 - 3
data/item/loot_tables/gameparty/white.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 34,
+    "weight": 36,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -40,13 +40,13 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"italic\\\":0}\"}}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"italic\\\":0,\\\"Lore\\\":[\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"小游戏中生命值 +1\\\\\\\",\\\\\\\"italic\\\\\\\":0,\\\\\\\"color\\\\\\\":\\\\\\\"gray\\\\\\\"}\\\"]}\"}}"
         }
     ]
 },
 {
     "type": "minecraft:item",
-    "weight": 4,
+    "weight": 3,
     "name": "minecraft:arrow",
     "functions": [
         {
@@ -59,6 +59,21 @@
         }
     ]
 },
+{
+    "type": "minecraft:item",
+    "weight": 3,
+    "name": "minecraft:bow",
+    "functions": [
+        {
+            "function": "minecraft:set_damage",
+            "damage":{"min": 0.01, "max": 0.02}
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"破损的弓\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_clear_nbt\":1b}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 4,

+ 2 - 2
data/mini/functions/zombie/tick20.mcfunction

@@ -10,9 +10,9 @@ execute if score $countdown mem matches 61.. run effect give @e[tag=mini_mob,lim
 execute if score $countdown mem matches 91.. run effect give @e[tag=mini_mob,limit=1,sort=random] slowness 2 1
 
 # 召唤猪灵
-execute if score $random mem matches 1..15 if score $countdown mem matches 1.. run function mini:zombie/game/summon_empty
+execute if score $random mem matches 1..9 if score $countdown mem matches 1.. run function mini:zombie/game/summon_empty
 execute if score $random mem matches 1..15 if score $countdown mem matches ..0 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
-execute if score $random mem matches 1..15 if score $countdown mem matches ..0 unless entity @e[tag=empty_pig] run function mini:zombie/game/summon_equip
+execute if score $random mem matches 1..9 if score $countdown mem matches ..0 unless entity @e[tag=empty_pig] run function mini:zombie/game/summon_equip
 
 # 显示提示
 execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "猪灵摆脱了缓慢的束缚!","color":"red"}]