Kaynağa Gözat

TNT Run 会生成奖励物品了

LTCatt 6 yıl önce
ebeveyn
işleme
ab214c09b6

+ 1 - 1
data/item/functions/bonus_item/rank/blue.mcfunction

@@ -1,6 +1,6 @@
 # 生成蓝色品质的物品实体
 
-loot spawn ~ ~ ~ loot item:gameparty/ranks/blue
+loot spawn ~ ~ ~ loot item:gameparty/blue
 summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
 data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
 kill @e[limit=1,type=item,sort=nearest,tag=!new_item]

+ 1 - 1
data/item/functions/bonus_item/rank/green.mcfunction

@@ -1,6 +1,6 @@
 # 生成绿色品质的物品实体
 
-loot spawn ~ ~ ~ loot item:gameparty/ranks/green
+loot spawn ~ ~ ~ loot item:gameparty/green
 summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
 data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
 kill @e[limit=1,type=item,sort=nearest,tag=!new_item]

+ 1 - 1
data/item/functions/bonus_item/rank/purple.mcfunction

@@ -1,6 +1,6 @@
 # 生成紫色品质的物品实体
 
-loot spawn ~ ~ ~ loot item:gameparty/ranks/purple
+loot spawn ~ ~ ~ loot item:gameparty/purple
 summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
 data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
 kill @e[limit=1,type=item,sort=nearest,tag=!new_item]

+ 1 - 1
data/item/functions/bonus_item/rank/white.mcfunction

@@ -1,6 +1,6 @@
 # 生成白色品质的物品实体
 
-loot spawn ~ ~ ~ loot item:gameparty/ranks/white
+loot spawn ~ ~ ~ loot item:gameparty/white
 summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
 data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
 kill @e[limit=1,type=item,sort=nearest,tag=!new_item]

+ 0 - 0
data/item/loot_tables/gameparty/ranks/blue.json → data/item/loot_tables/gameparty/blue.json


+ 16 - 1
data/item/loot_tables/gameparty/ranks/green.json → data/item/loot_tables/gameparty/green.json

@@ -2,7 +2,22 @@
 
 {
     "type": "minecraft:item",
-    "weight": 24,
+    "weight": 12,
+    "name": "minecraft:nether_star",
+    "functions": [
+        {
+            "function": "minecraft:set_count",
+            "count": 2
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +2\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":2}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 12,
     "name": "minecraft:nether_star",
     "functions": [
         {

+ 0 - 0
data/item/loot_tables/gameparty/ranks/purple.json → data/item/loot_tables/gameparty/purple.json


+ 0 - 0
data/item/loot_tables/gameparty/ranks/white.json → data/item/loot_tables/gameparty/white.json


+ 4 - 0
data/mini/functions/tntrun/game_init.mcfunction

@@ -9,6 +9,10 @@ setblock 1000 11 2000 minecraft:redstone_block
 
 # 清理残余实体
 kill @e[tag=tntrun_block]
+kill @e[type=item]
+
+# 生成奖励
+execute positioned 1011.5 15.5 2011.5 run function item:bonus_item/rank/green
 
 # 伤害管理
 team modify player friendlyFire true

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

@@ -10,16 +10,16 @@ function lib:random
 execute if score $random mem matches 40.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
 
 # 赋予随机效果
-effect give @e[limit=1,sort=random] speed 1 1
-effect give @e[limit=1,sort=random] speed 4
-effect give @e[type=zombie,limit=1,sort=random] slowness 4
-effect give @e[type=zombie,limit=1,sort=random] slowness 2 1
+effect give @e[type=!player,limit=1,sort=random] speed 1 1
+effect give @e[type=!player,limit=1,sort=random] speed 4
+effect give @e[type=zombie,limit=1,sort=random] slowness 3
+effect give @e[type=zombie,limit=1,sort=random] slowness 1 1
 
 # 召唤怪物
-execute if score $countdown mem matches ..120 if score $random mem matches 0..10 run function mini:zombie/game/summon_zombie
-execute if score $countdown mem matches ..90 if score $random mem matches 11..15 run function mini:zombie/game/summon_skeleton
-execute if score $countdown mem matches ..60 if score $random mem matches 16..20 run function mini:zombie/game/summon_creeper
-execute if score $countdown mem matches ..0 if score $random mem matches 21..25 run function mini:zombie/game/summon_evoker
+execute if score $countdown mem matches 61..120 if score $random mem matches 0..10 run function mini:zombie/game/summon_zombie
+execute if score $countdown mem matches 1..90 if score $random mem matches 11..20 run function mini:zombie/game/summon_skeleton
+execute if score $countdown mem matches ..60 if score $random mem matches 21..30 run function mini:zombie/game/summon_creeper
+execute if score $countdown mem matches ..0 if score $random mem matches 31..40 run function mini:zombie/game/summon_evoker
 
 # 显示提示
 execute if score $countdown mem matches 90 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "骷髅 ","color":"red"},"已开始出现!"]