Przeglądaj źródła

热土豆的修改

龙腾猫跃 3 lat temu
rodzic
commit
28b1647a01

+ 5 - 0
data/item/functions/bonus_item/gameparty/auto/low.mcfunction

@@ -0,0 +1,5 @@
+# 根据轮数生成对应的物品
+
+execute if score $round mem matches ..1 run function item:bonus_item/gameparty/mixed/low
+execute if score $round mem matches 2..3 run function item:bonus_item/gameparty/mixed/normal
+execute if score $round mem matches 4.. run function item:bonus_item/gameparty/score/low

+ 2 - 2
data/item/functions/bonus_item/gameparty/auto/random.mcfunction → data/item/functions/bonus_item/gameparty/auto/normal.mcfunction

@@ -1,4 +1,4 @@
 # 根据轮数生成对应的物品
 
-execute if score $round mem matches ..3 run function item:bonus_item/gameparty/mixed/random
-execute if score $round mem matches 4.. run function item:bonus_item/gameparty/score/random
+execute if score $round mem matches ..3 run function item:bonus_item/gameparty/mixed/normal
+execute if score $round mem matches 4.. run function item:bonus_item/gameparty/score/normal

+ 14 - 0
data/item/functions/bonus_item/gameparty/mixed/low.mcfunction

@@ -0,0 +1,14 @@
+# 生成随机品质的物品
+
+# 品质:生成一个 1~14 的 randomarray,每次从其中取下一个数
+execute unless data storage ltw:mini qualities[0] run function item:bonus_item/new_array
+execute store result score #quality mem run data get storage ltw:mini qualities[0]
+data remove storage ltw:mini qualities[0]
+
+# 根据品质生成不同的物品
+# 白色:7x
+execute if score #quality mem matches ..7 run function item:bonus_item/gameparty/mixed/white
+# 蓝色:5x
+execute if score #quality mem matches 8..12 run function item:bonus_item/gameparty/mixed/green
+# 紫色:2x
+execute if score #quality mem matches 13.. run function item:bonus_item/gameparty/mixed/blue

+ 4 - 4
data/item/functions/bonus_item/gameparty/mixed/random.mcfunction → data/item/functions/bonus_item/gameparty/mixed/normal.mcfunction

@@ -6,11 +6,11 @@ execute store result score #quality mem run data get storage ltw:mini qualities[
 data remove storage ltw:mini qualities[0]
 
 # 根据品质生成不同的物品
-# 白色:5
+# 白色:5x
 execute if score #quality mem matches ..5 run function item:bonus_item/gameparty/mixed/white
-# 绿色:4
+# 蓝色:4x
 execute if score #quality mem matches 6..9 run function item:bonus_item/gameparty/mixed/green
-# 蓝色:3
+# 紫色:3x
 execute if score #quality mem matches 10..12 run function item:bonus_item/gameparty/mixed/blue
-# 紫色:2
+# 橙色:2x
 execute if score #quality mem matches 13.. run function item:bonus_item/gameparty/mixed/purple

+ 14 - 0
data/item/functions/bonus_item/gameparty/score/low.mcfunction

@@ -0,0 +1,14 @@
+# 生成随机品质的物品
+
+# 品质:生成一个 1~14 的 randomarray,每次从其中取下一个数
+execute unless data storage ltw:mini qualities[0] run function item:bonus_item/new_array
+execute store result score #quality mem run data get storage ltw:mini qualities[0]
+data remove storage ltw:mini qualities[0]
+
+# 根据品质生成不同的物品
+# 白色:7x
+execute if score #quality mem matches ..7 run function item:bonus_item/gameparty/score/white
+# 蓝色:5x
+execute if score #quality mem matches 8..12 run function item:bonus_item/gameparty/score/green
+# 紫色:2x
+execute if score #quality mem matches 13.. run function item:bonus_item/gameparty/score/blue

+ 4 - 4
data/item/functions/bonus_item/gameparty/score/random.mcfunction → data/item/functions/bonus_item/gameparty/score/normal.mcfunction

@@ -6,11 +6,11 @@ execute store result score #quality mem run data get storage ltw:mini qualities[
 data remove storage ltw:mini qualities[0]
 
 # 根据品质生成不同的物品
-# 白色:5
+# 白色:5x
 execute if score #quality mem matches ..5 run function item:bonus_item/gameparty/score/white
-# 绿色:4
+# 蓝色:4x
 execute if score #quality mem matches 6..9 run function item:bonus_item/gameparty/score/green
-# 蓝色:3
+# 紫色:3x
 execute if score #quality mem matches 10..12 run function item:bonus_item/gameparty/score/blue
-# 紫色:2
+# 橙色:2x
 execute if score #quality mem matches 13.. run function item:bonus_item/gameparty/score/purple

+ 8 - 8
data/ltw/functions/state/6/generate_bonus.mcfunction

@@ -8,14 +8,14 @@ kill @e[type=trident]
 # 生成 玩家数+1 个奖励
 execute store result score #bonus_count mem if entity @a[team=playing]
 scoreboard players add #bonus_count mem 1
-execute if score #bonus_count mem matches 1.. positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 2.. positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 3.. positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 4.. positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 5.. positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 6.. positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 7.. positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/auto/random
-execute if score #bonus_count mem matches 8.. positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/auto/random
+execute if score #bonus_count mem matches 1.. positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 2.. positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 3.. positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 4.. positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 5.. positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 6.. positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 7.. positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/auto/normal
+execute if score #bonus_count mem matches 8.. positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/auto/normal
 
 # 生成拾取背景
 execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background

+ 4 - 4
data/mini/functions/colormatch/game/new_item.mcfunction

@@ -7,8 +7,8 @@ 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 if score $random mem matches 0 positioned 1060.5 26 4002.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 0 positioned 1060.5 26 4018.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 1 positioned 1068.5 26 4010.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 1 positioned 1052.5 26 4010.5 run function item:bonus_item/gameparty/auto/low
 execute as @e[tag=bonus_item,limit=1] run data modify entity @s NoGravity set value 0b

+ 16 - 0
data/mini/functions/hotpm/game/new_item.mcfunction

@@ -0,0 +1,16 @@
+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 2
+function lib:random
+
+# 生成物资
+execute if score $random mem matches 0 positioned 1026.5 19.0 3021.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 0 positioned 1009.5 19.0 3005.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 1 positioned 1023.5 19.0 3008.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 1 positioned 1010.5 19.0 3022.5 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 2 positioned 1017.0 19.0 3024.0 run function item:bonus_item/gameparty/auto/low
+execute if score $random mem matches 2 positioned 1017.5 19.0 3005.5 run function item:bonus_item/gameparty/auto/low
+execute as @e[tag=bonus_item,limit=1] run data modify entity @s NoGravity set value 0b

+ 2 - 0
data/mini/functions/hotpm/game_init.mcfunction

@@ -1,8 +1,10 @@
 # 初始化热土豆地图
 forceload add 1000 3000 1100 3100
 
+# 初始化
 scoreboard players set $finish_mode mem 0
 scoreboard players set $survival mem 0
+scoreboard players set $new_item_cd mem 0
 scoreboard players reset * surviveRound
 
 # 伤害管理

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

@@ -0,0 +1,4 @@
+# 调整物品:仅在纵向速度 < -0.006 且 y > 13 时,才将 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=13,z=3000,dx=100,dy=100,dz=100,scores={temp=-6..}] run data merge entity @s {NoGravity:0b}
+execute as @e[tag=bonus_item] unless entity @s[x=1000,y=13,z=3000,dx=100,dy=100,dz=100,scores={temp=-6..}] run data merge entity @s {NoGravity:1b}

+ 6 - 4
data/mini/functions/hotpm/tick2.mcfunction

@@ -22,10 +22,12 @@ execute as @a[tag=!pm_holding] if data entity @s Inventory[{tag:{game_item:1b}}]
 # HUD
 scoreboard players set $bossbar_color mem 0
 scoreboard players set @a[tag=pm_holding] bossbar_color 1
-execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding,distance=..14] bossbar_color 2
-execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding,distance=14..] bossbar_color 3
+execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding] bossbar_color 2
 scoreboard players set $bossbar_type mem 1
 function lib:bossbar/show
-bossbar set mini:green name "炸弹稳定度"
 bossbar set mini:yellow name "炸弹稳定度"
-bossbar set mini:red name {"text":"炸弹稳定度","color":"red"}
+bossbar set mini:red name {"text":"< ! > 你正持有炸弹 < ! >","color":"red"}
+
+# 粒子
+execute as @a[tag=pm_holding] at @s run particle minecraft:crit ~ ~1 ~ 0.2 0.5 0.2 0.5 10 normal @a[distance=0.01..]
+execute as @a[tag=pm_holding] at @s run particle minecraft:lava ~ ~1 ~ 0.1 0.1 0.1 0.5 1 force @a

+ 18 - 0
data/mini/functions/hotpm/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
+# 已经超过 20s 冷却时间
+execute if score $new_item_cd mem matches ..19 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:hotpm/game/new_item

+ 3 - 1
data/mini/functions/hotpm/tick5.mcfunction

@@ -3,4 +3,6 @@
 # execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ minecraft:barrier run function lib:sounds/teleport
 
 # 给持有者播放音效
-execute as @a[tag=pm_holding] at @s run function lib:sounds/creeper
+execute as @a[tag=pm_holding] at @s run playsound minecraft:entity.creeper.primed player @s 0 1000000 0 1000000
+execute as @a[tag=pm_holding] at @s run playsound minecraft:entity.creeper.primed player @a[distance=0.01..] ~ ~ ~ 0.8
+execute as @a[tag=pm_holding] at @s run playsound minecraft:entity.creeper.primed player @a[distance=0.01..] ~ ~ ~ 0.4

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

@@ -1,2 +1,3 @@
 execute if score $mini_type mem matches 2 run function mini:tntrun/tick1
+execute if score $mini_type mem matches 3 run function mini:hotpm/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 3 run function mini:hotpm/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

+ 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/random
+execute positioned 1015.5 12.0 1019.5 run function item:bonus_item/gameparty/auto/normal
 
 # 生成传送门实体
 summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}

+ 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/random
-execute positioned 1035.0 28.5 6002.5 run function item:bonus_item/gameparty/auto/random
+execute positioned 1034.0 27.5 6058.5 run function item:bonus_item/gameparty/auto/normal
+execute positioned 1035.0 28.5 6002.5 run function item:bonus_item/gameparty/auto/normal

+ 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/random
+execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/normal

+ 8 - 8
data/test/functions/generate/mixed.mcfunction

@@ -12,14 +12,14 @@ kill @e[type=arrow]
 kill @e[type=trident]
 
 # 生成奖励
-execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/mixed/random
-execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/mixed/random
+execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/mixed/normal
+execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/mixed/normal
 
 # 生成拾取背景
 execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background

+ 8 - 8
data/test/functions/generate/score.mcfunction

@@ -12,14 +12,14 @@ kill @e[type=arrow]
 kill @e[type=trident]
 
 # 生成奖励
-execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/score/random
-execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/score/random
-execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/score/random
-execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/score/random
-execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/score/random
-execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/score/random
-execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/score/random
-execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/score/random
+execute positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/score/normal
+execute positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/score/normal
 
 # 生成拾取背景
 execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background