龙腾猫跃 3 лет назад
Родитель
Сommit
997e7d5dab
31 измененных файлов с 73 добавлено и 55 удалено
  1. 0 6
      data/item/functions/bonus_item/gameparty/auto/blue.mcfunction
  2. 0 6
      data/item/functions/bonus_item/gameparty/auto/green.mcfunction
  3. 0 6
      data/item/functions/bonus_item/gameparty/auto/purple.mcfunction
  4. 0 6
      data/item/functions/bonus_item/gameparty/auto/white.mcfunction
  5. 1 2
      data/item/functions/bonus_item/gameparty/wrap/all.mcfunction
  6. 1 4
      data/item/functions/bonus_item/gameparty/wrap/blue.mcfunction
  7. 4 0
      data/item/functions/bonus_item/gameparty/wrap/blue2.mcfunction
  8. 1 4
      data/item/functions/bonus_item/gameparty/wrap/green.mcfunction
  9. 4 0
      data/item/functions/bonus_item/gameparty/wrap/green2.mcfunction
  10. 1 4
      data/item/functions/bonus_item/gameparty/wrap/purple.mcfunction
  11. 4 0
      data/item/functions/bonus_item/gameparty/wrap/purple2.mcfunction
  12. 1 4
      data/item/functions/bonus_item/gameparty/wrap/white.mcfunction
  13. 4 0
      data/item/functions/bonus_item/gameparty/wrap/white2.mcfunction
  14. 1 1
      data/item/functions/bonus_item/give_items.mcfunction
  15. 1 1
      data/item/functions/bonus_item/return_item.mcfunction
  16. 1 1
      data/mini/functions/ass/game_init.mcfunction
  17. 14 0
      data/mini/functions/colormatch/game/new_item.mcfunction
  18. 1 0
      data/mini/functions/colormatch/game_init.mcfunction
  19. 4 0
      data/mini/functions/colormatch/tick1.mcfunction
  20. 18 0
      data/mini/functions/colormatch/tick20.mcfunction
  21. 1 1
      data/mini/functions/hotpm/game_init.mcfunction
  22. 1 1
      data/mini/functions/iron/game_init.mcfunction
  23. 1 0
      data/mini/functions/main/tick1.mcfunction
  24. 1 0
      data/mini/functions/main/tick20.mcfunction
  25. 1 1
      data/mini/functions/parkour/game_init.mcfunction
  26. 1 1
      data/mini/functions/parkour/game_init2.mcfunction
  27. 1 1
      data/mini/functions/phantom/game_init.mcfunction
  28. 2 2
      data/mini/functions/phantom/game_init2.mcfunction
  29. 1 1
      data/mini/functions/tntrun/game_init.mcfunction
  30. 1 1
      data/mini/functions/tntrun/game_init2.mcfunction
  31. 1 1
      data/mini/functions/trade/game_init.mcfunction

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

@@ -1,6 +0,0 @@
-# 生成蓝色品质的物品实体
-
-execute if score $round mem matches ..2 run function item:bonus_item/gameparty/mixed/blue
-execute if score $round mem matches 3 run function item:bonus_item/gameparty/score/blue
-execute if score $round mem matches 4 run function item:bonus_item/gameparty/mixed/blue
-execute if score $round mem matches 5.. run function item:bonus_item/gameparty/score/blue

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

@@ -1,6 +0,0 @@
-# 生成绿色品质的物品实体
-
-execute if score $round mem matches ..2 run function item:bonus_item/gameparty/mixed/green
-execute if score $round mem matches 3 run function item:bonus_item/gameparty/score/green
-execute if score $round mem matches 4 run function item:bonus_item/gameparty/mixed/green
-execute if score $round mem matches 5.. run function item:bonus_item/gameparty/score/green

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

@@ -1,6 +0,0 @@
-# 生成紫色品质的物品实体
-
-execute if score $round mem matches ..2 run function item:bonus_item/gameparty/mixed/purple
-execute if score $round mem matches 3 run function item:bonus_item/gameparty/score/purple
-execute if score $round mem matches 4 run function item:bonus_item/gameparty/mixed/purple
-execute if score $round mem matches 5.. run function item:bonus_item/gameparty/score/purple

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

@@ -1,6 +0,0 @@
-# 生成白色品质的物品实体
-
-execute if score $round mem matches ..2 run function item:bonus_item/gameparty/mixed/white
-execute if score $round mem matches 3 run function item:bonus_item/gameparty/score/white
-execute if score $round mem matches 4 run function item:bonus_item/gameparty/mixed/white
-execute if score $round mem matches 5.. run function item:bonus_item/gameparty/score/white

+ 1 - 2
data/item/functions/bonus_item/gameparty/wrap/all.mcfunction

@@ -1,6 +1,5 @@
 #as item at item generate position
-summon item 0 0 0 {Tags:["new_item_"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"minecraft:gold_nugget",Count:1}}
+summon item 0 0 0 {Tags:["new_item_","bonus_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"minecraft:gold_nugget",Count:1}}
 data modify entity @e[tag=new_item_,limit=1] Item set from entity @s Item
 execute as @e[tag=new_item_] run data modify entity @s CustomName set from entity @s Item.tag.item_name
-tag @e[tag=new_item_] add item_new
 kill @s

+ 1 - 4
data/item/functions/bonus_item/gameparty/wrap/blue.mcfunction

@@ -1,6 +1,3 @@
 #as item
 function item:bonus_item/gameparty/wrap/all
-team join purple @e[tag=new_item_]
-tag @e[tag=new_item_] add item_blue
-tp @e[tag=new_item_] ~ ~ ~
-tag @e[tag=new_item_] remove new_item_
+execute as @e[tag=new_item_] run function item:bonus_item/gameparty/wrap/blue2

+ 4 - 0
data/item/functions/bonus_item/gameparty/wrap/blue2.mcfunction

@@ -0,0 +1,4 @@
+team join purple @s
+tag @s add item_blue
+tag @s remove new_item_
+tp @s ~ ~ ~

+ 1 - 4
data/item/functions/bonus_item/gameparty/wrap/green.mcfunction

@@ -1,6 +1,3 @@
 #as item
 function item:bonus_item/gameparty/wrap/all
-team join blue @e[tag=new_item_]
-tag @e[tag=new_item_] add item_green
-tp @e[tag=new_item_] ~ ~ ~
-tag @e[tag=new_item_] remove new_item_
+execute as @e[tag=new_item_] run function item:bonus_item/gameparty/wrap/green2

+ 4 - 0
data/item/functions/bonus_item/gameparty/wrap/green2.mcfunction

@@ -0,0 +1,4 @@
+team join blue @s
+tag @s add item_green
+tag @s remove new_item_
+tp @s ~ ~ ~

+ 1 - 4
data/item/functions/bonus_item/gameparty/wrap/purple.mcfunction

@@ -1,6 +1,3 @@
 #as item
 function item:bonus_item/gameparty/wrap/all
-team join gold @e[tag=new_item_]
-tag @e[tag=new_item_] add item_purple
-tp @e[tag=new_item_] ~ ~ ~
-tag @e[tag=new_item_] remove new_item_
+execute as @e[tag=new_item_] run function item:bonus_item/gameparty/wrap/purple2

+ 4 - 0
data/item/functions/bonus_item/gameparty/wrap/purple2.mcfunction

@@ -0,0 +1,4 @@
+team join gold @s
+tag @s add item_purple
+tag @s remove new_item_
+tp @s ~ ~ ~

+ 1 - 4
data/item/functions/bonus_item/gameparty/wrap/white.mcfunction

@@ -1,6 +1,3 @@
 #as item
 function item:bonus_item/gameparty/wrap/all
-team join white @e[tag=new_item_]
-tag @e[tag=new_item_] add item_white
-tp @e[tag=new_item_] ~ ~ ~
-tag @e[tag=new_item_] remove new_item_
+execute as @e[tag=new_item_] run function item:bonus_item/gameparty/wrap/white2

+ 4 - 0
data/item/functions/bonus_item/gameparty/wrap/white2.mcfunction

@@ -0,0 +1,4 @@
+team join white @s
+tag @s add item_white
+tag @s remove new_item_
+tp @s ~ ~ ~

+ 1 - 1
data/item/functions/bonus_item/give_items.mcfunction

@@ -3,7 +3,7 @@ setblock 0 0 0 jukebox replace
 data modify block 0 0 0 RecordItem set from storage item:bonus item.tag.bonus_give_items[0]
 setblock 0 0 0 air destroy
 tag @s add item_op
-execute as @e[tag=!bonus_old,tag=!item_new,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
+execute as @e[tag=!bonus_old,tag=!bonus_item,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
 tag @s remove item_op
 data remove storage item:bonus item.tag.bonus_give_items[0]
 execute if data storage item:bonus item.tag.bonus_give_items[0] run function item:bonus_item/give_items

+ 1 - 1
data/item/functions/bonus_item/return_item.mcfunction

@@ -3,5 +3,5 @@ data modify block 0 0 0 RecordItem set from storage item:bonus item
 data modify block 0 0 0 RecordItem.tag.bonus_new set value 0b
 setblock 0 0 0 air destroy
 tag @s add item_op
-execute as @e[tag=!bonus_old,tag=!item_new,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
+execute as @e[tag=!bonus_old,tag=!bonus_item,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
 tag @s remove item_op

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

@@ -18,4 +18,4 @@ team modify playing deathMessageVisibility always
 gamerule naturalRegeneration false
 gamerule fallDamage false
 
-schedule function mini:ass/game_init2 1t replace
+schedule function mini:ass/game_init2 10t replace

+ 14 - 0
data/mini/functions/colormatch/game/new_item.mcfunction

@@ -0,0 +1,14 @@
+tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "新的奖励物资已在空中部署!","color":"aqua"}]
+scoreboard players set $new_item_cd mem 0
+
+# 随机选择生成组
+scoreboard players set $random_min mem 0
+scoreboard players set $random_max mem 1
+function lib:random
+
+# 生成物资
+execute if score $random mem matches 0 positioned 1060.5 26 4002.5 run function item:bonus_item/gameparty/auto/random
+execute if score $random mem matches 0 positioned 1060.5 26 4018.5 run function item:bonus_item/gameparty/auto/random
+execute if score $random mem matches 1 positioned 1068.5 26 4010.5 run function item:bonus_item/gameparty/auto/random
+execute if score $random mem matches 1 positioned 1052.5 26 4010.5 run function item:bonus_item/gameparty/auto/random
+execute as @e[tag=bonus_item,limit=1] run data modify entity @s NoGravity set value 0b

+ 1 - 0
data/mini/functions/colormatch/game_init.mcfunction

@@ -8,6 +8,7 @@ scoreboard players set $finish_mode mem 0
 scoreboard players set $survival mem 0
 scoreboard players set $color_match_time mem 60
 scoreboard players set $color_match_type mem 0
+scoreboard players set $new_item_cd mem 0
 
 # 刷新地基
 function mini:colormatch/game/prepare_round

+ 4 - 0
data/mini/functions/colormatch/tick1.mcfunction

@@ -0,0 +1,4 @@
+# 调整物品:仅在纵向速度 < -0.015 且 y > 20 时,才将 NoGravity 设置为 false
+execute as @e[tag=bonus_item] store result score @s temp run data get entity @s Motion[1] 1000
+execute as @e[tag=bonus_item] if entity @s[x=1000,y=20,z=4000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:0b}
+execute as @e[tag=bonus_item] unless entity @s[x=1000,y=20,z=4000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:1b}

+ 18 - 0
data/mini/functions/colormatch/tick20.mcfunction

@@ -0,0 +1,18 @@
+# 判断是否符合刷出新物品的条件:0 为可以,其他为不可以
+scoreboard players set #new_item mem 0
+
+# 当前场地上没有物品
+execute if entity @e[tag=bonus_item] run scoreboard players set #new_item mem 1
+
+# 如果没有物品,则计算冷却
+execute if score #new_item mem matches 0 run scoreboard players add $new_item_cd mem 1
+# 已经超过 12s 冷却时间
+execute if score $new_item_cd mem matches ..11 run scoreboard players set #new_item mem 1
+
+# 存活玩家数($player_alive)>= 3
+execute if score $player_alive mem matches ..2 run scoreboard players set #new_item mem 1
+# 死亡玩家数($player_finish)<= 2
+execute if score $player_finish mem matches 3.. run scoreboard players set #new_item mem 1
+
+# 如果上述条件均满足,则刷出新物品
+execute if score #new_item mem matches 0 run function mini:colormatch/game/new_item

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

@@ -17,4 +17,4 @@ setblock 1000 4 3000 air
 setblock 1000 4 3000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:hp",sizeY:15,sizeZ:30,showboundingbox:0b}
 setblock 1000 5 3000 minecraft:redstone_block
 
-schedule function mini:hotpm/game_init2 1t replace
+schedule function mini:hotpm/game_init2 10t replace

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

@@ -29,4 +29,4 @@ gamerule doTileDrops true
 gamerule doEntityDrops true
 gamerule doMobLoot true
 
-schedule function mini:iron/game_init2 1t append
+schedule function mini:iron/game_init2 10t append

+ 1 - 0
data/mini/functions/main/tick1.mcfunction

@@ -1 +1,2 @@
 execute if score $mini_type mem matches 2 run function mini:tntrun/tick1
+execute if score $mini_type mem matches 4 run function mini:colormatch/tick1

+ 1 - 0
data/mini/functions/main/tick20.mcfunction

@@ -1,6 +1,7 @@
 
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/tick20
+execute if score $mini_type mem matches 4 run function mini:colormatch/tick20
 execute if score $mini_type mem matches 5 run function mini:phantom/tick20
 execute if score $mini_type mem matches 201 run function mini:ass/tick20
 execute if score $mini_type mem matches 101 run function mini:iron/tick20

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

@@ -22,4 +22,4 @@ team modify playing collisionRule never
 team modify playing deathMessageVisibility never
 gamerule fallDamage false
 
-schedule function mini:parkour/game_init2 1t replace
+schedule function mini:parkour/game_init2 10t replace

+ 1 - 1
data/mini/functions/parkour/game_init2.mcfunction

@@ -9,7 +9,7 @@ function mini:main/kill_entity
 function mini:parkour/game/marker_spawn
 
 # 生成物品
-execute positioned 1015.5 12.0 1019.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1015.5 12.0 1019.5 run function item:bonus_item/gameparty/auto/random
 
 # 生成传送门实体
 summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}

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

@@ -30,4 +30,4 @@ team modify playing collisionRule always
 team modify playing deathMessageVisibility always
 gamerule fallDamage false
 
-schedule function mini:phantom/game_init2 1t replace
+schedule function mini:phantom/game_init2 10t replace

+ 2 - 2
data/mini/functions/phantom/game_init2.mcfunction

@@ -4,5 +4,5 @@ function mini:main/kill_entity
 tp @e[type=phantom] 1000 -100 6000
 
 # 生成奖励物品
-execute positioned 1034.0 27.5 6058.5 run function item:bonus_item/gameparty/auto/white
-execute positioned 1035.0 28.5 6002.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1034.0 27.5 6058.5 run function item:bonus_item/gameparty/auto/random
+execute positioned 1035.0 28.5 6002.5 run function item:bonus_item/gameparty/auto/random

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

@@ -39,4 +39,4 @@ team modify playing collisionRule always
 team modify playing deathMessageVisibility never
 gamerule fallDamage false
 
-schedule function mini:tntrun/game_init2 1t replace
+schedule function mini:tntrun/game_init2 10t replace

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

@@ -4,4 +4,4 @@ function mini:main/kill_entity
 kill @e[tag=tntrun_block]
 
 # 生成奖励
-execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/random

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

@@ -29,4 +29,4 @@ gamerule doTileDrops true
 gamerule doEntityDrops true
 gamerule doMobLoot true
 
-schedule function mini:trade/game_init2 1t append
+schedule function mini:trade/game_init2 10t append