Explorar el Código

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

HerobrineXia hace 5 años
padre
commit
b593691628

+ 4 - 4
data/ltw/functions/clock/tick2.mcfunction

@@ -1,6 +1,10 @@
 # 每秒执行一次
 schedule function ltw:clock/tick2 2t replace
 
+# 死亡触发
+execute as @a[x=-12,y=7,z=-102,distance=..5] at @s run function ltw:main/player_death
+execute as @a[x=-12,y=7,z=-102,distance=..5] run tp @s -13 9 -42
+
 # 调用其他模块
 function lib:bossbar/tick2
 execute if score $state mem matches 3 run function ltw:state/3/tick2
@@ -24,7 +28,3 @@ function item:tick2
 # 全局倒计时
 execute if score $countdown_fast mem matches 1.. run scoreboard players remove $countdown_fast mem 1
 scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1
-
-# 死亡触发
-execute as @a[tag=temp_death] at @s run function ltw:main/player_death
-execute as @a[scores={death=1..}] run tag @s add temp_death

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

@@ -1,7 +1,7 @@
 # 全局初始化
 
 # 游戏数据
-setworldspawn 10 13 10
+setworldspawn -12 7 -102
 forceload remove all
 time set midnight
 weather clear
@@ -41,8 +41,6 @@ scoreboard objectives add health health "生命值"
 scoreboard objectives remove health_disp
 scoreboard objectives add health_disp dummy "生命值"
 scoreboard objectives modify health_disp rendertype hearts
-scoreboard objectives remove death
-scoreboard objectives add death deathCount "死亡触发"
 scoreboard objectives remove mem
 scoreboard objectives add mem dummy "全局变量"
 scoreboard objectives remove total_score

+ 0 - 2
data/ltw/functions/main/player_death.mcfunction

@@ -1,4 +1,2 @@
 # 当玩家死亡后触发
-scoreboard players reset @s death
-tag @s remove temp_death
 execute if score $state mem matches 5 run function ltw:state/5/player_death

+ 7 - 5
data/ltw/functions/main/player_enter.mcfunction

@@ -1,7 +1,9 @@
 # 当玩家加入游戏时触发
 
+spawnpoint @s -12 7 -102
+
 # TODO: v0.3 升级函数
-execute if entity @s[tag=!v02upgrade,scores={gold_total=1..}] run function ltw:main/player_upgrade
+execute if entity @s[tag=!v02upgrade,scores={stat_total=1..}] run function ltw:main/player_upgrade
 tag @s add v02upgrade
 
 advancement revoke @s only lib:damage_dealt
@@ -26,8 +28,8 @@ bossbar set ltw:notice players @a
 function lib:bossbar/show
 
 # TODO: https://shimo.im/docs/8dQtWhYp8rJhRRWG
-# FIXME: <! 重要> [010] 已确认确实可以用钓鱼竿获得两个奖励
+# FIXME: <! 重要> 可以用钓鱼竿获得两个奖励
 # TODO: [LTCat/HIM] 土豆的两个炸弹同时爆炸把两个人炸死,让他们俩并列第三(按存活回合数记分)
-# FIXME: [HIM] 死亡复活后可能会捡到已经在地上待了很久的 “老物品”
-# FIXME: <! 重要> [HIM] 锁定格子的物品会被带进其他小游戏
-# FIXME: [LTCat] BGM 可能会双响
+# FIXME: [LTCat] BGM 可能会双响
+# FIXME: 关掉 JourneyMap 的生物雷达
+# FIXME: <! 重要> 在未知情况下会跳过第二轮直接进入第三轮

+ 3 - 0
data/ltw/functions/main/player_upgrade.mcfunction

@@ -36,4 +36,7 @@ scoreboard players reset @s particle_type
 scoreboard players add @s gold 20
 scoreboard players add @s gold_total 20
 
+function item:shop/refresh_gold
+function item:shop/refresh_green
+
 tellraw @s ["",{"text": ">> ","color": "green","bold":true},{"text":"由于服务器升级, 绿宝石购买已经重置, 补偿的 20 金粒已发放!","color":"green"}]

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

@@ -2,6 +2,9 @@
 forceload add -32 -17 31 -80
 kill @e[type=item]
 
+# 世界边界
+worldborder set 1000000
+
 # 要求系统进入状态 0(等待大厅)
 scoreboard players set $state mem 0
 execute as @a[team=!debugging] run function ltw:state/0/player_enter

+ 3 - 0
data/ltw/functions/state/7/state_enter.mcfunction

@@ -2,6 +2,9 @@
 scoreboard players set $state mem 7
 execute as @a[team=!debugging] run function ltw:state/7/player_enter
 
+# 世界边界
+worldborder set 1000000
+
 # HUD
 scoreboard objectives setdisplay belowName total_score_disp
 scoreboard objectives setdisplay sidebar total_score

+ 0 - 2
data/mini/functions/diamond/game/respawn1.mcfunction

@@ -11,5 +11,3 @@ gamerule naturalRegeneration false
 
 # 传送玩家
 tp @s 1016 280 5016
-tag @s add respawning
-schedule function mini:diamond/game/respawn2 1t append

+ 0 - 1
data/mini/functions/diamond/game/respawn2.mcfunction

@@ -1 +0,0 @@
-tag @a remove respawning

+ 0 - 3
data/mini/functions/diamond/game_end.mcfunction

@@ -15,6 +15,3 @@ execute as @a[team=playing] run scoreboard players operation @s mini_score += @s
 
 # 清理物品栏
 clear @a[team=playing]
-
-# 世界边界
-worldborder set 1000000

+ 1 - 1
data/mini/functions/diamond/player_intro.mcfunction

@@ -1,6 +1,6 @@
 # 向单个玩家展示小游戏介绍
 tp @s[team=!debugging] 1013.47 247.63 5045.62 -178.86 17.18
-worldborder set 999999
+worldborder set 1000000
 effect give @s[team=!debugging] night_vision 1000000 0 true
 tellraw @s ["",{"text":"\n >> 钻石风暴 >>\n\n","color":"gold","bold":true}," 制作铁镐, 挖取钻石, 然后保住自己的小命!\n 不过, 或许也可以去地牢碰碰运气……\n"]
 tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"太阳落山时游戏即会结束, 然后根据持有的钻石数排名。","color":"gray"}]

+ 3 - 3
data/mini/functions/diamond/tick2.mcfunction

@@ -1,3 +1,3 @@
-execute as @a[team=playing] unless score @s death matches 1.. store result score @s posX run data get entity @s Pos[0]
-execute as @a[team=playing] unless score @s death matches 1.. store result score @s posY run data get entity @s Pos[1]
-execute as @a[team=playing] unless score @s death matches 1.. store result score @s posZ run data get entity @s Pos[2]
+execute as @a[team=playing] store result score @s posX run data get entity @s Pos[0]
+execute as @a[team=playing] store result score @s posY run data get entity @s Pos[1]
+execute as @a[team=playing] store result score @s posZ run data get entity @s Pos[2]

+ 1 - 1
data/mini/functions/diamond/tick5.mcfunction

@@ -1,7 +1,7 @@
 
 # 更新钻石数量
 execute as @a[team=playing] store result score @s diamond run clear @s diamond 0
-execute if score $countdown mem matches ..60 run effect give @a glowing 1000000 0 true
+execute if score $countdown mem matches ..60 run effect give @a[team=playing] glowing 1000000 0 true
 # effect give @a[scores={diamond=1..}] glowing 5 0 true
 
 # 显示提示

+ 2 - 2
data/mini/functions/parkour/game_start.mcfunction

@@ -1,12 +1,12 @@
 # 游戏结束倒计时
-scoreboard players set $countdown mem 140
+scoreboard players set $countdown mem 130
 
 # HUD
 scoreboard objectives setdisplay list total_score_disp
 scoreboard objectives setdisplay belowName total_score_disp
 scoreboard objectives setdisplay sidebar treasure
 scoreboard players set $bossbar_color mem 4
-scoreboard players set $countdown_max mem 140
+scoreboard players set $countdown_max mem 130
 scoreboard players set $bossbar_type mem 2
 function lib:bossbar/show
 bossbar set mini:blue name "剩余时间"

+ 2 - 1
data/test/functions/fast_countdown.mcfunction

@@ -2,4 +2,5 @@
 
 scoreboard players set #start_countdown mem 3
 scoreboard players set $countdown mem 1
-scoreboard players set $countdown_fast mem 5
+scoreboard players set $countdown_fast mem 5
+tellraw @a ["",{"text": ">> ","color": "aqua","bold": true}, {"text": "管理员按下了快进键!","color": "aqua"}]