LTCatt 6 лет назад
Родитель
Сommit
36bd09e97d

+ 4 - 4
data/item/functions/shop/buy_armor1.mcfunction

@@ -1,15 +1,15 @@
-# 金靴子 (1 gi)
+# 金靴子 (4 gi)
 # 触发器ID 3
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=0,gold=9..}] add canbuy
+tag @s[scores={shop_armor=0,gold=36..}] add canbuy
 tellraw @s[scores={shop_armor=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=0,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
 tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金靴子","color":"green"}]
 execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金靴子","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 9
+scoreboard players remove @s[tag=canbuy] gold 36
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 7 - 7
data/item/functions/shop/buy_armor2.mcfunction

@@ -1,15 +1,15 @@
-# 金头盔 (4 gi)
-# 触发器ID 4
+# 金护腿 (1 gb)
+# 触发器ID 5
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=1,gold=36..}] add canbuy
+tag @s[scores={shop_armor=1,gold=81..}] add canbuy
 tellraw @s[scores={shop_armor=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金头盔","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金头盔","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 36
+scoreboard players remove @s[tag=canbuy] gold 81
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 7 - 7
data/item/functions/shop/buy_armor3.mcfunction

@@ -1,15 +1,15 @@
-# 金护腿 (1 gb)
-# 触发器ID 5
+# 金胸甲 (3 gb)
+# 触发器ID 6
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=2,gold=81..}] add canbuy
+tag @s[scores={shop_armor=2,gold=243..}] add canbuy
 tellraw @s[scores={shop_armor=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=2,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 81
+scoreboard players remove @s[tag=canbuy] gold 243
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 0 - 16
data/item/functions/shop/buy_armor4.mcfunction

@@ -1,16 +0,0 @@
-# 金胸甲 (3 gb)
-# 触发器ID 6
-execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-tag @s remove canbuy
-tag @s[scores={shop_armor=3,gold=243..}] add canbuy
-tellraw @s[scores={shop_armor=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-tellraw @s[scores={shop_armor=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
-scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 243
-execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-execute as @s[tag=canbuy] run function item:shop/refresh_gold
-tag @s remove canbuy

+ 2 - 3
data/item/functions/shop/check.mcfunction

@@ -1,9 +1,8 @@
 execute if score @s buy_trigger matches 1 if score $state mem matches 0 run function item:shop/buy_apple1
 execute if score @s buy_trigger matches 2 if score $state mem matches 0 run function item:shop/buy_apple2
 execute if score @s buy_trigger matches 3 if score $state mem matches 0 run function item:shop/buy_armor1
-execute if score @s buy_trigger matches 4 if score $state mem matches 0 run function item:shop/buy_armor2
-execute if score @s buy_trigger matches 5 if score $state mem matches 0 run function item:shop/buy_armor3
-execute if score @s buy_trigger matches 6 if score $state mem matches 0 run function item:shop/buy_armor4
+execute if score @s buy_trigger matches 5 if score $state mem matches 0 run function item:shop/buy_armor2
+execute if score @s buy_trigger matches 6 if score $state mem matches 0 run function item:shop/buy_armor3
 execute if score @s buy_trigger matches 7 if score $state mem matches 0 run function item:shop/buy_arrow1
 execute if score @s buy_trigger matches 8 if score $state mem matches 0 run function item:shop/buy_arrow2
 execute if score @s buy_trigger matches 9 if score $state mem matches 0 run function item:shop/buy_arrow3

+ 2 - 4
data/item/functions/shop/refresh_equip.mcfunction

@@ -32,11 +32,9 @@ give @s[scores={shop_arrow=3}] tipped_arrow{Potion:"minecraft:slowness"} 2
 clear @s crossbow
 give @s[scores={shop_firework=1}] minecraft:crossbow{display:{Name:'{"text":"烟花弩","italic":false,"color":"gray"}',Lore:['{"text":"发射一个漂亮的烟花!","italic":false,"color":"gray"}']},Damage:326,Charged:1b,ChargedProjectiles:[{id:"firework_rocket",Count:1b,tag:{Fireworks:{Flight:1b,Explosions:[{Type:0b,Colors:[I;11743532,15435844,14602026,4312372,6719955,2437522,8073150],Flicker:1b}]}}}]} 1
 
-replaceitem entity @s armor.head air
-replaceitem entity @s[scores={shop_armor=2}] armor.head golden_helmet{display:{Name:'{"text":"金头盔","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.chest air
-replaceitem entity @s[scores={shop_armor=4}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=3..}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.legs air
-replaceitem entity @s[scores={shop_armor=3}] armor.legs golden_leggings{display:{Name:'{"text":"金护腿","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=2}] armor.legs golden_leggings{display:{Name:'{"text":"金护腿","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.feet air
 replaceitem entity @s[scores={shop_armor=1}] armor.feet golden_boots{display:{Name:'{"text":"金靴子","italic":false,"color":"gray"}'}}