diff --git a/gm4_monsters_unbound/beet.yaml b/gm4_monsters_unbound/beet.yaml index 20fb7ccde9..439e7601d3 100644 --- a/gm4_monsters_unbound/beet.yaml +++ b/gm4_monsters_unbound/beet.yaml @@ -1,6 +1,6 @@ id: gm4_monsters_unbound name: Monsters Unbound -version: 1.0.X +version: 1.1.X data_pack: load: . @@ -19,13 +19,14 @@ meta: required: lib_forceload: 1.3.0 lib_lore: 1.1.0 - gm4_survival_refightalized: 1.0.0 schedule_loops: - tick - main - slow_clock website: description: Mobs gain special effects based on their biome. + recommended: + - gm4_survival_refightalized video: null wiki: https://wiki.gm4.co/wiki/Monsters_Unbound credits: diff --git a/gm4_monsters_unbound/data/gm4/advancement/monsters_unbound_elite_kill.json b/gm4_monsters_unbound/data/gm4/advancement/monsters_unbound_elite_kill.json index 9f6fb2f878..e9ca0c94a5 100644 --- a/gm4_monsters_unbound/data/gm4/advancement/monsters_unbound_elite_kill.json +++ b/gm4_monsters_unbound/data/gm4/advancement/monsters_unbound_elite_kill.json @@ -14,7 +14,7 @@ }, "frame": "task" }, - "parent": "gm4:survival_refightalized_armor_damage", + "parent": "gm4:root", "criteria": { "kill_elite": { "trigger": "minecraft:player_killed_entity", diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/clocks/elite/zephyr_process.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/clocks/elite/zephyr_process.mcfunction index 7f5dd785bc..443b0aba49 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/clocks/elite/zephyr_process.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/clocks/elite/zephyr_process.mcfunction @@ -5,6 +5,6 @@ # schedule from mob/process/elite/zephyr/skeleton/start scoreboard players set $keep_tick.elite_process_zephyr gm4_mu_keep_tick 0 -execute as @e[type=#gm4_survival_refightalized:skeleton_types,tag=gm4_mu_elite.zephyr_skeleton_burst] at @s run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst +execute as @e[type=#gm4_monsters_unbound:skeleton_types,tag=gm4_mu_elite.zephyr_skeleton_burst] at @s run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst execute if score $keep_tick.elite_process_zephyr gm4_mu_keep_tick matches 1 run schedule function gm4_monsters_unbound:clocks/elite/zephyr_process 3t diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/skeleton.mcfunction index 10d06d2cb7..3227272465 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 46 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/zombie.mcfunction index aef515b4cc..4f5630f4e1 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/blazing/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 46 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/skeleton.mcfunction index c05abbd66c..f35579afef 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 96 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/zombie.mcfunction index 38fb726a96..27694ecdcc 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/gargantuan/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 96 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/skeleton.mcfunction index 0ee9e2dbfc..8e55c9811f 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 1 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/zombie.mcfunction index 82ff3e7eef..20f8bfba81 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/glacial/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 1 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/skeleton.mcfunction index fe90e407c5..e3e1acad8b 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 16 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/zombie.mcfunction index a2cbac1ceb..0d8172dfbc 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/mending/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 16 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/skeleton.mcfunction index 02a172b96e..bb59d54eda 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 86 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/zombie.mcfunction index 5493328c87..0ea6923994 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/pearlescent/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 86 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/skeleton.mcfunction index 8b18bd3b39..7bf922f7f8 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 66 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/zombie.mcfunction index 02d3bde46c..98cbd6c0af 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/splitting/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 66 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/skeleton.mcfunction index 3a647c4758..e006b0c1ac 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 76 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/zombie.mcfunction index 23aa9cdd8c..e573963f2a 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/volatile/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 76 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/skeleton.mcfunction index b3cfb44401..65f6a05dd1 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 56 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/zombie.mcfunction index 608f70da6d..9bee15ec0a 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/vorpal/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 56 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/skeleton.mcfunction index 25a76b60ad..5f2325a3be 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/skeleton.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 31 summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/zombie.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/zombie.mcfunction index 70dd38c0e4..f153763e70 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/zombie.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/debug/spawn_elite/zephyr/zombie.mcfunction @@ -1,4 +1,5 @@ scoreboard players set $prepicked_elite gm4_mu_data 31 summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]} -execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/init.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/init.mcfunction index 7cb1b35d4e..05f3666024 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/init.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/init.mcfunction @@ -9,21 +9,26 @@ scoreboard objectives add gm4_mu_generation dummy scoreboard objectives add gm4_mu_frozen_time dummy scoreboard objectives add gm4_mu_feared_time dummy scoreboard objectives add gm4_mu_keep_tick dummy +scoreboard objectives add gm4_mu_config dummy +# add Survival Refightalized objectives for compatibility +scoreboard objectives add gm4_sr_data dummy +scoreboard objectives add gm4_sr_arrow.damage_change dummy +scoreboard objectives add gm4_sr_arrow.fire_delay dummy # configs -execute unless score $spawn_phantoms gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $spawn_phantoms gm4_sr_config 1 +execute unless score $spawn_phantoms gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $spawn_phantoms gm4_mu_config 1 # disable natural phantom spawning execute unless score $phantoms_disabled gm4_mu_data matches 1 run gamerule doInsomnia false execute unless score $phantoms_disabled gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:{"text":"[INFO] Monsters Unbound changed gamerule doInsomnia to false"}} scoreboard players set $phantoms_disabled gm4_mu_data 1 execute store result score $doinsomnia gm4_mu_data run gamerule doInsomnia -execute if score $spawn_phantoms gm4_sr_config matches 1 if score $doinsomnia gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:[{"text":"[WARN]","color":"red"},{"text":" Monsters Unbound requires doInsomnia to be false, but it is true. ","color":"white"},{"text":"click here to fix","color":"red","clickEvent":{"action":"suggest_command","value":"/gamerule doInsomnia false"}}]} +execute if score $spawn_phantoms gm4_mu_config matches 1 if score $doinsomnia gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:[{"text":"[WARN]","color":"red"},{"text":" Monsters Unbound requires doInsomnia to be false, but it is true. ","color":"white"},{"text":"click here to fix","color":"red","clickEvent":{"action":"suggest_command","value":"/gamerule doInsomnia false"}}]} # mob caps -execute unless score $mob_limit.husk_army gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.husk_army gm4_sr_config 128 -execute unless score $mob_limit.spore_zombie gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.spore_zombie gm4_sr_config 128 -execute unless score $mob_limit.phantom gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.phantom gm4_sr_config 48 +execute unless score $mob_limit.husk_army gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.husk_army gm4_mu_config 128 +execute unless score $mob_limit.spore_zombie gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.spore_zombie gm4_mu_config 128 +execute unless score $mob_limit.phantom gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.phantom gm4_mu_config 48 # elite teams team add gm4_mu_elite.glacial diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/main.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/main.mcfunction index 10acd29ed2..94ff74a26b 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/main.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/main.mcfunction @@ -1,11 +1,19 @@ schedule function gm4_monsters_unbound:main 16t +# modify mobs +# if survival_refightalized is installed the modification is instead started from there +execute unless score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=!smithed.entity,tag=!gm4_mu_processed,nbt=!{PersistenceRequired:1b}] at @s run function gm4_monsters_unbound:mob/init/check_mob + +# phantoms drown under water +# if survival_refightalized is installed this happens from there instead +execute unless score gm4_survival_refightalized load.status matches 1.. as @e[type=phantom,tag=!smithed.entity] at @s if block ~ ~ ~ #gm4:water run damage @s 2 drown + # process cloaked creepers execute as @e[type=creeper,tag=gm4_mu_cloaked_creeper] at @s if entity @a[gamemode=!spectator,gamemode=!creative,distance=..3.1] run function gm4_monsters_unbound:mob/process/cloaked_creeper # zombie spores execute as @e[type=item,tag=gm4_mu_spore] at @s run function gm4_monsters_unbound:mob/process/spore/advance -execute as @e[type=#gm4_survival_refightalized:zombie_types,tag=gm4_mu_spore_zombie,predicate=gm4_monsters_unbound:technical/on_fire] run function gm4_monsters_unbound:mob/process/spore/burn_on_head +execute as @e[type=#gm4_monsters_unbound:zombie_types,tag=gm4_mu_spore_zombie,predicate=gm4_monsters_unbound:technical/on_fire] run function gm4_monsters_unbound:mob/process/spore/burn_on_head # traps execute as @e[type=marker,tag=gm4_mu_snowy_trap] at @s if entity @a[gamemode=!spectator,gamemode=!creative,distance=..7] run function gm4_monsters_unbound:mob/process/reveal_snowy_trap diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/check_mob.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/check_mob.mcfunction new file mode 100644 index 0000000000..4736b154d7 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/check_mob.mcfunction @@ -0,0 +1,17 @@ +# initiate newly spawned mobs (mobs without any tags) +# @s = mobs that can be buffed +# at @s +# run from main + +# /!\ This function only runs if Survival Refightalized is not installed + +# pre-mark mob as processed if it spawned in the air (from a spawner), these do not get modified +# mobs in the modify_in_air list are ignored here +execute if block ~ ~-0.01 ~ #gm4:no_collision run tag @s[type=!#gm4_monsters_unbound:modify_in_air] add gm4_sr_from_spawner + +# if the mob is riding another mob *do* modify them +scoreboard players set $mounted gm4_mu_data 0 +execute if entity @s[tag=gm4_sr_from_spawner] on vehicle run scoreboard players set $mounted gm4_mu_data 1 +execute if score $mounted gm4_mu_data matches 1 run tag @s remove gm4_sr_from_spawner + +function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/blazing.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/blazing.mcfunction index 5a54f17ae9..1086576b02 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/blazing.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/blazing.mcfunction @@ -11,10 +11,10 @@ attribute @s minecraft:attack_damage modifier add gm4_monsters_unbound:elite_buf attribute @s minecraft:movement_speed modifier add gm4_monsters_unbound:elite_buff.fire -0.45 add_multiplied_total attribute @s minecraft:burning_time modifier add gm4_monsters_unbound:elite_buff.fire -1 add_multiplied_total -enchant @s[type=#gm4_survival_refightalized:skeleton_types] flame -scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.damage_change -18 -scoreboard players add @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 2 -item replace entity @s[type=!#gm4_survival_refightalized:skeleton_types] weapon.mainhand with blaze_rod[enchantments={fire_aspect:2}] +enchant @s[type=#gm4_monsters_unbound:skeleton_types] flame +scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.damage_change -18 +scoreboard players add @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 2 +item replace entity @s[type=!#gm4_monsters_unbound:skeleton_types] weapon.mainhand with blaze_rod[enchantments={fire_aspect:2}] data modify entity @s drop_chances.mainhand set value 0 item replace entity @s armor.head with magma_block[enchantments={binding_curse:1},enchantment_glint_override=false] diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/gargantuan.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/gargantuan.mcfunction index ba9e87eaec..b227e4ccae 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/gargantuan.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/gargantuan.mcfunction @@ -13,13 +13,13 @@ attribute @s minecraft:attack_knockback modifier add gm4_monsters_unbound:elite_ attribute @s minecraft:water_movement_efficiency modifier add gm4_monsters_unbound:elite_buff.giant 0.85 add_value attribute @s minecraft:movement_speed modifier add gm4_monsters_unbound:elite_buff.giant -0.35 add_multiplied_total -attribute @s[type=#gm4_survival_refightalized:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.507537 add_multiplied_total -attribute @s[type=!#gm4_survival_refightalized:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.538461 add_multiplied_total +attribute @s[type=#gm4_monsters_unbound:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.507537 add_multiplied_total +attribute @s[type=!#gm4_monsters_unbound:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.538461 add_multiplied_total -enchant @s[type=#gm4_survival_refightalized:skeleton_types] punch 2 -enchant @s[type=#gm4_survival_refightalized:skeleton_types] power 1 +enchant @s[type=#gm4_monsters_unbound:skeleton_types] punch 2 +enchant @s[type=#gm4_monsters_unbound:skeleton_types] power 1 -scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 7 +scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 7 item replace entity @s armor.head with cobblestone[enchantment_glint_override=false,minecraft:enchantments={projectile_protection:5,binding_curse:1}] 1 data modify entity @s drop_chances.head set value 0 diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/splitting.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/splitting.mcfunction index 868c60d9dc..73b470470c 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/splitting.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/elite/type/splitting.mcfunction @@ -8,8 +8,8 @@ tag @s add gm4_mu_elite.splitting attribute @s minecraft:max_health modifier add gm4_monsters_unbound:elite_buff.vorpal 2.5 add_multiplied_total -loot replace entity @s[type=!#gm4_survival_refightalized:skeleton_types] armor.head loot gm4_monsters_unbound:elite/splitting_zombie -loot replace entity @s[type=#gm4_survival_refightalized:skeleton_types] armor.head loot gm4_monsters_unbound:elite/splitting_skeleton +loot replace entity @s[type=!#gm4_monsters_unbound:skeleton_types] armor.head loot gm4_monsters_unbound:elite/splitting_zombie +loot replace entity @s[type=#gm4_monsters_unbound:skeleton_types] armor.head loot gm4_monsters_unbound:elite/splitting_skeleton data modify entity @s drop_chances.head set value 1 team join gm4_mu_elite.splitting diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/initialize.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/initialize.mcfunction new file mode 100644 index 0000000000..a6277c2d12 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/initialize.mcfunction @@ -0,0 +1,25 @@ +# initiate newly spawned mobs (mobs without any tags) +# @s = mobs that can be buffed +# at @s +# run from mob/init/check_mob + +# /!\ This function only runs if Survival Refightalized is not installed + +scoreboard players reset $mob_extras gm4_sr_data +tag @s add gm4_mu_processed + +# remove baby zombies except chicken jockeys (will be turned into Elites) +scoreboard players set $was_baby gm4_mu_data 0 +execute if entity @s[type=zombie] if predicate {condition:"all_of",terms:[{condition:"entity_properties",entity:"this",predicate:{flags:{is_baby:1b}}},{condition:"inverted",term:{condition:"entity_properties",entity:"this",predicate:{vehicle:{}}}}]} store success score $was_baby gm4_mu_data run data modify entity @s IsBaby set value 0b +execute if score $was_baby gm4_mu_data matches 1 run tag @s add gm4_sr_was_baby + +function gm4_monsters_unbound:mob/init/mob_type + + +# heal to max health +effect give @s[type=#minecraft:undead] instant_damage 1 20 true +effect give @s[type=!#minecraft:undead] instant_health 1 20 true + +# process any spawned mobs (uses sr instead of mu to be compatible with survival_refightalized) +execute if score $mob_extras gm4_sr_data matches 1.. unless entity @s[tag=gm4_sr_extra_mob] as @e[type=#gm4_monsters_unbound:modify,tag=gm4_sr_extra_mob] at @s run function gm4_monsters_unbound:mob/init/initialize +tag @s remove gm4_sr_extra_mob diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type.mcfunction index cb80d56d63..df6a5cdd26 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type.mcfunction @@ -1,12 +1,13 @@ # check what mob is being processed # @s = mobs that can be buffed # at @s +# run from mob/init/initialize # run from function call gm4_survival_refightalized:init_mob, from gm4_survival_refightalized:mob/init/initiate # zombie, zombie_villager, husk, drowned -execute if entity @s[type=#gm4_survival_refightalized:zombie_types] run return run function gm4_monsters_unbound:mob/init/mob_type/zombie/base +execute if entity @s[type=#gm4_monsters_unbound:zombie_types] run return run function gm4_monsters_unbound:mob/init/mob_type/zombie/base # skeleton, bogged, stray -execute if entity @s[type=#gm4_survival_refightalized:skeleton_types,type=!wither_skeleton] run return run function gm4_monsters_unbound:mob/init/mob_type/skeleton/base +execute if entity @s[type=#gm4_monsters_unbound:skeleton_types,type=!wither_skeleton] run return run function gm4_monsters_unbound:mob/init/mob_type/skeleton/base execute if entity @s[type=spider] run return run function gm4_monsters_unbound:mob/init/mob_type/spider/spider execute if entity @s[type=creeper] run return run function gm4_monsters_unbound:mob/init/mob_type/creeper/base execute if entity @s[type=cave_spider] run return run function gm4_monsters_unbound:mob/init/mob_type/spider/cave_spider diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/creeper/base.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/creeper/base.mcfunction index ebb31255f4..9fe2c8ea75 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/creeper/base.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/creeper/base.mcfunction @@ -18,6 +18,6 @@ execute if entity @s[tag=gm4_mu_toxic_creeper] run function gm4_monsters_unbound # growth attribute @s[predicate=gm4_monsters_unbound:biome/growth] minecraft:movement_speed modifier add gm4_monsters_unbound:stat_change.growth 0.2 add_multiplied_base # underground -data modify entity @s[predicate=gm4_survival_refightalized:mob/underground] ExplosionRadius set value 4s +data modify entity @s[predicate=gm4_monsters_unbound:mob/underground] ExplosionRadius set value 4s # dripstone caves execute if biome ~ ~ ~ dripstone_caves if block ~.875 ~ ~.875 #gm4:no_collision if block ~.875 ~ ~-.875 #gm4:no_collision if block ~-.875 ~ ~.875 #gm4:no_collision if block ~-.875 ~ ~-.875 #gm4:no_collision run function gm4_monsters_unbound:mob/init/mob_type/creeper/dripstone_caves diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/enderman/base.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/enderman/base.mcfunction index ab0bb045ed..ecaa291f6d 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/enderman/base.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/enderman/base.mcfunction @@ -11,10 +11,10 @@ execute if predicate gm4_monsters_unbound:biome/toxic if predicate {condition:"m # burned execute if entity @s[tag=!gm4_sr_extra_mob,predicate=gm4_monsters_unbound:biome/burned] store success score $mob_extras gm4_sr_data run summon enderman ~.05 ~ ~ {Tags:["gm4_sr_extra_mob"]} execute if entity @s[tag=!gm4_sr_extra_mob,predicate=gm4_monsters_unbound:biome/burned] store success score $mob_extras gm4_sr_data run summon enderman ~-.05 ~ ~.05 {Tags:["gm4_sr_extra_mob"]} -# growth +# growth execute if predicate gm4_monsters_unbound:biome/growth run function gm4_monsters_unbound:mob/init/mob_type/enderman/growth # underground -execute if entity @s[tag=!gm4_sr_extra_mob,predicate=gm4_survival_refightalized:mob/underground] if predicate {condition:"minecraft:random_chance",chance:0.15} run function gm4_monsters_unbound:mob/init/mob_type/enderman/underground +execute if entity @s[tag=!gm4_sr_extra_mob,predicate=gm4_monsters_unbound:technical/underground] if predicate {condition:"minecraft:random_chance",chance:0.15} run function gm4_monsters_unbound:mob/init/mob_type/enderman/underground # dripstone caves execute if biome ~ ~ ~ dripstone_caves if block ~.875 ~ ~.875 #gm4:no_collision if block ~.875 ~ ~-.875 #gm4:no_collision if block ~-.875 ~ ~.875 #gm4:no_collision if block ~-.875 ~ ~-.875 #gm4:no_collision run function gm4_monsters_unbound:mob/init/mob_type/enderman/dripstone_caves diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/skeleton/base.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/skeleton/base.mcfunction index df9a1c6f2a..4e3e5967d3 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/skeleton/base.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/skeleton/base.mcfunction @@ -6,14 +6,14 @@ # elites - don't get other modifiers - 5% of spawns execute store result score $nearby_elites gm4_mu_data if entity @e[type=#gm4_monsters_unbound:elite_types,tag=gm4_mu_elite,distance=..64] execute if score $nearby_elites gm4_mu_data matches ..3 if predicate {condition:"minecraft:random_chance",chance:0.05} run tag @s[tag=!gm4_sr_extra_mob] add gm4_mu_elite -execute if entity @s[tag=gm4_mu_elite] run return run function gm4_monsters_unbound:mob/init/elite/pick +execute if entity @s[tag=gm4_mu_elite,tag=!gm4_sr_from_spawner] run return run function gm4_monsters_unbound:mob/init/elite/pick # | Biome Modifiers # snowy execute if entity @s[type=stray,predicate=gm4_monsters_unbound:biome/snowy,predicate=!gm4_monsters_unbound:biome/growth] run loot replace entity @s weapon.offhand loot gm4_monsters_unbound:mob/equip_arrow/stray_snowy # mountainous execute if predicate gm4_monsters_unbound:biome/mountainous positioned ~ ~35 ~ store result score $phantom_count gm4_mu_data if entity @e[type=phantom,distance=..32] -execute if score $spawn_phantoms gm4_sr_config matches 1 if score $phantom_count gm4_mu_data < $mob_limit.phantom gm4_sr_config if predicate gm4_monsters_unbound:chance/spawn_phantom run function gm4_monsters_unbound:mob/init/mob_type/zombie/spawn_phantoms +execute if score $spawn_phantoms gm4_mu_config matches 1 if score $phantom_count gm4_mu_data < $mob_limit.phantom gm4_mu_config if predicate gm4_monsters_unbound:chance/spawn_phantom run function gm4_monsters_unbound:mob/init/mob_type/zombie/spawn_phantoms # flowering execute if predicate {condition:"minecraft:all_of",terms:[{condition:"minecraft:random_chance",chance:0.85},{condition:"minecraft:reference",name:"gm4_monsters_unbound:biome/flowering"}]} run function gm4_monsters_unbound:mob/init/mob_type/skeleton/flowering # toxic @@ -27,7 +27,7 @@ execute if entity @s[type=!bogged,predicate=gm4_monsters_unbound:biome/growth] r # dripstone caves execute if predicate {condition:"minecraft:all_of",terms:[{condition:"location_check",predicate:{biomes:"dripstone_caves"}},{condition:"random_chance",chance:0.6}]} run item replace entity @s weapon.mainhand with stone_pickaxe # underground -execute if predicate gm4_survival_refightalized:mob/underground if predicate {condition:"minecraft:random_chance",chance:0.4} run function gm4_monsters_unbound:mob/init/mob_type/skeleton/underground +execute if predicate gm4_monsters_unbound:technical/underground if predicate {condition:"minecraft:random_chance",chance:0.4} run function gm4_monsters_unbound:mob/init/mob_type/skeleton/underground # soul sand valley execute if biome ~ ~ ~ soul_sand_valley run effect give @s fire_resistance infinite 0 true diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/spider/spider.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/spider/spider.mcfunction index f70f7f3520..c7452fe129 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/spider/spider.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/spider/spider.mcfunction @@ -20,4 +20,4 @@ execute if entity @s[tag=!gm4_sr_extra_mob,predicate=gm4_monsters_unbound:biome/ # dripstone caves execute if predicate {condition:"minecraft:all_of",terms:[{condition:"minecraft:random_chance",chance:0.1},{condition:"minecraft:location_check",predicate:{biomes:"dripstone_caves"}}]} run function gm4_monsters_unbound:mob/init/mob_type/spider/gargantuan # underground -execute if predicate {condition:"minecraft:all_of",terms:[{condition:"minecraft:random_chance",chance:0.25},{condition:"minecraft:reference",name:"gm4_survival_refightalized:mob/underground"}]} run function gm4_monsters_unbound:mob/init/mob_type/spider/underground/pick +execute if predicate {condition:"minecraft:all_of",terms:[{condition:"minecraft:random_chance",chance:0.25},{condition:"minecraft:reference",name:"gm4_monsters_unbound:technical/underground"}]} run function gm4_monsters_unbound:mob/init/mob_type/spider/underground/pick diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/base.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/base.mcfunction index 6be391bc36..4e2da0848a 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/base.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/base.mcfunction @@ -4,8 +4,8 @@ # run from mob/init/mob_type # elites - don't get other modifiers - 5% of spawns (replaces baby zombies) -execute if entity @s[tag=gm4_sr_was_baby] store result score $nearby_elites gm4_mu_data if entity @e[type=#gm4_monsters_unbound:elite_types,tag=gm4_mu_elite,distance=..64] -execute if entity @s[tag=gm4_sr_was_baby] if score $nearby_elites gm4_mu_data matches ..3 run return run function gm4_monsters_unbound:mob/init/elite/pick +execute if entity @s[tag=gm4_sr_was_baby,tag=!gm4_sr_from_spawner] store result score $nearby_elites gm4_mu_data if entity @e[type=#gm4_monsters_unbound:elite_types,tag=gm4_mu_elite,distance=..64] +execute if entity @s[tag=gm4_sr_was_baby,tag=!gm4_sr_from_spawner] if score $nearby_elites gm4_mu_data matches ..3 run return run function gm4_monsters_unbound:mob/init/elite/pick # | Biome Modifiers # snowy @@ -28,4 +28,4 @@ execute if entity @s[type=!zombie_villager,tag=!gm4_mu_spore_zombie,predicate=gm # dripstone caves execute if entity @s[tag=!gm4_sr_extra_mob] if biome ~ ~ ~ dripstone_caves run function gm4_monsters_unbound:mob/init/mob_type/zombie/dripstone_caves/try # underground (not dripstone caves) -execute if predicate {condition:"all_of",terms:[{condition:"reference",name:"gm4_survival_refightalized:mob/underground"},{condition:"inverted",term:{condition:"location_check",predicate:{"biomes":"dripstone_caves"}}},{condition:"random_chance",chance:0.5}]} run function gm4_monsters_unbound:mob/init/mob_type/zombie/underground/pick +execute if predicate {condition:"all_of",terms:[{condition:"reference",name:"gm4_monsters_unbound:technical/underground"},{condition:"inverted",term:{condition:"location_check",predicate:{"biomes":"dripstone_caves"}}},{condition:"random_chance",chance:0.5}]} run function gm4_monsters_unbound:mob/init/mob_type/zombie/underground/pick diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/burned_husk.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/burned_husk.mcfunction index 2b82605d37..1532a6e686 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/burned_husk.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/burned_husk.mcfunction @@ -6,4 +6,4 @@ attribute @s minecraft:max_health modifier add gm4_monsters_unbound:stat_change.burned_husk -0.65 add_multiplied_total attribute @s minecraft:attack_damage modifier add gm4_monsters_unbound:stat_change.burned_husk -0.25 add_multiplied_total execute at @p[gamemode=!spectator] store result score $husk_count gm4_mu_data if entity @e[type=husk,distance=..128] -execute if entity @s[tag=!gm4_sr_extra_mob] unless score $husk_count gm4_mu_data > $mob_limit.husk_army gm4_sr_config run function gm4_monsters_unbound:mob/init/mob_type/zombie/burned_husk_army +execute if entity @s[tag=!gm4_sr_extra_mob] unless score $husk_count gm4_mu_data > $mob_limit.husk_army gm4_mu_config run function gm4_monsters_unbound:mob/init/mob_type/zombie/burned_husk_army diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/mountainous.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/mountainous.mcfunction index 0e12585127..42e21a7ed5 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/mountainous.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/mountainous.mcfunction @@ -4,7 +4,7 @@ # run from mob/init/mob_type/zombie/base execute positioned ~ ~35 ~ store result score $phantom_count gm4_mu_data if entity @e[type=phantom,distance=..32] -execute if score $spawn_phantoms gm4_sr_config matches 1 if score $phantom_count gm4_mu_data < $mob_limit.phantom gm4_sr_config if predicate gm4_monsters_unbound:chance/spawn_phantom run function gm4_monsters_unbound:mob/init/mob_type/zombie/spawn_phantoms +execute if score $spawn_phantoms gm4_mu_config matches 1 if score $phantom_count gm4_mu_data < $mob_limit.phantom gm4_mu_config if predicate gm4_monsters_unbound:chance/spawn_phantom run function gm4_monsters_unbound:mob/init/mob_type/zombie/spawn_phantoms attribute @s minecraft:attack_knockback modifier add gm4_monsters_unbound:stat_change.mountainous 1 add_value attribute @s minecraft:attack_damage modifier add gm4_monsters_unbound:stat_change.mountainous 1 add_value diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/underground/replace_with_skeleton.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/underground/replace_with_skeleton.mcfunction index 54d1390260..2b04e80889 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/underground/replace_with_skeleton.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/init/mob_type/zombie/underground/replace_with_skeleton.mcfunction @@ -3,6 +3,7 @@ # at @s # run from mob/init/mob_type/zombie/underground/pick +# gm4_sr_melee_skeleton tag is to avoid survival_refightalized treating this skeleton as holding a bow summon skeleton ~.05 ~ ~ {Tags:["gm4_sr_extra_mob","gm4_sr_melee_skeleton"],HandItems:[{},{}]} summon skeleton ~ ~ ~ {Tags:["gm4_sr_extra_mob","gm4_sr_melee_skeleton"],HandItems:[{},{}]} tp @s ~ ~-2050 ~ diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/blazing/process.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/blazing/process.mcfunction index 6915844a73..cdd7710b97 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/blazing/process.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/blazing/process.mcfunction @@ -10,5 +10,5 @@ execute if score $has_target gm4_mu_data matches 0 run scoreboard players set @s scoreboard players set @s[scores={gm4_mu_timer=10..}] gm4_mu_timer 0 execute if score @s gm4_mu_timer matches 3 anchored eyes positioned ^ ^-0.25 ^ on target facing entity @s eyes rotated ~ -75 summon block_display run function gm4_monsters_unbound:mob/process/elite/blazing/init_flare -execute if score @s[type=#gm4_survival_refightalized:zombie_types] gm4_mu_timer matches 4 anchored eyes positioned ^ ^-0.25 ^ on target facing entity @s eyes rotated ~90 -75 summon block_display run function gm4_monsters_unbound:mob/process/elite/blazing/init_flare -execute if score @s[type=#gm4_survival_refightalized:zombie_types] gm4_mu_timer matches 5 anchored eyes positioned ^ ^-0.25 ^ on target facing entity @s eyes rotated ~-90 -75 summon block_display run function gm4_monsters_unbound:mob/process/elite/blazing/init_flare +execute if score @s[type=#gm4_monsters_unbound:zombie_types] gm4_mu_timer matches 4 anchored eyes positioned ^ ^-0.25 ^ on target facing entity @s eyes rotated ~90 -75 summon block_display run function gm4_monsters_unbound:mob/process/elite/blazing/init_flare +execute if score @s[type=#gm4_monsters_unbound:zombie_types] gm4_mu_timer matches 5 anchored eyes positioned ^ ^-0.25 ^ on target facing entity @s eyes rotated ~-90 -75 summon block_display run function gm4_monsters_unbound:mob/process/elite/blazing/init_flare diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/gargantuan/update_stats.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/gargantuan/update_stats.mcfunction index 6a343dffd3..529a3dd1c8 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/gargantuan/update_stats.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/gargantuan/update_stats.mcfunction @@ -13,11 +13,11 @@ scoreboard players operation $curr_health gm4_mu_data /= $max_health gm4_mu_data scoreboard players set $curr_health_percent_lost gm4_mu_data 100 scoreboard players operation $curr_health_percent_lost gm4_mu_data -= $curr_health gm4_mu_data -execute if score $curr_health_percent_lost gm4_mu_data matches 50.. run effect give @s[type=!#gm4_survival_refightalized:skeleton_types] minecraft:resistance infinite 0 true -execute if score $curr_health_percent_lost gm4_mu_data matches 75.. run effect give @s[type=!#gm4_survival_refightalized:skeleton_types] minecraft:resistance infinite 1 true +execute if score $curr_health_percent_lost gm4_mu_data matches 50.. run effect give @s[type=!#gm4_monsters_unbound:skeleton_types] minecraft:resistance infinite 0 true +execute if score $curr_health_percent_lost gm4_mu_data matches 75.. run effect give @s[type=!#gm4_monsters_unbound:skeleton_types] minecraft:resistance infinite 1 true -execute if score $curr_health_percent_lost gm4_mu_data matches 50.. run scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 4 -execute if score $curr_health_percent_lost gm4_mu_data matches 75.. run scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 6 +execute if score $curr_health_percent_lost gm4_mu_data matches 50.. run scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 4 +execute if score $curr_health_percent_lost gm4_mu_data matches 75.. run scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 6 execute store result storage gm4_monsters_unbound:temp set.speed float 0.015 run scoreboard players get $curr_health_percent_lost gm4_mu_data execute store result storage gm4_monsters_unbound:temp set.damage float 0.005 run scoreboard players get $curr_health_percent_lost gm4_mu_data diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/splitting/init_entity.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/splitting/init_entity.mcfunction index 85c291eb60..849e0add21 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/splitting/init_entity.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/splitting/init_entity.mcfunction @@ -12,7 +12,7 @@ attribute @s minecraft:max_health modifier add gm4_monsters_unbound:split_entity attribute @s minecraft:scale modifier add gm4_monsters_unbound:split_entity -0.5 add_multiplied_total attribute @s minecraft:step_height modifier add gm4_monsters_unbound:split_entity -0.5 add_multiplied_total attribute @s minecraft:movement_speed modifier add gm4_monsters_unbound:split_entity 0.33 add_multiplied_total -attribute @s[type=#gm4_survival_refightalized:skeleton_types] minecraft:follow_range modifier add gm4_monsters_unbound:split_entity -0.66 add_multiplied_total +attribute @s[type=#gm4_monsters_unbound:skeleton_types] minecraft:follow_range modifier add gm4_monsters_unbound:split_entity -0.66 add_multiplied_total scoreboard players set @s gm4_sr_arrow.fire_delay 6 scoreboard players set @s gm4_sr_arrow.damage_change -14 @@ -25,11 +25,12 @@ execute store result entity @s Motion[2] double 0.01 run random value -30..30 tag @s add gm4_mu_elite.split_entity tag @s add gm4_mu_split_entity -execute if dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld -execute unless dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_else +execute if score gm4_survival_refightalized load.status matches 1.. if dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute if score gm4_survival_refightalized load.status matches 1.. unless dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_else +execute unless score gm4_survival_refightalized load.status matches 1.. run function gm4_monsters_unbound:mob/init/initialize item replace entity @s armor.head with spawner data modify entity @s drop_chances.head set value 0 team join gm4_mu_elite.split -execute if score $has_bow gm4_mu_data matches 0 run item replace entity @s[type=#gm4_survival_refightalized:skeleton_types] weapon.mainhand with wooden_sword +execute if score $has_bow gm4_mu_data matches 0 run item replace entity @s[type=#gm4_monsters_unbound:skeleton_types] weapon.mainhand with wooden_sword diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/volatile/process.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/volatile/process.mcfunction index e2a66d0853..e5cd5681b4 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/volatile/process.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/volatile/process.mcfunction @@ -4,7 +4,7 @@ # run from mob/process/elite/check_type scoreboard players set $has_target gm4_mu_data 0 -execute on target if entity @s[type=player] run scoreboard players set $has_target gm4_mu_data 1 +execute on target if entity @s[type=player,distance=..22] run scoreboard players set $has_target gm4_mu_data 1 execute if score $has_target gm4_mu_data matches 0 run return 0 scoreboard players add @s gm4_mu_timer 1 diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/activate.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/activate.mcfunction index d4bfb53877..9744cbf412 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/activate.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/activate.mcfunction @@ -7,7 +7,7 @@ execute anchored eyes positioned ^ ^-1.15 ^ run particle gust_emitter_small ~ ~ playsound minecraft:entity.breeze.wind_burst hostile @a ~ ~ ~ 1 0 # skeletons shoot arrows instead of speed burst -execute if entity @s[type=#gm4_survival_refightalized:skeleton_types] run return run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/start +execute if entity @s[type=#gm4_monsters_unbound:skeleton_types] run return run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/start summon breeze_wind_charge ~ ~ ~ {Motion:[0.0,-5.0,0.0]} attribute @s minecraft:movement_speed modifier remove gm4_monsters_unbound:elite_buff.speed.charging diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/process.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/process.mcfunction index b1d8f88b4a..4b661e9b6a 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/process.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/process.mcfunction @@ -5,7 +5,7 @@ scoreboard players set $has_target gm4_mu_data 0 execute on target run scoreboard players set $has_target gm4_mu_data 1 -execute if entity @s[type=#gm4_survival_refightalized:skeleton_types,scores={gm4_mu_timer=1..}] run scoreboard players set $has_target gm4_mu_data 1 +execute if entity @s[type=#gm4_monsters_unbound:skeleton_types,scores={gm4_mu_timer=1..}] run scoreboard players set $has_target gm4_mu_data 1 # no target execute if score $has_target gm4_mu_data matches 0 if score @s gm4_mu_timer matches -2147483648..2147483647 run function gm4_monsters_unbound:mob/process/elite/zephyr/lose_charge @@ -23,6 +23,6 @@ execute if score @s gm4_mu_timer matches 3 run playsound minecraft:entity.breeze execute if score @s gm4_mu_timer matches 4 run playsound minecraft:entity.breeze.idle_air hostile @a ~ ~ ~ 1 0.65 execute if score @s gm4_mu_timer matches 5 run function gm4_monsters_unbound:mob/process/elite/zephyr/activate -execute if score @s[type=#gm4_survival_refightalized:skeleton_types] gm4_mu_timer matches 6..10 run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst +execute if score @s[type=#gm4_monsters_unbound:skeleton_types] gm4_mu_timer matches 6..10 run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst scoreboard players reset @s[scores={gm4_mu_timer=14..},tag=!gm4_mu_charging_attack] gm4_mu_timer diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/skeleton/init_arrow.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/skeleton/init_arrow.mcfunction index 4980b3fa3a..0b38134774 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/skeleton/init_arrow.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/zephyr/skeleton/init_arrow.mcfunction @@ -3,7 +3,7 @@ # at @s # run from mob/process/elite/zephyr/skeleton/arrow_burst -# don't process this arrow +# don't process this arrow in survival_refightalized tag @s add gm4_sr_arrow_checked # arrow deals half damage diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_dripstone_trap.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_dripstone_trap.mcfunction index fe8147f8fe..73ef8c587b 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_dripstone_trap.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_dripstone_trap.mcfunction @@ -18,4 +18,5 @@ execute if score $pick_entity gm4_mu_data matches 1 run summon skeleton ~ ~-0.8 execute if score $pick_entity gm4_mu_data matches 2 run summon zombie ~ ~-0.8 ~ {Tags:["gm4_sr_extra_mob"],Motion:[0.0d,-0.275d,0.0d],attributes:[{id:"fall_damage_multiplier",base:1,modifiers:[{id:"gm4_monsters_unbound:stat_change.dripstone_trap",amount:-0.95,operation:"add_multiplied_total"}]}]} execute if score $pick_entity gm4_mu_data matches 3 run summon spider ~ ~ ~ {Tags:["gm4_sr_extra_mob"],Motion:[0.0d,-0.275d,0.0d],attributes:[{id:"fall_damage_multiplier",base:1,modifiers:[{id:"gm4_monsters_unbound:stat_change.dripstone_trap",amount:-0.95,operation:"add_multiplied_total"}]}]} -execute as @e[type=#gm4_survival_refightalized:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_survival_refightalized:mob/init/initiate +execute if score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_survival_refightalized:mob/init/initiate +execute unless score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_snowy_trap.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_snowy_trap.mcfunction index 41f348202c..29e4142c12 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_snowy_trap.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/reveal_snowy_trap.mcfunction @@ -17,4 +17,5 @@ execute if score $pick_entity gm4_mu_data matches 1 run summon zombie ~ ~-0.75 ~ execute if score $pick_entity gm4_mu_data matches 2 run summon stray ~ ~-0.75 ~ {Tags:["gm4_sr_extra_mob"],Motion:[0.0d,0.5d,0.0d]} execute if score $pick_entity gm4_mu_data matches 3 run summon creeper ~ ~-0.75 ~ {Tags:["gm4_sr_extra_mob"],Motion:[0.0d,0.5d,0.0d]} -execute as @e[type=#gm4_survival_refightalized:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_survival_refightalized:mob/init/initiate +execute if score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_survival_refightalized:mob/init/initiate +execute unless score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=gm4_sr_extra_mob,distance=..1,limit=1] at @s run function gm4_monsters_unbound:mob/init/initialize diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/spore/activate.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/spore/activate.mcfunction index fc43aafca4..5937187fd4 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/spore/activate.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/spore/activate.mcfunction @@ -4,9 +4,9 @@ # run from mob/process/spore/advance # check for mob cap -execute at @p[gamemode=!spectator] store result score $spore_zombie_count gm4_mu_data if entity @e[type=#gm4_survival_refightalized:zombie_types,tag=gm4_mu_spore_mob,distance=..32] -execute if score $spore_zombie_count gm4_mu_data > $mob_limit.spore_zombie gm4_sr_config run kill @s -execute if score $spore_zombie_count gm4_mu_data > $mob_limit.spore_zombie gm4_sr_config run return 0 +execute at @p[gamemode=!spectator] store result score $spore_zombie_count gm4_mu_data if entity @e[type=#gm4_monsters_unbound:zombie_types,tag=gm4_mu_spore_mob,distance=..32] +execute if score $spore_zombie_count gm4_mu_data > $mob_limit.spore_zombie gm4_mu_config run kill @s +execute if score $spore_zombie_count gm4_mu_data > $mob_limit.spore_zombie gm4_mu_config run return 0 # get spores in stack and their generation execute store result score $spore_count gm4_mu_data run data get entity @s Item.count diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/guidebook/monsters_unbound.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/guidebook/monsters_unbound.json index 7eba959453..6b31d4f79d 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/guidebook/monsters_unbound.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/guidebook/monsters_unbound.json @@ -12,7 +12,7 @@ "player": [ { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } ] } diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/burned.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/burned.json index 6dbf35d141..0990eff01f 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/burned.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/burned.json @@ -3,7 +3,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/flowering.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/flowering.json index 0076ffbb3f..d405c96c61 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/flowering.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/flowering.json @@ -15,7 +15,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/growth.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/growth.json index 36dc9adb2e..3f014aec2d 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/growth.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/growth.json @@ -3,7 +3,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/mountainous.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/mountainous.json index 802689bbf8..d8e7a9cfcd 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/mountainous.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/mountainous.json @@ -3,7 +3,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/reef.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/reef.json index 5f0551827a..54869d1c9e 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/reef.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/reef.json @@ -6,7 +6,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/snowy.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/snowy.json index 6b9fa961eb..999726f1cf 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/snowy.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/snowy.json @@ -3,7 +3,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/toxic.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/toxic.json index fd294dbc53..2f4d4e554b 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/toxic.json +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/biome/toxic.json @@ -3,7 +3,7 @@ "condition": "minecraft:inverted", "term": { "condition": "minecraft:reference", - "name": "gm4_survival_refightalized:mob/underground" + "name": "gm4_monsters_unbound:technical/underground" } }, { diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/technical/underground.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/technical/underground.json new file mode 100644 index 0000000000..c3b1f67908 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/predicate/technical/underground.json @@ -0,0 +1,22 @@ +[ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:location_check", + "predicate": { + "block": { + "blocks": "#gm4:water" + } + } + } + }, + { + "condition": "minecraft:location_check", + "offsetY": 1, + "predicate": { + "light": { + "light": 0 + } + } + } +] diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify.json new file mode 100644 index 0000000000..9ec8e2d3ca --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify.json @@ -0,0 +1,20 @@ +{ + "values": [ + "minecraft:bogged", + "minecraft:cave_spider", + "minecraft:creeper", + "minecraft:drowned", + "minecraft:enderman", + "minecraft:husk", + "minecraft:phantom", + "minecraft:piglin", + "minecraft:silverfish", + "minecraft:skeleton", + "minecraft:spider", + "minecraft:stray", + "minecraft:wither_skeleton", + "minecraft:zombie", + "minecraft:zombie_villager", + "minecraft:zombified_piglin" + ] +} diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify_in_air.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify_in_air.json new file mode 100644 index 0000000000..e396af5310 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/modify_in_air.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:cave_spider", + "minecraft:drowned", + "minecraft:phantom", + "minecraft:silverfish" + ] +} diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/skeleton_types.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/skeleton_types.json new file mode 100644 index 0000000000..0dbca73205 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/skeleton_types.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:bogged", + "minecraft:skeleton", + "minecraft:stray", + "minecraft:wither_skeleton" + ] +} diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/zombie_types.json b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/zombie_types.json new file mode 100644 index 0000000000..d52516baa7 --- /dev/null +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/tags/entity_type/zombie_types.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:drowned", + "minecraft:husk", + "minecraft:zombie", + "minecraft:zombie_villager" + ] +} diff --git a/gm4_survival_refightalized/beet.yaml b/gm4_survival_refightalized/beet.yaml index 3959138376..b2ae2a3d81 100644 --- a/gm4_survival_refightalized/beet.yaml +++ b/gm4_survival_refightalized/beet.yaml @@ -1,6 +1,6 @@ id: gm4_survival_refightalized name: Survival Refightalized -version: 1.0.X +version: 1.1.X data_pack: load: . diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/damaged.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/damaged.json index 06cdde48d6..2d8fcb3fea 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/damaged.json +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/damaged.json @@ -50,6 +50,34 @@ } } }, + "breaching": { + "trigger": "minecraft:entity_hurt_player", + "conditions": { + "damage": { + "source_entity": { + "equipment": { + "mainhand": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:breach" + } + ] + } + } + } + }, + "type": { + "tags": [ + { + "id": "gm4_survival_refightalized:ignore", + "expected": false + } + ] + } + } + } + }, "bypasses_enchantments": { "trigger": "minecraft:entity_hurt_player", "conditions": { @@ -69,6 +97,25 @@ } } }, + "bypasses_shield": { + "trigger": "minecraft:entity_hurt_player", + "conditions": { + "damage": { + "type": { + "tags": [ + { + "id": "minecraft:bypasses_shield", + "expected": true + }, + { + "id": "gm4_survival_refightalized:ignore", + "expected": false + } + ] + } + } + } + }, "is_fire": { "trigger": "minecraft:entity_hurt_player", "conditions": { @@ -195,7 +242,9 @@ "combat_damage", "armor_piercing", "armor_piercing_mob", + "breaching", "bypasses_enchantments", + "bypasses_shield", "is_fire", "is_fall", "is_explosion", diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/kill_mob.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/kill_mob.json new file mode 100644 index 0000000000..2f8406c8d6 --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/advancement/kill_mob.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "hostile": { + "trigger": "minecraft:player_killed_entity", + "conditions": { + "entity": { + "type": "#gm4:hostile" + } + } + }, + "neutral_hostile": { + "trigger": "minecraft:player_killed_entity", + "conditions": { + "entity": { + "type": "#gm4:neutral_hostile" + } + } + } + }, + "requirements": [ + [ + "hostile", + "neutral_hostile" + ] + ], + "rewards": { + "function": "gm4_survival_refightalized:player/killed_mob" + } +} diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/enchantment/trident_damage_reduction.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/enchantment/trident_damage_reduction.json new file mode 100644 index 0000000000..11a36430c4 --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/enchantment/trident_damage_reduction.json @@ -0,0 +1,32 @@ +{ + "anvil_cost": 0, + "description": "gm4.survival_refightalized.trident_damage_reduction", + "effects": { + "minecraft:damage": [ + { + "effect": { + "type": "minecraft:add", + "value": { + "type": "minecraft:linear", + "base": -1, + "per_level_above_first": -1 + } + } + } + ] + }, + "max_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "max_level": 5, + "min_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "slots": [ + "mainhand" + ], + "supported_items": "trident", + "weight": 1 +} diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/check_arrow.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/check_arrow.mcfunction index db369a2ced..c9fd2623d2 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/check_arrow.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/check_arrow.mcfunction @@ -5,9 +5,16 @@ # tag item as checked and try to process tag @s add gm4_sr_arrow_checked +scoreboard players set $trident_damage_change gm4_sr_data 0 execute store result score $arrow_damage gm4_sr_data run data get entity @s damage 10 tag @s add gm4_sr_current_arrow execute on origin if entity @s[type=#gm4_survival_refightalized:can_fire_arrows] run function gm4_survival_refightalized:mob/process/arrow/run tag @s remove gm4_sr_current_arrow -execute unless score $arrow_damage gm4_sr_data matches 20 store result entity @s damage double 0.1 run scoreboard players get $arrow_damage gm4_sr_data + +# if it's a trident use enchantments instead +execute if entity @s[type=trident] run return run execute store result entity @s item.components."minecraft:enchantments"."gm4_survival_refightalized:trident_damage_reduction" int -1 run scoreboard players get $trident_damage_change gm4_sr_data + +# store result on arrow +scoreboard players operation $arrow_damage gm4_sr_data += $arrow_damage_change gm4_sr_data +execute store result entity @s damage double 0.1 run scoreboard players get $arrow_damage gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/init.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/init.mcfunction index 20c1ac9ff5..c3d1f67839 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/init.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/init.mcfunction @@ -33,6 +33,7 @@ scoreboard objectives add gm4_sr_stat.deaths deathCount scoreboard objectives add gm4_sr_armor.tier dummy scoreboard objectives add gm4_sr_armor.reduction dummy scoreboard objectives add gm4_sr_armor.reduction_timer dummy +scoreboard objectives add gm4_sr_armor.hit_cooldown dummy scoreboard objectives add gm4_sr_arrow.fire_delay dummy scoreboard objectives add gm4_sr_arrow.fire_delay_left dummy @@ -43,9 +44,11 @@ scoreboard objectives add gm4_sr_shield.use_ticks dummy scoreboard objectives add gm4_sr_shield.timer dummy # configs -execute unless score $natural_regen gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $natural_regen gm4_sr_config 1 -execute unless score $combat_regen_timer gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $combat_regen_timer gm4_sr_config 1250 -execute unless score $armor_recharge_timer gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $armor_recharge_timer gm4_sr_config 625 +execute unless score $config_version gm4_sr_config matches 2.. run scoreboard players set $natural_regen gm4_sr_config 1 +execute unless score $config_version gm4_sr_config matches 2.. run scoreboard players set $combat_regen_timer gm4_sr_config 1250 +execute unless score $config_version gm4_sr_config matches 2.. run scoreboard players set $rapid_regen_timer gm4_sr_config 250 +execute unless score $config_version gm4_sr_config matches 2.. run scoreboard players set $armor_recharge_timer gm4_sr_config 500 +scoreboard players set $config_version gm4_sr_data 2 # swap natural regeneration to module's system execute unless score $natural_regen_disabled gm4_sr_data matches 1 run gamerule naturalRegeneration false @@ -56,22 +59,15 @@ execute if score $natural_regen gm4_sr_config matches 1 if score $naturalregener # constants scoreboard players set #-128 gm4_sr_data -128 -scoreboard players set #-50 gm4_sr_data -50 scoreboard players set #0 gm4_sr_data 0 scoreboard players set #1 gm4_sr_data 1 scoreboard players set #2 gm4_sr_data 2 -scoreboard players set #4 gm4_sr_data 4 scoreboard players set #5 gm4_sr_data 5 scoreboard players set #8 gm4_sr_data 8 scoreboard players set #10 gm4_sr_data 10 -scoreboard players set #20 gm4_sr_data 20 -scoreboard players set #25 gm4_sr_data 25 -scoreboard players set #50 gm4_sr_data 50 scoreboard players set #60 gm4_sr_data 60 scoreboard players set #80 gm4_sr_data 80 scoreboard players set #100 gm4_sr_data 100 -scoreboard players set #300 gm4_sr_data 300 -scoreboard players set #1000 gm4_sr_data 1000 scoreboard players set #1024 gm4_sr_data 1024 # start clocks diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/check_mob.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/check_mob.mcfunction index ad39c5fe32..9382570a71 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/check_mob.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/check_mob.mcfunction @@ -3,15 +3,15 @@ # at @s # run from main -# pre-mark mob as processed if it spawned in the air (from a spawner), these do not get modified +# pre-mark mob as processed if it spawned in the air (from a spawner), these do not get health changes or armor # mobs in the modify_in_air list are ignored here -execute if block ~ ~-0.01 ~ #gm4:no_collision run tag @s[type=!#gm4_survival_refightalized:modify_in_air] add gm4_sr_processed +execute if block ~ ~-0.01 ~ #gm4:no_collision run tag @s[type=!#gm4_survival_refightalized:modify_in_air] add gm4_sr_from_spawner # if the mob is riding another mob *do* modify them scoreboard players set $mounted gm4_sr_data 0 -execute if entity @s[tag=gm4_sr_processed] on vehicle run scoreboard players set $mounted gm4_sr_data 1 -execute if score $mounted gm4_sr_data matches 1 run tag @s remove gm4_sr_processed +execute if entity @s[tag=gm4_sr_from_spawner] on vehicle run scoreboard players set $mounted gm4_sr_data 1 +execute if score $mounted gm4_sr_data matches 1 run tag @s remove gm4_sr_from_spawner -# initiate unless mob is pre-marked -execute unless entity @s[tag=gm4_sr_processed] if dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld -execute unless entity @s[tag=gm4_sr_processed] unless dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_else +# initiate depending on dimension +execute if dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld +execute unless dimension minecraft:overworld run function gm4_survival_refightalized:mob/init/calc_difficulty_else diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type.mcfunction index 40483ada79..8a64f56269 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type.mcfunction @@ -19,5 +19,6 @@ execute if entity @s[type=enderman] run return run function gm4_survival_refight execute if entity @s[type=wither_skeleton] run return run function gm4_survival_refightalized:mob/init/mob_type/wither_skeleton execute if entity @s[type=phantom] run return run function gm4_survival_refightalized:mob/init/mob_type/phantom execute if entity @s[type=piglin] run return run function gm4_survival_refightalized:mob/init/mob_type/piglin +execute if entity @s[type=piglin_brute] run return run function gm4_survival_refightalized:mob/init/mob_type/piglin_brute execute if entity @s[type=zombified_piglin] run return run function gm4_survival_refightalized:mob/init/mob_type/zombified_piglin execute if entity @s[type=silverfish] run return run function gm4_survival_refightalized:mob/init/mob_type/silverfish diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/cave_spider.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/cave_spider.mcfunction index 423015ca4c..67ec73b15e 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/cave_spider.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/cave_spider.mcfunction @@ -4,16 +4,16 @@ # run from mob/init/mob_type ## Stat Block (normal/hard diff) -# health: 4 - 12 -# damage: 0.5 - 1.5 +# health: 4 - 16 +# damage: 1.5 - 3 # speed: 90 - 135% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -8 add_value -attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -1.5 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -8 add_value +attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -0.5 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.1 add_multiplied_base # max stat buffs -scoreboard players set $mob_health gm4_sr_data 8 -scoreboard players set $mob_damage gm4_sr_data 10 +scoreboard players set $mob_health gm4_sr_data 12 +scoreboard players set $mob_damage gm4_sr_data 15 scoreboard players set $mob_speed gm4_sr_data 45 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/creeper.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/creeper.mcfunction index 24b077b679..f73514a4b8 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/creeper.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/creeper.mcfunction @@ -4,15 +4,15 @@ # run from mob/init/mob_type ## Stat Block (normal/hard diff) -# health: 12 - 24 +# health: 12 - 28 # damage: explosion -# speed: 90 - 125% +# speed: 90 - 130% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -8 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -8 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.1 add_value # max stat buffs -scoreboard players set $mob_health gm4_sr_data 12 +scoreboard players set $mob_health gm4_sr_data 16 scoreboard players set $mob_damage gm4_sr_data 0 -scoreboard players set $mob_speed gm4_sr_data 35 +scoreboard players set $mob_speed gm4_sr_data 40 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/enderman.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/enderman.mcfunction index e06fc19bcb..42adea6943 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/enderman.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/enderman.mcfunction @@ -5,7 +5,7 @@ ## Stat Block (normal/hard diff) # health: 40 - 55 -# damage: 5 - 8 +# damage: 5 - 9 # speed: 90 - 125% # base stat nerf @@ -14,5 +14,5 @@ attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:st # max stat buffs scoreboard players set $mob_health gm4_sr_data 15 -scoreboard players set $mob_damage gm4_sr_data 30 +scoreboard players set $mob_damage gm4_sr_data 40 scoreboard players set $mob_speed gm4_sr_data 35 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/phantom.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/phantom.mcfunction index 79fc4db8e1..6bc85ae613 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/phantom.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/phantom.mcfunction @@ -9,7 +9,7 @@ # speed: 100% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -16 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -16 add_value attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -0.5 add_value # max stat buffs diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin.mcfunction index b035c91f07..efb32d777d 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin.mcfunction @@ -6,7 +6,7 @@ ## Stat Block (normal/hard diff) # health: 16 - 32 # damage: 5 - 7 (melee), 2 - 4 (unarmed) -# speed: 80 - 115% +# speed: 80 - 125% # base stat nerf attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -3 add_value @@ -15,12 +15,13 @@ attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:st # max stat buffs scoreboard players set $mob_health gm4_sr_data 16 scoreboard players set $mob_damage gm4_sr_data 20 -scoreboard players set $mob_speed gm4_sr_data 35 +scoreboard players set $mob_speed gm4_sr_data 45 # max damage mob is allowed to deal in one hit (to deal with weapons) -scoreboard players set @s gm4_sr_mob.damage_cap 70 +scoreboard players set @s gm4_sr_mob.damage_cap 80 tag @s add gm4_sr_check_damage_cap # set armor +execute if entity @s[tag=gm4_sr_from_spawner] run return 0 scoreboard players set $override_equipment gm4_sr_data 0 function #gm4_survival_refightalized:equip/piglin execute if score $override_equipment gm4_sr_data matches 1 run return 1 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin_brute.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin_brute.mcfunction new file mode 100644 index 0000000000..f131283d2f --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/piglin_brute.mcfunction @@ -0,0 +1,22 @@ +# calculate modifiers for newly spawned piglin brute +# @s = piglin brute +# at @s +# run from mob/init/mob_type + +## Stat Block (normal/hard diff) +# health: 30 - 50 +# damage: 6 - 8 (melee), 3 - 5 (unarmed) +# speed: 75 - 105% + +# base stat nerf +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -20 add_value +attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -4 add_value +attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.25 add_multiplied_base + +# max stat buffs +scoreboard players set $mob_health gm4_sr_data 20 +scoreboard players set $mob_damage gm4_sr_data 20 +scoreboard players set $mob_speed gm4_sr_data 30 +# max damage mob is allowed to deal in one hit (to deal with weapons) +scoreboard players set @s gm4_sr_mob.damage_cap 90 +tag @s add gm4_sr_check_damage_cap diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/silverfish.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/silverfish.mcfunction index dc806713b3..e5750c0d76 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/silverfish.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/silverfish.mcfunction @@ -9,7 +9,7 @@ # speed: 80 - 120% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -7 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -7 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.2 add_multiplied_total # max stat buffs @@ -17,7 +17,8 @@ scoreboard players set $mob_health gm4_sr_data 5 scoreboard players set $mob_damage gm4_sr_data 15 scoreboard players set $mob_speed gm4_sr_data 40 -# size changes +# size changes (not if from spawner) +execute if entity @s[tag=gm4_sr_from_spawner] run return 0 execute store result score $size_change gm4_sr_data run random value 1..100 # normal (+20% speed) execute if score $size_change gm4_sr_data matches ..50 run attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.random_scale 0.2 add_multiplied_total diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/skeleton.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/skeleton.mcfunction index 930979cd11..08ccb7a2ac 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/skeleton.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/skeleton.mcfunction @@ -9,7 +9,7 @@ # speed: 75 - 105% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -11 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -11 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.25 add_multiplied_base # max stat buffs @@ -22,9 +22,10 @@ tag @s add gm4_sr_check_damage_cap # arrow damage - only set if it was not preset at spawning execute unless score @s gm4_sr_arrow.damage_change matches -2147483648..2147483647 store result score @s gm4_sr_arrow.damage_change run random value -4..4 -execute unless score @s gm4_sr_arrow.fire_delay matches -2147483648..2147483647 store result score @s gm4_sr_arrow.damage_change run random value -4..4 +execute unless score @s gm4_sr_arrow.fire_delay matches -2147483648..2147483647 store result score @s gm4_sr_arrow.fire_delay run random value 2..4 # set weapon +execute if entity @s[tag=gm4_sr_from_spawner] run return 0 loot replace entity @s[tag=!gm4_sr_melee_skeleton] weapon.mainhand loot gm4_survival_refightalized:mob/skeleton/weapon # set armor diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/spider.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/spider.mcfunction index 0103a3270f..594f135223 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/spider.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/spider.mcfunction @@ -9,7 +9,7 @@ # speed: 95 - 145% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -4 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -4 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.05 add_multiplied_base # max stat buffs diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/wither_skeleton.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/wither_skeleton.mcfunction index b77366b6c4..858e989931 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/wither_skeleton.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/wither_skeleton.mcfunction @@ -5,35 +5,36 @@ ## Stat Block (normal/hard diff) # health: 22 - 36 -# damage: 6.5 - 8.5 (armed), 0.5 - 2.5 (unarmed) +# damage: 7.5 - 8.5 (armed), 1.5 - 2.5 (unarmed) # speed: 95 - 120% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_buff 2 add_value -attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -1.5 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_buff 2 add_value +attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -0.5 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.05 add_multiplied_base # max stat buffs scoreboard players set $mob_health gm4_sr_data 14 -scoreboard players set $mob_damage gm4_sr_data 20 +scoreboard players set $mob_damage gm4_sr_data 10 scoreboard players set $mob_speed gm4_sr_data 25 # max damage mob is allowed to deal in one hit (to deal with weapons) -scoreboard players set @s gm4_sr_mob.damage_cap 85 +scoreboard players set @s gm4_sr_mob.damage_cap 95 tag @s add gm4_sr_check_damage_cap # knockback resistance attribute @s minecraft:knockback_resistance modifier add gm4_survival_refightalized:stat_change.kb_resist 0.666 add_value +# shoot arrows slower and weaker +scoreboard players set @s gm4_sr_arrow.fire_delay 4 +execute store result score @s gm4_sr_arrow.damage_change run random value -6..0 + # set weapon +execute if entity @s[tag=gm4_sr_from_spawner] run return 0 loot replace entity @s weapon.mainhand loot gm4_survival_refightalized:mob/wither_skeleton/weapon # withering arrow if a bow is held execute if items entity @s weapon.mainhand bow run loot replace entity @s weapon.offhand loot gm4_survival_refightalized:mob/wither_skeleton/arrow -# shoot arrows slower and weaker -scoreboard players set @s gm4_sr_arrow.fire_delay 4 -execute store result score @s gm4_sr_arrow.damage_change run random value -6..0 - # set armor scoreboard players set $override_equipment gm4_sr_data 0 function #gm4_survival_refightalized:equip/wither_skeleton diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombie.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombie.mcfunction index 97dd926890..1d277a45e3 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombie.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombie.mcfunction @@ -5,23 +5,24 @@ ## Stat Block (normal/hard diff) # health: 18 - 36 -# damage: 3 - 6.5 (cap 8) -# speed: 80 - 120% +# damage: 3 - 6.5 (cap 8) | trident: 4.5 - 9.0 +# speed: 80 - 125% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -2 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -2 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.2 add_multiplied_base # max stat buffs scoreboard players set $mob_health gm4_sr_data 18 scoreboard players set $mob_damage gm4_sr_data 35 -scoreboard players set $mob_speed gm4_sr_data 40 +scoreboard players set $mob_speed gm4_sr_data 45 # max damage mob is allowed to deal in one hit (to deal with weapons) scoreboard players set @s gm4_sr_mob.damage_cap 80 tag @s add gm4_sr_check_damage_cap -# add fire delay to drowned for tridents -scoreboard players set @s[type=drowned] gm4_sr_arrow.fire_delay 10 +# add fire delay and damage variance to drowned for tridents +execute unless score @s[type=drowned] gm4_sr_arrow.damage_change matches -2147483648..2147483647 store result score @s gm4_sr_arrow.damage_change run random value -5..-2 +execute unless score @s[type=drowned] gm4_sr_arrow.fire_delay matches -2147483648..2147483647 store result score @s gm4_sr_arrow.fire_delay run random value 3..5 # remove leader bonus from zombies execute if data entity @s attributes[{id:"minecraft:max_health"}].modifiers[{id:"minecraft:leader_zombie_bonus"}] run attribute @s minecraft:max_health modifier remove minecraft:leader_zombie_bonus @@ -32,6 +33,7 @@ execute if predicate {condition:"all_of",terms:[{condition:"entity_properties",e execute if score $was_baby gm4_sr_data matches 1 run tag @s add gm4_sr_was_baby # set armor +execute if entity @s[tag=gm4_sr_from_spawner] run return 0 scoreboard players set $override_equipment gm4_sr_data 0 function #gm4_survival_refightalized:equip/zombie execute if score $override_equipment gm4_sr_data matches 1 run return 1 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombified_piglin.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombified_piglin.mcfunction index 194cd84070..fd433268a9 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombified_piglin.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/init/mob_type/zombified_piglin.mcfunction @@ -4,17 +4,17 @@ # run from mob/init/mob_type ## Stat Block (normal/hard diff) -# health: 14 - 20 -# damage: 3.5 - 5 (armed), 0.5 - 2 (unarmed) +# health: 14 - 24 +# damage: 5.5 - 7 (armed), 2.5 - 4 (unarmed) # speed: 90 - 140% # base stat nerf -attribute @s minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -6 add_value -attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -4.5 add_value +attribute @s[tag=!gm4_sr_from_spawner] minecraft:max_health modifier add gm4_survival_refightalized:stat_change.base_nerf -6 add_value +attribute @s minecraft:attack_damage modifier add gm4_survival_refightalized:stat_change.base_nerf -2.5 add_value attribute @s minecraft:movement_speed modifier add gm4_survival_refightalized:stat_change.base_nerf -0.1 add_multiplied_base # max stat buffs -scoreboard players set $mob_health gm4_sr_data 18 +scoreboard players set $mob_health gm4_sr_data 22 scoreboard players set $mob_damage gm4_sr_data 15 scoreboard players set $mob_speed gm4_sr_data 50 # max damage mob is allowed to deal in one hit (to deal with weapons) diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/process/arrow/run.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/process/arrow/run.mcfunction index a094874340..43a2f8572b 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/process/arrow/run.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/mob/process/arrow/run.mcfunction @@ -1,5 +1,5 @@ # modify shot arrows -# @s = arrow +# @s = arrow origin # at unspecified # run from check_arrow @@ -8,7 +8,8 @@ execute if entity @s[type=player] run return run function #gm4_survival_refighta # | Non-players: # add damage to arrow -scoreboard players operation $arrow_damage gm4_sr_data += @s gm4_sr_arrow.damage_change +scoreboard players operation $arrow_damage_change gm4_sr_data = @s gm4_sr_arrow.damage_change +scoreboard players operation $trident_damage_change gm4_sr_data = @s gm4_sr_arrow.damage_change # add fire delay # ( A modifier that removes all follow_range is added to stop the entity from firing more arrows) scoreboard players operation @s gm4_sr_arrow.fire_delay_left = @s gm4_sr_arrow.fire_delay diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/break.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/break.mcfunction index ba42956465..e986e4c444 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/break.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/break.mcfunction @@ -3,9 +3,21 @@ # at @s # run from player/damage/calculate_damage -playsound minecraft:entity.armor_stand.break player @a[distance=..8] ~ ~ ~ 0.66 0 0.5 +playsound minecraft:entity.armor_stand.break player @a[distance=..8] ~ ~ ~ 1 0 1 +playsound minecraft:entity.armor_stand.break player @s ~ ~ ~ 1 0.75 1 function gm4_survival_refightalized:player/resistance/remove function #gm4_survival_refightalized:armor_break # set damage taken to the amount of armor remaining so it gets removed -scoreboard players operation $damage_armor gm4_sr_data = $player_armor gm4_sr_data +scoreboard players operation $total_armor_damage gm4_sr_data = $player_armor gm4_sr_data +scoreboard players operation $damage_armor gm4_sr_data < $player_armor gm4_sr_data + +# reduce damage by players max armor +scoreboard players operation $armor_break_damage_reduction gm4_sr_data = @s gm4_sr_armor.reduction +scoreboard players operation $armor_break_damage_reduction gm4_sr_data += $player_armor gm4_sr_data +scoreboard players operation $damage_total gm4_sr_data -= $armor_break_damage_reduction gm4_sr_data +scoreboard players operation $damage_total gm4_sr_data > $player_armor gm4_sr_data +tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":"Armor Break: ","color":"gray"},{"text":"-","color":"white"},{"score":{"name":"$armor_break_damage_reduction","objective":"gm4_sr_data"},"color":"white"},{"text":" = ","color":"gray"},{"score":{"name":"$damage_total","objective":"gm4_sr_data"},"color":"white"}] + +# increase the armor recharge cooldown +scoreboard players operation $set gm4_sr_armor.reduction_timer += $armor_recharge_timer gm4_sr_config diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/recharge.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/recharge.mcfunction index aad3fca3b4..ac8592cd66 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/recharge.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/recharge.mcfunction @@ -3,10 +3,6 @@ # at unspecified # run from player/armor/timer -# only run if health is full -function gm4_survival_refightalized:player/health/calculate_hp -execute unless score @s gm4_sr_stat.health_percentage matches 100.. run return 0 - scoreboard players remove @s[scores={gm4_sr_armor.reduction=1..}] gm4_sr_armor.reduction 10 scoreboard players operation @s gm4_sr_armor.reduction > #0 gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/timer.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/timer.mcfunction index f87fa287ab..f6dad2c6d5 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/timer.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/armor/timer.mcfunction @@ -4,6 +4,9 @@ # run from player/player_submain # gm4_sr_stat.armor_recharge_change is normally 0, but can be changed by expansions +scoreboard players set @s gm4_sr_stat.armor_recharge_change 0 +function #gm4_survival_refightalized:armor_recharge_timer + scoreboard players set $armor_recharge gm4_sr_data 100 scoreboard players operation $armor_recharge gm4_sr_data += @s gm4_sr_stat.armor_recharge_change scoreboard players operation $armor_recharge gm4_sr_data > #0 gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_breach_enchantment.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_breach_enchantment.mcfunction new file mode 100644 index 0000000000..b861443ec6 --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_breach_enchantment.mcfunction @@ -0,0 +1,13 @@ +# calculate breach extra damage to armor +# @s = damaged player +# at @s +# run from player/damage/calculate_damage + +# get breach level x15 +execute on attacker store result score $breach_level gm4_sr_data run data get entity @s equipment.mainhand.components."minecraft:enchantments"."minecraft:breach" 15 + +# get extra damage (this is calculated from post-mitigation damage) +scoreboard players operation $extra_armor_damage gm4_sr_data = $damage_armor gm4_sr_data +scoreboard players operation $extra_armor_damage gm4_sr_data *= $breach_level gm4_sr_data +scoreboard players operation $extra_armor_damage gm4_sr_data /= #100 gm4_sr_data +scoreboard players operation $total_armor_damage gm4_sr_data += $extra_armor_damage gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_damage.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_damage.mcfunction index cd683a3e75..a1832b4fa9 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_damage.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_damage.mcfunction @@ -5,19 +5,23 @@ # make sure at least 1 damage is dealt scoreboard players operation $damage_total gm4_sr_data > #1 gm4_sr_data -tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":"Real Damage Taken (x10): ","color":"gray"},{"score":{"name":"$damage_total","objective":"gm4_sr_data"},"color":"white"}] # | Armor scoreboard players operation $damage_armor gm4_sr_data += $damage_total gm4_sr_data # if damage pierces armor no effect execute unless entity @s[advancements={gm4_survival_refightalized:damaged={armor_piercing=false,armor_piercing_mob=false}}] run scoreboard players set $damage_armor gm4_sr_data 0 +# breach adds 15% more damage per level +scoreboard players operation $total_armor_damage gm4_sr_data = $damage_armor gm4_sr_data +execute if entity @s[advancements={gm4_survival_refightalized:damaged={breaching=true}}] run function gm4_survival_refightalized:player/damage/calculate_breach_enchantment # if armor is reduced to below 1 play sound and remove resistance effect on player execute store result score $player_armor gm4_sr_data run attribute @s minecraft:armor get 10 scoreboard players operation $armor_check gm4_sr_data = $player_armor gm4_sr_data -scoreboard players operation $armor_check gm4_sr_data -= $damage_armor gm4_sr_data +scoreboard players operation $armor_check gm4_sr_data -= $total_armor_damage gm4_sr_data execute if score $armor_check gm4_sr_data matches ..9 run function gm4_survival_refightalized:player/armor/break -# calc the reduction in armor that should be applied -execute store result storage gm4_survival_refightalized:temp set.armor_reduction float 0.1 run scoreboard players operation @s gm4_sr_armor.reduction += $damage_armor gm4_sr_data +tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":"Real Damage Taken (x10): ","color":"gray"},{"score":{"name":"$damage_total","objective":"gm4_sr_data"},"color":"white"}] +# apply armor reduction to player armor +scoreboard players operation @s gm4_sr_armor.reduction += $total_armor_damage gm4_sr_data +execute store result storage gm4_survival_refightalized:temp set.armor_reduction float 0.1 run scoreboard players get @s gm4_sr_armor.reduction # any leftover damage is applied to the players absorption and health scoreboard players operation $damage_left gm4_sr_data = $damage_total gm4_sr_data scoreboard players operation $damage_left gm4_sr_data -= $damage_armor gm4_sr_data @@ -39,7 +43,8 @@ scoreboard players operation $damage_health gm4_sr_data += $damage_left gm4_sr_d # | Damage the player # armor -execute if score $damage_armor gm4_sr_data matches 1.. run tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":" > Armor: ","color":"gray"},{"score":{"name":"$damage_armor","objective":"gm4_sr_data"},"color":"white"}] +execute if score $damage_armor gm4_sr_data matches 1.. unless entity @s[advancements={gm4_survival_refightalized:damaged={breaching=true}}] run tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":" > Armor: ","color":"gray"},{"score":{"name":"$total_armor_damage","objective":"gm4_sr_data"},"color":"white"}] +execute if score $damage_armor gm4_sr_data matches 1.. if entity @s[advancements={gm4_survival_refightalized:damaged={breaching=true}}] run tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":" > Armor: ","color":"gray"},{"score":{"name":"$total_armor_damage","objective":"gm4_sr_data"},"color":"white"},{"text":" | Breach Enchantment: ","color":"gray"},{"text":"+","color":"white"},{"score":{"name":"$extra_armor_damage","objective":"gm4_sr_data"},"color":"white"},{"text":" (","color":"dark_gray"},{"score":{"name":"$breach_level","objective":"gm4_sr_data"},"color":"dark_gray"},{"text":"%)","color":"dark_gray"}] execute if score $damage_armor gm4_sr_data matches 1.. run function gm4_survival_refightalized:player/armor/eval_reduction with storage gm4_survival_refightalized:temp set # absorption hearts execute if score $damage_absorption gm4_sr_data matches 1.. run tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":" > Absorption: ","color":"gray"},{"score":{"name":"$damage_absorption","objective":"gm4_sr_data"},"color":"white"}] diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_reduction.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_reduction.mcfunction index ec3a022df7..414396ec65 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_reduction.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/calculate_reduction.mcfunction @@ -3,6 +3,10 @@ # at @s # run from player/damage/run +# add a 10 tick delay before damage can be calculated again +execute if score @s gm4_sr_armor.hit_cooldown matches 1.. run return run tellraw @s[tag=gm4_sr_dev.damage_log] {"text":"Recent damage invulnerability","color":"white"} +scoreboard players set @s gm4_sr_armor.hit_cooldown 10 + # grab active effects to check for resistance later - can be skipped if this was already done for cave spider / witch poison reduction execute unless data storage gm4_survival_refightalized:temp active_effects run data modify storage gm4_survival_refightalized:temp active_effects set from entity @s active_effects @@ -19,16 +23,18 @@ scoreboard players operation $damage_total gm4_sr_data = @s gm4_sr_stat.damage_r # first check the resistance level besides from this module # if this results in 100% damage reduction skip the rest of this function -execute store success score $resistance_damage_reduction gm4_sr_data if data storage gm4_survival_refightalized:temp active_effects[{id:"minecraft:resistance"}].hidden_effect.duration -execute if score $resistance_damage_reduction gm4_sr_data matches 1 store result score $resistance_damage_reduction gm4_sr_data run data get storage gm4_survival_refightalized:temp active_effects[{id:"minecraft:resistance"}].hidden_effect.amplifier 20 +scoreboard players set $resistance_damage_reduction gm4_sr_data 0 +execute if data storage gm4_survival_refightalized:temp active_effects[{id:"minecraft:resistance"}].hidden_effect.duration store result score $resistance_damage_reduction gm4_sr_data run data get storage gm4_survival_refightalized:temp active_effects[{id:"minecraft:resistance"}].hidden_effect.amplifier 20 execute if score $resistance_damage_reduction gm4_sr_data matches 1.. run scoreboard players add $resistance_damage_reduction gm4_sr_data 20 +execute if score $resistance_damage_reduction gm4_sr_data matches 100.. run tellraw @s[tag=gm4_sr_dev.damage_log] [{text:"Blocked by Resistance",color:"gray"}] +execute if score $resistance_damage_reduction gm4_sr_data matches 100.. run scoreboard players set $damage_total gm4_sr_data 0 execute unless score $resistance_damage_reduction gm4_sr_data matches 0..99 run return run data remove storage gm4_survival_refightalized:temp active_effects # | Reduce damage taken based on # /!\ order for these is important! # 1. armor toughness (only if player still has armor) execute store result score $armor_toughness gm4_sr_data run attribute @s minecraft:armor_toughness get -execute if score $armor_toughness gm4_sr_data matches 1.. if score @s gm4_sr_stat.armor matches 1.. run function gm4_survival_refightalized:player/damage/reduction/armor_toughness +execute if score $armor_toughness gm4_sr_data matches 1.. if score @s[advancements={gm4_survival_refightalized:damaged={armor_piercing=false,armor_piercing_mob=false}}] gm4_sr_stat.armor matches 1.. run function gm4_survival_refightalized:player/damage/reduction/armor_toughness # 2. enchantments execute if entity @s[advancements={gm4_survival_refightalized:damaged={bypasses_enchantments=false}}] run function gm4_survival_refightalized:player/damage/reduction/enchantments/run diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/armor_toughness.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/armor_toughness.mcfunction index 603ec06417..7178534af0 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/armor_toughness.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/armor_toughness.mcfunction @@ -4,21 +4,28 @@ # run from player/damage/calculate_reduction # Formula: -# Damage reduction percentage = (damage * armor_toughness * 50) / ( damage * armor_toughness + 3500 ) +# Damage reduction percentage = (6 * armor_toughness + 2 * armor_toughness * damage) / (damage + 5 * armor_toughness) -# dividend = damage * armor_toughness * 50 -scoreboard players operation $armor_toughness.dividend gm4_sr_data = $damage_total gm4_sr_data +scoreboard players operation $armor_toughness.times_5 gm4_sr_data = $armor_toughness gm4_sr_data +scoreboard players operation $armor_toughness.times_5 gm4_sr_data *= #5 gm4_sr_data + +# dividend = 6 * armor_toughness + 2 * armor_toughness * damage +scoreboard players operation $armor_toughness.dividend gm4_sr_data += $armor_toughness.times_5 gm4_sr_data scoreboard players operation $armor_toughness.dividend gm4_sr_data *= $armor_toughness gm4_sr_data -scoreboard players operation $armor_toughness.dividend gm4_sr_data *= #50 gm4_sr_data +scoreboard players operation $armor_toughness.dividend2 gm4_sr_data = $damage_total gm4_sr_data +scoreboard players operation $armor_toughness.dividend2 gm4_sr_data *= $armor_toughness gm4_sr_data +scoreboard players operation $armor_toughness.dividend2 gm4_sr_data *= #2 gm4_sr_data +scoreboard players operation $armor_toughness.dividend gm4_sr_data += $armor_toughness.dividend2 gm4_sr_data -# divisor = damage * armor_toughness + 3500 +# divisor = damage + 5 * armor_toughness scoreboard players operation $armor_toughness.divisor gm4_sr_data = $damage_total gm4_sr_data -scoreboard players operation $armor_toughness.divisor gm4_sr_data *= $armor_toughness gm4_sr_data -scoreboard players add $armor_toughness.divisor gm4_sr_data 3500 +scoreboard players operation $armor_toughness.divisor gm4_sr_data += $armor_toughness.times_5 gm4_sr_data -# dividend / divisor (this rounds down!), can max reduce damage by 25% +# dividend / divisor (this rounds down!), can max reduce damage by 2x armor_toughness scoreboard players operation $armor_toughness.dividend gm4_sr_data /= $armor_toughness.divisor gm4_sr_data -scoreboard players operation $armor_toughness.dividend gm4_sr_data < #25 gm4_sr_data +scoreboard players operation $armor_toughness.max_reduction gm4_sr_data = $armor_toughness gm4_sr_data +scoreboard players operation $armor_toughness.max_reduction gm4_sr_data *= #2 gm4_sr_data +scoreboard players operation $armor_toughness.dividend gm4_sr_data < $armor_toughness.max_reduction gm4_sr_data # get damage reduction scoreboard players operation $armor_toughness_effect gm4_sr_data = $damage_total gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/enchantments/run.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/enchantments/run.mcfunction index 0842fe2c27..e7117f4006 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/enchantments/run.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/reduction/enchantments/run.mcfunction @@ -18,12 +18,12 @@ data remove block 29999998 1 7134 Items scoreboard players set $enchant.damage_reduction gm4_sr_data 0 # generic protection enchantment -execute store result score $enchant.protection gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:0b}].components."minecraft:enchantments"."minecraft:protection" 1 -execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:1b}].components."minecraft:enchantments"."minecraft:protection" 1 +execute store result score $enchant.protection gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:0b}].components."minecraft:enchantments"."minecraft:protection" 2 +execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:1b}].components."minecraft:enchantments"."minecraft:protection" 2 scoreboard players operation $enchant.protection gm4_sr_data += $enchant.protection.add gm4_sr_data -execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:2b}].components."minecraft:enchantments"."minecraft:protection" 1 +execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:2b}].components."minecraft:enchantments"."minecraft:protection" 2 scoreboard players operation $enchant.protection gm4_sr_data += $enchant.protection.add gm4_sr_data -execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:3b}].components."minecraft:enchantments"."minecraft:protection" 1 +execute store result score $enchant.protection.add gm4_sr_data run data get storage gm4_survival_refightalized:temp Items[{Slot:3b}].components."minecraft:enchantments"."minecraft:protection" 2 scoreboard players operation $enchant.protection gm4_sr_data += $enchant.protection.add gm4_sr_data execute if score $enchant.damage_reduction gm4_sr_data matches 0 if score $enchant.protection gm4_sr_data matches 1.. run tellraw @s[tag=gm4_sr_dev.damage_log] {"text":"Enchantments:","color":"gray"} diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/run.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/run.mcfunction index 757f5c3213..254c5e1c01 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/run.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/run.mcfunction @@ -21,7 +21,7 @@ execute if score $on_paper gm4_sr_data matches 1 run scoreboard players operatio execute if score $on_paper gm4_sr_data matches 1 run scoreboard players operation @s gm4_sr_stat.damage_resisted /= #512 gm4_sr_data # disable shield if damage was blocked, don't run the rest of this function -execute unless score @s[scores={gm4_sr_shield.timer=1..2,gm4_sr_shield.use_ticks=1..}] gm4_sr_stat.damage_taken matches 1.. unless score @s gm4_sr_stat.damage_absorbed matches 1.. run return run function gm4_survival_refightalized:player/damage/shield/blocked_damage +execute unless score @s[scores={gm4_sr_shield.timer=1..2,gm4_sr_shield.use_ticks=1..},advancements={gm4_survival_refightalized:damaged={bypasses_shield=false}}] gm4_sr_stat.damage_taken matches 1.. unless score @s gm4_sr_stat.damage_absorbed matches 1.. run return run function gm4_survival_refightalized:player/damage/shield/blocked_damage # cave spider / witch poison reduction execute if entity @s[advancements={gm4_survival_refightalized:damaged={cave_spider=true}}] run function gm4_survival_refightalized:player/damage/cave_spider_poison_reduction @@ -34,9 +34,10 @@ tellraw @s[tag=gm4_sr_dev.damage_log,advancements={gm4_survival_refightalized:da execute if score @s gm4_sr_stat.armor matches 1.. run function gm4_survival_refightalized:player/damage/calculate_reduction execute unless score @s gm4_sr_stat.armor matches 1.. run tellraw @s[tag=gm4_sr_dev.damage_log] [{"text":"No Armor - Damage (x10): ","color":"gray"},{"score":{"name":"@s","objective":"gm4_sr_stat.damage_taken"},"color":"white"}] -# set combat regeneration timers, allow to be altered by function call +# set combat regeneration timers, allow to be altered by function call, use rapid_regen if damage was non-combat scoreboard players operation $set gm4_sr_armor.reduction_timer = $armor_recharge_timer gm4_sr_config scoreboard players operation $set gm4_sr_health.regeneration_timer = $combat_regen_timer gm4_sr_config +execute if entity @s[advancements={gm4_survival_refightalized:damaged={combat_damage=false}}] run scoreboard players operation $set gm4_sr_health.regeneration_timer = $rapid_regen_timer gm4_sr_config # function call # called after damage is calculated but before it is applied (unless there was no armor, then it is applied by the game) @@ -51,8 +52,7 @@ execute if score $damage_armor gm4_sr_data matches 1.. run scoreboard players op # apply durability damage to armor unless it was armor piercing damage execute if entity @s[advancements={gm4_survival_refightalized:damaged={armor_piercing=false,armor_piercing_mob=false}}] run function gm4_survival_refightalized:player/armor/durability/check -# apply health regeneration timer, /5 if damage was non-combat, 0 if damage did not apply to health -execute if entity @s[advancements={gm4_survival_refightalized:damaged={combat_damage=false}}] run scoreboard players operation $set gm4_sr_health.regeneration_timer /= #5 gm4_sr_data +# apply health regeneration timer, 0 if damage did not apply to health execute if score $damage_health gm4_sr_data matches 1.. run scoreboard players operation @s gm4_sr_health.regeneration_timer > $set gm4_sr_health.regeneration_timer scoreboard players operation @s[scores={gm4_sr_stat.damage_taken=1..}] gm4_sr_health.regeneration_timer > $set gm4_sr_health.regeneration_timer diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/blocked_damage.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/blocked_damage.mcfunction index 0d01f214fa..815fc376a1 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/blocked_damage.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/blocked_damage.mcfunction @@ -22,7 +22,7 @@ execute if score @s gm4_sr_shield.use_ticks <= $parry_ticks gm4_sr_data unless s # disable shield tag @s add gm4_sr_target -execute at @s anchored eyes positioned ^ ^ ^1 summon armor_stand run return run function gm4_survival_refightalized:player/damage/shield/disable +execute at @s anchored eyes positioned ^ ^ ^1 summon armor_stand run function gm4_survival_refightalized:player/damage/shield/disable tag @s remove gm4_sr_target # dev damage log diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry.mcfunction index 182dfdebf7..4437ce04e2 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry.mcfunction @@ -21,7 +21,9 @@ scoreboard players set @s gm4_sr_shield.spam_detection 0 # stop attacker for a bit tag @s add gm4_sr_parrier -execute on attacker run function gm4_survival_refightalized:player/damage/shield/parry_effect +execute store result storage gm4_survival_refightalized:temp parry.damage float 1 run attribute @s attack_damage get 1 +execute on attacker run function gm4_survival_refightalized:player/damage/shield/parry_effect with storage gm4_survival_refightalized:temp parry +data remove storage gm4_survival_refightalized:temp parry tag @s remove gm4_sr_parrier # dev damage log diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry_effect.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry_effect.mcfunction index 3a2dd185ce..403a7dace8 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry_effect.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/damage/shield/parry_effect.mcfunction @@ -9,4 +9,5 @@ stopsound @s player minecraft:entity.player.hurt effect give @s[distance=..3] nausea 2 0 effect give @s[distance=..3,type=!player] slowness 1 9 true effect give @s[distance=..3] slowness 2 0 true -damage @s[distance=..3] 0.01 player_attack by @p[tag=gm4_sr_parrier] +$damage @s[distance=..3] $(damage) player_attack by @p[tag=gm4_sr_parrier] +particle minecraft:sweep_attack ~ ~1 ~ 0 0 0 0 1 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/combat_health.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/combat_health.mcfunction index 9985721553..ab1138b632 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/combat_health.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/combat_health.mcfunction @@ -8,4 +8,5 @@ execute unless score @s gm4_sr_stat.current_health < @s gm4_sr_stat.max_health r # base restore 10 (half a heart), call function tag for expansions scoreboard players add @s gm4_sr_health.restoration 10 +scoreboard players operation @s gm4_sr_health.regeneration_timer = $rapid_regen_timer gm4_sr_config function #gm4_survival_refightalized:health_regeneration diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/timer.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/timer.mcfunction index e251af26ca..6db04ac8bc 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/timer.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/health/regeneration/timer.mcfunction @@ -4,6 +4,9 @@ # run from player_submain # gm4_sr_stat.regeneration_rate_change is normally 0, but can be changed by expansions +scoreboard players set @s gm4_sr_stat.regeneration_rate_change 0 +function #gm4_survival_refightalized:health_regeneration_timer + scoreboard players set $regeneration_timer gm4_sr_data 100 scoreboard players operation $regeneration_timer gm4_sr_data += @s gm4_sr_stat.regeneration_rate_change scoreboard players operation $regeneration_timer gm4_sr_data > #0 gm4_sr_data diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/killed_mob.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/killed_mob.mcfunction new file mode 100644 index 0000000000..09d12136ce --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player/killed_mob.mcfunction @@ -0,0 +1,4 @@ +advancement revoke @s only gm4_survival_refightalized:kill_mob + +# lower regen timer +scoreboard players operation @s gm4_sr_health.regeneration_timer < $rapid_regen_timer gm4_sr_config diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player_submain.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player_submain.mcfunction index b10d49ab1c..38e7a854fb 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player_submain.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/player_submain.mcfunction @@ -12,10 +12,6 @@ execute as @a[tag=gm4_sr_dev.mob_stats] at @s as @n[type=#gm4_survival_refightal # process players that died execute as @a[scores={gm4_sr_stat.deaths=1..}] run function gm4_survival_refightalized:player/death -# reset regeneration and armor recharge changes, can be set from function tag -scoreboard players set @a gm4_sr_stat.armor_recharge_change 0 -scoreboard players set @a gm4_sr_stat.regeneration_rate_change 0 - # armor recharge timer execute as @a[gamemode=!spectator,tag=gm4_sr_armor.reduction] run function gm4_survival_refightalized:player/armor/timer # health regen timer diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/tick.mcfunction b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/tick.mcfunction index 9bcccebf13..cba43dab73 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/function/tick.mcfunction +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/function/tick.mcfunction @@ -10,3 +10,5 @@ execute as @e[type=#gm4_survival_refightalized:arrow,tag=!gm4_sr_arrow_checked,t execute as @a[scores={gm4_sr_shield.timer=1}] run function gm4_survival_refightalized:player/damage/shield/remove_using scoreboard players remove @a[scores={gm4_sr_shield.timer=1..}] gm4_sr_shield.timer 1 scoreboard players remove @a[scores={gm4_sr_shield.spam_detection=1..}] gm4_sr_shield.spam_detection 1 + +scoreboard players remove @a[scores={gm4_sr_armor.hit_cooldown=1..}] gm4_sr_armor.hit_cooldown 1 diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/arrow.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/arrow.json index 2992991bd0..c7390576e2 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/arrow.json +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/arrow.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:arrow", - "minecraft:spectral_arrow" + "minecraft:spectral_arrow", + "minecraft:trident" ] } diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/modify.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/modify.json index 9ec8e2d3ca..81b52dd0d7 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/modify.json +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/entity_type/modify.json @@ -8,6 +8,7 @@ "minecraft:husk", "minecraft:phantom", "minecraft:piglin", + "minecraft:piglin_brute", "minecraft:silverfish", "minecraft:skeleton", "minecraft:spider", diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/armor_recharge_timer.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/armor_recharge_timer.json new file mode 100644 index 0000000000..82523888aa --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/armor_recharge_timer.json @@ -0,0 +1,3 @@ +{ + "values": [] +} diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/health_regeneration_timer.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/health_regeneration_timer.json new file mode 100644 index 0000000000..82523888aa --- /dev/null +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/function/health_regeneration_timer.json @@ -0,0 +1,3 @@ +{ + "values": [] +} diff --git a/gm4_survival_refightalized/data/minecraft/enchantment/protection.json b/gm4_survival_refightalized/data/minecraft/enchantment/protection.json index 57caa44613..600da5f197 100644 --- a/gm4_survival_refightalized/data/minecraft/enchantment/protection.json +++ b/gm4_survival_refightalized/data/minecraft/enchantment/protection.json @@ -25,8 +25,8 @@ "type": "minecraft:add", "value": { "type": "minecraft:linear", - "base": 0.25, - "per_level_above_first": 0.25 + "base": 0.5, + "per_level_above_first": 0.5 } }, "requirements": {