Explorar el Código

新增失明药水;最后一轮的小游戏也只生成分数

LTCatt hace 6 años
padre
commit
1808d0c4aa

+ 12 - 0
data/item/functions/bonus_item/gameparty/auto/blue.mcfunction

@@ -0,0 +1,12 @@
+# 生成蓝色品质的物品实体
+
+execute if score $round mem matches ..5 run loot spawn ~ ~ ~ loot item:gameparty/normal/blue
+execute if score $round mem matches 6 run loot spawn ~ ~ ~ loot item:gameparty/last/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]
+execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
+team join blue @e[tag=new_item]
+tag @e[tag=new_item] add item_blue
+tag @e[tag=new_item] add item_new
+tag @e[tag=new_item] remove new_item

+ 12 - 0
data/item/functions/bonus_item/gameparty/auto/green.mcfunction

@@ -0,0 +1,12 @@
+# 生成绿色品质的物品实体
+
+execute if score $round mem matches ..5 run loot spawn ~ ~ ~ loot item:gameparty/normal/green
+execute if score $round mem matches 6 run loot spawn ~ ~ ~ loot item:gameparty/last/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]
+execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
+team join green @e[tag=new_item]
+tag @e[tag=new_item] add item_green
+tag @e[tag=new_item] add item_new
+tag @e[tag=new_item] remove new_item

+ 12 - 0
data/item/functions/bonus_item/gameparty/auto/purple.mcfunction

@@ -0,0 +1,12 @@
+# 生成紫色品质的物品实体
+
+execute if score $round mem matches ..5 run loot spawn ~ ~ ~ loot item:gameparty/normal/purple
+execute if score $round mem matches 6 run loot spawn ~ ~ ~ loot item:gameparty/last/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]
+execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
+team join purple @e[tag=new_item]
+tag @e[tag=new_item] add item_purple
+tag @e[tag=new_item] add item_new
+tag @e[tag=new_item] remove new_item

+ 12 - 0
data/item/functions/bonus_item/gameparty/auto/white.mcfunction

@@ -0,0 +1,12 @@
+# 生成白色品质的物品实体
+
+execute if score $round mem matches ..5 run loot spawn ~ ~ ~ loot item:gameparty/normal/white
+execute if score $round mem matches 6 run loot spawn ~ ~ ~ loot item:gameparty/last/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]
+execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
+team join white @e[tag=new_item]
+tag @e[tag=new_item] add item_white
+tag @e[tag=new_item] add item_new
+tag @e[tag=new_item] remove new_item

+ 2 - 2
data/item/loot_tables/gameparty/normal/white.json

@@ -107,7 +107,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"0:10 飘浮\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":25,\"Amplifier\":0,\"Duration\":200}],\"CustomPotionColor\":11458519,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型浮空药水\\\",\\\"italic\\\":0,\\\"color\\\":\\\"white\\\"}\"}}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"飘浮 (0:10)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":25,\"Amplifier\":0,\"Duration\":200}],\"CustomPotionColor\":11458519,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型浮空药水\\\",\\\"italic\\\":0,\\\"color\\\":\\\"white\\\"}\"}}"
         }
     ]
 },
@@ -118,7 +118,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"缓慢 V (0:15)\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":2,\"Amplifier\":4,\"Duration\":300}],\"CustomPotionColor\":5860223,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型迟缓药水\\\",\\\"italic\\\":0,\\\"color\\\":\\\"green\\\"}\"}}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"失明 (0:10)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":15,\"Amplifier\":0,\"Duration\":200}],\"CustomPotionColor\":5860223,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型迟缓药水\\\",\\\"italic\\\":0,\\\"color\\\":\\\"white\\\"}\"}}"
         }
     ]
 },

+ 1 - 2
data/ltw/functions/main/player_leave.mcfunction

@@ -13,5 +13,4 @@ execute if score $state mem matches 5 if score $mini_type mem matches 3 run func
 # FIXME : [010/HIM] 奖励选择房和跑酷图还有结构方块的线
 # FIXME : <! 紧急> 跑酷中途掉线导致名次判断错误
 # FIXME : <! 紧急> [010] 物品依然可能给不到人
-# FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦
-# TODO : [LTCat] 最后一轮的道具只给分数
+# FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦

+ 3 - 3
data/mini/functions/hotpm/game_init.mcfunction

@@ -49,6 +49,6 @@ setblock 1000 4 2999 minecraft:structure_block[mode=load]{metadata:"",mirror:"NO
 setblock 1000 5 2999 minecraft:redstone_block
 
 # 生成物品
-execute positioned 1022.0 17.0 3009.0 run function item:bonus_item/gameparty/normal/white
-execute positioned 1022.5 32.0 3038.0 run function item:bonus_item/gameparty/normal/white
-# execute positioned 1022.5 43.5 3012.5 run function item:bonus_item/gameparty/normal/white
+execute positioned 1022.0 17.0 3009.0 run function item:bonus_item/gameparty/auto/white
+execute positioned 1022.5 32.0 3038.0 run function item:bonus_item/gameparty/auto/white
+# execute positioned 1022.5 43.5 3012.5 run function item:bonus_item/gameparty/auto/white

+ 2 - 2
data/mini/functions/parkour/game_init.mcfunction

@@ -16,8 +16,8 @@ kill @e[type=falling_block,tag=parkour_block]
 kill @e[type=trident]
 
 # 生成奖励物品
-execute positioned 1004.5 18.5 1043.5 run function item:bonus_item/gameparty/normal/white
-execute positioned 1024.5 30.5 1038.5 run function item:bonus_item/gameparty/normal/blue
+execute positioned 1004.5 18.5 1043.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1024.5 30.5 1038.5 run function item:bonus_item/gameparty/auto/blue
 
 # 初始化开门变量
 scoreboard players set $parkour_door mem 0

+ 1 - 1
data/mini/functions/tntrun/game_init.mcfunction

@@ -14,7 +14,7 @@ kill @e[tag=tntrun_block]
 kill @e[type=trident]
 
 # 生成奖励
-execute positioned 1011.5 15.5 2011.5 run function item:bonus_item/gameparty/normal/white
+execute positioned 1011.5 15.5 2011.5 run function item:bonus_item/gameparty/auto/white
 
 # 伤害管理
 scoreboard players set $remove_resistance mem 0

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

@@ -27,7 +27,7 @@ execute if score $random mem matches 21..30 if score $countdown mem matches ..5
 execute if score $random mem matches 21..30 if score $countdown mem matches ..5 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
 
 # 生成奖励
-execute if score $random mem matches ..50 if score $countdown mem matches 155 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/normal/white
-execute if score $random mem matches 51.. if score $countdown mem matches 155 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/normal/white
-execute if score $random mem matches ..50 if score $countdown mem matches 105 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/normal/white
-execute if score $random mem matches 51.. if score $countdown mem matches 105 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/normal/white
+execute if score $random mem matches ..50 if score $countdown mem matches 155 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/auto/white
+execute if score $random mem matches 51.. if score $countdown mem matches 155 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/auto/white
+execute if score $random mem matches ..50 if score $countdown mem matches 105 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/auto/white
+execute if score $random mem matches 51.. if score $countdown mem matches 105 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/auto/white