Browse Source

Merge branch 'master' of github.com:LTCatt/LTW3

HerobrineXia 6 years ago
parent
commit
6a7015e283

+ 3 - 3
data/item/functions/shop/buy_firework.mcfunction

@@ -1,4 +1,4 @@
-# 漂亮烟花 (1 gb)
+# 漂亮的烟花 (1 gb)
 # 触发器ID 19
 execute unless entity @s[scores={shop_firework=0..}] run scoreboard players set @s shop_firework 0
 tag @s remove canbuy
@@ -6,8 +6,8 @@ tag @s[scores={shop_firework=0,gold=81..}] add canbuy
 tellraw @s[scores={shop_firework=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
 tellraw @s[scores={shop_firework=0,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_firework=..-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_firework 1
 scoreboard players remove @s[tag=canbuy] gold 81
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error

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

@@ -1,18 +0,0 @@
-# 速度药 (1 gb)
-# 触发器ID 9
-execute unless entity @s[scores={shop_potion=0..}] run scoreboard players set @s shop_potion 0
-tag @s remove canbuy
-tag @s[scores={shop_potion=..0,gold=81..}] add canbuy
-
-tellraw @s[scores={shop_potion=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_potion=..0,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"速度 (0:20) 药水","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"速度 (0:20) 药水","color":"green"}]
-scoreboard players add @s[tag=canbuy] shop_potion 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

+ 19 - 6
data/item/functions/shop/refresh_equip.mcfunction

@@ -1,25 +1,38 @@
 # 刷新单个玩家购买的物品
 
+clear @s bow
+give @s[scores={shop_bow=1}] bow{display:{Name:'{"text":"弓","italic":false,"color":"gray"}'},Damage:381}
+
 clear @s wooden_shovel
 clear @s stone_shovel
 clear @s iron_shovel
+clear @s diamond_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"}'}}
+give @s[scores={shop_weapon=4}] diamond_shovel{display:{Name:'{"text":"钻石锹","italic":false,"color":"gray"}'}}
 
 clear @s splash_potion
-give @s[scores={shop_potion=1}] splash_potion{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:400}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型速度药水","italic":false,"color":"gray"}'}}
+give @s[scores={shop_potion_spd=1}] splash_potion{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:300}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型迅捷药水","italic":false,"color":"gray"}'}}
+give @s[scores={shop_potion_spd=2}] splash_potion{CustomPotionEffects:[{Id:1,Amplifier:1,Duration:300}],CustomPotionColor:8039610,display:{Name:'{"text":"喷溅型迅捷药水","italic":false,"color":"gray"}'}}
+give @s[scores={shop_potion_rst=1}] splash_potion{CustomPotionEffects:[{Id:11,Amplifier:0,Duration:400}],CustomPotionColor:9913400,display:{Name:'{"text":"喷溅型抵抗药水","italic":false,"color":"gray"}'}}
 
 clear @s golden_apple
+clear @s enchanted_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"}'}}
+give @s[scores={shop_apple=2}] enchanted_golden_apple{display:{Name:'{"text":"附魔生命果","italic":false}',Lore:['{"text":"恢复到满血或生命加倍","italic":false,"color":"gray"}']}}
+scoreboard players reset @s shop_apple
 
 clear @s arrow
-give @s[scores={shop_arrow=1}] arrow 2
-give @s[scores={shop_arrow=2}] tipped_arrow{Potion:"minecraft:slowness"} 3
+give @s[scores={shop_arrow=1}] arrow
+give @s[scores={shop_arrow=2}] arrow 2
+give @s[scores={shop_arrow=3}] tipped_arrow{Potion:"minecraft:slowness"} 2
 
 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[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=3}] armor.chest leather_chestplate{display:{Name:'{"text":"皮革外套","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=4}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.legs air
-replaceitem entity @s[scores={shop_armor=2}] armor.legs leather_leggings{display:{Name:'{"text":"皮革裤子","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=3}] 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.legs golden_boots{display:{Name:'{"text":"金靴子","italic":false,"color":"gray"}'}}

+ 1 - 0
data/ltw/functions/state/0/player_enter.mcfunction

@@ -18,6 +18,7 @@ effect clear @s
 effect give @s saturation 1000000 0 true
 gamerule naturalRegeneration true
 effect give @s resistance 1000000 4 true
+effect give @s weakness 1000000 4 true
 
 # 冒险模式
 gamemode adventure @s[tag=!debug]