Преглед на файлове

猪灵的物品改为随机位置发放

LTCatt преди 6 години
родител
ревизия
0d90a78dde

+ 5 - 3
data/item/functions/bonus_item/call.mcfunction

@@ -5,17 +5,19 @@
 data modify block 0 0 0 RecordItem set from entity @s Inventory[{"tag":{"bonus_new":1b}}]
 clear @s #item:bonus{"bonus_new":1b}
 
-# 通知玩家物品被拾取
-tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"nbt": "RecordItem.tag.item_name","block": "0 0 0","interpret": true}]
+# 播放音效
 function lib:sounds/hit
 
+# 显示物品拾取
+tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"nbt": "RecordItem.tag.item_name","block": "0 0 0","interpret": true}]
+
 # 如果有 return 标签则退回物品(最先执行)
 execute if data block 0 0 0 RecordItem.tag{"bonus_return":1b} run function item:bonus_item/return_item
 
 # 如果有 add_score 标签则增加积分
 execute if data block 0 0 0 RecordItem.tag.bonus_add_score run function item:bonus_item/add_score
 
-# 如果有 give_items 标签则给与物品
+# 如果有 give_items 标签则给予物品
 execute if data block 0 0 0 RecordItem.tag.bonus_give_items[0] run function item:bonus_item/give_items
 
 # 执行特定函数

+ 2 - 3
data/item/functions/special/clear_effect.mcfunction

@@ -2,11 +2,10 @@
 effect clear @a[tag=consume_apple] absorption
 effect clear @a[tag=consume_apple] regeneration
 effect clear @a[tag=consume_apple] fire_resistance
-effect give @a[tag=consume_apple] minecraft:resistance 999999 4 true
+effect give @a[tag=consume_apple] resistance 999999 4 true
 
 # 检测是否保留抗性提升
 execute if score $remove_resistance mem matches 1 run effect clear @a[tag=consume_apple] resistance 
 
-# 重置tag和分数
+# 重置 tag
 tag @a[tag=consume_apple] remove consume_apple
-scoreboard players reset $remove_resistance mem

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

@@ -13,7 +13,5 @@ execute if score $state mem matches 5 if score $mini_type mem matches 3 run func
 # FIXME : [010/HIM] 玩家可以钓鱼
 # FIXME : [010/HIM] 喝完药的玻璃瓶没有 clear
 # FIXME : [010/HIM] 跑酷中途掉线导致名次判断错误
-# TODO : [LTCat] 猪灵的房间角落改成圆角
-# TODO : [LTCat] 猪灵的物品改为随机位置发放
 # FIXME : [010] 弩和箭可能给不到人
 # FIXME : [010] 关闭原版进度

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

@@ -26,5 +26,7 @@ execute if score $random mem matches ..20 if score $countdown mem matches ..80 u
 execute if score $random mem matches ..20 if score $countdown mem matches ..80 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
 
 # 生成奖励
-execute 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 $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/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

+ 1 - 1
data/test/functions/mini/colormatch.mcfunction

@@ -2,7 +2,7 @@
 tag @a add hub_gameparty
 tag @a remove hub_watch
 function ltw:state/0/start_gameparty
-scoreboard players set $round mem 10
+scoreboard players set $round mem 6
 scoreboard players set $mini_type mem 4
 function mini:main/game_init
 function ltw:state/4/state_enter

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

@@ -2,7 +2,7 @@
 tag @a add hub_gameparty
 tag @a remove hub_watch
 function ltw:state/0/start_gameparty
-scoreboard players set $round mem 10
+scoreboard players set $round mem 6
 scoreboard players set $mini_type mem 3
 function mini:main/game_init
 function ltw:state/4/state_enter

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

@@ -2,7 +2,7 @@
 tag @a add hub_gameparty
 tag @a remove hub_watch
 function ltw:state/0/start_gameparty
-scoreboard players set $round mem 10
+scoreboard players set $round mem 6
 scoreboard players set $mini_type mem 1
 function mini:main/game_init
 function ltw:state/4/state_enter

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

@@ -2,7 +2,7 @@
 tag @a add hub_gameparty
 tag @a remove hub_watch
 function ltw:state/0/start_gameparty
-scoreboard players set $round mem 10
+scoreboard players set $round mem 6
 scoreboard players set $mini_type mem 2
 function mini:main/game_init
 function ltw:state/4/state_enter

+ 1 - 1
data/test/functions/mini/zombie.mcfunction

@@ -2,7 +2,7 @@
 tag @a add hub_gameparty
 tag @a remove hub_watch
 function ltw:state/0/start_gameparty
-scoreboard players set $round mem 10
+scoreboard players set $round mem 6
 scoreboard players set $mini_type mem 5
 function mini:main/game_init
 function ltw:state/4/state_enter