Explorar o código

幻翼基本部署完成

LTCatt %!s(int64=6) %!d(string=hai) anos
pai
achega
25525f5794

+ 1 - 1
data/ltw/functions/main/player_leave.mcfunction

@@ -10,6 +10,6 @@ execute if score $state mem matches 1.. if score $game_type mem matches 1 if sco
 execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/player_leave
 
 # FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦
-# TODO : [010/HIM] 为幻翼小游戏地图添加基础的照明,因为这个游戏里玩家莫得夜视
 # TODO : [LTCat] 制作幻翼小游戏的原型
 # TODO : [010/HIM] 在主阶段(state 2)玩家背包里每有一个下界之星(魔晶石),给予 -10% 减速
+# TODO : [010/HIM] 倒腾主阶段地图

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

@@ -3,6 +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
 
 # 计算排名
 tag @a remove mini_rank1

+ 1 - 0
data/mini/functions/main/game_init.mcfunction

@@ -9,3 +9,4 @@ 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

+ 1 - 0
data/mini/functions/main/game_start.mcfunction

@@ -18,3 +18,4 @@ 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

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

@@ -11,4 +11,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 5 run function mini:zombie/player_enter
+execute if score $mini_type mem matches 6 run function mini:phantom/player_enter

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

@@ -3,4 +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 5 run function mini:zombie/player_intro
+execute if score $mini_type mem matches 6 run function mini:phantom/player_intro

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

@@ -2,6 +2,7 @@
 # 触发单个模块
 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
 
 # 结束游戏判定
 function mini:main/check_game_end

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

@@ -3,4 +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 5 run function mini:zombie/watcher_limit
+execute if score $mini_type mem matches 6 run function mini:phantom/watcher_limit

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

@@ -0,0 +1,2 @@
+forceload remove 1000 6000 1064 6064
+gamerule doDaylightCycle false

+ 3 - 0
data/mini/functions/phantom/game_init.mcfunction

@@ -3,6 +3,9 @@ forceload add 1000 6000 1064 6064
 
 scoreboard players set $finish_mode mem 0
 
+# 调整时间
+time set 21000t
+
 # 生成地图
 setblock 1000 4 6000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"LTCat",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:hy00",sizeY:32,sizeZ:32,showboundingbox:0b}
 setblock 1000 5 6000 redstone_block

+ 2 - 0
data/mini/functions/phantom/game_start.mcfunction

@@ -0,0 +1,2 @@
+gamerule doDaylightCycle true
+scoreboard players set $countdown mem 100

+ 20 - 0
data/mini/functions/phantom/player_enter.mcfunction

@@ -0,0 +1,20 @@
+# 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_slow
+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
+
+# 传送玩家
+tp @s[tag=!debug] 1030.5 24.5 6031.5
+
+# 调整模式
+gamemode spectator @s[tag=!debug]
+gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
+
+# 重新加入处理
+execute if entity @s[tag=rejoining] run gamemode spectator

+ 2 - 2
data/mini/functions/phantom/player_intro.mcfunction

@@ -1,8 +1,8 @@
 # 向单个玩家展示小游戏介绍
 tp @s[tag=!debug] 1062.34 27.11 6040.84 461.44 28.30
-tellraw @s ["",{"text":"\n >> 月夜狩猎 >>\n\n","color":"red","bold":true}," 击杀幻翼, 获得积分, 但击杀红色幻翼会倒扣分……\n"]
+tellraw @s ["",{"text":"\n >> 月夜狩猎 >>\n\n","color":"red","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":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
-tellraw @s ["",{"text": " <早期测试> ","color":"red","bold": true}, {"text":"这是刚做出来的新游戏, 碰到什么 Bug 都很正常!","color":"dark_red"}]
+tellraw @s ["",{"text": " <早期测试> ","color":"dark_red","bold": true}, {"text":"这是刚做出来的新游戏, 碰到什么 Bug 都很正常!","color":"dark_red"}]
 tellraw @s ""

+ 5 - 0
data/mini/functions/phantom/tick20.mcfunction

@@ -0,0 +1,5 @@
+
+# 90s:提示游戏结束
+execute if score $countdown mem matches 10 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "太阳即将升起!","color":"aqua"}]
+# 100s:游戏结束
+execute if score $countdown mem matches 0 run function mini:main/game_end

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

@@ -0,0 +1,3 @@
+# 观察者限制飞行范围
+execute as @a[gamemode=spectator] if entity @s[x=1000,y=30,z=6000,distance=100..] run spectate
+execute as @a[gamemode=spectator] if entity @s[x=1000,y=30,z=6000,distance=100..] run tp @s[tag=!debug] 1062.34 27.11 6040.84 461.44 28.30

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

@@ -1,3 +1,2 @@
 # 结束僵尸
 forceload remove 1000 5000 1050 5050
-team modify player friendlyFire true