-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
598b3fc
commit 17dc973
Showing
52 changed files
with
1,227 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
gm4_augmented_armor/data/gm4/advancement/augmented_armor_identify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...mented_armor/data/gm4_augmented_armor/function/armor/augment/type/raging/check.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# check if armor should activate | ||
# @s = player being checked | ||
# at unspecified | ||
# run from armor/augment/clocked | ||
|
||
function gm4_survival_refightalized:player/health/calculate_hp | ||
|
||
execute store result score $stored_bonus gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.augment.stored_bonus | ||
|
||
scoreboard players set $bonus gm4_aa_data 99 | ||
scoreboard players operation $bonus gm4_aa_data -= @s gm4_sr_health.percentage | ||
scoreboard players operation $bonus gm4_aa_data /= #25 gm4_sr_data | ||
|
||
execute unless score $bonus gm4_aa_data = $stored_bonus gm4_aa_data run function gm4_augmented_armor:armor/augment/type/raging/update |
28 changes: 28 additions & 0 deletions
28
...ented_armor/data/gm4_augmented_armor/function/armor/augment/type/raging/update.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# activate the augments on the armor piece | ||
# @s = player wearing the armor | ||
# at unspecified | ||
# run from functions in armor/augment/type/acrobatic/check | ||
|
||
scoreboard players set $change gm4_aa_data 1 | ||
|
||
execute store result storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.augment.stored_bonus int 1 run scoreboard players get $bonus gm4_aa_data | ||
|
||
scoreboard players set $damage_bonus gm4_aa_data 0 | ||
|
||
scoreboard players set $damage_bonus_add gm4_aa_data 0 | ||
execute if score $bonus gm4_aa_data matches 1.. store result score $damage_bonus_add gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.levels[0] | ||
scoreboard players operation $damage_bonus gm4_aa_data += $damage_bonus_add gm4_aa_data | ||
|
||
scoreboard players set $damage_bonus_add gm4_aa_data 0 | ||
execute if score $bonus gm4_aa_data matches 2.. store result score $damage_bonus_add gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.levels[1] | ||
scoreboard players operation $damage_bonus gm4_aa_data += $damage_bonus_add gm4_aa_data | ||
|
||
scoreboard players set $damage_bonus_add gm4_aa_data 0 | ||
execute if score $bonus gm4_aa_data matches 3.. store result score $damage_bonus_add gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.levels[2] | ||
scoreboard players operation $damage_bonus gm4_aa_data += $damage_bonus_add gm4_aa_data | ||
|
||
# modify attribute | ||
execute if score $slot gm4_aa_data matches 0 store result storage gm4_augmented_armor:temp components."minecraft:attribute_modifiers".modifiers[{id:"gm4_augmented_armor:head.dynamic"}].amount float 0.1 run scoreboard players get $damage_bonus gm4_aa_data | ||
execute if score $slot gm4_aa_data matches 1 store result storage gm4_augmented_armor:temp components."minecraft:attribute_modifiers".modifiers[{id:"gm4_augmented_armor:chest.dynamic"}].amount float 0.1 run scoreboard players get $damage_bonus gm4_aa_data | ||
execute if score $slot gm4_aa_data matches 2 store result storage gm4_augmented_armor:temp components."minecraft:attribute_modifiers".modifiers[{id:"gm4_augmented_armor:legs.dynamic"}].amount float 0.1 run scoreboard players get $damage_bonus gm4_aa_data | ||
execute if score $slot gm4_aa_data matches 3 store result storage gm4_augmented_armor:temp components."minecraft:attribute_modifiers".modifiers[{id:"gm4_augmented_armor:feet.dynamic"}].amount float 0.1 run scoreboard players get $damage_bonus gm4_aa_data |
13 changes: 13 additions & 0 deletions
13
...ed_armor/data/gm4_augmented_armor/function/armor/augment/type/sustaining/check.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# check if armor should activate | ||
# @s = player being checked | ||
# at unspecified | ||
# run from armor/augment/clocked | ||
|
||
function gm4_survival_refightalized:player/health/calculate_hp | ||
|
||
execute store result score $stored_missing_hp gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.augment.stored_missing_hp | ||
|
||
scoreboard players operation $missing_health gm4_aa_data = @s gm4_sr_health.max | ||
scoreboard players operation $missing_health gm4_aa_data -= @s gm4_sr_health.current | ||
|
||
execute unless score $missing_health gm4_aa_data = $stored_missing_hp gm4_aa_data run function gm4_augmented_armor:armor/augment/type/sustaining/update |
2 changes: 2 additions & 0 deletions
2
...rmor/data/gm4_augmented_armor/function/armor/augment/type/sustaining/eval_lore.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
$data modify storage gm4_lore:temp Input set value ['{"color":"dark_gray","fallback":"Currently %s","italic":false,"translate":"item.gm4.augmented_armor.lore.sustaining_2","with":[{"color":"blue","italic":false,"translate":"attribute.modifier.equals.1","with":["$(regen_speed)",{"fallback":"Regeneration Speed","translate":"attribute.gm4.augmented_armor.regen_speed"}]}]}'] |
32 changes: 32 additions & 0 deletions
32
...d_armor/data/gm4_augmented_armor/function/armor/augment/type/sustaining/update.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# activate the augments on the armor piece | ||
# @s = player wearing the armor | ||
# at unspecified | ||
# run from functions in armor/augment/type/acrobatic/check | ||
|
||
scoreboard players set $change gm4_aa_data 1 | ||
|
||
execute store result storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.augment.stored_missing_hp int 1 run scoreboard players get $missing_health gm4_aa_data | ||
|
||
execute store result score $level gm4_aa_data run data get storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.levels[0] | ||
scoreboard players operation $level gm4_aa_data *= $missing_health gm4_aa_data | ||
|
||
# modify attribute | ||
execute store result storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.custom_attribute.regen_speed int 1 run scoreboard players get $level gm4_aa_data | ||
|
||
# use lib_lore to remove the old current bonus text | ||
data modify storage gm4_lore:temp Source set from storage gm4_augmented_armor:temp components."minecraft:lore" | ||
data modify storage gm4_lore:temp Target set value '{"color":"gray","fallback":"%s Augment:","italic":false,"translate":"item.gm4.augmented_armor.lore.augment","with":[{"fallback":"Sustaining","translate":"item.gm4.augmented_armor.augment.sustaining"}]}' | ||
scoreboard players set $start gm4_lore 2 | ||
function #gm4_lore:remove | ||
|
||
# use lib_lore to update the current bonus text | ||
data modify storage gm4_lore:temp Target set value '{"color":"gray","fallback":"%s Augment:","italic":false,"translate":"item.gm4.augmented_armor.lore.augment","with":[{"fallback":"Sustaining","translate":"item.gm4.augmented_armor.augment.sustaining"}]}' | ||
function gm4_augmented_armor:armor/augment/type/sustaining/eval_lore with storage gm4_augmented_armor:temp components."minecraft:custom_data".gm4_augmented_armor.custom_attribute | ||
scoreboard players set $start gm4_lore 2 | ||
function #gm4_lore:insert | ||
|
||
# update | ||
data modify storage gm4_augmented_armor:temp components."minecraft:lore" set from storage gm4_lore:temp Source | ||
|
||
# set this score so player combat regeneration is recalculated | ||
scoreboard players set $update.combat_regeneration gm4_aa_data 1 |
Oops, something went wrong.