Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balance Combat Expanded #914

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# run from armor/modifier/check_modifier

execute if score $modifier gm4_ce_data matches 31 if score @s gm4_ce_kill matches 1.. run function gm4_combat_expanded:armor/modifier/type/consume/grow
execute if score $modifier gm4_ce_data matches 32 if score @s gm4_ce_kill matches 1.. run function gm4_combat_expanded:armor/modifier/type/vamp/vamp
execute if score $modifier gm4_ce_data matches 32 if score @s gm4_ce_kill_player matches 1.. run function gm4_combat_expanded:armor/modifier/type/vamp/vamp
execute if score $modifier gm4_ce_data matches 33 if score @s gm4_ce_kill matches 1.. at @s as @e[type=!player,type=!#gm4_combat_expanded:effect_immune,team=!gm4_ce_team_check,distance=..12,tag=!smithed.strict] at @s run function gm4_combat_expanded:armor/modifier/type/fear/fear
execute if score $modifier gm4_ce_data matches 34 if score @s gm4_ce_kill matches 1.. at @s run function gm4_combat_expanded:armor/modifier/type/totem/activate
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# run from armor/check_modifier/killing

# store healing
scoreboard players add @s gm4_ce_healstore 1
scoreboard players add @s gm4_ce_healstore 4
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ scoreboard objectives add gm4_ce_hurt minecraft.custom:minecraft.damage_taken
scoreboard objectives add gm4_ce_hurt2 minecraft.custom:minecraft.damage_absorbed
scoreboard objectives add gm4_ce_t_hurt dummy
scoreboard objectives add gm4_ce_kill minecraft.custom:minecraft.mob_kills
scoreboard objectives add gm4_ce_kill_player minecraft.custom:minecraft.player_kills
scoreboard objectives add gm4_ce_t_shield dummy
scoreboard objectives add gm4_ce_t_delay dummy
scoreboard objectives add gm4_ce_t_guard dummy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
# run from mob/mob_type/zombie

tag @s add gm4_ce_zombie_reinforcement
# have 1/4th droprate
data merge entity @s {ArmorDropChances:[0.0226F,0.0226F,0.0226F,0.0226F],HandDropChances:[0.0226F,0.0226F]}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# at @s
# run from mob/check_mob

# get difficulty score from the nearest player
scoreboard players operation $difficulty gm4_ce_data = @p[gamemode=!spectator] gm4_ce_difficult
# get difficulty score from global difficulty
scoreboard players operation $difficulty gm4_ce_data = $global_difficulty gm4_ce_data

# reset scoreboards
scoreboard players reset $mob_extras gm4_ce_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_damage gm4_ce_data 2
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_toughness gm4_ce_data 2

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# biome specific modifiers for this mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_toughness gm4_ce_data 4
attribute @s[predicate=gm4_combat_expanded:mob/modifier/dark] zombie.spawn_reinforcements modifier add 88708a3a-b8f0-46f8-8dd9-1f8fb0f315d6 "gm4_ce_modifier_dark" 0.25 multiply_base
Expand All @@ -37,9 +34,6 @@ execute if entity @s[tag=gm4_ce_spore_zombie] run function gm4_combat_expanded:m
# set weapon
loot replace entity @s[predicate=!gm4_combat_expanded:mob/modifier/reef] weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon/generic

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# remove bonus damage if weapon is held, then set droprate to 20% (unless in "Dark" or wielding trident)
execute if data entity @s HandItems[{Count:1b}] run scoreboard players set $mob_damage gm4_ce_data 0
execute if score $mob_damage gm4_ce_data matches 0 unless data entity @s HandItems[{id:"minecraft:trident"}] run data modify entity @s[predicate=!gm4_combat_expanded:mob/modifier/dark] HandDropChances set value [0.20F,0.20F]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_damage gm4_ce_data 2
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_toughness gm4_ce_data 2

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# biome specific modifiers for this mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_toughness gm4_ce_data 4
attribute @s[predicate=gm4_combat_expanded:mob/modifier/dark] zombie.spawn_reinforcements modifier add 88708a3a-b8f0-46f8-8dd9-1f8fb0f315d6 "gm4_ce_modifier_dark" 0.25 multiply_base
Expand All @@ -35,9 +32,6 @@ execute if entity @s[tag=gm4_ce_spore_zombie] run function gm4_combat_expanded:m
# set weapon
loot replace entity @s weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon/generic

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# remove bonus damage if weapon is held, then set droprate to 20% (unless in "Dark")
execute if data entity @s HandItems[{Count:1b}] run scoreboard players set $mob_damage gm4_ce_data 0
execute if score $mob_damage gm4_ce_data matches 0 run data modify entity @s[predicate=!gm4_combat_expanded:mob/modifier/dark] HandDropChances set value [0.20F,0.20F]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@ execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add
execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add $mob_armor gm4_ce_data 1
execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add $mob_toughness gm4_ce_data 5

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# set armor
loot replace entity @s armor.feet loot gm4_combat_expanded:mob/equip_armor/piglin

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# remove bonus damage if weapon is held, then set droprate to 20% (unless in "Dark")
execute if data entity @s HandItems[{Count:1b}] run scoreboard players set $mob_damage gm4_ce_data 0
execute if score $mob_damage gm4_ce_data matches 0 run data modify entity @s[predicate=!gm4_combat_expanded:mob/modifier/dark] HandDropChances set value [0.20F,0.20F]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ scoreboard players operation $mob_health gm4_ce_data += $difficulty gm4_ce_data
execute if score $difficulty gm4_ce_data matches 4.. run scoreboard players add $mob_toughness gm4_ce_data 1
execute if score $difficulty gm4_ce_data matches 8.. store success score $arrow gm4_ce_data run loot replace entity @s[predicate=gm4_combat_expanded:technical/chance/skeleton_harming_arrow,predicate=!gm4_combat_expanded:mob/modifier/growth] weapon.offhand loot gm4_combat_expanded:mob/equip_arrow/skeleton_harming

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# biome specific modifiers for this mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_speed gm4_ce_data 2
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_toughness gm4_ce_data 2
Expand All @@ -31,8 +28,5 @@ loot replace entity @s weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon
# drop rate for custom arrows
execute if score $arrow gm4_ce_data matches 1 run data modify entity @s HandDropChances[1] set value 0.25F

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# set modifiers
function gm4_combat_expanded:mob/modifier/prep
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ scoreboard players operation $mob_health gm4_ce_data += $difficulty gm4_ce_data
execute if score $difficulty gm4_ce_data matches 4.. run scoreboard players add $mob_toughness gm4_ce_data 1
execute if score $difficulty gm4_ce_data matches 8.. store success score $arrow gm4_ce_data run loot replace entity @s[predicate=gm4_combat_expanded:technical/chance/skeleton_harming_arrow,predicate=!gm4_combat_expanded:mob/modifier/growth] weapon.offhand loot gm4_combat_expanded:mob/equip_arrow/stray_harming

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# biome specific modifiers for this mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_speed gm4_ce_data 2
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_toughness gm4_ce_data 2
Expand All @@ -32,8 +29,5 @@ loot replace entity @s weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon
# arrow drop rate
execute if score $arrow gm4_ce_data matches 1 run data modify entity @s HandDropChances[1] set value 0.25F

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# set modifiers
function gm4_combat_expanded:mob/modifier/prep
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add
execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add $mob_damage gm4_ce_data 3
execute if score $difficulty gm4_ce_data matches 11.. run scoreboard players add $mob_speed gm4_ce_data 2

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# set armor
loot replace entity @s armor.feet loot gm4_combat_expanded:mob/equip_armor/wither_skeleton
# set weapon
Expand All @@ -22,9 +19,6 @@ loot replace entity @s weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon
execute if data entity @s HandItems[{id:"minecraft:bow"}] store success score $arrow gm4_ce_data run loot replace entity @s weapon.offhand loot gm4_combat_expanded:mob/equip_arrow/withering
execute if score $arrow gm4_ce_data matches 1 run data modify entity @s HandDropChances[1] set value 0.25F

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# remove bonus damage if weapon is held, then set droprate to 20% (unless in "Dark")
execute if data entity @s HandItems[{Count:1b}] run scoreboard players set $mob_damage gm4_ce_data 0
execute if score $mob_damage gm4_ce_data matches 0 run data modify entity @s[predicate=!gm4_combat_expanded:mob/modifier/dark] HandDropChances set value [0.20F,0.20F]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_damage gm4_ce_data 2
execute if score $difficulty gm4_ce_data matches 8.. run scoreboard players add $mob_toughness gm4_ce_data 2

# quadruple armor drop rate at diff 11 or above
execute if score $difficulty gm4_ce_data matches 11.. run data modify entity @s ArmorDropChances set value [0.34F,0.34F,0.34F,0.34F]

# biome specific modifiers for this mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_toughness gm4_ce_data 4
attribute @s[predicate=gm4_combat_expanded:mob/modifier/dark] zombie.spawn_reinforcements modifier add 88708a3a-b8f0-46f8-8dd9-1f8fb0f315d6 "gm4_ce_modifier_dark" 0.25 multiply_base
Expand All @@ -34,9 +31,6 @@ execute if entity @s[tag=gm4_ce_spore_zombie] run function gm4_combat_expanded:m
# set weapon
loot replace entity @s weapon.mainhand loot gm4_combat_expanded:mob/equip_weapon/generic

# half droprate of armor in "Dark"
data modify entity @s[predicate=gm4_combat_expanded:mob/modifier/dark] ArmorDropChances set value [0.0452F,0.0452F,0.0452F,0.0452F]

# remove bonus damage if weapon is held, then set droprate to 20% (unless in "Dark")
execute if data entity @s HandItems[{Count:1b}] run scoreboard players set $mob_damage gm4_ce_data 0
execute if score $mob_damage gm4_ce_data matches 0 run data modify entity @s[predicate=!gm4_combat_expanded:mob/modifier/dark] HandDropChances set value [0.20F,0.20F]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# at @s
# run from functions in mob/mob_types/

# increased droprate armor
data modify entity @s[tag=!gm4_ce_miniboss,tag=!gm4_ce_spore_zombie] ArmorDropChances set value [0.15F,0.15F,0.15F,0.15F]

# biome specific modifiers for any mob
execute if predicate gm4_combat_expanded:mob/modifier/dark run scoreboard players add $mob_stats gm4_ce_data 3
execute if predicate gm4_combat_expanded:mob/modifier/snowy run scoreboard players add $mob_health gm4_ce_data 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ scoreboard players remove @a[scores={gm4_ce_t_reactive=1..}] gm4_ce_t_reactive 1
scoreboard players reset @a gm4_ce_hurt
scoreboard players reset @a gm4_ce_hurt2
scoreboard players reset @a gm4_ce_kill
scoreboard players reset @a gm4_ce_kill_player
scoreboard players reset @a gm4_ce_sprinting
scoreboard players reset @a gm4_ce_swimming
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
schedule function gm4_combat_expanded:slow_clock 30s

# calculate player difficulty score
execute as @a[gamemode=!spectator] run function gm4_combat_expanded:player/calculate_difficulty
# calculate global difficulty score (go to 10 over 2 hours)
scoreboard players add $diff_clock gm4_ce_data 1
execute if score $diff_clock gm4_ce_data matches 24.. unless score $global_difficulty gm4_ce_data matches 10.. run scoreboard players add $global_difficulty gm4_ce_data 1
execute if score $diff_clock gm4_ce_data matches 24.. run scoreboard players reset $diff_clock gm4_ce_data

# toxic creepers
execute as @e[type=creeper,tag=gm4_ce_toxic_creeper] run function gm4_combat_expanded:mob/effect/toxic_creeper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/gloom"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/half"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/horse"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/husk"
Expand All @@ -35,10 +27,6 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/link"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/lunar"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/nocturnal"
Expand All @@ -55,10 +43,6 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/scout"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/second_wind"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/shielded"
Expand All @@ -71,18 +55,6 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/stall"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/thorns"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/totem"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/toxic"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/common/vamp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
},
{
"type": "minecraft:loot_table",
"weight": 7,
"weight": 9,
"name": "gm4_combat_expanded:armor/identification/rare"
},
{
"type": "minecraft:loot_table",
"weight": 2,
"name": "gm4_combat_expanded:armor/identification/epic"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/rare/reactive"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/rare/shadow"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/rare/sneak"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:armor/identification/rare/soothe"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
},
{
"type": "minecraft:loot_table",
"weight": 8,
"weight": 10,
"name": "gm4_combat_expanded:weapon/identification/rare"
},
{
"type": "minecraft:loot_table",
"weight": 2,
"name": "gm4_combat_expanded:weapon/identification/epic"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:weapon/identification/rare/chaos"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:weapon/identification/rare/chime"
},
{
"type": "minecraft:loot_table",
"name": "gm4_combat_expanded:weapon/identification/rare/delay"
Expand Down
Loading