Skip to content

Commit 6f4011a

Browse files
committed
🐛 信仰変更時に装備データが更新されないのを修正
1 parent 8c01713 commit 6f4011a

File tree

10 files changed

+34
-3
lines changed

10 files changed

+34
-3
lines changed

TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_attribute/
2121
execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} if entity @s[tag=TriggerFlag.Sneak] run function asset_manager:artifact/triggers/event/sneak/reset_when_change_item
2222
execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} if entity @s[tag=TriggerFlag.UsingItem] run function asset_manager:artifact/triggers/event/use_item/reset_when_change_item
23+
# 改宗時の更新処理
24+
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_attribute/
25+
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/event/sneak/reset
26+
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/event/use_item/reset
2327
# 各神器にトリガー受けわたし
2428
function asset_manager:artifact/triggers/trigger/
2529
# EntityStorageにデータ突っ込む
@@ -29,3 +33,4 @@
2933
data remove storage asset:artifact ArtifactEvents
3034
data remove storage asset:artifact New
3135
data remove storage asset:artifact Old
36+
tag @s remove Believe.Changed

TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/extract_changes.mcfunction

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# EquipIDは必要なのでlib:array/maskは使わない
99
# 改宗時は問答無用で通すようにする
1010
data modify storage asset:artifact Mask set from storage asset:artifact CopiedChanges[-1]._._
11+
execute if entity @s[tag=Believe.Changed] run data modify storage asset:artifact Mask set value false
1112
data modify storage asset:artifact Old.MaskedItemData append from storage asset:artifact Old.CopiedItemData[-1]
1213
execute unless data storage asset:artifact Old.MaskedItemData[-1].EquipID run data modify storage asset:artifact Old.MaskedItemData[-1].EquipID set value -2
1314
execute if data storage asset:artifact Old.MaskedItemData[-1].Modifiers[0] run data modify storage asset:artifact Old.MaskedItemData[-1].Modifiers[].ID set from storage asset:artifact Old.CopiedItemData[-1].ID

TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/use_item/reset.mcfunction

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
#
55
# @within function
6+
# asset_manager:artifact/triggers/
67
# asset_manager:artifact/triggers/trigger/
78
# asset_manager:artifact/triggers/use_item/
89

TheSkyBlessing/data/player_manager/functions/god/_index.d.mcfunction

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@
1717
#> storage for process
1818
# @within function player_manager:god/mercy/**
1919
#declare storage player_manager:god
20+
21+
#> Tag for Equipment Update
22+
# @within function
23+
# player_manager:god/*/believe
24+
# player_manager:god/none/set_tag
25+
# asset_manager:artifact/triggers/
26+
# asset_manager:artifact/triggers/equipments/update_attribute/*
27+
#declare tag Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/flora/believe.mcfunction

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@
2222
data modify storage api: Argument.UUID set value [2, 1, 1, 10]
2323
data modify storage api: Argument.Amount set value -0.2
2424
data modify storage api: Argument.Operation set value "multiply_base"
25-
function api:modifier/defense/fire/add
25+
function api:modifier/defense/fire/add
26+
27+
# 全装備を再チェック
28+
tag @s add Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/none/set_tag.mcfunction

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
#
55
# @within function core:handler/first_join
66

7-
tag @s add Believe.None
7+
tag @s add Believe.None
8+
tag @s add Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/nyaptov/believe.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
data modify storage api: Argument.Amount set value 1
2929
data modify storage api: Argument.Operation set value "multiply_base"
3030
function api:modifier/fall_damage/add
31+
32+
# 全装備を再チェック
33+
tag @s add Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/rumor/believe.mcfunction

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,7 @@
2727
data modify storage api: Argument.UUID set value [2, 1, 1, 12]
2828
data modify storage api: Argument.Amount set value -0.1
2929
data modify storage api: Argument.Operation set value "multiply_base"
30-
function api:modifier/defense/base/add
30+
function api:modifier/defense/base/add
31+
32+
# 全装備を再チェック
33+
tag @s add Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/urban/believe.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
data modify storage api: Argument.Amount set value -0.15
2929
data modify storage api: Argument.Operation set value "multiply_base"
3030
function api:modifier/receive_heal/add
31+
32+
# 全装備を再チェック
33+
tag @s add Believe.Changed

TheSkyBlessing/data/player_manager/functions/god/wi-ki/believe.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@
3333
data modify storage api: Argument.Amount set value -0.3
3434
data modify storage api: Argument.Operation set value "multiply_base"
3535
function api:modifier/defense/fire/add
36+
37+
# 全装備を再チェック
38+
tag @s add Believe.Changed

0 commit comments

Comments
 (0)