-
Notifications
You must be signed in to change notification settings - Fork 6
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
5838ffd
commit f89f450
Showing
25 changed files
with
202 additions
and
133 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
28 changes: 0 additions & 28 deletions
28
TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/fetch.mcfunction
This file was deleted.
Oops, something went wrong.
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
13 changes: 0 additions & 13 deletions
13
...kyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/trigger.m.mcfunction
This file was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
...ger/functions/artifact/triggers/equipments/update_attribute/add/calc_effective.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
2 changes: 1 addition & 1 deletion
2
...t_manager/functions/artifact/triggers/equipments/update_attribute/add/custom.m.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
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
29 changes: 29 additions & 0 deletions
29
...et_manager/functions/artifact/triggers/equipments/update_attribute/add/process.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,29 @@ | ||
#> asset_manager:artifact/triggers/equipments/update_attribute/add/process | ||
# @within function asset_manager:artifact/triggers/equipments/update_attribute/add/* | ||
|
||
# データを取得 | ||
data modify storage asset:artifact Modifier set from storage asset:artifact MaskedModifiers[-1] | ||
|
||
# データを整える | ||
execute if data storage asset:artifact Modifier{Slot:"hotbar"} run function asset_manager:artifact/triggers/equipments/update_attribute/add/calc_effective | ||
data modify storage asset:artifact Modifier.UUID set value [I;1,1,-1,-1] | ||
data modify storage asset:artifact Modifier.UUID[2] set from storage asset:artifact Modifier.ID | ||
data modify storage asset:artifact Enum.Slot set from storage asset:artifact Modifier.Slot | ||
execute store result storage asset:artifact Modifier.UUID[3] int 1 run function asset:artifact/enum/slot/.m with storage asset:artifact Enum | ||
|
||
# apiに移す | ||
data modify storage api: Argument.UUID set from storage asset:artifact Modifier.UUID | ||
data modify storage api: Argument.Amount set from storage asset:artifact Modifier.Amount | ||
data modify storage api: Argument.Operation set from storage asset:artifact Modifier.Operation | ||
# カスタムModifierで処理 | ||
scoreboard players set $CustomModifier Temporary 0 | ||
function asset_manager:artifact/triggers/equipments/update_attribute/add/custom.m with storage asset:artifact Modifier | ||
# バニラModifierで処理 | ||
execute unless score $CustomModifier Temporary matches 1 run function asset_manager:artifact/triggers/equipments/update_attribute/dec_to_hex/ | ||
execute unless score $CustomModifier Temporary matches 1 run function asset_manager:artifact/triggers/equipments/update_attribute/add/generic.m with storage asset:artifact Modifier | ||
|
||
# リセット&ループ | ||
scoreboard players reset $CustomModifier Temporary | ||
data remove storage asset:artifact Modifier | ||
data remove storage asset:artifact MaskedModifiers[-1] | ||
execute if data storage asset:artifact MaskedModifiers[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/process |
17 changes: 17 additions & 0 deletions
17
...set_manager/functions/artifact/triggers/equipments/update_attribute/add/stack/.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,17 @@ | ||
#> asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ | ||
# @within function | ||
# asset_manager:artifact/triggers/equipments/update_attribute/add/ | ||
# asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ | ||
|
||
# Modifier一覧を切り出す | ||
execute if data storage asset:artifact MaskedNewItemData[-1].Modifiers[0] run data modify storage asset:artifact MaskedNewItemData[-1].Modifiers[].ID set from storage asset:artifact MaskedNewItemData[-1].ID | ||
execute if data storage asset:artifact MaskedNewItemData[-1].Modifiers[0] run data modify storage asset:artifact MaskedNewItemData[-1].Modifiers[].Slot set from storage asset:artifact MaskedNewItemData[-1].Slot | ||
data modify storage asset:artifact Modifiers append from storage asset:artifact MaskedNewItemData[-1].Modifiers[] | ||
|
||
# Modifierのスタック処理 | ||
execute if data storage asset:artifact Modifiers[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/foreach | ||
|
||
# 要素を削除して、残っているならば再帰 | ||
data remove storage asset:artifact Modifiers | ||
data remove storage asset:artifact MaskedNewItemData[-1] | ||
execute if data storage asset:artifact MaskedNewItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ |
23 changes: 23 additions & 0 deletions
23
...nager/functions/artifact/triggers/equipments/update_attribute/add/stack/calc.m.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,23 @@ | ||
#> asset_manager:artifact/triggers/equipments/update_attribute/add/stack/calc.m | ||
# @input args | ||
# ID : int | ||
# Type : string | ||
# @within function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/foreach | ||
|
||
#> Private | ||
# @private | ||
#declare score_holder $SameModifier | ||
#declare score_holder $ModifierStack | ||
|
||
# 同一スロット、タイプ、IDのものがないかチェック | ||
$execute store result score $SameModifier Temporary if data storage asset:artifact MaskedModifiers[{ID:$(ID),Type:"$(Type)"}] | ||
# 一致しているものがあればスタック追加 | ||
$execute if score $SameModifier Temporary matches 1.. store result score $ModifierStack Temporary run data get storage asset:artifact MaskedModifiers[{ID:$(ID),Type:"$(Type)"}].Stack | ||
execute if score $SameModifier Temporary matches 1.. run scoreboard players add $ModifierStack Temporary 1 | ||
$execute if score $SameModifier Temporary matches 1.. store result storage asset:artifact MaskedModifiers[{ID:$(ID),Type:"$(Type)"}].Stack int 1 run scoreboard players get $ModifierStack Temporary | ||
# 一致しているものがなければ追加 | ||
execute if score $SameModifier Temporary matches 0 run data modify storage asset:artifact MaskedModifiers append from storage asset:artifact Modifier | ||
execute if score $SameModifier Temporary matches 0 run data modify storage asset:artifact MaskedModifiers[-1].Stack set value 1 | ||
# リセット | ||
scoreboard players reset $SameModifier Temporary | ||
scoreboard players reset $ModifierStack Temporary |
13 changes: 13 additions & 0 deletions
13
...ager/functions/artifact/triggers/equipments/update_attribute/add/stack/foreach.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 @@ | ||
#> asset_manager:artifact/triggers/equipments/update_attribute/add/stack/foreach | ||
# @within function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/* | ||
|
||
# Modifierを切り出す | ||
data modify storage asset:artifact Modifier set from storage asset:artifact Modifiers[-1] | ||
|
||
# Modifierのスタックを行う | ||
function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/calc.m with storage asset:artifact Modifier | ||
|
||
# 要素を削除して、残っているならば再帰 | ||
data remove storage asset:artifact Modifier | ||
data remove storage asset:artifact Modifiers[-1] | ||
execute if data storage asset:artifact Modifiers[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/foreach |
11 changes: 11 additions & 0 deletions
11
...manager/functions/artifact/triggers/equipments/update_attribute/check_religion.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,11 @@ | ||
#> asset_manager:artifact/triggers/equipments/update_attribute/check_religion | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/equipments/update_attribute/extract_changes | ||
|
||
execute if data storage asset:artifact {CanUsedGod:["Flora"]} if predicate player_manager:is_believe/flora run scoreboard players set $CheckBelieve Temporary 1 | ||
execute if data storage asset:artifact {CanUsedGod:["Nyaptov"]} if predicate player_manager:is_believe/nyaptov run scoreboard players set $CheckBelieve Temporary 1 | ||
execute if data storage asset:artifact {CanUsedGod:["Rumor"]} if predicate player_manager:is_believe/rumor run scoreboard players set $CheckBelieve Temporary 1 | ||
execute if data storage asset:artifact {CanUsedGod:["Urban"]} if predicate player_manager:is_believe/urban run scoreboard players set $CheckBelieve Temporary 1 | ||
execute if data storage asset:artifact {CanUsedGod:["Wi-ki"]} if predicate player_manager:is_believe/wi-ki run scoreboard players set $CheckBelieve Temporary 1 |
Oops, something went wrong.