aqupa пре 4 година
родитељ
комит
80b6837984

+ 1 - 1
data/mini/functions/rgb/game/events/summon_tnt.mcfunction

@@ -1,4 +1,4 @@
 # as rule marker
 # with rgb_op
 
-execute at @a[tag=rgb_op] run summon tnt ~ ~ ~ {Fuse:30}
+execute at @a[tag=rgb_op] run summon tnt ~ ~ ~ {Fuse:40}

+ 3 - 2
data/mini/functions/rgb/game/give_random_rule.mcfunction

@@ -2,14 +2,15 @@
 
 # 随机规则 0-100
 scoreboard players set $random_min mem 0
-scoreboard players set $random_max mem 13
+scoreboard players set $random_max mem 15
 function lib:random
 
 execute if score $random mem matches 0..2 run loot replace block 0 0 1 container.0 loot mini:rgb/add_red
 execute if score $random mem matches 3..5 run loot replace block 0 0 1 container.0 loot mini:rgb/add_green
 execute if score $random mem matches 6..8 run loot replace block 0 0 1 container.0 loot mini:rgb/add_blue
 execute if score $random mem matches 9..12 run loot replace block 0 0 1 container.0 loot mini:rgb/harmful
-execute if score $random mem matches 13 run loot replace block 0 0 1 container.0 loot mini:rgb/finish
+execute if score $random mem matches 13..14 run loot replace block 0 0 1 container.0 loot mini:rgb/effect
+execute if score $random mem matches 15 run loot replace block 0 0 1 container.0 loot mini:rgb/finish
 
 # 生成文本
 data modify storage ltw:mini rgb.rule set from block 0 0 1 Items[0].tag

+ 7 - 0
data/mini/functions/rgb/game/init_rule.mcfunction

@@ -0,0 +1,7 @@
+scoreboard players remove $init_rule_num rgb_sys 1
+execute store result score $rule_type rgb_sys run data get storage ltw3:mini rgb.init_array[0]
+data remove storage ltw3:mini rgb.init_array[0]
+
+execute positioned 1038 15 8031 run function mini:rgb/game/summon_new_rule
+
+execute if score $init_rule_num rgb_sys matches 1.. run schedule function mini:rgb/game/init_rule 3s

+ 6 - 5
data/mini/functions/rgb/game/summon_new_rule.mcfunction

@@ -1,11 +1,10 @@
 # at new position
 # input: $rgb_rule_type rgb_sys
 
-execute if score $rgb_rule_type rgb_sys matches 1 run loot replace block 0 0 1 container.0 loot mini:rgb/red
-execute if score $rgb_rule_type rgb_sys matches 2 run loot replace block 0 0 1 container.0 loot mini:rgb/green
-#execute if score $rgb_rule_type rgb_sys matches 3 run loot replace block 0 0 1 container.0 loot mini:rgb/blue
-#execute if score $rgb_rule_type rgb_sys matches 4 run loot replace block 0 0 1 container.0 loot mini:rgb/event
-execute if score $rgb_rule_type rgb_sys matches 5 run loot replace block 0 0 1 container.0 loot mini:rgb/finish
+execute if score $rgb_rule_type rgb_sys matches 1 run loot replace block 0 0 1 container.0 loot mini:rgb/add_red
+execute if score $rgb_rule_type rgb_sys matches 2 run loot replace block 0 0 1 container.0 loot mini:rgb/add_green
+execute if score $rgb_rule_type rgb_sys matches 3 run loot replace block 0 0 1 container.0 loot mini:rgb/add_blue
+execute if score $rgb_rule_type rgb_sys matches 4 run loot replace block 0 0 1 container.0 loot mini:rgb/finish
 
 # 生成文本
 data modify storage ltw:mini rgb.rule set from block 0 0 1 Items[0].tag
@@ -19,4 +18,6 @@ summon armor_stand ~ ~ ~ {Tags:["rgb_new_rule"],Small:1b,ArmorItems:[{id:"minecr
 data modify entity @e[tag=rgb_new_rule,limit=1] CustomName set from block 0 1 0 Text1
 data modify entity @e[tag=rgb_new_rule,limit=1] ArmorItems[0].tag.conditions set from block 0 0 1 Items[0].tag.conditions
 data modify entity @e[tag=rgb_new_rule,limit=1] ArmorItems[0].tag.events set from block 0 0 1 Items[0].tag.events
+effect give @e[tag=rgb_new_rule] slow_falling 10
+spreadplayers ~ ~ 1 1.5 false @s
 execute as @e[tag=rgb_new_rule] run function mini:rgb/game/add_rule

+ 11 - 2
data/mini/functions/rgb/game_start.mcfunction

@@ -6,8 +6,17 @@ scoreboard objectives setdisplay list health_disp
 scoreboard objectives setdisplay belowName health_disp
 scoreboard objectives setdisplay sidebar health_disp
 scoreboard players set $bossbar_color mem 3
-scoreboard players set $countdown_max mem 100
+scoreboard players set $countdown_max mem 180
 scoreboard players set $bossbar_type mem 2
 function lib:bossbar/show
 bossbar set mini:green name "剩余时间"
-bossbar set mini:red name "强制死亡模式"
+bossbar set mini:red name "强制死亡模式"
+
+# 初始规则
+scoreboard players set $randarray_max mem 4
+scoreboard players set $randarray_last mem 0
+function lib:randarray/call
+data modify storage ltw:mini rgb.init_array set from storage lib:randarray out
+scoreboard players set $init_rule_num rgb_sys 3
+
+schedule function mini:rgb/game/init_rule 3s

+ 1 - 1
data/mini/loot_tables/rgb/add_red.json

@@ -43,7 +43,7 @@
                     "functions": [
                         {
                             "function": "minecraft:set_nbt",
-                            "tag": "{conditions:[{name:'{\"text\":\"站在火中1秒\",\"color\":\"yellow\"}',type:'in_fire',value:4s}],events:[{name:'{\"text\":\"R+4\",\"color\":\"red\"}',type:'add_red',value:5s}]}"
+                            "tag": "{conditions:[{name:'{\"text\":\"站在火中1秒\",\"color\":\"yellow\"}',type:'in_fire',value:4s}],events:[{name:'{\"text\":\"R+4\",\"color\":\"red\"}',type:'add_red',value:4s}]}"
                         }
                     ]
                 },