Forráskód Böngészése

史莱姆阶段性攻击力提高

LTCatt 6 éve
szülő
commit
ccc64dce4e

+ 3 - 0
data/mini/functions/slime/game/set_attack.mcfunction

@@ -0,0 +1,3 @@
+execute if score $countdown mem matches 61.. as @e[type=slime] run attribute @s minecraft:generic.attack_damage base set 2
+execute if score $countdown mem matches 2..60 as @e[type=slime] run attribute @s minecraft:generic.attack_damage base set 3.5
+execute if score $countdown mem matches ..1 as @e[type=slime] run attribute @s minecraft:generic.attack_damage base set 5

+ 1 - 1
data/mini/functions/slime/game/summon.mcfunction

@@ -1,4 +1,4 @@
 # 召唤史莱姆
 summon slime 1012.0 6.01 7015.0 {Size:2}
 effect give @e[type=slime] resistance 1000000 5 true
-schedule function mini:slime/game/summon2 1t
+schedule function mini:slime/game/set_attack 1t

+ 0 - 1
data/mini/functions/slime/game/summon2.mcfunction

@@ -1 +0,0 @@
-execute as @e[type=slime] run attribute @s minecraft:generic.attack_damage base set 3.5

+ 1 - 1
data/mini/functions/slime/game_start.mcfunction

@@ -3,4 +3,4 @@
 function mini:slime/game/summon
 
 # 史莱姆刷新倒计时
-scoreboard players set $countdown mem 30
+scoreboard players set $countdown mem 120

+ 27 - 9
data/mini/functions/slime/tick20.mcfunction

@@ -1,10 +1,28 @@
 
-# 显示提示
-execute if score $countdown mem matches 5 run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"text": "新的史莱姆将在 5 秒后空投到球场中央!","color":"gold"}]
-execute if score $countdown mem matches 5 as @a at @s run function lib:sounds/error
-
-# 召唤
-execute if score $countdown mem matches 0 run function mini:slime/game/summon
-execute if score $countdown mem matches 0 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "新的史莱姆已空投!","color":"red"}]
-execute if score $countdown mem matches 0 as @a at @s run function lib:sounds/teleport
-scoreboard players set $countdown mem 30
+# 召唤提示 1
+execute if score $countdown mem matches 95 run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"text": "新的史莱姆将在 5 秒后空投到球场中央!","color":"gold"}]
+execute if score $countdown mem matches 95 as @a at @s run function lib:sounds/error
+
+# 召唤 1
+execute if score $countdown mem matches 90 run function mini:slime/game/summon
+execute if score $countdown mem matches 90 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "新的史莱姆已空投!","color":"red"}]
+execute if score $countdown mem matches 90 as @a at @s run function lib:sounds/teleport
+
+# 属性提升 1
+execute if score $countdown mem matches 60 run function mini:slime/game/set_attack
+execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "史莱姆的攻击力提高了!","color":"red"}]
+execute if score $countdown mem matches 60 as @a at @s run function lib:sounds/error
+
+# 召唤提示 2
+execute if score $countdown mem matches 35 run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"text": "新的史莱姆将在 5 秒后空投到球场中央!","color":"gold"}]
+execute if score $countdown mem matches 35 as @a at @s run function lib:sounds/error
+
+# 召唤 2
+execute if score $countdown mem matches 30 run function mini:slime/game/summon
+execute if score $countdown mem matches 30 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "新的史莱姆已空投!","color":"red"}]
+execute if score $countdown mem matches 30 as @a at @s run function lib:sounds/teleport
+
+# 属性提升 2
+execute if score $countdown mem matches 1 run function mini:slime/game/set_attack
+execute if score $countdown mem matches 1 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "史莱姆的攻击力提高了!","color":"red"}]
+execute if score $countdown mem matches 1 as @a at @s run function lib:sounds/error