Bladeren bron

移除史莱姆

LTCatt 6 jaren geleden
bovenliggende
commit
795daed08a
35 gewijzigde bestanden met toevoegingen van 9 en 169 verwijderingen
  1. BIN
      data/backup/slime.zip
  2. 1 1
      data/ltw/functions/init.mcfunction
  3. 0 5
      data/ltw/functions/state/0/player_enter.mcfunction
  4. 1 1
      data/ltw/functions/state/3/newarray.mcfunction
  5. 0 1
      data/ltw/functions/state/3/state_enter.mcfunction
  6. 1 2
      data/mini/functions/main/damage_dealt.mcfunction
  7. 1 2
      data/mini/functions/main/damage_taken.mcfunction
  8. 0 1
      data/mini/functions/main/game_end.mcfunction
  9. 0 1
      data/mini/functions/main/game_init.mcfunction
  10. 1 2
      data/mini/functions/main/game_start.mcfunction
  11. 0 1
      data/mini/functions/main/init.mcfunction
  12. 0 1
      data/mini/functions/main/player_death.mcfunction
  13. 1 2
      data/mini/functions/main/player_enter.mcfunction
  14. 1 2
      data/mini/functions/main/player_intro.mcfunction
  15. 0 1
      data/mini/functions/main/tick1.mcfunction
  16. 1 2
      data/mini/functions/main/tick2.mcfunction
  17. 0 1
      data/mini/functions/main/tick20.mcfunction
  18. 1 2
      data/mini/functions/main/watcher_limit.mcfunction
  19. 0 1
      data/mini/functions/slime/game/clear_effect.mcfunction
  20. 0 2
      data/mini/functions/slime/game/damage_dealt.mcfunction
  21. 0 3
      data/mini/functions/slime/game/damage_taken.mcfunction
  22. 0 7
      data/mini/functions/slime/game/get_score.mcfunction
  23. 0 1
      data/mini/functions/slime/game/set_attack.mcfunction
  24. 0 5
      data/mini/functions/slime/game/summon.mcfunction
  25. 0 5
      data/mini/functions/slime/game_end.mcfunction
  26. 0 26
      data/mini/functions/slime/game_init.mcfunction
  27. 0 12
      data/mini/functions/slime/game_start.mcfunction
  28. 0 3
      data/mini/functions/slime/init.mcfunction
  29. 0 31
      data/mini/functions/slime/player_enter.mcfunction
  30. 0 3
      data/mini/functions/slime/player_failed.mcfunction
  31. 0 10
      data/mini/functions/slime/player_intro.mcfunction
  32. 0 15
      data/mini/functions/slime/tick1.mcfunction
  33. 0 1
      data/mini/functions/slime/tick2.mcfunction
  34. 0 13
      data/mini/functions/slime/tick20.mcfunction
  35. 0 3
      data/mini/functions/slime/watcher_limit.mcfunction

BIN
data/backup/slime.zip


+ 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 6
+scoreboard players set #mini_total mem 5
 scoreboard players set #const_2 mem 2
 scoreboard players set #const_5 mem 5
 scoreboard players set #const_9 mem 9

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

@@ -26,11 +26,6 @@ gamemode adventure @s[tag=!debug]
 # 传送玩家
 tp @s[tag=!debug] -10 8 -42 68 -20
 
-# 返还金粒
-scoreboard players operation @s[tag=!gold_return] gold = @s gold_total
-tellraw @s[tag=!gold_return,scores={gold=1..}] ["",{"text":">> ","color":"aqua","bold": true},{"text":"由于商店更新, 你的已有购买已重置, 花费的金粒已返还!","color":"aqua"}]
-tag @s add gold_return
-
 # 刷新物品
 clear @s[tag=!debug]
 execute as @s[tag=!debug] run function item:shop/refresh_gold

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

@@ -1,4 +1,4 @@
-scoreboard players operation $randarray_max mem = $c_mini_total mem
+scoreboard players operation $randarray_max mem = #mini_total mem
 scoreboard players operation $randarray_last mem = $mini_type mem
 function lib:randarray/call
 data modify storage ltw:mini types set from storage lib:randarray out

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

@@ -19,7 +19,6 @@ scoreboard players set $countdown mem 3
 scoreboard players set $tempo_enable mem 0
 
 # 小游戏编号
-# 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_dealt.mcfunction

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

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

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

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

@@ -4,7 +4,6 @@ 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:phantom/game_end
-execute if score $mini_type mem matches 6 run function mini:slime/game_end
 
 # 计算排名
 tag @a remove mini_rank1

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

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

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

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

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

@@ -2,7 +2,6 @@
 function mini:tntrun/init
 function mini:parkour/init
 function mini:phantom/init
-function mini:slime/init
 
 # 计分板初始化
 scoreboard objectives remove mini_score

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

@@ -1,3 +1,2 @@
 # 玩家死亡后触发
 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

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

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

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

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

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

@@ -1,2 +1 @@
 execute if score $mini_type mem matches 2 run function mini:tntrun/tick1
-execute if score $mini_type mem matches 6 run function mini:slime/tick1

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

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

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

@@ -2,7 +2,6 @@
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/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

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

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

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

@@ -1 +0,0 @@
-effect clear @a regeneration

+ 0 - 2
data/mini/functions/slime/game/damage_dealt.mcfunction

@@ -1,2 +0,0 @@
-execute store result score $slime_last_hit mem run data get entity @s UUID[0]
-scoreboard players set $countdown_fast mem 10

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

@@ -1,3 +0,0 @@
-execute as @a[tag=mini_running] store result score @s UUID run data get entity @s UUID[0]
-scoreboard players reset @s UUID
-execute as @a[tag=mini_running,tag=!watcher,gamemode=!spectator] if score @s UUID = $slime_last_hit mem at @s run function mini:slime/game/get_score

+ 0 - 7
data/mini/functions/slime/game/get_score.mcfunction

@@ -1,7 +0,0 @@
-scoreboard players add @s slime_score 1
-
-scoreboard players operation @s temp = @s slime_score
-scoreboard players operation @s temp %= #const_5 mem
-execute as @s[scores={temp=1..}] run function lib:sounds/hit
-execute as @s[scores={temp=0}] run function lib:sounds/levelup
-execute as @s[scores={temp=0}] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"}," 已获得 ",{"score": { "name": "@s","objective": "slime_score"},"color":"gold"},{"text":" 分","color":"gold"}]

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

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

+ 0 - 5
data/mini/functions/slime/game/summon.mcfunction

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

+ 0 - 5
data/mini/functions/slime/game_end.mcfunction

@@ -1,5 +0,0 @@
-# 结束史莱姆
-forceload remove 1000 7000 1064 7064
-
-# 计算得分
-execute as @a[tag=!watcher,tag=!debug] run scoreboard players operation @s mini_score = @s slime_score

+ 0 - 26
data/mini/functions/slime/game_init.mcfunction

@@ -1,26 +0,0 @@
-# 初始化史莱姆地图
-forceload add 1000 7000 1064 7064
-
-scoreboard players set $finish_mode mem 0
-scoreboard players reset * slime_score
-
-# 生成地图
-setblock 1000 4 7000 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:slime",sizeY:7,sizeZ:32,showboundingbox:0b}
-setblock 1000 5 7000 redstone_block
-setblock 1000 4 7000 air
-
-# 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
-tp @e[type=slime] 1000 -100 6000
-kill @e[type=trident]
-
-# 重置分数
-scoreboard players reset $slime_last_hit mem
-scoreboard players set $countdown_fast mem 0
-
-# 伤害管理
-scoreboard players set $remove_resistance mem 1
-team modify player friendlyFire false
-team modify player collisionRule always
-gamerule fallDamage false

+ 0 - 12
data/mini/functions/slime/game_start.mcfunction

@@ -1,12 +0,0 @@
-function mini:slime/game/summon
-scoreboard players set $countdown mem 100
-
-# HUD
-execute if score $mini_type mem matches 6 run scoreboard objectives setdisplay list health_disp
-execute if score $mini_type mem matches 6 run scoreboard objectives setdisplay belowName total_score
-execute if score $mini_type mem matches 6 run scoreboard objectives setdisplay sidebar slime_score
-scoreboard players set $bossbar_color mem 4
-scoreboard players set $countdown_max mem 100
-scoreboard players set $bossbar_type mem 2
-function lib:bossbar/show
-bossbar set mini:blue name "剩余时间"

+ 0 - 3
data/mini/functions/slime/init.mcfunction

@@ -1,3 +0,0 @@
-# 重置记分板
-scoreboard objectives remove slime_score
-scoreboard objectives add slime_score dummy "史莱姆命中数"

+ 0 - 31
data/mini/functions/slime/player_enter.mcfunction

@@ -1,31 +0,0 @@
-# 单个玩家开始小游戏时执行
-function lib:sounds/music/mini_middle
-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] 1002.0 7.5 7002.0
-
-# 重置记分板
-scoreboard players reset @s slime_score
-scoreboard players set @s[tag=!watcher,tag=!rejoining,tag=!debug] slime_score 0
-
-# 调整模式
-gamemode spectator @s[tag=!debug]
-gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
-
-# 重新加入处理
-execute if entity @s[tag=rejoining] run function mini:slime/player_failed
-
-# 给予物品
-replaceitem entity @s hotbar.8 stick{game_item:1b,Enchantments:[{id:"knockback",lvl:2}],display:{Name:'{"text":"补给用击退棒","italic":false,"color":"white"}'}} 1

+ 0 - 3
data/mini/functions/slime/player_failed.mcfunction

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

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

@@ -1,10 +0,0 @@
-# 向单个玩家展示小游戏介绍
-tp @s[tag=!debug] 1004.13 7.86 7003.00 -2922.38 12.84
-tellraw @s ["",{"text":"\n >> 夺命足球 >>\n\n","color":"gold","bold":true}," 将史莱姆踢到其他人的脸上, 其他人就是你的球门!\n 史莱姆也会造成伤害, 站在绿宝石上恢复生命值……\n"]
-tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"击退史莱姆, 每撞到一个人获得一分。","color":"gray"}]
-tellraw @s ["",{"text": " <间接 PVP> ","color":"light_purple","bold": true}, {"text":"无法直接攻击他人, 但可以击退史莱姆撞击他人。","color":"gray"}]
-tellraw @s ["",{"text": " <提供补给> ","color":"aqua","bold": true}, {"text":"快捷栏的最后一格将提供击退木棍。","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 - 15
data/mini/functions/slime/tick1.mcfunction

@@ -1,15 +0,0 @@
-# 反弹
-#execute as @e[type=slime] at @s if block ~-1.5 ~ ~ lime_concrete store result entity @s Motion[0] double -0.001 run data get entity @s Motion[0] 1000
-execute as @e[type=slime] at @s if block ~-1.5 ~ ~ lime_concrete store result score @s temp run data get entity @s Motion[0] 10000
-execute as @e[type=slime] at @s if block ~-1.5 ~ ~ lime_concrete if score @s temp matches ..-1 store result entity @s Motion[0] double -0.0001 run scoreboard players get @s temp
-#execute as @e[type=slime] at @s if block ~1.5 ~ ~ lime_concrete store result entity @s Motion[0] double -0.001 run data get entity @s Motion[0] 1000
-execute as @e[type=slime] at @s if block ~1.5 ~ ~ lime_concrete store result score @s temp run data get entity @s Motion[0] 10000
-execute as @e[type=slime] at @s if block ~1.5 ~ ~ lime_concrete if score @s temp matches 1.. store result entity @s Motion[0] double -0.0001 run scoreboard players get @s temp
-#execute as @e[type=slime] at @s if block ~ ~ ~-1.5 lime_concrete store result entity @s Motion[2] double -0.001 run data get entity @s Motion[2] 1000
-execute as @e[type=slime] at @s if block ~ ~ ~-1.5 lime_concrete store result score @s temp run data get entity @s Motion[2] 10000
-execute as @e[type=slime] at @s if block ~ ~ ~-1.5 lime_concrete if score @s temp matches ..-1 store result entity @s Motion[2] double -0.0001 run scoreboard players get @s temp
-#execute as @e[type=slime] at @s if block ~ ~ ~1.5 lime_concrete store result entity @s Motion[2] double -0.001 run data get entity @s Motion[2] 1000
-execute as @e[type=slime] at @s if block ~ ~ ~1.5 lime_concrete store result score @s temp run data get entity @s Motion[2] 10000
-execute as @e[type=slime] at @s if block ~ ~ ~1.5 lime_concrete if score @s temp matches 1.. store result entity @s Motion[2] double -0.0001 run scoreboard players get @s temp
-# 禁空
-execute as @e[type=slime] run data modify entity @s Motion[1] set value 0d

+ 0 - 1
data/mini/functions/slime/tick2.mcfunction

@@ -1 +0,0 @@
-execute if score $countdown_fast mem matches 0 run scoreboard players reset $slime_last_hit mem

+ 0 - 13
data/mini/functions/slime/tick20.mcfunction

@@ -1,13 +0,0 @@
-
-# 显示倒计时
-execute if score $countdown mem matches ..10 run title @a times 3 14 2
-execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
-execute if score $countdown mem matches ..10 run title @a title [""]
-execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
-
-# 0s:游戏结束
-execute if score $countdown mem matches 0 run function mini:main/game_end
-
-# 回复生命值
-execute as @a at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2
-# execute as @a at @s if block ~ ~-1 ~ emerald_block run schedule function mini:slime/game/clear_effect 1t replace

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

@@ -1,3 +0,0 @@
-# 观察者限制飞行范围
-execute as @a[gamemode=spectator] unless entity @s[x=1001,y=6,z=7001,dx=18,dy=4,dz=18] run spectate
-execute as @a[gamemode=spectator] unless entity @s[x=1001,y=6,z=7001,dx=18,dy=4,dz=18] run tp @s[tag=!debug] 1004.13 7.86 7003.00 -2922.38 12.84