Skip to content

Commit

Permalink
🐛 信仰変更時に装備データが更新されないのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Nov 23, 2024
1 parent 9156bc7 commit d331ae1
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_attribute/
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
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
# 改宗時の更新処理
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_attribute/
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/event/sneak/reset
execute if entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/event/use_item/reset
# 各神器にトリガー受けわたし
function asset_manager:artifact/triggers/trigger/
# EntityStorageにデータ突っ込む
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# EquipIDは必要なのでlib:array/maskは使わない
# 改宗時は問答無用で通すようにする
data modify storage asset:artifact Mask set from storage asset:artifact CopiedChanges[-1]._._
execute if entity @s[tag=Believe.Changed] run data modify storage asset:artifact Mask set value false
data modify storage asset:artifact Old.MaskedItemData append from storage asset:artifact Old.CopiedItemData[-1]
execute unless data storage asset:artifact Old.MaskedItemData[-1].EquipID run data modify storage asset:artifact Old.MaskedItemData[-1].EquipID set value -2
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
#
# @within function
# asset_manager:artifact/triggers/
# asset_manager:artifact/triggers/trigger/
# asset_manager:artifact/triggers/use_item/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@
#> storage for process
# @within function player_manager:god/mercy/**
#declare storage player_manager:god

#> Tag for Equipment Update
# @within function
# player_manager:god/*/believe
# player_manager:god/none/set_tag
# asset_manager:artifact/triggers/
# asset_manager:artifact/triggers/equipments/update_attribute/*
#declare tag Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@
data modify storage api: Argument.UUID set value [2, 1, 1, 10]
data modify storage api: Argument.Amount set value -0.2
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/defense/fire/add
function api:modifier/defense/fire/add

# 全装備を再チェック
tag @s add Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
#
# @within function core:handler/first_join

tag @s add Believe.None
tag @s add Believe.None
tag @s add Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
data modify storage api: Argument.Amount set value 1
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/fall_damage/add

# 全装備を再チェック
tag @s add Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@
data modify storage api: Argument.UUID set value [2, 1, 1, 12]
data modify storage api: Argument.Amount set value -0.1
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/defense/base/add
function api:modifier/defense/base/add

# 全装備を再チェック
tag @s add Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
data modify storage api: Argument.Amount set value -0.15
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/receive_heal/add

# 全装備を再チェック
tag @s add Believe.Changed
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@
data modify storage api: Argument.Amount set value -0.3
data modify storage api: Argument.Operation set value "multiply_base"
function api:modifier/defense/fire/add

# 全装備を再チェック
tag @s add Believe.Changed

0 comments on commit d331ae1

Please sign in to comment.