Bladeren bron

移除猪海

LTCatt 6 jaren geleden
bovenliggende
commit
aed6ea8ff9

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

@@ -71,7 +71,7 @@ scoreboard objectives add shop_bgm dummy "BGM"
 scoreboard objectives add shop_pig dummy "猪叫"
 
 # 常量与变量初始化
-scoreboard players set $c_mini_total mem 7
+scoreboard players set $c_mini_total mem 6
 scoreboard players set #const_2 mem 2
 scoreboard players set #const_5 mem 5
 scoreboard players set #const_9 mem 9

+ 1 - 1
data/ltw/functions/state/3/state_enter.mcfunction

@@ -19,7 +19,7 @@ scoreboard players set $countdown mem 3
 scoreboard players set $tempo_enable mem 0
 
 # 小游戏编号
-# 1 跑酷;2 TNT Run;3 热土豆;4 陷阱迷阵;5 僵尸
+# 1 跑酷;2 TNT Run;3 热土豆;4 陷阱迷阵
 # 优化下一次游戏的选择:生成一个 1~[最大游戏编号] 的 randomarray,每次从其中取下一个数。
 execute unless data storage ltw:mini types[0] run function ltw:state/3/newarray
 execute store result score $mini_type mem run data get storage ltw:mini types[0]

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

@@ -1,4 +1,3 @@
 # 检测分数调用对应函数
 execute if score $mini_type mem matches 3 run function mini:hotpm/game/damage_taken
-execute if score $mini_type mem matches 5 run function mini:zombie/game/damage_taken
-execute if score $mini_type mem matches 7 run function mini:slime/game/damage_taken
+execute if score $mini_type mem matches 6 run function mini:slime/game/damage_taken

+ 2 - 3
data/mini/functions/main/game_end.mcfunction

@@ -3,9 +3,8 @@ execute if score $mini_type mem matches 1 run function mini:parkour/game_end
 execute if score $mini_type mem matches 2 run function mini:tntrun/game_end
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_end
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_end
-execute if score $mini_type mem matches 5 run function mini:zombie/game_end
-execute if score $mini_type mem matches 6 run function mini:phantom/game_end
-execute if score $mini_type mem matches 7 run function mini:slime/game_end
+execute if score $mini_type mem matches 5 run function mini:phantom/game_end
+execute if score $mini_type mem matches 6 run function mini:slime/game_end
 
 # 计算排名
 tag @a remove mini_rank1

+ 2 - 3
data/mini/functions/main/game_init.mcfunction

@@ -8,6 +8,5 @@ execute if score $mini_type mem matches 1 run function mini:parkour/game_init
 execute if score $mini_type mem matches 2 run function mini:tntrun/game_init
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_init
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_init
-execute if score $mini_type mem matches 5 run function mini:zombie/game_init
-execute if score $mini_type mem matches 6 run function mini:phantom/game_init
-execute if score $mini_type mem matches 7 run function mini:slime/game_init
+execute if score $mini_type mem matches 5 run function mini:phantom/game_init
+execute if score $mini_type mem matches 6 run function mini:slime/game_init

+ 2 - 3
data/mini/functions/main/game_start.mcfunction

@@ -2,6 +2,5 @@ execute if score $mini_type mem matches 1 run function mini:parkour/game_start
 execute if score $mini_type mem matches 2 run function mini:tntrun/game_start
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_start
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_start
-execute if score $mini_type mem matches 5 run function mini:zombie/game_start
-execute if score $mini_type mem matches 6 run function mini:phantom/game_start
-execute if score $mini_type mem matches 7 run function mini:slime/game_start
+execute if score $mini_type mem matches 5 run function mini:phantom/game_start
+execute if score $mini_type mem matches 6 run function mini:slime/game_start

+ 2 - 3
data/mini/functions/main/player_death.mcfunction

@@ -1,4 +1,3 @@
 # 玩家死亡后触发
-execute if score $mini_type mem matches 5 run function mini:zombie/player_failed
-execute if score $mini_type mem matches 6 run function mini:phantom/player_failed
-execute if score $mini_type mem matches 7 run function mini:slime/player_failed
+execute if score $mini_type mem matches 5 run function mini:phantom/player_failed
+execute if score $mini_type mem matches 6 run function mini:slime/player_failed

+ 2 - 3
data/mini/functions/main/player_enter.mcfunction

@@ -13,6 +13,5 @@ execute if score $mini_type mem matches 1 run function mini:parkour/player_enter
 execute if score $mini_type mem matches 2 run function mini:tntrun/player_enter
 execute if score $mini_type mem matches 3 run function mini:hotpm/player_enter
 execute if score $mini_type mem matches 4 run function mini:colormatch/player_enter
-execute if score $mini_type mem matches 5 run function mini:zombie/player_enter
-execute if score $mini_type mem matches 6 run function mini:phantom/player_enter
-execute if score $mini_type mem matches 7 run function mini:slime/player_enter
+execute if score $mini_type mem matches 5 run function mini:phantom/player_enter
+execute if score $mini_type mem matches 6 run function mini:slime/player_enter

+ 2 - 3
data/mini/functions/main/player_intro.mcfunction

@@ -3,6 +3,5 @@ execute if score $mini_type mem matches 1 run function mini:parkour/player_intro
 execute if score $mini_type mem matches 2 run function mini:tntrun/player_intro
 execute if score $mini_type mem matches 3 run function mini:hotpm/player_intro
 execute if score $mini_type mem matches 4 run function mini:colormatch/player_intro
-execute if score $mini_type mem matches 5 run function mini:zombie/player_intro
-execute if score $mini_type mem matches 6 run function mini:phantom/player_intro
-execute if score $mini_type mem matches 7 run function mini:slime/player_intro
+execute if score $mini_type mem matches 5 run function mini:phantom/player_intro
+execute if score $mini_type mem matches 6 run function mini:slime/player_intro

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

@@ -1,9 +1,8 @@
 
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/tick20
-execute if score $mini_type mem matches 5 run function mini:zombie/tick20
-execute if score $mini_type mem matches 6 run function mini:phantom/tick20
-execute if score $mini_type mem matches 7 run function mini:slime/tick20
+execute if score $mini_type mem matches 5 run function mini:phantom/tick20
+execute if score $mini_type mem matches 6 run function mini:slime/tick20
 
 # 结束游戏判定
 function mini:main/check_game_end

+ 2 - 3
data/mini/functions/main/watcher_limit.mcfunction

@@ -3,6 +3,5 @@ execute if score $mini_type mem matches 1 run function mini:parkour/watcher_limi
 execute if score $mini_type mem matches 2 run function mini:tntrun/watcher_limit
 execute if score $mini_type mem matches 3 run function mini:hotpm/watcher_limit
 execute if score $mini_type mem matches 4 run function mini:colormatch/watcher_limit
-execute if score $mini_type mem matches 5 run function mini:zombie/watcher_limit
-execute if score $mini_type mem matches 6 run function mini:phantom/watcher_limit
-execute if score $mini_type mem matches 7 run function mini:slime/watcher_limit
+execute if score $mini_type mem matches 5 run function mini:phantom/watcher_limit
+execute if score $mini_type mem matches 6 run function mini:slime/watcher_limit

+ 0 - 4
data/mini/functions/zombie/game/damage_taken.mcfunction

@@ -1,4 +0,0 @@
-# 给予效果并设置分数
-execute unless score @s countdown matches 1.. run effect give @s resistance 2 4
-execute unless score @s countdown matches 1.. run effect give @s speed 2 1
-execute unless score @s countdown matches 1.. run scoreboard players set @s countdown 3

+ 0 - 13
data/mini/functions/zombie/game/give_equip.mcfunction

@@ -1,13 +0,0 @@
-# 将无装备猪灵变为有装备猪灵
-
-tag @s remove empty_pig
-
-# 生成随机数
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 4
-function lib:random
-
-# 给予装备
-execute if score $random mem matches 1..2 run replaceitem entity @s weapon.mainhand minecraft:crossbow
-execute if score $random mem matches 3..4 run replaceitem entity @s weapon.mainhand minecraft:golden_sword
-execute if score $random mem matches 2..3 run replaceitem entity @s armor.legs minecraft:golden_leggings

+ 0 - 15
data/mini/functions/zombie/game/summon_empty.mcfunction

@@ -1,15 +0,0 @@
-# 召唤无装备猪灵
-scoreboard players set $random_min mem 0
-scoreboard players set $random_max mem 4
-function lib:random
-
-execute if score $random mem matches 0 positioned 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b,Tags:["mini_mob","empty_pig"]}
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b,Tags:["mini_mob","empty_pig"]}
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b,Tags:["mini_mob","empty_pig"]}
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b,Tags:["mini_mob","empty_pig"]}
-
-# 提高追踪范围
-execute as @e[type=piglin] run attribute @s generic.follow_range base set 35
-
-# 关闭怪物间友伤
-team join white @e[tag=mini_mob]

+ 0 - 16
data/mini/functions/zombie/game/summon_equip.mcfunction

@@ -1,16 +0,0 @@
-# 召唤有装备猪灵
-scoreboard players set $random_min mem 0
-scoreboard players set $random_max mem 4
-function lib:random
-
-execute if score $random mem matches 0 positioned 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
-execute as @e[type=piglin] run data merge entity @s {IsImmuneToZombification:1b,Tags:["mini_mob"],IsBaby:0b}
-
-# 提高追踪范围
-execute as @e[type=piglin] run attribute @s generic.follow_range base set 35
-
-# 关闭怪物间友伤
-team join white @e[tag=mini_mob]

+ 0 - 2
data/mini/functions/zombie/game_end.mcfunction

@@ -1,2 +0,0 @@
-# 结束僵尸
-forceload remove 1000 5000 1050 5050

+ 0 - 27
data/mini/functions/zombie/game_init.mcfunction

@@ -1,27 +0,0 @@
-# 初始化僵尸地图
-forceload add 1000 5000 1050 5050
-
-scoreboard players set $finish_mode mem 0
-
-# 生成地图
-setblock 1000 10 5000 minecraft:structure_block{mode:"LOAD",name:"mini:zombie"}
-setblock 1000 11 5000 minecraft:redstone_block
-
-# 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
-kill @e[type=trident]
-tp @e[tag=mini_mob] ~ -100 ~
-
-# 伤害管理
-scoreboard players set $remove_resistance mem 1
-team modify player friendlyFire false
-team modify player collisionRule always
-gamerule fallDamage false
-
-# 先召唤几只
-function mini:zombie/game/summon_empty
-function mini:zombie/game/summon_empty
-function mini:zombie/game/summon_empty
-function mini:zombie/game/summon_empty
-function mini:zombie/game/summon_empty

+ 0 - 8
data/mini/functions/zombie/game_start.mcfunction

@@ -1,8 +0,0 @@
-scoreboard players set $countdown mem 170
-
-# HUD
-execute if score $mini_type mem matches 5 run scoreboard objectives setdisplay list health_disp
-execute if score $mini_type mem matches 5 run scoreboard objectives setdisplay belowName health_disp
-execute if score $mini_type mem matches 5 run scoreboard objectives setdisplay sidebar total_score
-scoreboard players set $bossbar_type mem 0
-function lib:bossbar/show

+ 0 - 24
data/mini/functions/zombie/player_enter.mcfunction

@@ -1,24 +0,0 @@
-# 单个玩家开始小游戏时执行
-function lib:sounds/music/mini_fast
-title @s clear
-title @s actionbar ""
-
-# 状态效果
-effect clear @s
-effect give @s saturation 1000000 0 true
-effect give @s instant_health 10 0 true
-gamerule naturalRegeneration false
-effect give @s night_vision 1000000 0 true
-
-# 设置玩家生命
-attribute @s generic.max_health base set 20
-
-# 传送玩家
-tp @s[tag=!debug] 1010.5 12 5013.0
-
-# 调整模式
-gamemode spectator @s[tag=!debug]
-gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
-
-# 重新加入处理
-execute if entity @s[tag=rejoining] run function mini:zombie/player_failed

+ 0 - 5
data/mini/functions/zombie/player_failed.mcfunction

@@ -1,5 +0,0 @@
-# 玩家死亡时由玩家自己触发
-function mini:main/player_failed
-
-# 给死亡玩家加夜视
-effect give @s night_vision 1000000 0 true

+ 0 - 10
data/mini/functions/zombie/player_intro.mcfunction

@@ -1,10 +0,0 @@
-# 向单个玩家展示小游戏介绍
-tp @s[tag=!debug] 1010.5 20 5006.0 0 25
-tellraw @s ["",{"text":"\n >> 猪海寻路 >>\n\n","color":"gold","bold":true}," 猪灵正不断地涌现……努力生存, 成为最后的幸存者吧!\n"]
-tellraw @s ["",{"text": " <死亡淘汰制> ","color":"red","bold": true}, {"text":"生命无法自然恢复, 被猪灵杀死时即被淘汰。","color":"gray"}]
-tellraw @s ["",{"text": " <PVE> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家, 但可以杀死猪灵。","color":"gray"}]
-tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"将会随着时间推移生成 2 个白色道具。","color":"gray"}]
-tellraw @s ["",{"text": " <即将移除> ","color":"dark_red","bold": true}, {"text":"这个小游戏将在不久后被移除。","color":"dark_red"}]
-tellraw @s ""
-
-effect give @s night_vision 1000000 0 true

+ 0 - 33
data/mini/functions/zombie/tick20.mcfunction

@@ -1,33 +0,0 @@
-# 随机召唤怪物
-
-# 生成随机数
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 100
-function lib:random
-
-# 赋予缓慢效果
-execute if score $countdown mem matches ..30 run effect give @e[tag=mini_mob,limit=2,sort=random] speed 2 1
-execute if score $countdown mem matches ..80 run effect give @e[tag=mini_mob,limit=2,sort=random] resistance 2 1
-execute if score $countdown mem matches ..105 run effect give @e[tag=mini_mob,limit=1,sort=random] speed 2 0
-execute if score $countdown mem matches 131..170 run effect give @e[tag=mini_mob,limit=2,sort=random] slowness 2 0
-
-# 显示提示
-execute if score $countdown mem matches 155 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "补给物资已经送达!","color":"aqua"}]
-execute if score $countdown mem matches 130 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "猪灵开始摆脱缓慢的束缚了!","color":"red"}]
-execute if score $countdown mem matches 105 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "补给物资已经送达!","color":"aqua"}]
-execute if score $countdown mem matches 80 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "猪灵开始取回他们的装备了!","color":"red"}]
-execute if score $countdown mem matches 80 run scoreboard players set $random mem 1
-# execute if score $countdown mem matches 55 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "补给物资已经送达!","color":"aqua"}]
-
-# 召唤猪灵
-execute if score $random mem matches ..20 if score $countdown mem matches 81.. run function mini:zombie/game/summon_empty
-execute if score $random mem matches ..20 if score $countdown mem matches ..80 unless entity @e[tag=empty_pig] run function mini:zombie/game/summon_equip
-execute if score $random mem matches ..20 if score $countdown mem matches ..80 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
-execute if score $random mem matches 21..30 if score $countdown mem matches ..5 unless entity @e[tag=empty_pig] run function mini:zombie/game/summon_equip
-execute if score $random mem matches 21..30 if score $countdown mem matches ..5 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
-
-# 生成奖励
-execute if score $random mem matches ..50 if score $countdown mem matches 155 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/auto/white
-execute if score $random mem matches 51.. if score $countdown mem matches 155 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/auto/white
-execute if score $random mem matches ..50 if score $countdown mem matches 105 run execute positioned 1015.5 11.0 5022.0 run function item:bonus_item/gameparty/auto/white
-execute if score $random mem matches 51.. if score $countdown mem matches 105 run execute positioned 1005.5 11.0 5004.0 run function item:bonus_item/gameparty/auto/white

+ 0 - 3
data/mini/functions/zombie/watcher_limit.mcfunction

@@ -1,3 +0,0 @@
-# 观察者限制飞行范围
-execute as @a[gamemode=spectator] unless entity @s[x=1001,y=11,z=5001,dx=18,dy=10,dz=23] run spectate
-execute as @a[gamemode=spectator] unless entity @s[x=1001,y=11,z=5001,dx=18,dy=10,dz=23] run tp @s[tag=!debug] 1010.5 20 5006.0 0 25