Просмотр исходного кода

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

HerobrineXia 6 лет назад
Родитель
Сommit
0bfd13e90b
30 измененных файлов с 183 добавлено и 54 удалено
  1. 1 1
      data/item/functions/bonus_item/give_items.mcfunction
  2. 3 1
      data/item/functions/bonus_item/rank/blue.mcfunction
  3. 3 1
      data/item/functions/bonus_item/rank/green.mcfunction
  4. 3 1
      data/item/functions/bonus_item/rank/purple.mcfunction
  5. 2 2
      data/item/functions/bonus_item/rank/random.mcfunction
  6. 3 1
      data/item/functions/bonus_item/rank/white.mcfunction
  7. 1 1
      data/item/functions/bonus_item/return_item.mcfunction
  8. 1 1
      data/item/functions/tick2.mcfunction
  9. 16 5
      data/item/loot_tables/gameparty/ranks/blue.json
  10. 30 4
      data/item/loot_tables/gameparty/ranks/green.json
  11. 4 4
      data/item/loot_tables/gameparty/ranks/purple.json
  12. 46 2
      data/item/loot_tables/gameparty/ranks/white.json
  13. 0 7
      data/item/predicates/bonus/is_new_bonus_holder.json
  14. 6 1
      data/item/tags/items/bonus.json
  15. 1 1
      data/ltw/functions/main/player_leave.mcfunction
  16. 1 1
      data/ltw/functions/state/0/player_enter.mcfunction
  17. 1 1
      data/ltw/functions/state/6/generate_bonus.mcfunction
  18. 1 1
      data/ltw/functions/state/6/player_enter.mcfunction
  19. 1 1
      data/ltw/functions/state/6/tick20.mcfunction
  20. 1 1
      data/ltw/functions/state/7/next.mcfunction
  21. 1 1
      data/ltw/functions/state/7/state_enter.mcfunction
  22. 1 1
      data/mini/functions/main/game_start.mcfunction
  23. 18 0
      data/mini/functions/zombie/game/summon_creeper.mcfunction
  24. 18 0
      data/mini/functions/zombie/game/summon_evoker.mcfuntion
  25. 1 3
      data/mini/functions/zombie/game/summon_skeleton.mcfunction
  26. 0 3
      data/mini/functions/zombie/game_init.mcfunction
  27. 3 0
      data/mini/functions/zombie/game_start.mcfunction
  28. 11 6
      data/mini/functions/zombie/tick20.mcfunction
  29. 1 2
      data/test/functions/generate_bonus.mcfunction
  30. 4 0
      data/test/functions/generate_bonus2.mcfunction

+ 1 - 1
data/item/functions/bonus_item/give_items.mcfunction

@@ -3,7 +3,7 @@ setblock 0 0 1 jukebox replace
 data modify block 0 0 1 RecordItem set from block 0 0 0 RecordItem.tag.bonus_give_items[0]
 setblock 0 0 1 air destroy
 tag @s add item_op
-execute as @e[tag=!bonus_old,tag=!item_new,type=item,predicate=item:bonus/is_bonus,limit=1] run function item:bonus_item/tp
+execute as @e[tag=!bonus_old,tag=!item_new,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
 tag @s remove item_op
 data remove block 0 0 0 RecordItem.tag.bonus_give_items[0]
 execute if data block 0 0 0 RecordItem.tag.bonus_give_items[0] run function item:bonus_item/give_items

+ 3 - 1
data/item/functions/bonus_item/rank/blue.mcfunction

@@ -1,7 +1,9 @@
 # 生成蓝色品质的物品实体
 
 loot spawn ~ ~ ~ loot item:gameparty/ranks/blue
-data merge entity @e[distance=..1,limit=1,type=item] {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0]}
+summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
+data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
+kill @e[limit=1,type=item,sort=nearest,tag=!new_item]
 execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
 team join blue @e[tag=new_item]
 tag @e[tag=new_item] add item_blue

+ 3 - 1
data/item/functions/bonus_item/rank/green.mcfunction

@@ -1,7 +1,9 @@
 # 生成绿色品质的物品实体
 
 loot spawn ~ ~ ~ loot item:gameparty/ranks/green
-data merge entity @e[distance=..1,limit=1,type=item] {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0]}
+summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
+data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
+kill @e[limit=1,type=item,sort=nearest,tag=!new_item]
 execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
 team join green @e[tag=new_item]
 tag @e[tag=new_item] add item_green

+ 3 - 1
data/item/functions/bonus_item/rank/purple.mcfunction

@@ -1,7 +1,9 @@
 # 生成紫色品质的物品实体
 
 loot spawn ~ ~ ~ loot item:gameparty/ranks/purple
-data merge entity @e[distance=..1,limit=1,type=item] {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0]}
+summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
+data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
+kill @e[limit=1,type=item,sort=nearest,tag=!new_item]
 execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
 team join purple @e[tag=new_item]
 tag @e[tag=new_item] add item_purple

+ 2 - 2
data/item/functions/bonus_item/rank/random.mcfunction

@@ -9,7 +9,7 @@ scoreboard players operation $t_quality mem *= $c_10 mem
 scoreboard players operation $t_quality mem += $random mem
 
 # 根据品质生成不同的物品
-execute if score $t_quality mem matches ..19 run function item:bonus_item/rank/white
-execute if score $t_quality mem matches 20..54 run function item:bonus_item/rank/green
+execute if score $t_quality mem matches ..24 run function item:bonus_item/rank/white
+execute if score $t_quality mem matches 25..54 run function item:bonus_item/rank/green
 execute if score $t_quality mem matches 55..79 run function item:bonus_item/rank/blue
 execute if score $t_quality mem matches 80.. run function item:bonus_item/rank/purple

+ 3 - 1
data/item/functions/bonus_item/rank/white.mcfunction

@@ -1,7 +1,9 @@
 # 生成白色品质的物品实体
 
 loot spawn ~ ~ ~ loot item:gameparty/ranks/white
-data merge entity @e[distance=..1,limit=1,type=item] {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0]}
+summon item ~ ~ ~ {Tags:["new_item"],Age:-32768,PickupDelay:0,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1,Motion:[0,0,0],Item:{id:"gold_nugget",Count:1}}
+data modify entity @e[tag=new_item,limit=1] Item set from entity @e[limit=1,type=item,sort=nearest,tag=!new_item] Item
+kill @e[limit=1,type=item,sort=nearest,tag=!new_item]
 execute as @e[tag=new_item] run data modify entity @s CustomName set from entity @s Item.tag.item_name
 team join white @e[tag=new_item]
 tag @e[tag=new_item] add item_white

+ 1 - 1
data/item/functions/bonus_item/return_item.mcfunction

@@ -3,5 +3,5 @@ data modify block 0 0 1 RecordItem set from block 0 0 0 RecordItem
 data modify block 0 0 1 RecordItem.tag.bonus_new set value 0b
 setblock 0 0 1 air destroy
 tag @s add item_op
-execute as @e[tag=!bonus_old,tag=!item_new,type=item,predicate=item:bonus/is_bonus,limit=1] run function item:bonus_item/tp
+execute as @e[tag=!bonus_old,tag=!item_new,type=item,nbt={"Item":{"tag":{"is_bonus":1b}}},limit=1] run function item:bonus_item/tp
 tag @s remove item_op

+ 1 - 1
data/item/functions/tick2.mcfunction

@@ -3,7 +3,7 @@
 execute as @e[type=item] if data entity @s Thrower run function item:disable_throw
 
 # 检查玩家拾取奖励物品
-execute as @a if predicate item:bonus/is_new_bonus_holder run function item:bonus_item/call
+execute as @a if data entity @s Inventory[{"tag":{"bonus_new":1b}}] run function item:bonus_item/call
 
 # 检测玩家第九格锁定
 execute as @a unless data entity @s Inventory[{Slot:8b,tag:{GameItem:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b},Count:1b}] run function item:disable_slot

+ 16 - 5
data/item/loot_tables/gameparty/ranks/blue.json

@@ -2,27 +2,38 @@
 
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 4,
     "name": "minecraft:nether_star",
     "functions": [
         {
             "function": "minecraft:set_count",
-            "count": 2
+            "count": 4
         },
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +2\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":2}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +4\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4}"
         }
     ]
 },
 {
     "type": "minecraft:item",
     "weight": 1,
-    "name": "minecraft:iron_sword",
+    "name": "minecraft:iron_axe",
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"击退铁剑\\\",\\\"color\\\":\\\"aqua\\\"}\",\"Enchantments\":[{\"id\":\"knockback\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"击退铁斧\\\",\\\"color\\\":\\\"aqua\\\"}\",\"Enchantments\":[{\"id\":\"knockback\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:enchanted_golden_apple",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"italic\\\":0}\"}}"
         }
     ]
 }

+ 30 - 4
data/item/loot_tables/gameparty/ranks/green.json

@@ -2,12 +2,27 @@
 
 {
     "type": "minecraft:item",
-    "weight": 32,
+    "weight": 24,
     "name": "minecraft:nether_star",
+    "functions": [
+        {
+            "function": "minecraft:set_count",
+            "count": 3
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +3\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":3}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:splash_potion",
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +1\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":1}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"喷溅型浮空药水 (0:10)\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":25,\"Amplifier\":0,\"Duration\":200}],\"CustomPotionColor\":11458519,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型浮空药水\\\",\\\"italic\\\":0}\"}}"
         }
     ]
 },
@@ -46,12 +61,23 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 4,
+    "weight": 2,
+    "name": "minecraft:crossbow",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"弩, 箭 x3\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":3,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}]}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 2,
     "name": "minecraft:bow",
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"弓, 箭 x3\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":3,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}]}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"弓, 箭 x5\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":5,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}]}"
         }
     ]
 },

+ 4 - 4
data/item/loot_tables/gameparty/ranks/purple.json

@@ -2,16 +2,16 @@
 
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 2,
     "name": "minecraft:nether_star",
     "functions": [
         {
             "function": "minecraft:set_count",
-            "count": 3
+            "count": 5
         },
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +3\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":3,\"Motion\":[0,0,0]}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +5\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":5}"
         }
     ]
 },
@@ -22,7 +22,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"冲击弓, 箭 x20\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"Enchantments\":[{\"id\":\"punch\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":20,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}],\"Motion\":[0,0,0]}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"冲击弓, 箭 x20\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"Enchantments\":[{\"id\":\"punch\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":20,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}]}"
         }
     ]
 }

+ 46 - 2
data/item/loot_tables/gameparty/ranks/white.json

@@ -1,5 +1,49 @@
 {"pools": [{"rolls": 1,"entries": [
 
+{
+    "type": "minecraft:item",
+    "weight": 34,
+    "name": "minecraft:nether_star",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +1\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":1}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 3,
+    "name": "minecraft:splash_potion",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"喷溅型跳跃药水 VII (0:02)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":8,\"Amplifier\":6,\"Duration\":40}],\"CustomPotionColor\":2292811,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型跳跃药水\\\",\\\"italic\\\":0}\"}}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 3,
+    "name": "minecraft:potion",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"跳跃药水 II (0:15)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":8,\"Amplifier\":1,\"Duration\":300}],\"CustomPotionColor\":2292811,\"display\":{\"Name\":\"{\\\"text\\\":\\\"跳跃药水\\\",\\\"italic\\\":0}\"}}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:golden_apple",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"italic\\\":0}\"}}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 4,
@@ -22,7 +66,7 @@
     "functions": [
         {
             "function": "minecraft:set_damage",
-            "damage":{"min": 0.05, "max": 0.11}
+            "damage":{"min": 0.07, "max": 0.11}
         },
         {
             "function": "minecraft:set_nbt",
@@ -37,7 +81,7 @@
     "functions": [
         {
             "function": "minecraft:set_damage",
-            "damage":{"min": 0.05, "max": 0.13}
+            "damage":{"min": 0.05, "max": 0.11}
         },
         {
             "function": "minecraft:set_nbt",

+ 0 - 7
data/item/predicates/bonus/is_new_bonus_holder.json

@@ -1,7 +0,0 @@
-{
-    "condition": "minecraft:entity_properties",
-    "entity": "this",
-    "predicate": {
-        "nbt": "Inventory[{\"tag\":{\"bonus_new\":1b}}]"
-    }
-}

+ 6 - 1
data/item/tags/items/bonus.json

@@ -1,6 +1,10 @@
 {
     "values": [
-        "minecraft:iron_sword",
+        "minecraft:enchanted_golden_apple",
+        "minecraft:golden_apple",
+        "minecraft:splash_potion",
+        "minecraft:potion",
+        "minecraft:iron_axe",
         "minecraft:ender_pearl",
         "minecraft:stone_sword",
         "minecraft:snowball",
@@ -19,6 +23,7 @@
         "minecraft:netherite_boots",
         "minecraft:fishing_rod",
         "minecraft:shield",
+        "minecraft:crossbow",
         "minecraft:bow"
     ]
 }

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

@@ -10,4 +10,4 @@ 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
 
 # TODO : 如果在熔炉中放入魔晶石(暂时用下界之星代替),则显示提示并且炸毁熔炉
-# TODO : 判断玩家背包中的魔晶石数量(暂时用下界之星代替),每一个魔晶石提供 -10% 速度和 +0.5 击退抗性
+# TODO : [重要] 判断玩家背包中的魔晶石数量(暂时用下界之星代替),每一个魔晶石提供 -10% 速度和 +0.5 击退抗性

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

@@ -7,7 +7,7 @@ title @s actionbar ""
 clear @s
 
 # 重置玩家血量上限
-execute as @a run attribute @s generic.max_health base set 20
+attribute @s generic.max_health base set 20
 
 # 状态效果
 effect clear @s

+ 1 - 1
data/ltw/functions/state/6/generate_bonus.mcfunction

@@ -2,7 +2,7 @@
 kill @e[type=item]
 
 execute store result score $t_bonus_count mem if entity @a[tag=!watcher]
-scoreboard players add $t_bonus_count mem 1
+# scoreboard players add $t_bonus_count mem 1
 execute if score $t_bonus_count mem matches 1.. positioned 9.0 12.5 2012.5 run function item:bonus_item/rank/random
 execute if score $t_bonus_count mem matches 2.. positioned 5.0 12.5 2012.5 run function item:bonus_item/rank/random
 execute if score $t_bonus_count mem matches 3.. positioned 1.5 12.5 2009.0 run function item:bonus_item/rank/random

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

@@ -4,7 +4,7 @@ title @s clear
 title @s actionbar ""
 
 # 重置玩家血量上限
-execute as @a run attribute @s generic.max_health base set 20
+attribute @s generic.max_health base set 20
 
 # 状态效果
 effect clear @s

+ 1 - 1
data/ltw/functions/state/6/tick20.mcfunction

@@ -4,4 +4,4 @@ title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
 title @a title "准备选择奖励"
 
 # 退出状态
-execute if score $countdown mem matches ..6 run function ltw:state/7/state_enter
+execute if score $countdown mem matches ..7 run function ltw:state/7/state_enter

+ 1 - 1
data/ltw/functions/state/7/next.mcfunction

@@ -26,4 +26,4 @@ scoreboard players set $countdown mem 10
 execute as @a[tag=new_selector] at @s run function lib:sounds/hit
 execute if entity @a[tag=new_selector] as @a[tag=!new_selector] at @s run function lib:sounds/hit2
 
-# FIXME : 僵尸游戏的旁观者偶尔会抽搐
+# FIXME : 僵尸游戏的旁观者偶尔会传送到他人身上

+ 1 - 1
data/ltw/functions/state/7/state_enter.mcfunction

@@ -8,7 +8,7 @@ scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score_disp
 
 # 初始化倒计时
-scoreboard players set $countdown mem 6
+scoreboard players set $countdown mem 7
 
 # 伤害管理
 team modify player friendlyFire false

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

@@ -18,4 +18,4 @@ 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
 
-# FIXME : 从状态 7 转到游戏结束的时候触发了状态 3
+# FIXME : [010] 从状态 7 转到游戏结束的时候触发了状态 3

+ 18 - 0
data/mini/functions/zombie/game/summon_creeper.mcfunction

@@ -0,0 +1,18 @@
+# 召唤苦力怕
+
+scoreboard players set $random_min mem 0
+scoreboard players set $random_max mem 4
+function lib:random
+
+execute if score $random mem matches 0 positioned 1019.0 20.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
+execute if score $random mem matches 1 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
+execute if score $random mem matches 2 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
+execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
+execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
+tag @e[type=creeper] add mini_mob
+
+# 提高追踪范围
+execute as @e[type=creeper] run attribute @s generic.follow_range base set 35
+
+# 关闭怪物间友伤
+team join white @e[tag=mini_mob]

+ 18 - 0
data/mini/functions/zombie/game/summon_evoker.mcfuntion

@@ -0,0 +1,18 @@
+# 召唤唤魔者
+
+scoreboard players set $random_min mem 0
+scoreboard players set $random_max mem 4
+function lib:random
+
+execute if score $random mem matches 0 positioned 1019.0 20.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
+execute if score $random mem matches 1 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
+execute if score $random mem matches 2 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
+execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
+execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
+tag @e[type=evoker] add mini_mob
+
+# 提高追踪范围
+execute as @e[type=evoker] run attribute @s generic.follow_range base set 35
+
+# 关闭怪物间友伤
+team join white @e[tag=mini_mob]

+ 1 - 3
data/mini/functions/zombie/game/summon_skeleton.mcfunction

@@ -1,4 +1,4 @@
-# 召唤唤魔者
+# 召唤骷髅
 
 scoreboard players set $random_min mem 0
 scoreboard players set $random_max mem 4
@@ -11,8 +11,6 @@ execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless enti
 execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon skeleton
 tag @e[type=skeleton] add mini_mob
 
-tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"text": "骷髅 ","color":"gold"},"已出现!"]
-
 # 提高追踪范围
 execute as @e[type=evoker] run attribute @s generic.follow_range base set 35
 

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

@@ -12,9 +12,6 @@ kill @e[type=arrow]
 tp @e[tag=mini_mob] ~ -100 ~
 tp @e[type=vex] ~ -100 ~
 
-# 初始化附加值
-scoreboard players set $zombie_luck mem 0
-
 # 伤害管理
 team modify player friendlyFire false
 team modify player collisionRule always

+ 3 - 0
data/mini/functions/zombie/game_start.mcfunction

@@ -7,3 +7,6 @@ function mini:zombie/game/summon_zombie
 function mini:zombie/game/summon_zombie
 function mini:zombie/game/summon_zombie
 function mini:zombie/game/summon_zombie
+
+# 怪物刷新倒计时
+scoreboard players set $countdown mem 120

+ 11 - 6
data/mini/functions/zombie/tick20.mcfunction

@@ -5,18 +5,23 @@ effect clear @a hunger
 scoreboard players set $random_min mem 0
 scoreboard players set $random_max mem 100
 function lib:random
-scoreboard players operation $random mem += $zombie_luck mem
-execute if score $random mem matches 75.. run scoreboard players remove $zombie_luck mem 1
 
 # 清理恼鬼
 execute if score $random mem matches 40.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
 
 # 赋予随机效果
-effect give @e[type=husk,limit=1,sort=random] speed 1 1
-effect give @e[type=husk,limit=1,sort=random] speed 4
+effect give @e[limit=1,sort=random] speed 1 1
+effect give @e[limit=1,sort=random] speed 4
 effect give @e[type=zombie,limit=1,sort=random] slowness 4
 effect give @e[type=zombie,limit=1,sort=random] slowness 2 1
 
 # 召唤怪物
-execute if score $random mem matches -5..5 run function mini:zombie/game/summon_zombie
-execute if score $random mem matches ..-8 run function mini:zombie/game/summon_skeleton
+execute if score $countdown mem matches ..120 if score $random mem matches 0..10 run function mini:zombie/game/summon_zombie
+execute if score $countdown mem matches ..90 if score $random mem matches 11..15 run function mini:zombie/game/summon_skeleton
+execute if score $countdown mem matches ..60 if score $random mem matches 16..20 run function mini:zombie/game/summon_creeper
+execute if score $countdown mem matches ..0 if score $random mem matches 21..25 run function mini:zombie/game/summon_evoker
+
+# 显示提示
+execute if score $countdown mem matches 90 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "骷髅 ","color":"red"},"已开始出现!"]
+execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "苦力怕 ","color":"red"},"已开始出现!"]
+execute if score $countdown mem matches 1 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "唤魔者 ","color":"red"},"已开始出现!"]

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

@@ -4,5 +4,4 @@ tag @a remove watcher
 scoreboard players set $game_type mem 1
 scoreboard players set $round mem 4
 function ltw:state/6/state_enter
-scoreboard players set $state mem 0
-gamemode creative @a
+schedule function test:generate_bonus2 3t

+ 4 - 0
data/test/functions/generate_bonus2.mcfunction

@@ -0,0 +1,4 @@
+
+function ltw:state/7/state_enter
+scoreboard players set $state mem 0
+gamemode creative @a