Browse Source

修复着火 Bug

LTCatt 6 years ago
parent
commit
5f9f81227a

+ 1 - 1
data/lib/functions/random.mcfunction

@@ -9,4 +9,4 @@ scoreboard players add $random_max mem 1
 scoreboard players operation $random mem %= $random_max mem
 scoreboard players operation $random mem += $random_min mem
 
-# TODO : 血量上限改变依然会触发假死
+# TODO : *血量上限改变依然会触发假死

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

@@ -29,7 +29,6 @@ scoreboard players set $ game_id 0
 #   minigame总数
 scoreboard players set $global_mini_count mem 4
 
-
 # 队伍
 team remove ltw
 team add ltw "龙猫战争3"

+ 4 - 5
data/ltw/functions/state/0/player_enter.mcfunction

@@ -1,18 +1,17 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
-gamemode creative
 title @s clear
 title @s actionbar ""
 
+# 重置玩家血量上限
+execute as @a run attribute @s generic.max_health base set 20
+
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true
-effect give @s instant_health 10 0 true
+gamerule naturalRegeneration true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 
-# 设置血量上限
-execute as @a run attribute @s generic.max_health base set 20
-
 # 冒险模式
 gamemode adventure
 

+ 1 - 2
data/ltw/functions/state/3/player_enter.mcfunction

@@ -1,12 +1,11 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
-gamemode creative
 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 true
 effect give @s blindness 1000000 0 true
 
 # 自由旁观

+ 1 - 2
data/ltw/functions/state/4/player_enter.mcfunction

@@ -1,12 +1,11 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 
 # 显示小游戏介绍

+ 1 - 2
data/ltw/functions/state/6/player_enter.mcfunction

@@ -1,12 +1,11 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 
 # 显示小游戏结果

+ 4 - 2
data/ltw/functions/state/7/player_enter.mcfunction

@@ -1,12 +1,14 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
-gamemode creative
 title @s clear
 title @s actionbar ""
 
+# 重置玩家血量上限
+execute as @a run attribute @s generic.max_health base set 20
+
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true
-effect give @s instant_health 10 0 true
+gamerule naturalRegeneration true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 

+ 2 - 2
data/mini/functions/colormatch/game_init.mcfunction

@@ -1,7 +1,7 @@
 # 初始化地图
 forceload add 1001 4000 1075 4025
-fill 1049 10 4025 1075 10 3999 minecraft:bedrock
-fill 1074 11 4000 1050 11 4024 lava
+fill 1049 10 4025 1075 10 3999 bedrock
+fill 1074 11 4000 1050 11 4024 magma_block
 fill 1074 15 4000 1050 15 4024 stone
 fill 1075 11 3999 1075 40 4025 stone
 fill 1075 11 3999 1049 40 3999 stone

+ 2 - 2
data/mini/functions/colormatch/player_enter.mcfunction

@@ -1,11 +1,11 @@
 # 单个玩家开始小游戏时执行
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 

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

@@ -1 +1 @@
-execute as @a[tag=mini_running] at @s if block ~ ~ ~ lava run function mini:colormatch/player_lose_heart
+execute as @a[tag=mini_running] at @s if block ~ ~ ~ magma_block run function mini:colormatch/player_lose_heart

+ 3 - 3
data/mini/functions/hotpm/player_enter.mcfunction

@@ -1,11 +1,11 @@
 # 单个玩家开始小游戏时执行
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 
@@ -25,7 +25,7 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining]
 # 设置玩家生命数量
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 3
 function mini:main/player_max_health
-# TODO 灭火无效
+# TODO *灭火无效
 
 # 重新加入处理
 execute if entity @s[tag=rejoining] run function mini:hotpm/player_lose_heart

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

@@ -24,8 +24,5 @@ execute as @a[tag=!mini_rank1,tag=!mini_rank2] unless entity @a[tag=mini_rank3]
 # 4
 tag @a[tag=!mini_rank1,tag=!mini_rank2,tag=!mini_rank3,tag=!watcher] add mini_rank4
 
-# 重置玩家血量上限
-execute as @a run attribute @s generic.max_health base set 20
-
 # 进入状态 6
 function ltw:state/6/state_enter

+ 1 - 1
data/mini/functions/main/show_result.mcfunction

@@ -10,4 +10,4 @@ scoreboard players add @s[tag=mini_rank2,tag=!watcher] total_score 2
 scoreboard players add @s[tag=mini_rank3,tag=!watcher] total_score 1
 scoreboard players add @s[tag=mini_rank4,tag=!watcher] total_score 0
 
-# TODO 进入游戏会误判离开
+# TODO *进入游戏会误判离开

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

@@ -1,12 +1,11 @@
 # 单个玩家开始小游戏时执行
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 

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

@@ -1,11 +1,11 @@
 # 单个玩家开始小游戏时执行
-gamemode creative
 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 true
 effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 

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

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