2
0
Эх сурвалжийг харах

刷新物品、伤害调整、三叉戟调整

龙腾猫跃 3 жил өмнө
parent
commit
f3de0863dd
26 өөрчлөгдсөн 54 нэмэгдсэн , 63 устгасан
  1. 1 0
      data/ltw/functions/init.mcfunction
  2. 1 1
      data/ltw/functions/main/player_leave.mcfunction
  3. 0 1
      data/ltw/functions/state/0/state_enter.mcfunction
  4. 0 1
      data/ltw/functions/state/7/state_enter.mcfunction
  5. 1 36
      data/minecraft/loot_tables/entities/phantom.json
  6. 0 1
      data/mini/functions/ass/game_init.mcfunction
  7. 1 1
      data/mini/functions/colormatch/game/new_item.mcfunction
  8. 0 1
      data/mini/functions/colormatch/game_init.mcfunction
  9. 1 1
      data/mini/functions/hotpm/game/new_item.mcfunction
  10. 0 1
      data/mini/functions/hotpm/game_init.mcfunction
  11. 0 1
      data/mini/functions/iron/game_init.mcfunction
  12. 2 1
      data/mini/functions/main/tick1.mcfunction
  13. 0 1
      data/mini/functions/parkour/game_init.mcfunction
  14. 1 0
      data/mini/functions/phantom/game/clear_effect.mcfunction
  15. 1 1
      data/mini/functions/phantom/game/give_trident.mcfunction
  16. 5 0
      data/mini/functions/phantom/game/new_item.mcfunction
  17. 4 3
      data/mini/functions/phantom/game/summon2.mcfunction
  18. 1 1
      data/mini/functions/phantom/game/use_trident.mcfunction
  19. 1 0
      data/mini/functions/phantom/game_end.mcfunction
  20. 3 1
      data/mini/functions/phantom/game_init.mcfunction
  21. 11 0
      data/mini/functions/phantom/tick1.mcfunction
  22. 5 6
      data/mini/functions/phantom/tick2.mcfunction
  23. 6 2
      data/mini/functions/phantom/tick20.mcfunction
  24. 0 1
      data/mini/functions/tntrun/game_init.mcfunction
  25. 0 1
      data/mini/functions/trade/game_init.mcfunction
  26. 9 0
      data/mini/loot_tables/phantom.json

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

@@ -22,6 +22,7 @@ gamerule doTraderSpawning false
 gamerule drowningDamage false
 gamerule doLimitedCrafting true
 gamerule announceAdvancements true
+gamerule fallDamage false
 
 # 主寄存区块:将所有需要不卸载的都放里面
 #   已占用:(0,0,0) (0,0,1) (0,1,0) (0,1,1)

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

@@ -4,7 +4,7 @@ execute as @a at @s run function lib:sounds/error
 # 由于玩家人数不足,强制结束游戏
 execute store result score #count mem if entity @a[team=playing]
 execute if score $state mem matches 1.. if score #count mem matches ..2 run function ltw:main/game_end
-execute if score $state mem matches 1.. if score #count mem matches ..2 run tellraw @a ["",{"text":">> ","color":"red","bold":true},{"text": "由于玩家不足, 游戏强制结束, 无名次金粒奖励……","color":"red","bold":false}]
+execute if score $state mem matches 1.. if score #count mem matches ..2 run tellraw @a ["",{"text":">> ","color":"red","bold":true},{"text": "由于玩家不足, 游戏已强制结束!","color":"red","bold":false}]
 
 # 如果携带热土豆的玩家掉线,则重新生成土豆
 execute if score $state mem matches 5 run function mini:main/player_leave

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

@@ -22,7 +22,6 @@ function lib:bossbar/show
 scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire false
 team modify playing collisionRule never
-gamerule fallDamage false
 gamerule doMobLoot false
 gamerule doTileDrops false
 

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

@@ -19,4 +19,3 @@ scoreboard players set $countdown mem 5
 scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire false
 team modify playing collisionRule always
-gamerule fallDamage false

+ 1 - 36
data/minecraft/loot_tables/entities/phantom.json

@@ -1,39 +1,4 @@
 {
   "type": "minecraft:entity",
-  "pools": [
-    {
-      "rolls": 1.0,
-      "bonus_rolls": 0.0,
-      "entries": [
-        {
-          "type": "minecraft:item",
-          "functions": [
-            {
-              "function": "minecraft:set_count",
-              "count": {
-                "type": "minecraft:uniform",
-                "min": 0.0,
-                "max": 1.0
-              },
-              "add": false
-            },
-            {
-              "function": "minecraft:looting_enchant",
-              "count": {
-                "type": "minecraft:uniform",
-                "min": 0.0,
-                "max": 1.0
-              }
-            }
-          ],
-          "name": "minecraft:phantom_membrane"
-        }
-      ],
-      "conditions": [
-        {
-          "condition": "minecraft:killed_by_player"
-        }
-      ]
-    }
-  ]
+  "pools": []
 }

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

@@ -16,6 +16,5 @@ team modify playing friendlyFire false
 team modify playing collisionRule always
 team modify playing deathMessageVisibility always
 gamerule naturalRegeneration false
-gamerule fallDamage false
 
 schedule function mini:ass/game_init2 10t replace

+ 1 - 1
data/mini/functions/colormatch/game/new_item.mcfunction

@@ -12,4 +12,4 @@ execute if score $random mem matches 0 positioned 1060.5 26 4002.5 run function
 execute if score $random mem matches 0 positioned 1060.5 26 4018.5 run function item:bonus_item/gameparty/auto/low
 execute if score $random mem matches 1 positioned 1068.5 26 4010.5 run function item:bonus_item/gameparty/auto/low
 execute if score $random mem matches 1 positioned 1052.5 26 4010.5 run function item:bonus_item/gameparty/auto/low
-execute as @e[tag=bonus_item,limit=1] run data modify entity @s NoGravity set value 0b
+execute as @e[tag=bonus_item] run data modify entity @s NoGravity set value 0b

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

@@ -19,7 +19,6 @@ scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire true
 team modify playing collisionRule always
 team modify playing deathMessageVisibility never
-gamerule fallDamage false
 gamerule naturalRegeneration true
 
 schedule function mini:colormatch/game_init2 12t replace

+ 1 - 1
data/mini/functions/hotpm/game/new_item.mcfunction

@@ -14,4 +14,4 @@ execute if score $random mem matches 1 positioned 1023.5 19.0 3008.5 run functio
 execute if score $random mem matches 1 positioned 1010.5 19.0 3022.5 run function item:bonus_item/gameparty/auto/low
 execute if score $random mem matches 2 positioned 1017.0 19.0 3024.0 run function item:bonus_item/gameparty/auto/low
 execute if score $random mem matches 2 positioned 1017.5 19.0 3005.5 run function item:bonus_item/gameparty/auto/low
-execute as @e[tag=bonus_item,limit=1] run data modify entity @s NoGravity set value 0b
+execute as @e[tag=bonus_item] run data modify entity @s NoGravity set value 0b

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

@@ -12,7 +12,6 @@ scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire true
 team modify playing collisionRule always
 team modify playing deathMessageVisibility never
-gamerule fallDamage false
 
 # 生成地图
 setblock 1000 4 3000 air

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

@@ -18,7 +18,6 @@ scoreboard players set $remove_resistance mem 1
 team modify playing friendlyFire true
 team modify playing collisionRule always
 team modify playing deathMessageVisibility always
-gamerule fallDamage false
 gamerule fireDamage true
 gamerule drowningDamage true
 

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

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

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

@@ -19,6 +19,5 @@ scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire false
 team modify playing collisionRule never
 team modify playing deathMessageVisibility never
-gamerule fallDamage false
 
 schedule function mini:parkour/game_init2 15t replace

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

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

+ 1 - 1
data/mini/functions/phantom/game/give_trident.mcfunction

@@ -4,5 +4,5 @@ clear @s trident{game_item:1b}
 execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
 execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
 
-item replace entity @s hotbar.8 with trident{Damage:248,game_item:1b,display:{Name:'{"text":"补给用三叉戟","italic":false}'}} 1
+item replace entity @s hotbar.8 with trident{game_item:1b,Unbreakable:1b,HideFlags:63,display:{Name:'{"text":"三叉戟","italic":false}'}} 1
 scoreboard players set @s countdown_fast -1

+ 5 - 0
data/mini/functions/phantom/game/new_item.mcfunction

@@ -0,0 +1,5 @@
+function item:bonus_item/gameparty/auto/low
+execute as @e[tag=bonus_item,limit=1,sort=nearest] run data merge entity @s {NoGravity:0b,Motion:[0.0,0.8,0.0]}
+particle minecraft:explosion_emitter ~ ~ ~ 0 0 0 0 1 normal
+kill @s
+tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "红色幻翼已被击杀!","color":"aqua"}]

+ 4 - 3
data/mini/functions/phantom/game/summon2.mcfunction

@@ -1,5 +1,5 @@
 
-execute as @e[tag=new_phantom] at @s run tp @s ~ 30 ~
+execute as @e[tag=new_phantom] at @s run tp @s ~ 33 ~
 
 # 设置攻击力与随机生命值
 scoreboard players set $random_min mem 1
@@ -8,7 +8,7 @@ function lib:random
 execute if score $random mem matches 1 run attribute @e[tag=new_phantom,limit=1] generic.max_health base set 2
 execute if score $random mem matches 2 run attribute @e[tag=new_phantom,limit=1] generic.max_health base set 3
 execute if score $random mem matches 3 run attribute @e[tag=new_phantom,limit=1] generic.max_health base set 4
-attribute @e[tag=new_phantom,limit=1] generic.attack_damage base set 3
+attribute @e[tag=new_phantom,limit=1] generic.attack_damage base set 4
 
 # 如果满足条件(在 tick20 中检查),则刷出奖励幻翼
 execute if score #new_item mem matches 0 run tellraw @a ["\n",{"text": ">> ","color":"aqua","bold": true},{"text": "击杀红色幻翼, 获取奖励物资!\n","color":"aqua"}]
@@ -19,7 +19,8 @@ execute if score #new_item mem matches 0 run scoreboard players set $new_item_cd
 # 修改奖励幻翼的属性
 team join red @e[tag=bonus_phantom,tag=new_phantom,limit=1]
 effect give @e[tag=bonus_phantom,tag=new_phantom,limit=1] glowing 1000000 0 true
-data modify entity @e[tag=bonus_phantom,tag=new_phantom,limit=1] Size set value 4
+data merge entity @e[tag=bonus_phantom,tag=new_phantom,limit=1] {Size:5,DeathLootTable:"mini:phantom"}
+attribute @e[tag=bonus_phantom,tag=new_phantom,limit=1] generic.attack_damage base set 8
 attribute @e[tag=bonus_phantom,tag=new_phantom,limit=1] generic.max_health base set 20
 
 # 确认属性修改

+ 1 - 1
data/mini/functions/phantom/game/use_trident.mcfunction

@@ -1,5 +1,5 @@
 # 设置玩家分数
-scoreboard players set @s countdown_fast 14
+scoreboard players set @s countdown_fast 15
 scoreboard players reset @s use_trident
 
 # 清除三叉戟以防bug

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

@@ -1,6 +1,7 @@
 # 游戏结束
 forceload remove 1000 6000 1064 6064
 gamerule doDaylightCycle false
+gamerule doMobLoot false
 
 # 计算积分
 execute as @a[team=playing] run scoreboard players operation @s mini_score = @s kill_phantom

+ 3 - 1
data/mini/functions/phantom/game_init.mcfunction

@@ -29,6 +29,8 @@ scoreboard players set $remove_resistance mem 1
 team modify playing friendlyFire false
 team modify playing collisionRule always
 team modify playing deathMessageVisibility always
-gamerule fallDamage false
+
+# gamerule 调整
+gamerule doMobLoot true
 
 schedule function mini:phantom/game_init2 15t replace

+ 11 - 0
data/mini/functions/phantom/tick1.mcfunction

@@ -0,0 +1,11 @@
+# 调整物品:仅在纵向速度 < -0.015 且 y > 21 时,才将 NoGravity 设置为 false
+execute as @e[tag=bonus_item] store result score @s temp run data get entity @s Motion[1] 1000
+execute as @e[tag=bonus_item] if entity @s[x=1000,y=21,z=6000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:0b}
+execute as @e[tag=bonus_item] unless entity @s[x=1000,y=21,z=6000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:1b}
+
+# 奖励幻翼特效
+execute as @e[tag=bonus_phantom] at @s run particle dust 1 0 0 2 ~ ~ ~ 0.2 0 0.2 0 1 normal
+
+# 替换幻翼掉落物
+execute as @e[type=item,nbt={Item:{id:"minecraft:egg"}}] at @s run function mini:phantom/game/new_item
+kill @e[type=experience_orb]

+ 5 - 6
data/mini/functions/phantom/tick2.mcfunction

@@ -1,5 +1,7 @@
-# 使用三叉戟调用函数
-execute as @a[tag=mini_running] if score @s use_trident matches 1.. run function mini:phantom/game/use_trident
+# 近战攻击不消耗三叉戟
+execute as @a[tag=mini_running,scores={use_trident=1..}] at @s if data entity @s Inventory[{Slot:8b,id:"minecraft:trident",tag:{game_item:1b}}] run scoreboard players set @s use_trident 0
+# 投掷三叉戟
+execute as @a[tag=mini_running,scores={use_trident=1..}] at @s run function mini:phantom/game/use_trident
 
 # 给予三叉戟
 execute as @a[tag=mini_running,scores={countdown_fast=0}] unless data entity @s Inventory[{Slot:8b,id:"minecraft:trident",tag:{game_item:1b}}] run function mini:phantom/game/give_trident
@@ -9,7 +11,4 @@ execute as @e[type=trident,tag=!fixed_trident] run function mini:phantom/game/fi
 
 # 删除掉在地上的三叉戟
 kill @e[type=trident,nbt={inGround:1b}]
-kill @e[type=item,nbt={Item:{id:"minecraft:trident",tag:{game_item:1b}}}]
-
-# 奖励幻翼特效
-execute as @e[tag=bonus_phantom] at @s run particle dust 1 0 0 2 ~ ~ ~ 0.2 0 0.2 0 2 normal
+kill @e[type=item,nbt={Item:{id:"minecraft:trident",tag:{game_item:1b}}}]

+ 6 - 2
data/mini/functions/phantom/tick20.mcfunction

@@ -10,8 +10,8 @@ scoreboard players set #new_item mem 0
 execute if entity @e[tag=bonus_phantom] run scoreboard players set #new_item mem 1
 # 如果没有物品,则计算冷却
 execute if score #new_item mem matches 0 run scoreboard players add $new_item_cd mem 1
-# 已经超过 20s 冷却时间
-execute if score $new_item_cd mem matches ..19 run scoreboard players set #new_item mem 1
+# 已经超过 15s 冷却时间
+execute if score $new_item_cd mem matches ..14 run scoreboard players set #new_item mem 1
 
 # 召唤幻翼
 execute if score $countdown mem matches 11.. run function mini:phantom/game/try_summon
@@ -24,3 +24,7 @@ execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds
 
 # 0s:游戏结束
 execute if score $countdown mem matches 0 run function mini:main/game_end
+
+# 回复生命值
+execute if score $foursec mem matches 1 run effect give @a[team=playing] regeneration 1 10 true
+execute if score $foursec mem matches 1 run schedule function mini:phantom/game/clear_effect 1t replace

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

@@ -37,6 +37,5 @@ scoreboard players set $remove_resistance mem 0
 team modify playing friendlyFire true
 team modify playing collisionRule always
 team modify playing deathMessageVisibility never
-gamerule fallDamage false
 
 schedule function mini:tntrun/game_init2 10t replace

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

@@ -18,7 +18,6 @@ scoreboard players set $remove_resistance mem 1
 team modify playing friendlyFire false
 team modify playing collisionRule never
 team modify playing deathMessageVisibility always
-gamerule fallDamage false
 gamerule fireDamage false
 gamerule drowningDamage true
 

+ 9 - 0
data/mini/loot_tables/phantom.json

@@ -0,0 +1,9 @@
+{"pools": [{"rolls": 1,"entries": [
+
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:egg"
+}
+
+]}]}