Просмотр исходного кода

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

HerobrineXia 6 лет назад
Родитель
Сommit
c98f2ba98e

+ 5 - 3
data/ltw/functions/clock/tick20.mcfunction

@@ -14,11 +14,13 @@ execute if score $state mem matches 7 run function ltw:state/7/tick20
 # 全局倒计时
 execute if score $countdown mem matches 1.. run scoreboard players remove $countdown mem 1
 scoreboard players remove @e[scores={countdown=1..}] countdown 1
-
-# 两秒一次的支持
+# 两秒一次
 scoreboard players add $twice mem 1
 execute if score $twice mem matches 2.. run scoreboard players set $twice mem 0
 
 # 掐死原版 BGM
 stopsound @a music music.game
-stopsound @a music music.creative
+stopsound @a music music.creative
+
+# 特殊方块给予效果
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2 true

+ 4 - 0
data/ltw/functions/clock/tick5.mcfunction

@@ -8,3 +8,7 @@ function ltw:main/tick5
 
 # 死亡触发
 execute as @a[scores={death=1..,health=1..}] at @s run function ltw:main/player_death
+
+# 特殊方块给予效果
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 5 true
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true

+ 2 - 2
data/ltw/functions/main/game_end.mcfunction

@@ -49,7 +49,7 @@ tellraw @a [" ",{"text":"\n\n\n\n----- 游戏结束 -----\n","color":"green","bo
 tellraw @a [" ",{"text": "第一名 - ","color":"green"},{"selector": "@a[tag=total_rank1]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank1]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
 execute if entity @a[tag=total_rank2] run tellraw @a [" ",{"text": "第二名 - ","color":"green"},{"selector": "@a[tag=total_rank2]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank2]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
 execute if entity @a[tag=total_rank3] run tellraw @a [" ",{"text": "第三名 - ","color":"green"},{"selector": "@a[tag=total_rank3]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank3]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"}]
-tellraw @a "\n"
+tellraw @a ""
 
 # 得分金粒奖励
 execute as @a[tag=!watcher] run scoreboard players operation @s gold += @s total_score
@@ -67,7 +67,7 @@ execute as @a run scoreboard players operation @s gold_total += @s temp
 tellraw @a[tag=!watcher] [" ",{"text": "名次奖励: ","color":"gold"},{"score":{"name": "*","objective": "temp"}}," 金粒"]
 
 # 奖励结束
-tellraw @a[tag=!watcher] "\n"
+tellraw @a[tag=!watcher] ""
 
 # 返回主大厅
 schedule function ltw:state/0/state_enter 2t replace

+ 1 - 1
data/mini/functions/hotpm/game/pm_init.mcfunction

@@ -3,7 +3,7 @@ function mini:hotpm/game/pm_give
 tag @a[tag=pm_explode_last] remove pm_explode_last
 
 # 告知玩家
-tellraw @a ["",{"text":">> ","color":"red","bold": true},{"selector":"@a[tag=pm_holding]","color":"red"}," 获得了炸弹!"]
+tellraw @a ["",{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_holding]","color":"gold"}," 获得了炸弹!"]
 
 # 土豆爆炸时间 = 存活人数 * 2.5 + 3(秒)
 scoreboard players set $countdown_fast mem 30

+ 1 - 1
data/mini/functions/hotpm/player_lose_heart.mcfunction

@@ -1,6 +1,6 @@
 # 玩家失败时由玩家自己触发
 
-tellraw @a ["",{"text":">> ","color":"red","bold": true},{"selector":"@a[tag=pm_holding]","color":"red"}," 爆炸了!"]
+tellraw @a ["",{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_holding]","color":"gold"}," 爆炸了!"]
 # 增加tag
 tag @a[tag=pm_holding] add pm_explode_last
 

+ 2 - 2
data/mini/functions/hotpm/tick2.mcfunction

@@ -1,7 +1,7 @@
 
 # 随机时间
-scoreboard players set $random_min mem -3
-scoreboard players set $random_max mem 3
+scoreboard players set $random_min mem -5
+scoreboard players set $random_max mem 5
 function lib:random
 scoreboard players operation $countdown_fast mem += $random mem
 execute if score $countdown_fast mem matches ..0 run scoreboard players set $countdown_fast mem 0

+ 0 - 3
data/mini/functions/main/tick20.mcfunction

@@ -3,8 +3,5 @@
 execute if score $mini_type mem matches 1 run function mini:parkour/tick20
 execute if score $mini_type mem matches 5 run function mini:phantom/tick20
 
-# 特殊方块给予效果
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 1 true
-
 # 结束游戏判定
 function mini:main/check_game_end

+ 0 - 5
data/mini/functions/main/tick5.mcfunction

@@ -1,14 +1,9 @@
 
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/tick5
-execute if score $mini_type mem matches 2 run function mini:tntrun/tick5
 execute if score $mini_type mem matches 3 run function mini:hotpm/tick5
 execute if score $mini_type mem matches 5 run function mini:phantom/tick5
 
-# 特殊方块给予效果
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 5 true
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
-
 # 同步生命值
 scoreboard players reset * temp
 scoreboard players set @a[gamemode=!spectator] temp 20

+ 25 - 3
data/mini/functions/tntrun/game_init.mcfunction

@@ -4,8 +4,30 @@ forceload add 1000 2000 1050 2050
 scoreboard players set $finish_mode mem 0
 
 # 生成地图
-setblock 1000 10 2000 minecraft:structure_block{mode:"LOAD",name:"mini:tntrun"}
-setblock 1000 11 2000 minecraft:redstone_block
+##000
+setblock 1000 9 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun000",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1000 10 2000 minecraft:redstone_block
+##001
+setblock 1000 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun001",sizeY:32,sizeZ:8,showboundingbox:0b}
+setblock 1000 10 2032 minecraft:redstone_block
+##100
+setblock 1032 9 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun100",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1032 10 2000 minecraft:redstone_block
+##101
+setblock 1032 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun101",sizeY:32,sizeZ:8,showboundingbox:10}
+setblock 1032 10 2032 minecraft:redstone_block
+##010
+setblock 1000 52 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun010",sizeY:10,sizeZ:32,showboundingbox:0b}
+setblock 1000 51 2000 minecraft:redstone_block
+##011
+setblock 1000 52 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun011",sizeY:10,sizeZ:8,showboundingbox:0b}
+setblock 1000 51 2032 minecraft:redstone_block
+##110
+setblock 1032 52 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun110",sizeY:10,sizeZ:32,showboundingbox:0b}
+setblock 1032 51 2000 minecraft:redstone_block
+##111
+setblock 1032 52 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun111",sizeY:10,sizeZ:8,showboundingbox:0b}
+setblock 1032 51 2032 minecraft:redstone_block
 
 # 清理残余实体
 kill @e[type=arrow]
@@ -14,7 +36,7 @@ kill @e[tag=tntrun_block]
 kill @e[type=trident]
 
 # 生成奖励
-execute positioned 1011.5 15.5 2011.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/white
 
 # 伤害管理
 scoreboard players set $remove_resistance mem 0

+ 1 - 2
data/mini/functions/tntrun/player_enter.mcfunction

@@ -7,14 +7,13 @@ title @s actionbar ""
 effect clear @s
 effect give @s saturation 1000000 0 true
 gamerule naturalRegeneration true
-effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 
 # 设置玩家生命
 attribute @s generic.max_health base set 20
 
 # 传送玩家
-spreadplayers 1011.5 2011.5 4 4 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
+spreadplayers 1019.5 2020.5 4 4 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
 # schedule: tp @a ~ ~-3 ~
 
 # 两秒后才开始 TNT 掉落

+ 1 - 1
data/mini/functions/tntrun/player_enter2.mcfunction

@@ -1,2 +1,2 @@
 # spreadplayer 后不能立即传送,所以延迟 1tick
-execute as @a[tag=!watcher,tag=!rejoining] at @s run tp @s[tag=!debug] ~ ~-3 ~
+execute as @a[tag=!watcher,tag=!rejoining] at @s run tp @s[tag=!debug] ~ 34.5 ~

+ 3 - 6
data/mini/functions/tntrun/player_intro.mcfunction

@@ -1,10 +1,7 @@
 # 向单个玩家展示小游戏介绍
-tp @s[tag=!debug] 1011.5 18.0 2019.0 180 15
-tellraw @s ["",{"text":"\n >> 地陷之坛 >>\n\n","color":"gold","bold":true}," 你脚下的方块会不断塌陷! 保持移动, 千万不要停下来!\n"]
-tellraw @s ["",{"text": " <淘汰制> ","color":"red","bold": true}, {"text":"场地一共有三层, 掉到最下面即被淘汰。","color":"gray"}]
+tp @s[tag=!debug] 1023.65 20.29 2006.59 -345.99 17.34
+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"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个白色道具。","color":"gray"}]
-tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
 tellraw @s ""
-
-effect give @s night_vision 1000000 0 true

+ 4 - 2
data/mini/functions/tntrun/tick2.mcfunction

@@ -1,7 +1,9 @@
 # 控制方块消失
-
 # 修改下面这一行的数字以调整方块消失的延迟(单位为 2 刻,设置为 5 则为 10tick)
 execute as @e[tag=tntrun_block,scores={tntrun_timer=5}] at @s run setblock ~ ~ ~ air
 scoreboard players add @e[tag=tntrun_block] tntrun_timer 1
 execute as @e[tag=tntrun_block] at @s unless block ~ ~ ~ #mini:tntrun_floor run kill @s
-execute as @e[tag=tntrun_edge] at @s unless entity @a[tag=tntrun_pc,distance=..1.51] run kill @s
+execute as @e[tag=tntrun_edge] at @s unless entity @a[tag=tntrun_pc,distance=..1.51] run kill @s
+
+# 玩家死亡判断
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function mini:tntrun/player_failed

+ 0 - 2
data/mini/functions/tntrun/tick5.mcfunction

@@ -1,2 +0,0 @@
-# 玩家死亡判断
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function mini:tntrun/player_failed

+ 2 - 2
data/mini/functions/tntrun/watcher_limit.mcfunction

@@ -1,3 +1,3 @@
 # 观察者限制飞行范围
-execute as @a[gamemode=spectator] unless entity @s[x=1000,y=10,z=2000,dx=22,dz=22,dy=22] run spectate
-execute as @a[gamemode=spectator] unless entity @s[x=1000,y=10,z=2000,dx=22,dz=22,dy=22] run tp @s[tag=!debug] 1011.5 27.5 2011.5
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=10,z=2001,dx=37,dy=37,dz=37] run spectate
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=10,z=2001,dx=37,dy=37,dz=37] run tp @s[tag=!debug] 1023.65 20.29 2006.59 -345.99 17.34

+ 3 - 1
data/mini/tags/blocks/tntrun_floor.json

@@ -1,5 +1,7 @@
 {
     "values": [
-        "minecraft:cyan_terracotta"
+        "minecraft:dead_horn_coral_block",
+        "minecraft:crying_obsidian",
+        "minecraft:diamond_block"
     ]
 }