LTCatt 6 vuotta sitten
vanhempi
sitoutus
263487fed8

+ 1 - 1
data/item/functions/bonus_item/add_score.mcfunction

@@ -32,4 +32,4 @@ execute if score #bonus_add_score mem matches 200 run scoreboard players remove
 
 # 300:金粒 +1
 execute if score #bonus_add_score mem matches 300 run scoreboard players add @s gold 1
-execute if score #bonus_add_score mem matches 300 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"text": "1 金粒","color":"aqua"}]
+execute if score #bonus_add_score mem matches 300 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 1 金粒"]

+ 18 - 0
data/item/functions/shop/buy_orange.mcfunction

@@ -0,0 +1,18 @@
+# 活跃橙 (2 gb)
+
+execute unless entity @s[scores={shop_orange=0..}] run scoreboard players set @s shop_orange 0
+tag @s remove canbuy
+tag @s[scores={shop_orange=..0,gold=162..}] add canbuy
+
+tellraw @s[scores={shop_orange=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_orange=..0,gold=..161}] ["",{"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_orange 1
+scoreboard players remove @s[tag=canbuy] gold 162
+
+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

+ 6 - 6
data/item/functions/shop/buy_weapon2.mcfunction

@@ -1,17 +1,17 @@
-# 木斧 (6 gi)
+# 石锹 (4 gi)
 
 execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
 tag @s remove canbuy
-tag @s[scores={shop_weapon=1,gold=54..}] add canbuy
+tag @s[scores={shop_weapon=1,gold=36..}] add canbuy
 
 tellraw @s[scores={shop_weapon=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_weapon=1,gold=..53}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_weapon=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_weapon=..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_weapon 1
-scoreboard players remove @s[tag=canbuy] gold 54
+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

+ 19 - 0
data/item/functions/shop/buy_weapon3.mcfunction

@@ -0,0 +1,19 @@
+# 铁锹 (1 gb)
+
+execute unless entity @s[scores={shop_weapon=0..}] run scoreboard players set @s shop_weapon 0
+tag @s remove canbuy
+tag @s[scores={shop_weapon=1,gold=81..}] add canbuy
+
+tellraw @s[scores={shop_weapon=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_weapon=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_weapon=..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"}]
+scoreboard players add @s[tag=canbuy] shop_weapon 1
+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

+ 10 - 8
data/item/functions/shop/refresh_equip.mcfunction

@@ -1,13 +1,11 @@
 # 刷新单个玩家购买的物品
 
-clear @s arrow
-give @s[scores={shop_arrow=1}] arrow 2
-give @s[scores={shop_arrow=2}] tipped_arrow{Potion:"minecraft:slowness"} 3
-
-clear @s wooden_hoe
-clear @s wooden_axe
-give @s[scores={shop_weapon=1}] wooden_hoe{display:{Name:'{"text":"木锹","italic":false,"color":"gray"}'}}
-give @s[scores={shop_weapon=2}] wooden_axe{display:{Name:'{"text":"木斧","italic":false,"color":"gray"}'}}
+clear @s wooden_shovel
+clear @s stone_shovel
+clear @s iron_shovel
+give @s[scores={shop_weapon=1}] wooden_shovel{display:{Name:'{"text":"木锹","italic":false,"color":"gray"}'}}
+give @s[scores={shop_weapon=2}] stone_shovel{display:{Name:'{"text":"石锹","italic":false,"color":"gray"}'}}
+give @s[scores={shop_weapon=3}] iron_shovel{display:{Name:'{"text":"铁锹","italic":false,"color":"gray"}'}}
 
 clear @s potion
 give @s[scores={shop_potion=1}] potion{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:400}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型速度药水","italic":false,"color":"gray"}'}}
@@ -15,6 +13,10 @@ give @s[scores={shop_potion=1}] potion{CustomPotionEffects:[{Id:1,Amplifier:0,Du
 clear @s golden_apple
 give @s[scores={shop_apple=1}] golden_apple{display:{Lore:['{"text":"恢复 4 颗心或生命 +1","italic":false,"color":"gray"}'],Name:'{"text":"生命果","italic":false,"color":"green"}'}}
 
+clear @s arrow
+give @s[scores={shop_arrow=1}] arrow 2
+give @s[scores={shop_arrow=2}] tipped_arrow{Potion:"minecraft:slowness"} 3
+
 replaceitem entity @s armor.head air
 replaceitem entity @s[scores={shop_armor=1}] armor.head leather_helmet{display:{Name:'{"text":"皮革帽子","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.chest air

+ 1 - 0
data/ltw/functions/init.mcfunction

@@ -57,6 +57,7 @@ scoreboard objectives add shop_potion dummy "药水升级"
 scoreboard objectives add shop_apple dummy "苹果升级"
 scoreboard objectives add shop_armor dummy "护甲升级"
 scoreboard objectives add shop_weapon dummy "武器升级"
+scoreboard objectives add shop_orange dummy "活跃橙升级"
 
 # 常量与变量初始化
 scoreboard players set $c_mini_total mem 7