LTCatt 6 anni fa
parent
commit
2cc73bfb85

+ 1 - 1
data/item/functions/shop/refresh_gold.mcfunction

@@ -10,7 +10,7 @@ clear @s gold_nugget
 scoreboard players operation @s temp = @s gold
 scoreboard players operation @s temp /= #const_81 mem
 # 给予金块
-execute if score @s temp matches 1.. at @s run function item:shop/summon_block
+execute if score @s temp matches 1.. at @s run function item:shop/summon_gold_block
 # 获取金锭数,存于 temp
 scoreboard players operation @s temp = @s gold
 scoreboard players operation @s temp %= #const_81 mem

+ 10 - 3
data/item/functions/shop/refresh_green.mcfunction

@@ -1,10 +1,17 @@
 # 刷新单个玩家背包中的绿宝石
 
-execute unless entity @s[scores={green=0..}] run scoreboard players set @s green_total 0
 execute unless entity @s[scores={green=0..}] run scoreboard players set @s green 0
+execute unless entity @s[scores={green=0..}] run scoreboard players set @s green_total 0
+clear @s emerald_block
 clear @s emerald
 
+# 获取绿宝石块数,存于 temp
+scoreboard players operation @s temp = @s green
+scoreboard players operation @s temp /= #const_9 mem
+# 给予绿宝石块
+execute if score @s temp matches 1.. at @s run function item:shop/summon_emerald_block
 # 获取绿宝石数,存于 temp
 scoreboard players operation @s temp = @s green
-# 给予金粒
-execute if score @s temp matches 1.. at @s run function item:shop/summon_emerald
+scoreboard players operation @s temp %= #const_9 mem
+# 给予绿宝石
+execute if score @s temp matches 1.. at @s run function item:shop/summon_emerald

+ 10 - 0
data/item/functions/shop/summon_emerald_block.mcfunction

@@ -0,0 +1,10 @@
+# 给予绿宝石块
+summon item ~ ~ ~ {Item:{id:"emerald_block",Count:1b},Tags:["score_item"],PickupDelay:0}
+execute if score @s temp matches 1..64 store result entity @e[type=item,tag=score_item,limit=1] Item.Count byte 1 run scoreboard players get @s temp
+execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=score_item,limit=1] Item.Count set value 64b 
+data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
+tag @e[type=item,tag=score_item] remove score_item
+scoreboard players remove @s temp 64
+execute if score @s temp matches 1.. run function item:shop/summon_emerald_block
+
+

+ 1 - 1
data/item/functions/shop/summon_block.mcfunction → data/item/functions/shop/summon_gold_block.mcfunction

@@ -5,6 +5,6 @@ execute if score @s temp matches 65.. run data modify entity @e[type=item,tag=sc
 data modify entity @e[type=item,tag=score_item,limit=1] Owner set from entity @s UUID
 tag @e[type=item,tag=score_item] remove score_item
 scoreboard players remove @s temp 64
-execute if score @s temp matches 1.. run function item:shop/summon_block
+execute if score @s temp matches 1.. run function item:shop/summon_gold_block
 
 

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

@@ -25,5 +25,4 @@ function lib:bossbar/show
 # FIXME: [010] 在 init 的时候也重置随机数组
 # FIXME: [010] 已确认确实可以用钓鱼竿获得两个奖励
 # FIXME: [LTCat] 在游戏开局的时候可能会看到 2 然后 ding
-# TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)
-# FIXME: 物品可以丢给其他人
+# TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)