Browse Source

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

LTCatt 5 years ago
parent
commit
d1f451df06

+ 15 - 0
data/item/advancements/special/consume_totem.json

@@ -0,0 +1,15 @@
+{
+    "criteria": {
+        "consume_ga": {
+            "trigger": "minecraft:used_totem",
+            "conditions": {
+                "item": {
+                    "item": "minecraft:totem_of_undying"
+                }
+            }
+        }
+    },
+    "rewards": {
+        "function": "item:special/totem"
+    }
+}

+ 1 - 1
data/item/functions/special/enchanted_apple.mcfunction

@@ -17,4 +17,4 @@ execute unless score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> "
 # $remove_resistance 信息在小游戏初始化时提供
 # 去除buff
 execute run tag @s add consume_apple
-schedule function item:special/clear_effect 1t replace
+schedule function item:special/clear_effect 2t replace

+ 1 - 1
data/item/functions/special/golden_apple.mcfunction

@@ -17,4 +17,4 @@ execute unless score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> "
 # $remove_resistance 信息在小游戏初始化时提供
 # 去除buff
 execute run tag @s add consume_apple
-schedule function item:special/clear_effect 1t replace
+schedule function item:special/clear_effect 2t replace

+ 18 - 0
data/item/functions/special/totem.mcfunction

@@ -0,0 +1,18 @@
+# 去除进度
+advancement revoke @s only item:special/consume_totem
+
+# 有生命计数
+execute if score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 使用了不死图腾, 抵挡了一次死亡!"]
+
+
+# 无生命计数:恢复所有生命
+execute unless score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 使用了不死图腾, 并恢复到了满血!"]
+
+## 归还苹果
+#execute unless score @s mini_heart matches 1.. run tellraw @s ["",{"text": ">> ","color":"aqua","bold": true},{"text":"你只能在存在生命计数的小游戏中食用生命果!","color":"aqua"}]
+#execute unless score @s mini_heart matches 1.. run give @s minecraft:golden_apple{display:{Name:'{"text":"生命果","italic":false}',Lore:['{"text":"恢复 4 颗心或生命 +1","italic":false,"color":"gray"}']},bonus_new:0b,bonus_return:1b,is_bonus:1b,item_name:'{"text":"生命果","color":"green"}'}
+
+# $remove_resistance 信息在小游戏初始化时提供
+# 去除buff
+execute unless score @s mini_heart matches 1.. run tag @s add have_totem
+schedule function mini:main/lose_heart_effect 1t

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

@@ -19,7 +19,7 @@ execute unless entity @e[type=armor_stand,tag=shop_particle_7,tag=lobby_entity]
 execute unless entity @e[type=armor_stand,tag=shop_particle_8,tag=lobby_entity] run summon minecraft:armor_stand -14 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_8","show_particle_6","lobby_entity"]}
 execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run kill @e[type=minecart,tag=lobby_entity]
 execute unless entity @e[type=minecart,tag=lobby_entity] run kill @e[type=piglin,tag=lobby_entity,tag=shop_piglin_11]
-execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run summon minecart 4 28 -47 {Rotation:[0.0f,0.0f],Tags:["lobby_entity"],Passengers:[{id:"minecraft:piglin",Rotation:[90.0f,0.0f],Tags:["lobby_entity","shop_piglin_11"],CustomName:'{"text":"老板"}',ArmorItems:[{},{},{},{id:"player_head",Count:1b,tag:{SkullOwner:"HerobrineXia"}}],ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"gold_block",Count:1b},{}],HandDropChances:[0.0f,0.0f]}]}
+execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run summon minecart 4 28 -47 {Rotation:[0.0f,0.0f],Tags:["lobby_entity"],Passengers:[{id:"minecraft:piglin",Rotation:[90.0f,0.0f],Tags:["lobby_entity","shop_piglin_11"],CustomName:'{"text":"老板"}',ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"gold_block",Count:1b},{}],HandDropChances:[0.0f,0.0f]}]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}

+ 2 - 2
data/ltw/functions/state/0/tick5.mcfunction

@@ -46,5 +46,5 @@ execute if score #start_countdown mem matches 40 if score $count mem matches 9..
 execute if score #start_countdown mem matches 0 run function ltw:state/0/start_game
 
 # 显示信息
-execute if score #start_countdown mem matches 1..199 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
-execute if score #start_countdown mem matches 200.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]
+execute if score #start_countdown mem matches 1..199 run title @a[team=!debugging] actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
+execute if score #start_countdown mem matches 200.. run title @a[team=!debugging] actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]

+ 5 - 0
data/mini/functions/ass/give_effect.mcfunction

@@ -0,0 +1,5 @@
+# 状态效果
+effect clear @s
+effect give @s saturation 1000000 0 true
+effect give @s resistance 1000000 2 true
+effect give @s night_vision 1000000 0 true

+ 1 - 0
data/mini/functions/ass/player_death.mcfunction

@@ -2,6 +2,7 @@
 
 tag @s remove mini_running
 gamemode spectator
+effect give @s night_vision 999999 0 true
 tp @s[team=!debugging] 1032.34 27.11 7032.84 461.44 28.30
 # tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"selector": "@s","color":"red"}," 已死亡!"]
 # execute as @a at @s run function lib:sounds/error

+ 3 - 1
data/mini/functions/ass/player_enter.mcfunction

@@ -6,6 +6,8 @@ title @s actionbar ""
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true
+effect give @s night_vision 1000000 0 true
+effect give @s resistance 1000000 2 true
 
 # 设置玩家生命
 attribute @s generic.max_health base set 20
@@ -17,7 +19,7 @@ scoreboard players set @s countdown_fast 50
 scoreboard players set @s creeperUse 0
 
 # 传送玩家
-spreadplayers 1015 7015 1 10 under 36 false @s[team=playing,tag=!rejoining]
+spreadplayers 1015 7015 1 12 under 15 false @s[team=playing,tag=!rejoining]
 
 # 调整模式
 gamemode spectator @s[team=!debugging]

+ 2 - 1
data/mini/functions/ass/player_intro.mcfunction

@@ -1,5 +1,6 @@
 # 向单个玩家展示小游戏介绍
-tp @s[team=!debugging] 1015 20 7015 0 90
+tp @s[team=!debugging] 1010 23 7010 -45 45
+effect give @s night_vision 1000000 0 true
 tellraw @s ["",{"text":"\n >> 核爆刺客 >>\n\n","color":"gold","bold":true}," 在躲避苦力怕的同时,召唤苦力怕炸死对方!\n"]
 tellraw @s ["",{"text": " <淘汰制> ","color":"red","bold": true}, {"text":"被苦力怕炸死的玩家即被淘汰。","color":"gray"}]
 tellraw @s ["",{"text": " <间接 PVP> ","color":"light_purple","bold": true}, {"text":"攻击没有伤害,但可以召唤、击退苦力怕。","color":"gray"}]

+ 2 - 1
data/mini/functions/main/give_effect.mcfunction

@@ -4,4 +4,5 @@ execute if score $mini_type mem matches 3 run function mini:hotpm/give_effect
 execute if score $mini_type mem matches 4 run function mini:colormatch/give_effect
 execute if score $mini_type mem matches 5 run function mini:phantom/give_effect
 execute if score $mini_type mem matches 101 run function mini:diamond/give_effect
-execute if score $mini_type mem matches 102 run function mini:trade/give_effect
+execute if score $mini_type mem matches 102 run function mini:trade/give_effect
+execute if score $mini_type mem matches 201 run function mini:ass/give_effect

+ 2 - 0
data/mini/functions/main/lose_heart_effect.mcfunction

@@ -1,2 +1,4 @@
 execute as @a[tag=have_totem] run function mini:main/give_effect
+execute as @a[tag=have_totem] run effect give @s instant_health 1 5 true
+
 tag @a[tag=have_totem] remove have_totem

+ 2 - 1
data/mini/functions/main/player_lose_heart.mcfunction

@@ -5,7 +5,8 @@ execute if score @s mini_heart matches 1 if entity @s[nbt={SelectedItem:{id:"min
 execute if score @s mini_heart matches 1 if entity @s[nbt={Inventory:[{Slot:-106b,id:"minecraft:totem_of_undying"}]}] run tag @s add have_totem
 execute if entity @s[tag=have_totem] run effect clear @s resistance
 execute if entity @s[tag=have_totem] run effect give @s instant_damage 1 10 true
-schedule function mini:main/lose_heart_effect 1t
+# schedule function mini:main/lose_heart_effect 1t 
+# 现在触发图腾会默认清除效果了
 
 # 减少命
 execute if score @s[tag=!have_totem] mini_heart matches 1.. run scoreboard players remove @s mini_heart 1

+ 30 - 5
data/mini/tags/blocks/creeper_block.json

@@ -1,9 +1,34 @@
 {
     "values": [
-        "minecraft:clay",
-        "minecraft:white_concrete",
-        "#minecraft:wool",
-        "minecraft:diamond_block",
-        "minecraft:emerald_block"
+        "diamond_block",
+        "stone_bricks",
+        "cobblestone",
+        "gravel",
+        "mossy_stone_bricks",
+        "light_gray_terracotta",
+        "cracked_stone_bricks",
+        "spruce_log",
+        "polished_blackstone_bricks",
+        "cracked_polished_blackstone_bricks",
+        "polished_blackstone_brick_stairs",
+        "polished_blackstone_brick_wall",
+        "polished_blackstone_brick_slab",
+        "magma_block",
+        "polished_basalt",
+        "stone",
+        "dark_prismarine",
+        "green_stained_glass",
+        "orange_stained_glass",
+        "sea_lantern",
+        "dark_oak_stairs",
+        "chiseled_polished_blackstone",
+        "purple_terracotta",
+        "spruce_stairs",
+        "barrier",
+        "oak_leaves",
+        "spruce_fence",
+        "spruce_slab",
+        "netherite_block",
+        "polished_blackstone_stairs"
     ]
 }