From 7ab04106d40687b9854bce6e899977c68672204f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AF=E3=81=84=E3=81=84=E3=82=8D?= Date: Sun, 17 Nov 2024 23:52:08 +0900 Subject: [PATCH] =?UTF-8?q?:boom:=20=E3=83=88=E3=83=AA=E3=82=AC=E3=83=BC?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=81=AE=E3=83=9E=E3=82=AF=E3=83=AD=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/api/functions/damage/.mcfunction | 2 - .../functions/damage/core/attack.mcfunction | 5 +- .../functions/damage/core/mp_heal.mcfunction | 9 -- .../functions/damage/core/reset.mcfunction | 1 - .../push_from_attacker.mcfunction | 12 +- .../data/asset/functions/_index.d.mcfunction | 6 + .../artifact/alias/65535/attack/.mcfunction | 8 ++ .../alias/65535/attack/check.mcfunction | 8 ++ .../artifact/alias/65535/dis_equip.mcfunction | 8 ++ .../artifact/alias/65535/equip.mcfunction | 8 ++ .../artifact/alias/65535/register.mcfunction | 8 ++ .../artifact/common/_index.d.mcfunction | 14 --- .../common/check_condition/auto.mcfunction | 11 -- .../common/check_condition/chest.mcfunction | 11 -- .../common/check_condition/feet.mcfunction | 11 -- .../common/check_condition/head.mcfunction | 11 -- .../common/check_condition/hotbar.mcfunction | 11 -- .../common/check_condition/legs.mcfunction | 11 -- .../check_condition/mainhand.mcfunction | 12 -- .../common/check_condition/offhand.mcfunction | 11 -- .../functions/artifact/common/give.mcfunction | 78 ------------- .../artifact/common/protect.mcfunction | 12 -- .../artifact/common/replace.mcfunction | 19 --- .../artifact/common/use/auto.mcfunction | 9 -- .../artifact/common/use/chest.mcfunction | 9 -- .../artifact/common/use/feet.mcfunction | 9 -- .../artifact/common/use/head.mcfunction | 9 -- .../artifact/common/use/hotbar.mcfunction | 9 -- .../artifact/common/use/legs.mcfunction | 9 -- .../artifact/common/use/mainhand.mcfunction | 9 -- .../artifact/common/use/offhand.mcfunction | 9 -- .../artifact/example/attack/.mcfunction | 15 +++ .../artifact/example/attack/check.mcfunction | 8 ++ .../artifact/example/attack/damage.mcfunction | 13 +++ .../artifact/example/dis_equip/.mcfunction | 8 ++ .../artifact/example/equip/.mcfunction | 14 +++ .../artifact/example/give/2.give.mcfunction | 53 --------- .../artifact/example/register.mcfunction | 34 ++++++ .../example/trigger/1.trigger.mcfunction | 9 -- .../trigger/2.check_condition.mcfunction | 12 -- .../example/trigger/3.main.mcfunction | 20 ---- .../asset/tags/functions/artifact/attack.json | 4 - .../functions/artifact/attack/explosion.json | 5 - .../tags/functions/artifact/attack/melee.json | 5 - .../functions/artifact/attack/projectile.json | 5 - .../artifact/click.carrot_on_a_stick.json | 5 - .../asset/tags/functions/artifact/damage.json | 5 - .../functions/artifact/damage/drowning.json | 5 - .../functions/artifact/damage/explosion.json | 5 - .../tags/functions/artifact/damage/fire.json | 5 - .../functions/artifact/damage/freezing.json | 5 - .../artifact/damage/from_entity/.json | 5 - .../artifact/damage/from_entity/blocked.json | 5 - .../damage/from_entity/explosion.json | 5 - .../artifact/damage/from_entity/melee.json | 5 - .../damage/from_entity/projectile.json | 5 - .../functions/artifact/damage/lightning.json | 5 - .../tags/functions/artifact/damage/melee.json | 5 - .../tags/functions/artifact/damage/other.json | 5 - .../functions/artifact/damage/projectile.json | 5 - .../asset/tags/functions/artifact/give.json | 5 - .../asset/tags/functions/artifact/heal.json | 5 - .../asset/tags/functions/artifact/killed.json | 5 - .../functions/artifact/killed/explosion.json | 5 - .../tags/functions/artifact/killed/melee.json | 5 - .../functions/artifact/killed/projectile.json | 5 - .../tags/functions/artifact/receive_heal.json | 5 - .../asset/tags/functions/artifact/sneak/.json | 5 - .../tags/functions/artifact/sneak/10s.json | 5 - .../tags/functions/artifact/sneak/1s.json | 5 - .../tags/functions/artifact/sneak/2s.json | 5 - .../tags/functions/artifact/sneak/3s.json | 5 - .../tags/functions/artifact/sneak/4s.json | 5 - .../tags/functions/artifact/sneak/5s.json | 5 - .../tags/functions/artifact/sneak/keep/.json | 5 - .../functions/artifact/sneak/keep/10s.json | 5 - .../functions/artifact/sneak/keep/1s.json | 5 - .../functions/artifact/sneak/keep/2s.json | 5 - .../functions/artifact/sneak/keep/3s.json | 5 - .../functions/artifact/sneak/keep/4s.json | 5 - .../functions/artifact/sneak/keep/5s.json | 5 - .../asset/tags/functions/artifact/tick.json | 5 - .../tags/functions/artifact/use_item.json | 5 - .../tags/functions/artifact/using_item.json | 5 - .../functions/artifact/_index.d.mcfunction | 44 ++++--- .../functions/artifact/check/.mcfunction | 30 ++--- .../artifact/check/check_believe.mcfunction | 10 +- .../check/check_local_cooldown/.mcfunction | 7 +- .../check_local_cooldown/foreach.mcfunction | 9 +- .../artifact/check/check_mp.mcfunction | 6 +- .../check/check_special_cooldown.mcfunction | 2 +- .../check/check_type_cooldown/.mcfunction | 17 ++- .../check_type_cooldown/foreach.mcfunction | 26 ----- .../get_duration.m.mcfunction | 5 +- .../functions/artifact/cooldown/.mcfunction | 2 +- .../cooldown/decrement/local/.mcfunction | 4 +- .../artifact/cooldown/main_bar/.mcfunction | 18 +-- .../data/current/equips/init.mcfunction | 18 --- .../data/current/equips/merge.mcfunction | 18 --- .../data/current/equips/replace.mcfunction | 26 ----- .../artifact/data/current/filter.mcfunction | 23 ---- .../artifact/data/current/get.mcfunction | 32 ----- .../artifact/data/current/reset.mcfunction | 13 --- .../artifact/data/current/update/.mcfunction | 20 ---- .../update/when_modified/hotbar.mcfunction | 20 ---- .../when_modified/non-hotbar.mcfunction | 13 --- .../update/when_removed/hotbar.mcfunction | 45 ------- .../update/when_removed/non-hotbar.mcfunction | 33 ------ .../artifact/data/new/fetch_data/.mcfunction | 16 +-- .../data/new/fetch_data/foreach.mcfunction | 8 +- .../artifact/data/new/init.mcfunction | 110 +++++++++--------- .../data/new/revert_from_current.mcfunction | 25 ---- .../data/new/set_to_current.mcfunction | 26 ----- .../new/stash_to_entity_storage.mcfunction | 10 +- .../artifact/data/old/init.mcfunction | 13 ++- .../data/old/revert_from_current.mcfunction | 25 ---- .../data/old/set_to_current.mcfunction | 26 ----- .../functions/artifact/triggers/.mcfunction | 28 ++--- .../artifact/triggers/attack/.mcfunction | 17 +-- .../triggers/attack/attack.m.mcfunction | 8 ++ .../triggers/attack/check.m.mcfunction | 8 ++ .../triggers/attack/foreach.mcfunction | 46 ++++---- .../artifact/triggers/attack/use.mcfunction | 19 +++ .../triggers/attack/vanilla/.mcfunction | 28 ----- .../triggers/attack_explosion/.mcfunction | 15 +++ .../attack_explosion.m.mcfunction | 8 ++ .../attack_explosion/check.m.mcfunction | 8 ++ .../attack_explosion/foreach.mcfunction | 31 +++++ .../triggers/attack_explosion/use.mcfunction | 19 +++ .../triggers/attack_melee/.mcfunction | 15 +++ .../attack_melee/attack_melee.m.mcfunction | 8 ++ .../triggers/attack_melee/check.m.mcfunction | 8 ++ .../triggers/attack_melee/foreach.mcfunction | 34 ++++++ .../triggers/attack_melee/use.mcfunction | 19 +++ .../triggers/attack_projectile/.mcfunction | 15 +++ .../attack_projectile.m.mcfunction | 8 ++ .../attack_projectile/check.m.mcfunction | 8 ++ .../attack_projectile/foreach.mcfunction | 31 +++++ .../triggers/attack_projectile/use.mcfunction | 19 +++ .../artifact/triggers/click.carrot.mcfunction | 14 --- .../artifact/triggers/click/.mcfunction | 16 +++ .../triggers/click/check.m.mcfunction | 8 ++ .../triggers/click/click.m.mcfunction | 8 ++ .../artifact/triggers/click/use.mcfunction | 19 +++ .../artifact/triggers/damage/.mcfunction | 17 +-- .../triggers/damage/check.m.mcfunction | 8 ++ .../triggers/damage/damage.m.mcfunction | 8 ++ .../triggers/damage/foreach.mcfunction | 43 +++---- .../artifact/triggers/damage/use.mcfunction | 19 +++ .../triggers/damage_drowning/.mcfunction | 15 +++ .../damage_drowning/check.m.mcfunction | 8 ++ .../damage_drowning.m.mcfunction | 8 ++ .../damage_drowning/foreach.mcfunction | 25 ++++ .../triggers/damage_drowning/use.mcfunction | 19 +++ .../triggers/damage_entity/.mcfunction | 15 +++ .../triggers/damage_entity/check.m.mcfunction | 8 ++ .../damage_entity/damage_entity.m.mcfunction | 8 ++ .../triggers/damage_entity/foreach.mcfunction | 25 ++++ .../triggers/damage_entity/use.mcfunction | 19 +++ .../damage_entity_explosion/.mcfunction | 15 +++ .../check.m.mcfunction | 8 ++ .../damage_entity_explosion.m.mcfunction | 8 ++ .../foreach.mcfunction | 25 ++++ .../damage_entity_explosion/use.mcfunction | 19 +++ .../triggers/damage_entity_melee/.mcfunction | 15 +++ .../damage_entity_melee/check.m.mcfunction | 8 ++ .../damage_entity_melee.m.mcfunction | 8 ++ .../damage_entity_melee/foreach.mcfunction | 25 ++++ .../damage_entity_melee/use.mcfunction | 19 +++ .../damage_entity_projectile/.mcfunction | 15 +++ .../check.m.mcfunction | 8 ++ .../damage_entity_projectile.m.mcfunction | 8 ++ .../foreach.mcfunction | 25 ++++ .../damage_entity_projectile/use.mcfunction | 19 +++ .../triggers/damage_explosion/.mcfunction | 15 +++ .../damage_explosion/check.m.mcfunction | 8 ++ .../damage_explosion.m.mcfunction | 8 ++ .../damage_explosion/foreach.mcfunction | 25 ++++ .../triggers/damage_explosion/use.mcfunction | 19 +++ .../artifact/triggers/damage_fire/.mcfunction | 15 +++ .../triggers/damage_fire/check.m.mcfunction | 8 ++ .../damage_fire/damage_fire.m.mcfunction | 8 ++ .../triggers/damage_fire/foreach.mcfunction | 25 ++++ .../triggers/damage_fire/use.mcfunction | 19 +++ .../triggers/damage_freezing/.mcfunction | 15 +++ .../damage_freezing/check.m.mcfunction | 8 ++ .../damage_freezing.m.mcfunction | 8 ++ .../damage_freezing/foreach.mcfunction | 25 ++++ .../triggers/damage_freezing/use.mcfunction | 19 +++ .../triggers/damage_lightning/.mcfunction | 15 +++ .../damage_lightning/check.m.mcfunction | 8 ++ .../damage_lightning.m.mcfunction | 8 ++ .../damage_lightning/foreach.mcfunction | 25 ++++ .../triggers/damage_lightning/use.mcfunction | 19 +++ .../triggers/damage_melee/.mcfunction | 15 +++ .../triggers/damage_melee/check.m.mcfunction | 8 ++ .../damage_melee/damage_melee.m.mcfunction | 8 ++ .../triggers/damage_melee/foreach.mcfunction | 25 ++++ .../triggers/damage_melee/use.mcfunction | 19 +++ .../triggers/damage_projectile/.mcfunction | 15 +++ .../damage_projectile/check.m.mcfunction | 8 ++ .../damage_projectile.m.mcfunction | 8 ++ .../damage_projectile/foreach.mcfunction | 25 ++++ .../triggers/damage_projectile/use.mcfunction | 19 +++ .../artifact/triggers/dis_equip.mcfunction | 16 --- .../artifact/triggers/dis_equip/.mcfunction | 2 +- .../artifact/triggers/equip.mcfunction | 16 --- .../artifact/triggers/equip/.mcfunction | 2 +- .../triggers/equipments/compare.mcfunction | 4 +- .../equipments/update_attribute/.mcfunction | 20 ++-- .../update_attribute/add/stack/.mcfunction | 10 +- .../update_attribute/attire/.mcfunction | 4 +- .../attire/parts_count.m.mcfunction | 2 +- .../update_attribute/equip_trigger.mcfunction | 10 +- .../extract_changes.mcfunction | 28 ++--- .../remove/foreach.mcfunction | 10 +- .../equipments/update_cooldown/.mcfunction | 6 +- .../update_cooldown/foreach.mcfunction | 10 +- .../update_cooldown_type.mcfunction | 28 ++--- .../attack/add_tag_each_victim.mcfunction | 9 +- .../event/attack/get_max_amount.mcfunction | 13 +++ .../triggers/event/attack/mp_heal.mcfunction | 18 +++ .../event/damage/add_tag_attacker.mcfunction | 13 +++ .../event/kill/add_tag_victim.mcfunction | 13 +++ .../event/sneak/get_sneak_time/.mcfunction | 13 +++ .../sneak/get_sneak_time/hotbar.m.mcfunction | 8 ++ .../{ => event}/sneak/reset.mcfunction | 10 +- .../sneak/reset_when_change_item.mcfunction | 21 ++++ .../artifact/triggers/heal/.mcfunction | 17 +-- .../heal/add_tag_each_receiver.mcfunction | 2 +- .../artifact/triggers/heal/check.m.mcfunction | 8 ++ .../artifact/triggers/heal/foreach.mcfunction | 41 ++++--- .../artifact/triggers/heal/heal.m.mcfunction | 8 ++ .../artifact/triggers/heal/use.mcfunction | 19 +++ .../artifact/triggers/keep_click/.mcfunction | 16 +++ .../triggers/keep_click/check.m.mcfunction | 8 ++ .../keep_click/keep_click.m.mcfunction | 8 ++ .../triggers/keep_click/use.mcfunction | 19 +++ .../artifact/triggers/keep_sneak/.mcfunction | 21 ++++ .../triggers/keep_sneak/check.m.mcfunction | 8 ++ .../keep_sneak/keep_sneak.m.mcfunction | 8 ++ .../triggers/keep_sneak/use.mcfunction | 19 +++ .../triggers/keep_sneak_10s/.mcfunction | 21 ++++ .../keep_sneak_10s/check.m.mcfunction | 8 ++ .../keep_sneak_10s.m.mcfunction | 8 ++ .../triggers/keep_sneak_10s/use.mcfunction | 19 +++ .../triggers/keep_sneak_1s/.mcfunction | 21 ++++ .../triggers/keep_sneak_1s/check.m.mcfunction | 8 ++ .../keep_sneak_1s/keep_sneak_1s.m.mcfunction | 8 ++ .../triggers/keep_sneak_1s/use.mcfunction | 19 +++ .../triggers/keep_sneak_2s/.mcfunction | 21 ++++ .../triggers/keep_sneak_2s/check.m.mcfunction | 8 ++ .../keep_sneak_2s/keep_sneak_2s.m.mcfunction | 8 ++ .../triggers/keep_sneak_2s/use.mcfunction | 19 +++ .../triggers/keep_sneak_3s/.mcfunction | 21 ++++ .../triggers/keep_sneak_3s/check.m.mcfunction | 8 ++ .../keep_sneak_3s/keep_sneak_3s.m.mcfunction | 8 ++ .../triggers/keep_sneak_3s/use.mcfunction | 19 +++ .../triggers/keep_sneak_4s/.mcfunction | 21 ++++ .../triggers/keep_sneak_4s/check.m.mcfunction | 8 ++ .../keep_sneak_4s/keep_sneak_4s.m.mcfunction | 8 ++ .../triggers/keep_sneak_4s/use.mcfunction | 19 +++ .../triggers/keep_sneak_5s/.mcfunction | 21 ++++ .../triggers/keep_sneak_5s/check.m.mcfunction | 8 ++ .../keep_sneak_5s/keep_sneak_5s.m.mcfunction | 8 ++ .../triggers/keep_sneak_5s/use.mcfunction | 19 +++ .../artifact/triggers/kill/.mcfunction | 15 +++ .../artifact/triggers/kill/check.m.mcfunction | 8 ++ .../artifact/triggers/kill/foreach.mcfunction | 25 ++++ .../artifact/triggers/kill/kill.m.mcfunction | 8 ++ .../artifact/triggers/kill/use.mcfunction | 19 +++ .../triggers/kill_explosion/.mcfunction | 15 +++ .../kill_explosion/check.m.mcfunction | 8 ++ .../kill_explosion/foreach.mcfunction | 25 ++++ .../kill_explosion.m.mcfunction | 8 ++ .../triggers/kill_explosion/use.mcfunction | 19 +++ .../artifact/triggers/kill_melee/.mcfunction | 15 +++ .../triggers/kill_melee/check.m.mcfunction | 8 ++ .../triggers/kill_melee/foreach.mcfunction | 25 ++++ .../kill_melee/kill_melee.m.mcfunction | 8 ++ .../triggers/kill_melee/use.mcfunction | 19 +++ .../triggers/kill_projectile/.mcfunction | 15 +++ .../kill_projectile/check.m.mcfunction | 8 ++ .../kill_projectile/foreach.mcfunction | 25 ++++ .../kill_projectile.m.mcfunction | 8 ++ .../triggers/kill_projectile/use.mcfunction | 19 +++ .../artifact/triggers/killed/.mcfunction | 12 -- .../triggers/killed/foreach.mcfunction | 27 ----- .../triggers/receive_heal/.mcfunction | 17 +-- .../triggers/receive_heal/check.m.mcfunction | 8 ++ .../triggers/receive_heal/foreach.mcfunction | 33 +++--- .../receive_heal/receive_heal.m.mcfunction | 8 ++ .../triggers/receive_heal/use.mcfunction | 19 +++ .../artifact/triggers/sneak/.mcfunction | 77 +++--------- .../triggers/sneak/check.m.mcfunction | 8 ++ .../sneak/reset_threshold_less.mcfunction | 24 ---- .../sneak/reset_value_not-equal.mcfunction | 26 ----- .../sneak/reset_when_change_item.mcfunction | 28 ----- .../triggers/sneak/set_context.mcfunction | 21 ---- .../triggers/sneak/sneak.m.mcfunction | 8 ++ .../artifact/triggers/sneak/use.mcfunction | 19 +++ .../artifact/triggers/sneak_10s/.mcfunction | 21 ++++ .../triggers/sneak_10s/check.m.mcfunction | 8 ++ .../triggers/sneak_10s/sneak_10s.m.mcfunction | 8 ++ .../triggers/sneak_10s/use.mcfunction | 19 +++ .../artifact/triggers/sneak_1s/.mcfunction | 21 ++++ .../triggers/sneak_1s/check.m.mcfunction | 8 ++ .../triggers/sneak_1s/sneak_1s.m.mcfunction | 8 ++ .../artifact/triggers/sneak_1s/use.mcfunction | 19 +++ .../artifact/triggers/sneak_2s/.mcfunction | 21 ++++ .../triggers/sneak_2s/check.m.mcfunction | 8 ++ .../triggers/sneak_2s/sneak_2s.m.mcfunction | 8 ++ .../artifact/triggers/sneak_2s/use.mcfunction | 19 +++ .../artifact/triggers/sneak_3s/.mcfunction | 21 ++++ .../triggers/sneak_3s/check.m.mcfunction | 8 ++ .../triggers/sneak_3s/sneak_3s.m.mcfunction | 8 ++ .../artifact/triggers/sneak_3s/use.mcfunction | 19 +++ .../artifact/triggers/sneak_4s/.mcfunction | 21 ++++ .../triggers/sneak_4s/check.m.mcfunction | 8 ++ .../triggers/sneak_4s/sneak_4s.m.mcfunction | 8 ++ .../artifact/triggers/sneak_4s/use.mcfunction | 19 +++ .../artifact/triggers/sneak_5s/.mcfunction | 21 ++++ .../triggers/sneak_5s/check.m.mcfunction | 8 ++ .../triggers/sneak_5s/sneak_5s.m.mcfunction | 8 ++ .../artifact/triggers/sneak_5s/use.mcfunction | 19 +++ .../artifact/triggers/tick.mcfunction | 12 -- .../artifact/triggers/tick/.mcfunction | 16 +++ .../artifact/triggers/tick/check.m.mcfunction | 8 ++ .../artifact/triggers/tick/tick.m.mcfunction | 8 ++ .../artifact/triggers/tick/use.mcfunction | 19 +++ .../artifact/triggers/trigger/.mcfunction | 16 +++ .../triggers/trigger/foreach/.mcfunction | 37 ++++++ .../trigger/foreach/call.m.mcfunction | 8 ++ .../triggers/trigger/foreach/sub/.mcfunction | 18 +++ .../trigger/foreach/sub/call.m.mcfunction | 10 ++ .../triggers/trigger/normalize/.mcfunction | 27 +++++ .../normalize/slot_to_index.mcfunction | 13 +++ .../trigger/normalize/upsert.m.mcfunction | 20 ++++ .../artifact/triggers/use_item/.mcfunction | 37 ++---- .../triggers/use_item/check.m.mcfunction | 8 ++ .../triggers/use_item/check_change.mcfunction | 27 ----- .../use_item/check_hand_swap.mcfunction | 29 ----- .../use_item/check_has_consumable.mcfunction | 20 ---- .../use_item/check_item_drop.mcfunction | 11 -- .../artifact/triggers/use_item/use.mcfunction | 19 +++ .../triggers/use_item/use_item.m.mcfunction | 8 ++ .../artifact/triggers/using_item.mcfunction | 12 -- .../artifact/triggers/vanilla/.mcfunction | 29 +++++ .../triggers/vanilla/damage.mcfunction | 18 +++ .../push_kill_and_death_event.mcfunction | 2 +- .../functions/artifact/use/.mcfunction | 42 +++---- .../functions/artifact/use/item/.mcfunction | 14 ++- .../artifact/use/item/break.mcfunction | 24 ++-- .../use/item/fetch_inventory.m.mcfunction | 12 ++ .../artifact/use/item/has_remain.mcfunction | 10 +- .../artifact/use/item/update.mcfunction | 51 ++++---- .../item/update_local_cooldown/.mcfunction | 5 +- .../update_local_cooldown/hotbar.mcfunction | 20 ++-- .../non-hotbar.mcfunction | 13 +-- .../artifact/use/remove_mp.mcfunction | 4 +- .../common/reset_all_context.mcfunction | 4 - .../functions/handler/first_join.mcfunction | 2 +- .../functions/tick/player/post.mcfunction | 2 +- .../status_log/show_health.mcfunction | 2 +- 364 files changed, 3407 insertions(+), 1869 deletions(-) delete mode 100644 TheSkyBlessing/data/api/functions/damage/core/mp_heal.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/_index.d.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/check.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/alias/65535/dis_equip.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/alias/65535/equip.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/alias/65535/register.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/protect.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/replace.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/attack/.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/attack/check.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/attack/damage.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/dis_equip/.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/equip/.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction create mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/register.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction delete mode 100644 TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/attack.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/attack/explosion.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/attack/projectile.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/drowning.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/explosion.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/fire.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/freezing.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/blocked.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/explosion.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/melee.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/projectile.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/lightning.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/melee.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/other.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/damage/projectile.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/give.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/heal.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/killed.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/killed/explosion.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/killed/melee.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/killed/projectile.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/receive_heal.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/10s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/1s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/2s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/3s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/4s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/5s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/10s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/1s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/2s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/3s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/4s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/5s.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/tick.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/use_item.json delete mode 100644 TheSkyBlessing/data/asset/tags/functions/artifact/using_item.json delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/foreach.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/init.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/merge.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/replace.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/filter.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/get.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/reset.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/non-hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/non-hotbar.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/new/revert_from_current.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/new/set_to_current.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/old/revert_from_current.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/data/old/set_to_current.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/attack.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/use.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/attack_explosion.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/attack_melee.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/attack_projectile.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/use.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click.carrot.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/click.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/damage.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/damage_drowning.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/damage_entity.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/damage_entity_explosion.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/damage_entity_melee.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/damage_entity_projectile.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/damage_explosion.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/damage_fire.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/damage_freezing.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/damage_lightning.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/damage_melee.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/damage_projectile.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/use.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction rename TheSkyBlessing/data/asset_manager/functions/artifact/triggers/{ => event}/attack/add_tag_each_victim.mcfunction (61%) create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/get_max_amount.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/mp_heal.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/damage/add_tag_attacker.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/kill/add_tag_victim.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/hotbar.m.mcfunction rename TheSkyBlessing/data/asset_manager/functions/artifact/triggers/{ => event}/sneak/reset.mcfunction (73%) create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset_when_change_item.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/heal.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/keep_click.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/keep_sneak.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/keep_sneak_10s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/keep_sneak_1s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/keep_sneak_2s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/keep_sneak_3s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/keep_sneak_4s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/keep_sneak_5s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/kill.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/kill_explosion.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/kill_melee.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/kill_projectile.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/use.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/foreach.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/receive_heal.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/check.m.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_threshold_less.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_value_not-equal.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_when_change_item.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/set_context.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/sneak.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/sneak_10s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/sneak_1s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/sneak_2s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/sneak_3s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/sneak_4s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/sneak_5s.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/use.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/check.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/tick.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/call.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/call.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/slot_to_index.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/upsert.m.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check.m.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_change.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_hand_swap.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_has_consumable.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_item_drop.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use_item.m.mcfunction delete mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/using_item.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/.mcfunction create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/damage.mcfunction rename TheSkyBlessing/data/asset_manager/functions/artifact/triggers/{attack => }/vanilla/push_kill_and_death_event.mcfunction (91%) create mode 100644 TheSkyBlessing/data/asset_manager/functions/artifact/use/item/fetch_inventory.m.mcfunction diff --git a/TheSkyBlessing/data/api/functions/damage/.mcfunction b/TheSkyBlessing/data/api/functions/damage/.mcfunction index ea7584147f..6bddfcbd53 100644 --- a/TheSkyBlessing/data/api/functions/damage/.mcfunction +++ b/TheSkyBlessing/data/api/functions/damage/.mcfunction @@ -21,7 +21,6 @@ # └ Argument.BypassDifficulty? : boolean # Argument.ReduceEnchantment? : id(minecraft:enchantment) | { id: id(minecraft:enchantment), modifier?: int } # Argument.DeathMessage? : TextComponent || TextComponent[] -# Argument.AdditionalMPHeal? : int (default: PersistentArgument.AdditionalMPHeal) # Argument.DisableLog? : boolean (default: false) # Argument.Metadata? : any # @api @@ -42,7 +41,6 @@ execute unless data storage api: Argument.BypassEnchantments run data modify storage api: Argument.BypassEnchantments set value false execute unless data storage api: Argument.BypassResistance run data modify storage api: Argument.BypassResistance set value false execute unless data storage api: Argument.BypassDifficulty run data modify storage api: Argument.BypassDifficulty set value false - execute unless data storage api: Argument.AdditionalMPHeal run data modify storage api: Argument.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal execute unless data storage api: Argument.DisableLog run data modify storage api: Argument.DisableLog set value false # Healthを持つ干渉可能なEntityかつ死んでいなければ実行 diff --git a/TheSkyBlessing/data/api/functions/damage/core/attack.mcfunction b/TheSkyBlessing/data/api/functions/damage/core/attack.mcfunction index e5225cbc1b..252401bad8 100644 --- a/TheSkyBlessing/data/api/functions/damage/core/attack.mcfunction +++ b/TheSkyBlessing/data/api/functions/damage/core/attack.mcfunction @@ -12,7 +12,4 @@ function api:damage/core/health_subtract/ # リセット scoreboard players reset $Health Temporary - scoreboard players reset $Damage Temporary - -# MP 回復 - execute if data storage api: Argument.AdditionalMPHeal if entity @s[type=!player] as @a if score @s UserID = $LatestModifiedUser UserID run function api:damage/core/mp_heal + scoreboard players reset $Damage Temporary \ No newline at end of file diff --git a/TheSkyBlessing/data/api/functions/damage/core/mp_heal.mcfunction b/TheSkyBlessing/data/api/functions/damage/core/mp_heal.mcfunction deleted file mode 100644 index 50eb62bf69..0000000000 --- a/TheSkyBlessing/data/api/functions/damage/core/mp_heal.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> api:damage/core/mp_heal -# -# -# -# @within function api:damage/core/attack - -data modify storage api: Argument.Fluctuation set from storage api: Argument.AdditionalMPHeal -data modify storage api: Argument.DisableLog set value true -function api:mp/fluctuation diff --git a/TheSkyBlessing/data/api/functions/damage/core/reset.mcfunction b/TheSkyBlessing/data/api/functions/damage/core/reset.mcfunction index d4e6d24b43..e602295a86 100644 --- a/TheSkyBlessing/data/api/functions/damage/core/reset.mcfunction +++ b/TheSkyBlessing/data/api/functions/damage/core/reset.mcfunction @@ -16,7 +16,6 @@ data remove storage api: Argument.BypassEnchantments data remove storage api: Argument.BypassResistance data remove storage api: Argument.DisableParticle data remove storage api: Argument.ReduceEnchantment -data remove storage api: Argument.AdditionalMPHeal data remove storage api: Argument.DisableLog data remove storage api: Argument.Metadata diff --git a/TheSkyBlessing/data/api/functions/damage/core/trigger_events/non-player/kill_and_death/push_from_attacker.mcfunction b/TheSkyBlessing/data/api/functions/damage/core/trigger_events/non-player/kill_and_death/push_from_attacker.mcfunction index 8ec918f502..09b3e37bb7 100644 --- a/TheSkyBlessing/data/api/functions/damage/core/trigger_events/non-player/kill_and_death/push_from_attacker.mcfunction +++ b/TheSkyBlessing/data/api/functions/damage/core/trigger_events/non-player/kill_and_death/push_from_attacker.mcfunction @@ -8,9 +8,9 @@ execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobEvents.Death[-1].From int 1 run scoreboard players get @s UserID # プレイヤーにイベントを追加する function oh_my_dat:please - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed append value {Type: "api",IsVanilla:false} - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed[-1].To int 1 run scoreboard players get $DamagerUUID Temporary - execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed[-1].Amount double 0.01 run scoreboard players get $Damage Temporary - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed[-1].AttackType set from storage api: Argument.AttackType - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed[-1].ElementType set from storage api: Argument.ElementType - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed[-1].Metadata set from storage api: Argument.Metadata + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill append value {Type: "api",IsVanilla:false} + execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill[-1].To int 1 run scoreboard players get $DamagerUUID Temporary + execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill[-1].Amount double 0.01 run scoreboard players get $Damage Temporary + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill[-1].AttackType set from storage api: Argument.AttackType + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill[-1].ElementType set from storage api: Argument.ElementType + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill[-1].Metadata set from storage api: Argument.Metadata diff --git a/TheSkyBlessing/data/asset/functions/_index.d.mcfunction b/TheSkyBlessing/data/asset/functions/_index.d.mcfunction new file mode 100644 index 0000000000..6fb5357d27 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/_index.d.mcfunction @@ -0,0 +1,6 @@ +#> asset:_index.d +# @private + +#> 処理用一時storage +# @within * asset:** + #declare storage asset:temp diff --git a/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/.mcfunction new file mode 100644 index 0000000000..b5773ba196 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/alias/65535/attack/ +# +# 神器の攻撃時の処理のエイリアス +# +# @within asset_manager:artifact/triggers/attack/attack.m + +# 元の登録処理を呼び出す + function asset:artifact/example/attack/ diff --git a/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/check.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/check.mcfunction new file mode 100644 index 0000000000..61fd555ed0 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/attack/check.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/alias/65535/attack/check +# +# 神器の攻撃時の処理のエイリアス +# +# @within asset_manager:artifact/triggers/attack/check.m + +# 元の登録処理を呼び出す + function asset:artifact/example/attack/check diff --git a/TheSkyBlessing/data/asset/functions/artifact/alias/65535/dis_equip.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/dis_equip.mcfunction new file mode 100644 index 0000000000..edaa8c8cc3 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/dis_equip.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/alias/65535/dis_equip +# +# 神器の装備解除時の処理のエイリアス +# +# @within asset_manager:artifact/triggers/dis_equip/dis_equip.m + +# 元の登録処理を呼び出す + function asset:artifact/example/dis_equip/ diff --git a/TheSkyBlessing/data/asset/functions/artifact/alias/65535/equip.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/equip.mcfunction new file mode 100644 index 0000000000..f34ccc4764 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/equip.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/alias/65535/equip +# +# 神器の装備時の処理のエイリアス +# +# @within asset_manager:artifact/triggers/equip/equip.m + +# 元の登録処理を呼び出す + function asset:artifact/example/equip/ diff --git a/TheSkyBlessing/data/asset/functions/artifact/alias/65535/register.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/register.mcfunction new file mode 100644 index 0000000000..a8d6eeb412 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/alias/65535/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/alias/65535/register +# +# 神器のデータ指定処理のエイリアス +# +# @within asset_manager:artifact/triggers/register.m + +# 元の登録処理を呼び出す + function asset:artifact/example/register diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction deleted file mode 100644 index fa00d3aa64..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/_index.d.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/common/_index.d -# @private - -#> ReturnTag -# @within function -# asset:artifact/*/*/2.check_condition -# asset:artifact/*/*/2.check_condition/** -# asset_manager:artifact/check/ -# asset:artifact/common/use/* - #declare tag CanUsed - -#> 処理用一時storage -# @within * asset:** - #declare storage asset:temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction deleted file mode 100644 index 3224b75678..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/auto.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/auto -# -# 神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'auto' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction deleted file mode 100644 index 9f3235c900..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/chest.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/chest -# -# チェストプレートの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'chest' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction deleted file mode 100644 index e9923184d9..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/feet.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/feet -# -# ブーツの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'feet' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction deleted file mode 100644 index fae76193ee..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/head.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/head -# -# ヘルメットの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'head' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction deleted file mode 100644 index ff7a3a2c4c..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/hotbar.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/hotbar -# -# ヘルメットの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'hotbar' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction deleted file mode 100644 index 9a955612e0..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/legs.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/legs -# -# レギンスの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'legs' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction deleted file mode 100644 index 28001a2e68..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/mainhand.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:artifact/common/check_condition/mainhand -# -# メインハンドの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @input as player -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'mainhand' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction deleted file mode 100644 index 2f6aa94f6b..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/check_condition/offhand.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/common/check_condition/offhand -# -# オフハンドの神器の基礎的な発動条件をチェックします -# -# 発動可能な場合実行者に`CanUsed`のtagが付与されます。 -# -# @output tag @s CanUsed -# @within function asset:artifact/*/*/2.check_condition - -data modify storage asset:artifact TargetSlot set value 'offhand' -function asset_manager:artifact/check/ \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction deleted file mode 100644 index bf46466d4e..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/give.mcfunction +++ /dev/null @@ -1,78 +0,0 @@ -#> asset:artifact/common/give -# -# 神器を入手します -# -# @input storage asset:artifact -# ID : int -# Item : ItemID -# Name : TextComponent -# Lore : TextComponent[] -# RemainingCount? : int -# Slot : Slot -# Trigger : Trigger -# Condition? : TextComponent -# EnableDuplication? : boolean -# AttackInfo? : Component -# MPCost : int -# MPRequire? : int -# CostText? : TextComponent -# LocalCooldown? : int -# TypeCooldown? : {Type: enum(CooldownType), Duration: int} -# SpecialCooldown? : int -# DisableCooldownMessage? : boolean -# DisableMPMessage? : boolean -# DisableBreakSound? : boolean -# CanUsedGod : God[] -# @output item 神器 -# @within function asset:artifact/*/give/2.give - -#> Inv -# @private -#declare score_holder $InvSize - -# storage検証 - execute unless data storage asset:artifact ID run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" ID","color":"red"}] - execute unless data storage asset:artifact Item run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Item","color":"red"}] - execute unless data storage asset:artifact Name run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Name","color":"red"}] - execute unless data storage asset:artifact Lore run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Lore","color":"red"}] - execute unless data storage asset:artifact Slot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Slot","color":"red"}] - execute unless data storage asset:artifact Trigger run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" Trigger","color":"red"}] - execute unless data storage asset:artifact MPCost unless data storage asset:artifact MPHealWhenHit run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" MPCost","color":"red"},{"text":" or","color":"white"},{"text":" MPHealWhenHit","color":"red"}] - execute unless data storage asset:artifact CanUsedGod run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"引数が足りません"},{"text":" CanUsedGod","color":"red"}] -# 各データ設定 - function asset_manager:artifact/create/set_data -# 神器排出 - execute unless data storage asset:context Type run data modify storage asset:context Type set value "give" - # execute if data storage asset:context {Type:"box"} // 何もする必要がない - execute if data storage asset:context {Type:"drop"} run loot spawn ~ ~ ~ mine 10000 0 10000 debug_stick - execute if data storage asset:context {Type:"drop",Important:true} as @e[type=item,nbt={Item:{tag:{TSB:{}}}},distance=..0.3] run function asset:artifact/common/protect - execute if data storage asset:context {Type:"give"} run function api:inventory/get_size - execute if data storage asset:context {Type:"give"} if score $InvSize Lib matches ..35 run loot give @s mine 10000 0 10000 debug_stick - execute if data storage asset:context {Type:"give"} if score $InvSize Lib matches 36.. run loot spawn ~ ~ ~ mine 10000 0 10000 debug_stick - execute if data storage asset:context {Type:"give"} if score $InvSize Lib matches 36.. as @e[type=item,nbt={Item:{tag:{TSB:{}}}},distance=..0.3] run function asset:artifact/common/protect - execute if data storage asset:context {Type:"replace"} run function asset:artifact/common/replace - -# リセット - scoreboard players reset $InvSize Lib - data remove storage asset:context Type - data remove storage asset:artifact ID - data remove storage asset:artifact Item - data remove storage asset:artifact Name - data remove storage asset:artifact Lore - data remove storage asset:artifact RemainingCount - data remove storage asset:artifact Slot - data remove storage asset:artifact Trigger - data remove storage asset:artifact Condition - data remove storage asset:artifact EnableDuplication - data remove storage asset:artifact AttackInfo - data remove storage asset:artifact MPCost - data remove storage asset:artifact MPRequire - data remove storage asset:artifact CostText - data remove storage asset:artifact CanUsedGod - data remove storage asset:artifact CustomNBT - data remove storage asset:artifact LocalCooldown - data remove storage asset:artifact TypeCooldown - data remove storage asset:artifact SpecialCooldown - data remove storage asset:artifact DisableCooldownMessage - data remove storage asset:artifact DisableMPMessage - data remove storage asset:artifact DisableBreakSound diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/protect.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/protect.mcfunction deleted file mode 100644 index 9169da8e5a..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/protect.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:artifact/common/protect -# -# -# -# @within function asset:artifact/common/give - -data modify entity @s Glowing set value true -data modify entity @s NoGravity set value true -data modify entity @s Age set value -32768 -data modify entity @s Invulnerable set value true -data modify entity @s Motion set value [0d,0d,0d] -data modify entity @s Fire set value 2s \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/replace.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/replace.mcfunction deleted file mode 100644 index f660d769ab..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/replace.mcfunction +++ /dev/null @@ -1,19 +0,0 @@ -#> asset:artifact/common/replace -# -# 直接特定Slotに神器を配置します -# -# @within function asset:artifact/common/give - -# storageチェック - execute unless data storage asset:context Slot run data modify storage asset:context Slot set value "mainhand" - -# slot指定replace - execute if data storage asset:context {Slot:"mainhand"} run item replace entity @s weapon.mainhand from block 10000 0 10000 container.0 - execute if data storage asset:context {Slot:"offhand"} run item replace entity @s weapon.offhand from block 10000 0 10000 container.0 - execute if data storage asset:context {Slot:"feet"} run item replace entity @s armor.feet from block 10000 0 10000 container.0 - execute if data storage asset:context {Slot:"legs"} run item replace entity @s armor.legs from block 10000 0 10000 container.0 - execute if data storage asset:context {Slot:"chest"} run item replace entity @s armor.chest from block 10000 0 10000 container.0 - execute if data storage asset:context {Slot:"head"} run item replace entity @s armor.head from block 10000 0 10000 container.0 - -# リセット - data remove storage asset:context Slot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction deleted file mode 100644 index 30eff10b0e..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/auto.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/auto -# -# 神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'auto' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction deleted file mode 100644 index f1d6b7467c..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/chest.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/chest -# -# チェストプレートの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'chest' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction deleted file mode 100644 index 1c0b80e92b..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/feet.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/feet -# -# ブーツの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'feet' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction deleted file mode 100644 index bae73d00a0..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/head.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/head -# -# ヘルメットの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'head' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction deleted file mode 100644 index 4050d05af7..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/hotbar.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/hotbar -# -# チェストプレートの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'hotbar' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction deleted file mode 100644 index e46b6e4b0b..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/legs.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/legs -# -# レギンスの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'legs' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction deleted file mode 100644 index a19ebaa025..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/mainhand.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/mainhand -# -# メインハンドの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'mainhand' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction deleted file mode 100644 index cf0da34146..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/common/use/offhand.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/common/use/offhand -# -# オフハンドの神器の使用時共通処理を実行します -# -# @within function asset:artifact/*/*/3.main - -data modify storage asset:artifact TargetSlot set value 'offhand' -function asset_manager:artifact/use/ -tag @s remove CanUsed \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/attack/.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/attack/.mcfunction new file mode 100644 index 0000000000..77bdd8df09 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/attack/.mcfunction @@ -0,0 +1,15 @@ +#> asset:artifact/example/attack/ +# +# 神器の攻撃時の処理 +# +# @within function asset:artifact/alias/65535/attack/ + +# VFX + execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..60] run particle dust -1 0 0 1 ~ ~1.5 ~ 0.05 1 0.05 0 150 + execute at @e[type=#lib:living,type=!player,tag=Victim,distance=..60] run playsound minecraft:entity.elder_guardian.curse player @a ~ ~ ~ 0.3 1.4 + +# 各エンティティにダメージを与える + execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..60] run function asset:artifact/example/attack/damage + +# リセット + function api:damage/reset diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/attack/check.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/attack/check.mcfunction new file mode 100644 index 0000000000..64742bcf84 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/attack/check.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/example/attack/ +# +# 神器の攻撃時の処理 +# +# @within function asset:artifact/alias/65535/attack/ + +# バニラの攻撃じゃなかったら使えないようにする + execute unless data storage asset:context Attack{IsVanilla:true} run tag @s remove CanUsed diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/attack/damage.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/attack/damage.mcfunction new file mode 100644 index 0000000000..2d0b056220 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/attack/damage.mcfunction @@ -0,0 +1,13 @@ +#> asset:artifact/example/attack/damage +# +# +# +# @within function asset:artifact/example/attack/ + +execute store result storage api: Argument.Damage float 1 run function api:mob/get_max_health +data modify storage api: Argument.AttackType set value "Physical" +data modify storage api: Argument.ElementType set value "None" +data modify storage api: Argument.FixedDamage set value 1b +execute unless data storage api: {DamageLibModified:true} as @p[tag=this] run function api:damage/modifier +execute if data storage api: {DamageLibModified:true} as @p[tag=this] run function api:damage/modifier_continuation +function api:damage/ diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/dis_equip/.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/dis_equip/.mcfunction new file mode 100644 index 0000000000..7b23649c17 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/dis_equip/.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/example/dis_equip/ +# +# 神器の装備解除時の処理 +# +# @within function asset:artifact/alias/65535/dis_equip + +# 演出 + playsound minecraft:item.armor.equip_generic player @a ~ ~ ~ 1 0.8 diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/equip/.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/equip/.mcfunction new file mode 100644 index 0000000000..ec3bcda5d1 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/equip/.mcfunction @@ -0,0 +1,14 @@ +#> asset:artifact/example/equip/ +# +# 神器の装備した時の処理 +# +# @within function asset:artifact/alias/65535/equip + +# VFX + playsound ogg:block.smithing_table.smithing_table2 player @a ~ ~ ~ 0.5 1.6 + playsound minecraft:item.armor.equip_iron player @a ~ ~ ~ 0.5 1 + playsound ogg:random.levelup player @a ~ ~ ~ 0.6 2 + particle dust 0.278 0.733 1 1 ~ ~1 ~ 0.2 0.2 0.2 0 20 + particle crit ~ ~1 ~ 0 0 0 0.5 10 + particle dust 100000000 1 1 1 ~ ~1.5 ~ 0.5 1 0.5 0 150 + playsound minecraft:block.beacon.activate player @a ~ ~ ~ 1 2 diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction deleted file mode 100644 index 56bbdc78bc..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/give/2.give.mcfunction +++ /dev/null @@ -1,53 +0,0 @@ -#> asset:artifact/example/give/2.give -# -# 神器の作成部 ここでID等を定義する -# -# @user -# @private - -# 神器の説明や消費MPなどをここで設定する。 -# 最後にasset:artifact/common/giveを実行することで入手可能。 - -data modify storage asset:artifact ID set value 2147483647 - - -data modify storage asset:artifact Item set value "minecraft:iron_sword" - -data modify storage asset:artifact Name set value '{"text":"ツルギ","color":"gray"}' - -data modify storage asset:artifact Lore set value ['{"text":"きる"}'] - -data modify storage asset:artifact CostText set value '[{"translate":"item.minecraft.iron_ingot"},{"text":"x1"}]' - -data modify storage asset:artifact RemainingCount set value 1024 - -data modify storage asset:artifact Slot set value "mainhand" - -data modify storage asset:artifact Trigger set value "onAttackByMelee" - -data modify storage asset:artifact Condition set value '{"text":"ねこ"}' - -data modify storage asset:artifact AttackInfo.Damage set value 10 -data modify storage asset:artifact AttackInfo.AttackType set value ["Physical"] -data modify storage asset:artifact AttackInfo.ElementType set value ["None"] -data modify storage asset:artifact AttackInfo.BypassResist set value 1b -data modify storage asset:artifact AttackInfo.IsRangeAttack set value "always" -data modify storage asset:artifact AttackInfo.AttackRange set value "1.5" - -# data modify storage asset:artifact MPCost set value 5 -# data modify storage asset:artifact MPRequire set value 10 - -data modify storage asset:artifact MPHealWhenHit set value 5 - -data modify storage asset:artifact LocalCooldown set value 80 - -data modify storage asset:artifact TypeCooldown.Type set value "shortRange" -data modify storage asset:artifact TypeCooldown.Duration set value 40 - -data modify storage asset:artifact SpecialCooldown set value 20 - -data modify storage asset:artifact CanUsedGod set value ["Flora","Urban","Nyaptov","Wi-ki","Rumor"] - -data modify storage asset:artifact CustomNBT set value {Unbreakable:1b,AttributeModifiers:[]} - -function asset:artifact/common/give diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/register.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/register.mcfunction new file mode 100644 index 0000000000..ae8d3860e1 --- /dev/null +++ b/TheSkyBlessing/data/asset/functions/artifact/example/register.mcfunction @@ -0,0 +1,34 @@ +#> asset:artifact/example/register +# +# 神器の作成部 ここでID等を定義する +# +# @within function asset:artifact/alias/65535/register + +data modify storage asset:artifact ID set value 65535 +data modify storage asset:artifact Item set value "minecraft:stick" +data modify storage asset:artifact Name set value '{"text":"","extra":[{"text":"イーカロス","color":"dark_red"}]}' +data modify storage asset:artifact Lore set value ['{"text":"ある地に潜む研究者の末裔が作り出した、"}','{"text":"対天使兵器の最高傑作。"}','{"text":"攻撃した敵の傷口をさらに開き、致命傷に至らせる。"}','{"text":"「いかなる犠牲によっても、","color":"gray","italic":true}','{"text":"かの翼人らを討ち滅ぼさなければならぬのだ。」","color":"gray","italic":true}'] +data modify storage asset:artifact RemainingCount set value 10 +data modify storage asset:artifact RemainingCountMax set value 20 +data modify storage asset:artifact Slot set value "hotbar" +data modify storage asset:artifact Trigger set value "attack" +data modify storage asset:artifact SubTriggers set value ["equip"] +# data modify storage asset:artifact Condition set value +data modify storage asset:artifact AttackInfo set value {Damage:["???"],AttackType:[Physical],ElementType:[None],BypassResist:true,IsRangeAttack:never} +# data modify storage asset:artifact CostText set value '{"text":""}' +data modify storage asset:artifact MPCost set value 100 +# data modify storage asset:artifact MPRequire set value +data modify storage asset:artifact LocalCooldown set value 0 +# data modify storage asset:artifact TypeCooldown set value +# data modify storage asset:artifact SpecialCooldown set value +data modify storage asset:artifact DisableCooldownMessage set value true +data modify storage asset:artifact DisableMPMessage set value true +data modify storage asset:artifact DisableBreakSound set value true +# data modify storage asset:artifact EquipID set value +data modify storage asset:artifact Modifiers set value [] +data modify storage asset:artifact Modifiers append value {Type:"attack/base",Amount:0.05d,Operation:"multiply_base",MaxStack:9} +data modify storage asset:artifact Modifiers append value {Type:"defense/base",Amount:0.05d,Operation:"multiply_base",MaxStack:9} +data modify storage asset:artifact Modifiers append value {Type:"max_health",Amount:0.025d,Operation:"multiply_base",MaxStack:9} +data modify storage asset:artifact Modifiers append value {Type:"max_mp",Amount:0.025d,Operation:"multiply_base",MaxStack:9} +data modify storage asset:artifact CanUsedGod set value "ALL" +# data modify storage asset:artifact CustomNBT set value {} diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction deleted file mode 100644 index ec9b9fc6da..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/1.trigger.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/example/trigger/1.trigger -# -# 指定したイベントタイミングで実行されるfunction -# ここで自身の神器が判定をしてmain処理を呼び出す -# -# @within tag/function asset:artifact/** - -# storage asset:context idのfeet/legs/chest/head/mainhand/offhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する - execute if data storage asset:context id{mainhand:2147483647} run function asset:artifact/example/trigger/2.check_condition diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction deleted file mode 100644 index 745a1ad3dd..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/2.check_condition.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:artifact/example/trigger/2.check_condition -# -# 神器の発動条件をチェックします -# -# @within function asset:artifact/example/trigger/1.trigger - -# 神器IDの設定 - data modify storage asset:artifact TargetID set value 2147483647 -# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く - function asset:artifact/common/check_condition/mainhand -# CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/example/trigger/3.main diff --git a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction b/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction deleted file mode 100644 index 7b9eca3036..0000000000 --- a/TheSkyBlessing/data/asset/functions/artifact/example/trigger/3.main.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -#> asset:artifact/example/trigger/3.main -# -# 神器のメイン処理部 -# -# @within function asset:artifact/example/trigger/2.check_condition - -#> health -# @private - #declare score_holder $Health - #declare score_holder $Count - -# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う - function asset:artifact/common/use/mainhand - -# ここから先は神器側の効果の処理を書く - data modify storage api: Argument.Damage set value 1 - data modify storage api: Argument.AttackType set value "Physical" - function api:damage/modifier - execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..6] run function api:damage/ - function api:damage/reset diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json deleted file mode 100644 index a956ec088a..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "values": [ - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/explosion.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack/explosion.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/explosion.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json deleted file mode 100644 index bdd084cc78..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/melee.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "asset:artifact/example/trigger/1.trigger" - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/projectile.json b/TheSkyBlessing/data/asset/tags/functions/artifact/attack/projectile.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/attack/projectile.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json b/TheSkyBlessing/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/drowning.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/drowning.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/drowning.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/explosion.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/explosion.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/explosion.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/fire.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/fire.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/fire.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/freezing.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/freezing.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/freezing.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/blocked.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/blocked.json deleted file mode 100644 index d8df97c7b4..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/blocked.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/explosion.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/explosion.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/explosion.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/melee.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/melee.json deleted file mode 100644 index d8df97c7b4..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/melee.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/projectile.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/projectile.json deleted file mode 100644 index d8df97c7b4..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/from_entity/projectile.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/lightning.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/lightning.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/lightning.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/melee.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/melee.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/melee.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/other.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/other.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/other.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/projectile.json b/TheSkyBlessing/data/asset/tags/functions/artifact/damage/projectile.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/damage/projectile.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/give.json b/TheSkyBlessing/data/asset/tags/functions/artifact/give.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/give.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/heal.json b/TheSkyBlessing/data/asset/tags/functions/artifact/heal.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/heal.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/killed.json b/TheSkyBlessing/data/asset/tags/functions/artifact/killed.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/killed.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/explosion.json b/TheSkyBlessing/data/asset/tags/functions/artifact/killed/explosion.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/explosion.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/melee.json b/TheSkyBlessing/data/asset/tags/functions/artifact/killed/melee.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/melee.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/projectile.json b/TheSkyBlessing/data/asset/tags/functions/artifact/killed/projectile.json deleted file mode 100644 index d8df97c7b4..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/killed/projectile.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/receive_heal.json b/TheSkyBlessing/data/asset/tags/functions/artifact/receive_heal.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/receive_heal.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/.json deleted file mode 100644 index 66fe5a47c6..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/10s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/10s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/10s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/1s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/1s.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/1s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/2s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/2s.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/2s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/3s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/3s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/3s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/4s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/4s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/4s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/5s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/5s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/5s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/10s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/10s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/10s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/1s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/1s.json deleted file mode 100644 index 66fe5a47c6..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/1s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/2s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/2s.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/2s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/3s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/3s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/3s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/4s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/4s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/4s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/5s.json b/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/5s.json deleted file mode 100644 index 0d17807366..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/sneak/keep/5s.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} \ No newline at end of file diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/tick.json b/TheSkyBlessing/data/asset/tags/functions/artifact/tick.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/tick.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/use_item.json b/TheSkyBlessing/data/asset/tags/functions/artifact/use_item.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/use_item.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset/tags/functions/artifact/using_item.json b/TheSkyBlessing/data/asset/tags/functions/artifact/using_item.json deleted file mode 100644 index 5c922d2bbf..0000000000 --- a/TheSkyBlessing/data/asset/tags/functions/artifact/using_item.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - - ] -} diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction index 3243085f40..590098f6a0 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/_index.d.mcfunction @@ -3,12 +3,9 @@ #> storage # @within * +# api:artifact/core/** +# asset:artifact/** # asset_manager:artifact/** -# asset:artifact/*/register -# asset:artifact/*/give/2.give -# asset:artifact/*/trigger/2.check_condition -# asset:artifact/*/trigger/3.main -# asset:artifact/common/** # player_manager:actionbar/ #declare storage asset:artifact @@ -22,28 +19,29 @@ #> Trigger検知用 # @within function -# asset_manager:artifact/triggers/** +# asset_manager:artifact/triggers/ +# asset_manager:artifact/triggers/*/ # core:handler/** #declare tag TriggerFlag.ClickCarrot #declare tag TriggerFlag.UseItem #declare tag TriggerFlag.Sneak #declare tag TriggerFlag.UsingItem - #> バニラの攻撃を扱う用 # @within function -# asset_manager:artifact/check/ -# asset_manager:artifact/triggers/attack/** -#declare tag ShouldVanillaAttack +# asset_manager:artifact/triggers/ +# asset_manager:artifact/triggers/vanilla/ +# asset_manager:artifact/triggers/attack_melee/foreach + #declare tag ShouldVanillaAttack #> check用の失敗フラグ # @within function # asset_manager:artifact/check/** #declare tag CheckFailed -#> スニークの閾値用スコアホルダー -# @within function asset_manager:artifact/triggers/sneak/* - #declare score_holder $SneakThreshold +#> スニーク用スコアホルダー +# @within function asset_manager:artifact/triggers/*sneak*/* + #declare score_holder $SneakTime #> use_itemの誤検知対策タグ # @within function @@ -59,8 +57,6 @@ #declare tag Victim #declare tag Healer #declare tag Receiver - #declare tag Equip - #declare tag DisEquip #> セレクターテンプレート # @within * asset:artifact/** @@ -74,6 +70,22 @@ #declare score_holder $Max #> リセット用 -# @within function asset_manager:artifact/triggers/equipments/update_cooldown/* +# @within function asset_manager:artifact/triggers/equipments/update_cooldown/** #declare score_holder $Tick + #declare score_holder $Max #declare score_holder $LatestUsedTick + +#> スロットの数値化 +# @within function +# asset_manager:artifact/data/new/fetch_data/* +# asset_manager:artifact/triggers/trigger/** + #declare score_holder $SlotIndex + +#> 使用条件 +# @within function +# asset:artifact/*/*/check** +# asset_manager:artifact/check/ +# asset_manager:artifact/use/ +# asset_manager:artifact/triggers/*/* +# asset_manager:artifact/triggers/trigger/foreach/exec + #declare tag CanUsed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction index a38343c933..284a03fe38 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/.mcfunction @@ -2,14 +2,8 @@ # # 実行可能かどうかのチェックを行う # -# @input -# as player -# storage asset:artifact TargetSlot : Slot -# @output tag @s CanUsed -# @within function asset:artifact/common/check_condition/* +# @within function asset_manager:artifact/triggers/*/** -# 対象スロットのデータの取得 - function asset_manager:artifact/data/current/get # 事前にtag付与 tag @s add CanUsed # 条件を満たしてなかったらtag削除 @@ -27,8 +21,8 @@ tag @s[tag=CheckFailed] remove CheckFailed # MP必要量による制限 function asset_manager:artifact/check/check_mp - execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableMPMessage:true} run tellraw @s {"text":"MPが足りない!","color":"red"} - execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableMPMessage:true} run scoreboard players set @s MPLogCD 20 + execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItem{DisableMPMessage:true} run tellraw @s {"text":"MPが足りない!","color":"red"} + execute if entity @s[tag=CheckFailed] unless score @s MPLogCD matches 0.. unless data storage asset:artifact TargetItem{DisableMPMessage:true} run scoreboard players set @s MPLogCD 20 execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed # TypeCooldownによる制限 @@ -37,17 +31,9 @@ tag @s[tag=CheckFailed] remove CheckFailed # LocalCooldownによる制限 function asset_manager:artifact/check/check_local_cooldown/ - execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableCooldownMessage:true} run tellraw @s {"text":"クールダウンが終わっていません。","color":"red"} - execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItems[0].tag.TSB{DisableCooldownMessage:true} run scoreboard players set @s LocalCDLogCD 20 - execute if entity @s[tag=CheckFailed] run tag @s remove CanUsed + execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItem{DisableCooldownMessage:true} run tellraw @s {"text":"クールダウンが終わっていません。","color":"red"} + execute if entity @s[tag=CheckFailed] unless score @s LocalCDLogCD matches 0.. unless data storage asset:artifact TargetItem{DisableCooldownMessage:true} run scoreboard players set @s LocalCDLogCD 20 + execute if entity @s[tag=CheckFailed] unless data storage asset:artifact TargetItemList[0] run tag @s remove CanUsed tag @s[tag=CheckFailed] remove CheckFailed -# 条件を満たしてない && 使用回数が存在する && トリガーがitemUse ならば使用回数を減らす - execute if entity @s[tag=!CanUsed] if data storage asset:artifact TargetItems[0].tag.TSB.RemainingCount if data storage asset:artifact TargetItems[0].tag.TSB{Trigger:"itemUse"} run function asset_manager:artifact/use/item/has_remain - -# mainhand の場合はタグを削除する - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} if data storage asset:context Attack{Type:"vanilla_melee"} run tag @s remove ShouldVanillaAttack - -# リセット - data remove storage asset:artifact TargetSlot - data remove storage asset:artifact TargetDefaultSlot - data remove storage asset:artifact TargetItems +# 条件を満たしてない && 使用回数が存在する && トリガーがuse_itemならば使用回数を減らす + execute if entity @s[tag=!CanUsed] if data storage asset:artifact TargetItem.RemainingCount if data storage asset:artifact TargetItem{Trigger:"use_item"} run function asset_manager:artifact/use/item/has_remain diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_believe.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_believe.mcfunction index 6e521ab82a..c02eca30e2 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_believe.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_believe.mcfunction @@ -7,8 +7,8 @@ # タグの事前付与 tag @s add CheckFailed # チェックに成功してたらタグを外す - execute if data storage asset:artifact TargetItems[0].tag.TSB{CanUsedGod:["Flora"]} if predicate player_manager:is_believe/flora run tag @s remove CheckFailed - execute if data storage asset:artifact TargetItems[0].tag.TSB{CanUsedGod:["Nyaptov"]} if predicate player_manager:is_believe/nyaptov run tag @s remove CheckFailed - execute if data storage asset:artifact TargetItems[0].tag.TSB{CanUsedGod:["Rumor"]} if predicate player_manager:is_believe/rumor run tag @s remove CheckFailed - execute if data storage asset:artifact TargetItems[0].tag.TSB{CanUsedGod:["Urban"]} if predicate player_manager:is_believe/urban run tag @s remove CheckFailed - execute if data storage asset:artifact TargetItems[0].tag.TSB{CanUsedGod:["Wi-ki"]} if predicate player_manager:is_believe/wi-ki run tag @s remove CheckFailed \ No newline at end of file + execute if data storage asset:artifact TargetItem{CanUsedGod:["Flora"]} if predicate player_manager:is_believe/flora run tag @s remove CheckFailed + execute if data storage asset:artifact TargetItem{CanUsedGod:["Nyaptov"]} if predicate player_manager:is_believe/nyaptov run tag @s remove CheckFailed + execute if data storage asset:artifact TargetItem{CanUsedGod:["Rumor"]} if predicate player_manager:is_believe/rumor run tag @s remove CheckFailed + execute if data storage asset:artifact TargetItem{CanUsedGod:["Urban"]} if predicate player_manager:is_believe/urban run tag @s remove CheckFailed + execute if data storage asset:artifact TargetItem{CanUsedGod:["Wi-ki"]} if predicate player_manager:is_believe/wi-ki run tag @s remove CheckFailed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction index 3efb1ae936..edce6d4ae1 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/.mcfunction @@ -6,11 +6,12 @@ #> TickScore # @within function asset_manager:artifact/check/check_local_cooldown/* -#declare score_holder $Tick + #declare score_holder $Tick # データをコピー - data modify storage asset:artifact CopiedItem set from storage asset:artifact TargetItems + data modify storage asset:artifact CopiedItemList set from storage asset:artifact TargetItemList + data modify storage asset:artifact TargetItemList set value [] # すべての要素についてチェックする function asset_manager:artifact/check/check_local_cooldown/foreach # リセット - data remove storage asset:artifact CopiedItem + data remove storage asset:artifact CopiedItemList diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction index 62b4989071..9c588be061 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_local_cooldown/foreach.mcfunction @@ -12,17 +12,18 @@ # 時間を取得 execute store result score $Tick Temporary run time query gametime # 最後に使用したtickとLocalCooldownを取得 - execute store result score $LatestUsedTick Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.LatestUseTick - execute store result score $Cooldown Temporary run data get storage asset:artifact CopiedItem[-1].tag.TSB.LocalCooldown + execute store result score $LatestUsedTick Temporary run data get storage asset:artifact CopiedItemList[-1].LatestUseTick + execute store result score $Cooldown Temporary run data get storage asset:artifact CopiedItemList[-1].LocalCooldown # 減算 scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary # 比較 + execute if score $Tick Temporary >= $Cooldown Temporary run data modify storage asset:artifact TargetItemList append from storage asset:artifact CopiedItemList[-1] execute unless score $Tick Temporary >= $Cooldown Temporary run tag @s add CheckFailed # 末尾削除 - data remove storage asset:artifact CopiedItem[-1] + data remove storage asset:artifact CopiedItemList[-1] # リセット scoreboard players reset $Cooldown Temporary scoreboard players reset $LatestUsedTick Temporary scoreboard players reset $Tick Temporary # 要素がまだあるなら再帰 - execute if data storage asset:artifact CopiedItem[0] run function asset_manager:artifact/check/check_local_cooldown/foreach + execute if data storage asset:artifact CopiedItemList[0] run function asset_manager:artifact/check/check_local_cooldown/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction index 4422080dcc..69bbaf9ed0 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_mp.mcfunction @@ -9,8 +9,8 @@ #declare score_holder $Length # MP必要量を取得 - execute if data storage asset:artifact TargetItems[0].tag.TSB.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPRequire - execute unless data storage asset:artifact TargetItems[0].tag.TSB.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPCost + execute if data storage asset:artifact TargetItem.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPRequire + execute unless data storage asset:artifact TargetItem.MPRequire run data modify storage api: Argument.Threshold set from storage asset:artifact TargetItems[-1].tag.TSB.MPCost # アイテム数だけ増やす # execute store result score $Length Temporary if data storage asset:artifact TargetItems[] # scoreboard players operation $CheckMP Lib *= $Length Temporary @@ -19,4 +19,4 @@ # タグ付与 execute unless data storage api: Return{IsThresholdOrMore:true} run tag @s add CheckFailed # リセット - scoreboard players reset $Length Temporary \ No newline at end of file + scoreboard players reset $Length Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction index 95d6a2e5d6..b3d0ce8207 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_special_cooldown.mcfunction @@ -5,4 +5,4 @@ # @within function asset_manager:artifact/check/ # 特殊クールダウンが存在する∧$ArtifactSpecialCooldownが1以上ならタグ付与 // Item.tag.TSB.SpecialCooldown && $ArtifactSpecialCooldown >= 1 - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown if score $ArtifactSpecialCooldown Global matches 1.. run tag @s add CheckFailed \ No newline at end of file + execute if data storage asset:artifact TargetItem.SpecialCooldown if score $ArtifactSpecialCooldown Global matches 1.. run tag @s add CheckFailed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/.mcfunction index b7e4c2f759..95a5ca0995 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/.mcfunction @@ -4,11 +4,18 @@ # # @within function asset_manager:artifact/check/ -# データをコピー - data modify storage asset:artifact CopiedItem set from storage asset:artifact TargetItems +#> private +# @private + #declare score_holder $Duration + # プレイヤーの TypeCooldown 現在値を取得するために EntityStorage を呼び出す function oh_my_dat:please -# すべての要素についてチェックする - function asset_manager:artifact/check/check_type_cooldown/foreach + +# その神器に該当する種別クールダウンの現在値を取得する + scoreboard players set $Duration Temporary -15 + execute if data storage asset:artifact TargetItem.TypeCooldown store result score $Duration Temporary run function asset_manager:artifact/check/check_type_cooldown/get_duration.m with storage asset:artifact TargetItem.TypeCooldown +# クールダウンが終わっていなければタグを付与する + execute if score $Duration Temporary matches 1.. run tag @s add CheckFailed + # リセット - data remove storage asset:artifact CopiedItem + scoreboard players reset $Duration Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/foreach.mcfunction deleted file mode 100644 index a3760d9759..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/foreach.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/check/check_type_cooldown/foreach -# -# -# -# @within function -# asset_manager:artifact/check/check_type_cooldown/ -# asset_manager:artifact/check/check_type_cooldown/foreach - -#> Private -# @within function -# asset_manager:artifact/check/check_type_cooldown/foreach -# asset_manager:artifact/check/check_type_cooldown/check_duration.m -#declare score_holder $Duration - -# その神器に該当する種別クールダウンの現在値を取得する - scoreboard players set $Duration Temporary -15 - execute if data storage asset:artifact CopiedItem[-1].tag.TSB.TypeCooldown store result score $Duration Temporary run function asset_manager:artifact/check/check_type_cooldown/get_duration.m with storage asset:artifact CopiedItem[-1].tag.TSB.TypeCooldown -# クールダウンが終わっていなければタグを付与する - execute if score $Duration Temporary matches 1.. run tag @s add CheckFailed - -# 末尾削除 - data remove storage asset:artifact CopiedItem[-1] -# リセット - scoreboard players reset $Duration Temporary -# 要素がまだあるなら再帰 - execute if data storage asset:artifact CopiedItem[0] run function asset_manager:artifact/check/check_type_cooldown/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/get_duration.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/get_duration.m.mcfunction index 41ac725e2a..0985e144c7 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/get_duration.m.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/check/check_type_cooldown/get_duration.m.mcfunction @@ -1,8 +1,7 @@ #> asset_manager:artifact/check/check_type_cooldown/get_duration.m # # -# @input args -# Type: string -# @within function asset_manager:artifact/check/check_type_cooldown/foreach +# @input args Type: string +# @within function asset_manager:artifact/check/check_type_cooldown/ $return run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TypeCooldown[{Type:$(Type)}].Value diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/.mcfunction index b467f09a4c..809580d74d 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/.mcfunction @@ -4,7 +4,7 @@ # # @within function asset_manager:artifact/tick/player -#! LocalCoolDown +#! LocalCooldown # 0. offhand # 1. feet # 2. legs diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/decrement/local/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/decrement/local/.mcfunction index 66681baa9b..b5f5f39199 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/decrement/local/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/decrement/local/.mcfunction @@ -5,7 +5,7 @@ # @within function asset_manager:artifact/cooldown/ # コピーする - data modify storage asset:artifact LCDs set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown + data modify storage asset:artifact LCDs set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown # 各スロットの CD をデクリメントする LCDs(normal) -> DecrementedLCDs(inverted) function asset_manager:artifact/cooldown/decrement/local/foreach # 反転させる DecrementedLCDs(inverted) -> LCDs(normal) @@ -15,7 +15,7 @@ data modify storage asset:artifact LCDs set from storage lib: Array function lib:array/session/close # 元に戻す - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown set from storage asset:artifact LCDs + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown set from storage asset:artifact LCDs # リセット data remove storage asset:artifact DecrementedLCDs data remove storage asset:artifact NormalizedLCDs diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/main_bar/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/main_bar/.mcfunction index 520eb13e9c..962399d27b 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/main_bar/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/cooldown/main_bar/.mcfunction @@ -8,15 +8,15 @@ function api:data_get/selected_item_slot # 該当のローカルクールダウンを取得する - execute if data storage api: {SelectedItemSlot:0} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[5] - execute if data storage api: {SelectedItemSlot:1} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[6] - execute if data storage api: {SelectedItemSlot:2} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[7] - execute if data storage api: {SelectedItemSlot:3} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[8] - execute if data storage api: {SelectedItemSlot:4} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[9] - execute if data storage api: {SelectedItemSlot:5} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10] - execute if data storage api: {SelectedItemSlot:6} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11] - execute if data storage api: {SelectedItemSlot:7} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12] - execute if data storage api: {SelectedItemSlot:8} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13] + execute if data storage api: {SelectedItemSlot:0} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[5] + execute if data storage api: {SelectedItemSlot:1} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[6] + execute if data storage api: {SelectedItemSlot:2} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[7] + execute if data storage api: {SelectedItemSlot:3} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[8] + execute if data storage api: {SelectedItemSlot:4} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[9] + execute if data storage api: {SelectedItemSlot:5} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[10] + execute if data storage api: {SelectedItemSlot:6} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[11] + execute if data storage api: {SelectedItemSlot:7} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[12] + execute if data storage api: {SelectedItemSlot:8} run data modify storage asset:artifact LCD set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[13] # 該当の種別クールダウンを取得する execute if data storage api: {SelectedItemSlot:0} run data modify storage asset:artifact CooldownType.Type set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[5] diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/init.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/init.mcfunction deleted file mode 100644 index 99f4eba439..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/init.mcfunction +++ /dev/null @@ -1,18 +0,0 @@ -#> asset_manager:artifact/data/current/equips/init -# -# -# -# @within function -# asset_manager:artifact/data/*/revert_from_current -# asset_manager:artifact/triggers/equipments/mask_slot/ - -# 初期化 - data modify storage asset:artifact Equipments set value [] -# 適用 - data modify storage asset:artifact Equipments append from storage asset:context id.mainhand - data modify storage asset:artifact Equipments append from storage asset:context id.offhand - data modify storage asset:artifact Equipments append from storage asset:context id.feet - data modify storage asset:artifact Equipments append from storage asset:context id.legs - data modify storage asset:artifact Equipments append from storage asset:context id.chest - data modify storage asset:artifact Equipments append from storage asset:context id.head - data modify storage asset:artifact Equipments append from storage asset:context id.hotbar[] \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/merge.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/merge.mcfunction deleted file mode 100644 index 1b45af961e..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/merge.mcfunction +++ /dev/null @@ -1,18 +0,0 @@ -#> asset_manager:artifact/data/current/equips/merge -# -# Equipments <- MaskEquips -# -# @within function -# asset_manager:artifact/data/*/revert_from_current -# asset_manager:artifact/data/current/equips/merge - -# そのまま扱えないので取得 - execute store result storage asset:artifact LatestMaskEquipID int 1 run data get storage asset:artifact MaskEquips[-1] -# 末尾要素に応じて追加するものを変える - execute if data storage asset:artifact {LatestMaskEquipID:-1} run data modify storage asset:artifact NewEquips append from storage asset:artifact Equipments[-1] - execute unless data storage asset:artifact {LatestMaskEquipID:-1} run data modify storage asset:artifact NewEquips append from storage asset:artifact MaskEquips[-1] -# 末尾削除 - data remove storage asset:artifact MaskEquips[-1] - data remove storage asset:artifact Equipments[-1] -# 要素がまだあるなら再帰 - execute if data storage asset:artifact MaskEquips[0] if data storage asset:artifact Equipments[0] run function asset_manager:artifact/data/current/equips/merge \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/replace.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/replace.mcfunction deleted file mode 100644 index c83b896838..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/equips/replace.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/data/current/equips/replace -# -# -# -# @within function -# asset_manager:artifact/data/*/revert_from_current -# asset_manager:artifact/triggers/equipments/mask_slot/ - -# 適用 - data modify storage asset:context id.hotbar[8] set from storage asset:artifact NewEquips[0] - data modify storage asset:context id.hotbar[7] set from storage asset:artifact NewEquips[1] - data modify storage asset:context id.hotbar[6] set from storage asset:artifact NewEquips[2] - data modify storage asset:context id.hotbar[5] set from storage asset:artifact NewEquips[3] - data modify storage asset:context id.hotbar[4] set from storage asset:artifact NewEquips[4] - data modify storage asset:context id.hotbar[3] set from storage asset:artifact NewEquips[5] - data modify storage asset:context id.hotbar[2] set from storage asset:artifact NewEquips[6] - data modify storage asset:context id.hotbar[1] set from storage asset:artifact NewEquips[7] - data modify storage asset:context id.hotbar[0] set from storage asset:artifact NewEquips[8] - data modify storage asset:context id.head set from storage asset:artifact NewEquips[9] - data modify storage asset:context id.chest set from storage asset:artifact NewEquips[10] - data modify storage asset:context id.legs set from storage asset:artifact NewEquips[11] - data modify storage asset:context id.feet set from storage asset:artifact NewEquips[12] - data modify storage asset:context id.offhand set from storage asset:artifact NewEquips[13] - data modify storage asset:context id.mainhand set from storage asset:artifact NewEquips[14] -# リセット - data remove storage asset:artifact NewEquips \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/filter.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/filter.mcfunction deleted file mode 100644 index 29b6e0c896..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/filter.mcfunction +++ /dev/null @@ -1,23 +0,0 @@ -#> asset_manager:artifact/data/current/filter -# -# -# -# @within function -# asset_manager:artifact/data/current/get -# asset_manager:artifact/data/current/filter - -#> Private -# @private -#declare score_holder $nonIDEquals - -# 比較 - data modify storage asset:artifact Temp set from storage asset:artifact TargetID - execute store success score $nonIDEquals Temporary run data modify storage asset:artifact Temp set from storage asset:artifact HotbarItems[-1].tag.TSB.ID -# 一致してたら追加 - execute if score $nonIDEquals Temporary matches 0 run data modify storage asset:artifact TargetItems append from storage asset:artifact HotbarItems[-1] -# リセット - scoreboard players reset $nonIDEquals Temporary - data remove storage asset:artifact Temp - data remove storage asset:artifact HotbarItems[-1] -# 要素が残ってたら再帰 - execute if data storage asset:artifact HotbarItems[0] run function asset_manager:artifact/data/current/filter \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/get.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/get.mcfunction deleted file mode 100644 index d5cada7ce9..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/get.mcfunction +++ /dev/null @@ -1,32 +0,0 @@ -#> asset_manager:artifact/data/current/get -# -# TargetSlotを元にプレイヤーのデータを取得する -# -# @input -# as player -# storage asset:artifact TargetSlot : Slot -# @output storage asset:artifact -# Item : [ItemData] -# TargetDefaultSlot : Slot -# @within function -# asset_manager:artifact/check/ -# asset_manager:artifact/use/ - -# autoで無い場合はそのままDefaultSlotに突っ込む - execute unless data storage asset:artifact {TargetSlot:"auto"} run data modify storage asset:artifact TargetDefaultSlot set from storage asset:artifact TargetSlot -# autoの場合の処理 - execute if data storage asset:artifact {TargetSlot:"auto"} run data modify storage asset:artifact TargetDefaultSlot set from storage asset:context Items.AutoSlot - execute if data storage asset:artifact {TargetSlot:"auto"} unless data storage asset:context Items.AutoSlot run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"autoはこのトリガーでは実行できません","color":"white"}] - execute if data storage asset:artifact {TargetSlot:"auto"} unless data storage asset:context Items.AutoSlot run data modify storage asset:artifact TargetDefaultSlot set value 'mainhand' - -# 取得 - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.mainhand - execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.offhand - execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.feet - execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.legs - execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.chest - execute if data storage asset:artifact {TargetDefaultSlot:"head"} run data modify storage asset:artifact TargetItems append from storage asset:context Items.head - - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run data modify storage asset:artifact HotbarItems set from storage asset:context Items.hotbar - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/data/current/filter - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run data remove storage asset:artifact HotbarItems \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/reset.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/reset.mcfunction deleted file mode 100644 index 18de7be53c..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/reset.mcfunction +++ /dev/null @@ -1,13 +0,0 @@ -#> asset_manager:artifact/data/current/reset -# -# currentデータをリセットします -# -# @within function -# asset_manager:artifact/data/*/*_current -# asset_manager:artifact/triggers/ - -# リセット - data remove storage asset:context Inventory - data remove storage asset:context SelectedItemSlot - data remove storage asset:context Items - data remove storage asset:context id \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/.mcfunction deleted file mode 100644 index 483c37d810..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -#> asset_manager:artifact/data/current/update/ -# -# Itemを元にcurrentデータを更新する -# -# @input storage asset:artifact ProcessedItem : SlottedItem -# @within function -# asset_manager:artifact/use/item/update -# asset_manager:artifact/use/item/break - -# ターゲットスロットを設定する - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run data modify storage asset:artifact SpecificTargetSlot set from storage asset:artifact ProcessedItem.Slot - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} store result storage asset:artifact SpecificTargetSlot byte 1 run data get storage asset:context SelectedItemSlot -# 存在するときの処理 - execute if data storage asset:artifact ProcessedItem if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/data/current/update/when_modified/hotbar - execute if data storage asset:artifact ProcessedItem unless data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/data/current/update/when_modified/non-hotbar -# 削除されたときの処理 - execute unless data storage asset:artifact ProcessedItem if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/data/current/update/when_removed/hotbar - execute unless data storage asset:artifact ProcessedItem unless data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/data/current/update/when_removed/non-hotbar -# リセット - data remove storage asset:artifact ProcessedItem \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/hotbar.mcfunction deleted file mode 100644 index bb2a721634..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/hotbar.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -#> asset_manager:artifact/data/current/update/when_modified/hotbar -# -# -# -# @within function -# asset_manager:artifact/data/current/update/ -# asset_manager:artifact/data/current/update/when_modified/non-hotbar - -# 設定 - execute if data storage asset:artifact {SpecificTargetSlot:0b} run data modify storage asset:context Items.hotbar[{Slot:0b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:1b} run data modify storage asset:context Items.hotbar[{Slot:1b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:2b} run data modify storage asset:context Items.hotbar[{Slot:2b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:3b} run data modify storage asset:context Items.hotbar[{Slot:3b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:4b} run data modify storage asset:context Items.hotbar[{Slot:4b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:5b} run data modify storage asset:context Items.hotbar[{Slot:5b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:6b} run data modify storage asset:context Items.hotbar[{Slot:6b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:7b} run data modify storage asset:context Items.hotbar[{Slot:7b}] set from storage asset:artifact ProcessedItem - execute if data storage asset:artifact {SpecificTargetSlot:8b} run data modify storage asset:context Items.hotbar[{Slot:8b}] set from storage asset:artifact ProcessedItem -# リセット - data remove storage asset:artifact SpecificTargetSlot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/non-hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/non-hotbar.mcfunction deleted file mode 100644 index 7a780fcb4c..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_modified/non-hotbar.mcfunction +++ /dev/null @@ -1,13 +0,0 @@ -#> asset_manager:artifact/data/current/update/when_modified/non-hotbar -# -# Itemが存在するときの更新処理 -# -# @within function asset_manager:artifact/data/current/update/ - -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage asset:context Items.mainhand set from storage asset:artifact ProcessedItem -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function asset_manager:artifact/data/current/update/when_modified/hotbar -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run data modify storage asset:context Items.offhand set from storage asset:artifact ProcessedItem -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run data modify storage asset:context Items.feet set from storage asset:artifact ProcessedItem -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run data modify storage asset:context Items.legs set from storage asset:artifact ProcessedItem -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run data modify storage asset:context Items.chest set from storage asset:artifact ProcessedItem -execute if data storage asset:artifact {TargetDefaultSlot:"head"} run data modify storage asset:context Items.head set from storage asset:artifact ProcessedItem \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/hotbar.mcfunction deleted file mode 100644 index a843167300..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/hotbar.mcfunction +++ /dev/null @@ -1,45 +0,0 @@ -#> asset_manager:artifact/data/current/update/when_removed/hotbar -# -# -# -# @within function -# asset_manager:artifact/data/current/update/ -# asset_manager:artifact/data/current/update/when_removed/non-hotbar - -execute if data storage asset:artifact {SpecificTargetSlot:0b} run data modify storage asset:context Items.hotbar[0] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:0b} run data modify storage asset:context id.hotbar[0] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:0b} run data modify storage asset:context id.all.hotbar[0] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:1b} run data modify storage asset:context Items.hotbar[1] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:1b} run data modify storage asset:context id.hotbar[1] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:1b} run data modify storage asset:context id.all.hotbar[1] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:2b} run data modify storage asset:context Items.hotbar[2] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:2b} run data modify storage asset:context id.hotbar[2] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:2b} run data modify storage asset:context id.all.hotbar[2] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:3b} run data modify storage asset:context Items.hotbar[3] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:3b} run data modify storage asset:context id.hotbar[3] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:3b} run data modify storage asset:context id.all.hotbar[3] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:4b} run data modify storage asset:context Items.hotbar[4] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:4b} run data modify storage asset:context id.hotbar[4] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:4b} run data modify storage asset:context id.all.hotbar[4] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:5b} run data modify storage asset:context Items.hotbar[5] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:5b} run data modify storage asset:context id.hotbar[5] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:5b} run data modify storage asset:context id.all.hotbar[5] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:6b} run data modify storage asset:context Items.hotbar[6] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:6b} run data modify storage asset:context id.hotbar[6] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:6b} run data modify storage asset:context id.all.hotbar[6] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:7b} run data modify storage asset:context Items.hotbar[7] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:7b} run data modify storage asset:context id.hotbar[7] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:7b} run data modify storage asset:context id.all.hotbar[7] set value -2 - -execute if data storage asset:artifact {SpecificTargetSlot:8b} run data modify storage asset:context Items.hotbar[8] set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {SpecificTargetSlot:8b} run data modify storage asset:context id.hotbar[8] set value -2 -execute if data storage asset:artifact {SpecificTargetSlot:8b} run data modify storage asset:context id.all.hotbar[8] set value -2 - -data remove storage asset:artifact SpecificTargetSlot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/non-hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/non-hotbar.mcfunction deleted file mode 100644 index f244f32b76..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/current/update/when_removed/non-hotbar.mcfunction +++ /dev/null @@ -1,33 +0,0 @@ -#> asset_manager:artifact/data/current/update/when_removed/non-hotbar -# -# Itemが削除されたときの更新処理 -# -# @within function asset_manager:artifact/data/current/update/ - -execute if data storage asset:artifact {TargetSlot:"auto"} run data modify storage asset:context id.auto set value -2 -execute if data storage asset:artifact {TargetSlot:"auto"} run data modify storage asset:context id.all.auto set value -2 - -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage asset:context Items.mainhand set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage asset:context id.mainhand set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage asset:context id.all.mainhand set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function asset_manager:artifact/data/current/update/when_removed/hotbar - -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run data modify storage asset:context Items.offhand set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run data modify storage asset:context id.offhand set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run data modify storage asset:context id.all.offhand set value -2 - -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run data modify storage asset:context Items.feet set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run data modify storage asset:context id.feet set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run data modify storage asset:context id.all.feet set value -2 - -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run data modify storage asset:context Items.legs set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run data modify storage asset:context id.legs set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run data modify storage asset:context id.all.legs set value -2 - -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run data modify storage asset:context Items.chest set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run data modify storage asset:context id.chest set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run data modify storage asset:context id.all.chest set value -2 - -execute if data storage asset:artifact {TargetDefaultSlot:"head"} run data modify storage asset:context Items.head set value {tag:{TSB:{ID:-2,UUID:-2,LocalCooldown:0}}} -execute if data storage asset:artifact {TargetDefaultSlot:"head"} run data modify storage asset:context id.head set value -2 -execute if data storage asset:artifact {TargetDefaultSlot:"head"} run data modify storage asset:context id.all.head set value -2 \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/.mcfunction index 986547bfbc..d57285d751 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/.mcfunction @@ -7,15 +7,15 @@ # セッションを開く function lib:array/session/open # データを用意する - data modify storage asset:context New.ItemData set value [] + data modify storage asset:artifact New.ItemData set value [] # idを取得する - data modify storage lib: Array append from storage asset:context New.Items.mainhand.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.offhand.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.feet.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.legs.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.chest.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.head.tag.TSB - data modify storage lib: Array append from storage asset:context New.Items.hotbar[].tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.mainhand.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.offhand.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.feet.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.legs.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.chest.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.head.tag.TSB + data modify storage lib: Array append from storage asset:artifact New.Items.hotbar[].tag.TSB # 反転 function lib:array/reverse # id毎にデータを取得する diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/foreach.mcfunction index 471c45ba57..ee730cb558 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/fetch_data/foreach.mcfunction @@ -23,11 +23,11 @@ # Slotが一致しているか確認する execute store success score $InvalidSlot Temporary run data modify storage lib: Array[-1].Slot set from storage asset:artifact Enum.Slot # データが正しそうなら引っ張り出す - data modify storage asset:context New.ItemData append value {} - execute if score $ID Temporary matches 1.. unless score $InvalidSlot Temporary matches 1.. run data modify storage asset:context New.ItemData[-1] set from storage lib: Array[-1] + data modify storage asset:artifact New.ItemData append value {} + execute if score $ID Temporary matches 1.. unless score $InvalidSlot Temporary matches 1.. run data modify storage asset:artifact New.ItemData[-1] set from storage lib: Array[-1] # データが正しくなさそうならさようなら - execute if score $ID Temporary matches ..0 run data modify storage asset:context New.ItemData[-1] set value {ID:-2,UUID:-2} - execute unless data storage asset:context New.ItemData[-1].ID run data modify storage asset:context New.ItemData[-1] set value {ID:-2,UUID:-2} + execute if score $ID Temporary matches ..0 run data modify storage asset:artifact New.ItemData[-1] set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.ItemData[-1].ID run data modify storage asset:artifact New.ItemData[-1] set value {ID:-2,UUID:-2} # 要素を削除し、残っていたら再帰する scoreboard players reset $ID Temporary scoreboard players reset $InvalidSlot Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/init.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/init.mcfunction index d4c042bceb..96422b2db6 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/init.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/init.mcfunction @@ -5,68 +5,68 @@ # @within asset_manager:artifact/triggers/ # 初期化 - data remove storage asset:context New + data remove storage asset:artifact New # Inventory function api:data_get/inventory - data modify storage asset:context New.Inventory set from storage api: Inventory + data modify storage asset:artifact New.Inventory set from storage api: Inventory # SelectedItemSlot function api:data_get/selected_item_slot - data modify storage asset:context New.SelectedItemSlot set from storage api: SelectedItemSlot + data modify storage asset:artifact New.SelectedItemSlot set from storage api: SelectedItemSlot # Items function api:data_get/selected_item - data modify storage asset:context New.Items.mainhand set from storage api: SelectedItem - data modify storage asset:context New.Items.offhand set from storage asset:context New.Inventory[{Slot:-106b}] - data modify storage asset:context New.Items.feet set from storage asset:context New.Inventory[{Slot:100b}] - data modify storage asset:context New.Items.legs set from storage asset:context New.Inventory[{Slot:101b}] - data modify storage asset:context New.Items.chest set from storage asset:context New.Inventory[{Slot:102b}] - data modify storage asset:context New.Items.head set from storage asset:context New.Inventory[{Slot:103b}] + data modify storage asset:artifact New.Items.mainhand set from storage api: SelectedItem + data modify storage asset:artifact New.Items.offhand set from storage asset:artifact New.Inventory[{Slot:-106b}] + data modify storage asset:artifact New.Items.feet set from storage asset:artifact New.Inventory[{Slot:100b}] + data modify storage asset:artifact New.Items.legs set from storage asset:artifact New.Inventory[{Slot:101b}] + data modify storage asset:artifact New.Items.chest set from storage asset:artifact New.Inventory[{Slot:102b}] + data modify storage asset:artifact New.Items.head set from storage asset:artifact New.Inventory[{Slot:103b}] - execute if data storage asset:context New.Inventory[{Slot:0b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:0b}] - execute unless data storage asset:context New.Inventory[{Slot:0b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:0b} - execute if data storage asset:context New.Inventory[{Slot:1b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:1b}] - execute unless data storage asset:context New.Inventory[{Slot:1b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:1b} - execute if data storage asset:context New.Inventory[{Slot:2b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:2b}] - execute unless data storage asset:context New.Inventory[{Slot:2b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:2b} - execute if data storage asset:context New.Inventory[{Slot:3b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:3b}] - execute unless data storage asset:context New.Inventory[{Slot:3b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:3b} - execute if data storage asset:context New.Inventory[{Slot:4b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:4b}] - execute unless data storage asset:context New.Inventory[{Slot:4b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:4b} - execute if data storage asset:context New.Inventory[{Slot:5b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:5b}] - execute unless data storage asset:context New.Inventory[{Slot:5b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:5b} - execute if data storage asset:context New.Inventory[{Slot:6b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:6b}] - execute unless data storage asset:context New.Inventory[{Slot:6b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:6b} - execute if data storage asset:context New.Inventory[{Slot:7b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:7b}] - execute unless data storage asset:context New.Inventory[{Slot:7b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:7b} - execute if data storage asset:context New.Inventory[{Slot:8b}] run data modify storage asset:context New.Items.hotbar append from storage asset:context New.Inventory[{Slot:8b}] - execute unless data storage asset:context New.Inventory[{Slot:8b}] run data modify storage asset:context New.Items.hotbar append value {id:"none",Slot:8b} + execute if data storage asset:artifact New.Inventory[{Slot:0b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:0b}] + execute unless data storage asset:artifact New.Inventory[{Slot:0b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:0b} + execute if data storage asset:artifact New.Inventory[{Slot:1b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:1b}] + execute unless data storage asset:artifact New.Inventory[{Slot:1b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:1b} + execute if data storage asset:artifact New.Inventory[{Slot:2b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:2b}] + execute unless data storage asset:artifact New.Inventory[{Slot:2b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:2b} + execute if data storage asset:artifact New.Inventory[{Slot:3b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:3b}] + execute unless data storage asset:artifact New.Inventory[{Slot:3b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:3b} + execute if data storage asset:artifact New.Inventory[{Slot:4b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:4b}] + execute unless data storage asset:artifact New.Inventory[{Slot:4b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:4b} + execute if data storage asset:artifact New.Inventory[{Slot:5b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:5b}] + execute unless data storage asset:artifact New.Inventory[{Slot:5b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:5b} + execute if data storage asset:artifact New.Inventory[{Slot:6b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:6b}] + execute unless data storage asset:artifact New.Inventory[{Slot:6b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:6b} + execute if data storage asset:artifact New.Inventory[{Slot:7b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:7b}] + execute unless data storage asset:artifact New.Inventory[{Slot:7b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:7b} + execute if data storage asset:artifact New.Inventory[{Slot:8b}] run data modify storage asset:artifact New.Items.hotbar append from storage asset:artifact New.Inventory[{Slot:8b}] + execute unless data storage asset:artifact New.Inventory[{Slot:8b}] run data modify storage asset:artifact New.Items.hotbar append value {id:"none",Slot:8b} # NullCheck - execute unless data storage asset:context New.Items.mainhand run data modify storage asset:context New.Items.mainhand set value {} - execute unless data storage asset:context New.Items.offhand run data modify storage asset:context New.Items.offhand set value {} - execute unless data storage asset:context New.Items.feet run data modify storage asset:context New.Items.feet set value {} - execute unless data storage asset:context New.Items.legs run data modify storage asset:context New.Items.legs set value {} - execute unless data storage asset:context New.Items.chest run data modify storage asset:context New.Items.chest set value {} - execute unless data storage asset:context New.Items.head run data modify storage asset:context New.Items.head set value {} + execute unless data storage asset:artifact New.Items.mainhand run data modify storage asset:artifact New.Items.mainhand set value {} + execute unless data storage asset:artifact New.Items.offhand run data modify storage asset:artifact New.Items.offhand set value {} + execute unless data storage asset:artifact New.Items.feet run data modify storage asset:artifact New.Items.feet set value {} + execute unless data storage asset:artifact New.Items.legs run data modify storage asset:artifact New.Items.legs set value {} + execute unless data storage asset:artifact New.Items.chest run data modify storage asset:artifact New.Items.chest set value {} + execute unless data storage asset:artifact New.Items.head run data modify storage asset:artifact New.Items.head set value {} # 非TSBアイテムのNullCheck - execute unless data storage asset:context New.Items.mainhand.tag.TSB.ID run data modify storage asset:context New.Items.mainhand.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.offhand.tag.TSB.ID run data modify storage asset:context New.Items.offhand.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.feet.tag.TSB.ID run data modify storage asset:context New.Items.feet.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.legs.tag.TSB.ID run data modify storage asset:context New.Items.legs.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.chest.tag.TSB.ID run data modify storage asset:context New.Items.chest.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.head.tag.TSB.ID run data modify storage asset:context New.Items.head.tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[0].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[0].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[1].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[1].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[2].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[2].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[3].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[3].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[4].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[4].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[5].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[5].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[6].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[6].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[7].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[7].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} - execute unless data storage asset:context New.Items.hotbar[8].tag.TSB.ID run data modify storage asset:context New.Items.hotbar[8].tag.TSB set value {ID:-2,UUID:-2,LocalCooldown:0} + execute unless data storage asset:artifact New.Items.mainhand.tag.TSB.ID run data modify storage asset:artifact New.Items.mainhand.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.offhand.tag.TSB.ID run data modify storage asset:artifact New.Items.offhand.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.feet.tag.TSB.ID run data modify storage asset:artifact New.Items.feet.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.legs.tag.TSB.ID run data modify storage asset:artifact New.Items.legs.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.chest.tag.TSB.ID run data modify storage asset:artifact New.Items.chest.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.head.tag.TSB.ID run data modify storage asset:artifact New.Items.head.tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[0].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[0].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[1].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[1].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[2].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[2].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[3].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[3].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[4].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[4].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[5].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[5].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[6].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[6].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[7].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[7].tag.TSB set value {ID:-2,UUID:-2} + execute unless data storage asset:artifact New.Items.hotbar[8].tag.TSB.ID run data modify storage asset:artifact New.Items.hotbar[8].tag.TSB set value {ID:-2,UUID:-2} # id - data modify storage asset:context New.id.mainhand set from storage asset:context New.Items.mainhand.tag.TSB.ID - data modify storage asset:context New.id.offhand set from storage asset:context New.Items.offhand.tag.TSB.ID - data modify storage asset:context New.id.feet set from storage asset:context New.Items.feet.tag.TSB.ID - data modify storage asset:context New.id.legs set from storage asset:context New.Items.legs.tag.TSB.ID - data modify storage asset:context New.id.chest set from storage asset:context New.Items.chest.tag.TSB.ID - data modify storage asset:context New.id.head set from storage asset:context New.Items.head.tag.TSB.ID - data modify storage asset:context New.id.hotbar append from storage asset:context New.Items.hotbar[].tag.TSB.ID \ No newline at end of file + data modify storage asset:artifact New.id.mainhand set from storage asset:artifact New.Items.mainhand.tag.TSB.ID + data modify storage asset:artifact New.id.offhand set from storage asset:artifact New.Items.offhand.tag.TSB.ID + data modify storage asset:artifact New.id.feet set from storage asset:artifact New.Items.feet.tag.TSB.ID + data modify storage asset:artifact New.id.legs set from storage asset:artifact New.Items.legs.tag.TSB.ID + data modify storage asset:artifact New.id.chest set from storage asset:artifact New.Items.chest.tag.TSB.ID + data modify storage asset:artifact New.id.head set from storage asset:artifact New.Items.head.tag.TSB.ID + data modify storage asset:artifact New.id.hotbar append from storage asset:artifact New.Items.hotbar[].tag.TSB.ID diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/revert_from_current.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/revert_from_current.mcfunction deleted file mode 100644 index 19da4fc943..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/revert_from_current.mcfunction +++ /dev/null @@ -1,25 +0,0 @@ -#> asset_manager:artifact/data/new/revert_from_current -# -# currentデータをNewに格納します -# -# @within function asset_manager:artifact/triggers/** - -# 元配列 - function asset_manager:artifact/data/current/equips/init - data modify storage asset:artifact MaskEquips set from storage asset:artifact Equipments - - data modify storage asset:context id set from storage asset:context New.id - function asset_manager:artifact/data/current/equips/init -# idのmerge (-1はトリガー的なトリガー処理による削除なので上書きしない) - function asset_manager:artifact/data/current/equips/merge -# idの更新 - function asset_manager:artifact/data/current/equips/replace -# 新しいデータを一つ上の階層に上げる - data modify storage asset:context New.id set from storage asset:context id - data modify storage asset:context New.Items set from storage asset:context Items - data modify storage asset:context New.Inventory set from storage asset:context Inventory - data modify storage asset:context New.SelectedItemSlot set from storage asset:context SelectedItemSlot -# リセット - data remove storage asset:artifact MaskEquips - data remove storage asset:artifact Equipments - function asset_manager:artifact/data/current/reset \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/set_to_current.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/set_to_current.mcfunction deleted file mode 100644 index 1f54963e75..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/set_to_current.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/data/new/set_to_current -# -# Newをcurrentデータにsetします -# -# @within function asset_manager:artifact/triggers/** - -# リセット - function asset_manager:artifact/data/current/reset -# 新しいデータを一つ上の階層に上げる - data modify storage asset:context id set from storage asset:context New.id - data modify storage asset:context Items set from storage asset:context New.Items - data modify storage asset:context Inventory set from storage asset:context New.Inventory - data modify storage asset:context SelectedItemSlot set from storage asset:context New.SelectedItemSlot -# autoの処理 - # 初期化 - data modify storage asset:context id.auto set value -1 - # idのputとAutoSlotの設定 - data modify storage asset:context Items.AutoSlot set from storage asset:artifact Argument.AutoSlot - execute if data storage asset:artifact Argument{AutoSlot:"mainhand"} run data modify storage asset:context id.auto set from storage asset:context id.mainhand - execute if data storage asset:artifact Argument{AutoSlot:"offhand"} run data modify storage asset:context id.auto set from storage asset:context id.offhand - execute if data storage asset:artifact Argument{AutoSlot:"feet"} run data modify storage asset:context id.auto set from storage asset:context id.feet - execute if data storage asset:artifact Argument{AutoSlot:"legs"} run data modify storage asset:context id.auto set from storage asset:context id.legs - execute if data storage asset:artifact Argument{AutoSlot:"chest"} run data modify storage asset:context id.auto set from storage asset:context id.chest - execute if data storage asset:artifact Argument{AutoSlot:"head"} run data modify storage asset:context id.auto set from storage asset:context id.head - # リセット - data remove storage asset:artifact Argument.AutoSlot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/stash_to_entity_storage.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/stash_to_entity_storage.mcfunction index 888425c0db..1ddd64cf22 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/stash_to_entity_storage.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/new/stash_to_entity_storage.mcfunction @@ -7,8 +7,8 @@ # EntityStorage呼び出し function oh_my_dat:please # 突っ込む - # data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Inventory set from storage asset:context New.Inventory - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.SelectedItemSlot set from storage asset:context New.SelectedItemSlot - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Items set from storage asset:context New.Items - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.id set from storage asset:context New.id - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.ItemData set from storage asset:context New.ItemData + # data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Inventory set from storage asset:artifact New.Inventory + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.SelectedItemSlot set from storage asset:artifact New.SelectedItemSlot + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Items set from storage asset:artifact New.Items + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.id set from storage asset:artifact New.id + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.ItemData set from storage asset:artifact New.ItemData diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/init.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/init.mcfunction index f6b2dba4ca..383a58e6ae 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/init.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/init.mcfunction @@ -5,13 +5,14 @@ # @within function asset_manager:artifact/triggers/ # 初期化 - data remove storage asset:context Old + data remove storage asset:artifact Old # EntityStorage呼び出し function oh_my_dat:please # 突っ込む - data modify storage asset:context Old.Inventory set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Inventory - data modify storage asset:context Old.SelectedItemSlot set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.SelectedItemSlot - data modify storage asset:context Old.Items set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Items - data modify storage asset:context Old.id set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.id + # data modify storage asset:artifact Old.Inventory set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Inventory + data modify storage asset:artifact Old.SelectedItemSlot set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.SelectedItemSlot + data modify storage asset:artifact Old.Items set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.Items + data modify storage asset:artifact Old.id set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.id + data modify storage asset:artifact Old.ItemData set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash.ItemData # EntityStorageから削除 - data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash \ No newline at end of file + data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ContextStash diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/revert_from_current.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/revert_from_current.mcfunction deleted file mode 100644 index db2d1bc03a..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/revert_from_current.mcfunction +++ /dev/null @@ -1,25 +0,0 @@ -#> asset_manager:artifact/data/old/revert_from_current -# -# currentデータをOldに格納します -# -# @within function asset_manager:artifact/triggers/** - -# 元配列 - function asset_manager:artifact/data/current/equips/init - data modify storage asset:artifact MaskEquips set from storage asset:artifact Equipments - - data modify storage asset:context id set from storage asset:context Old.id - function asset_manager:artifact/data/current/equips/init -# idのmerge (-1はトリガー的なトリガー処理による削除なので上書きしない) - function asset_manager:artifact/data/current/equips/merge -# idの更新 - function asset_manager:artifact/data/current/equips/replace -# 新しいデータを一つ上の階層に上げる - data modify storage asset:context Old.id set from storage asset:context id - data modify storage asset:context Old.Items set from storage asset:context Items - data modify storage asset:context Old.Inventory set from storage asset:context Inventory - data modify storage asset:context Old.SelectedItemSlot set from storage asset:context SelectedItemSlot -# リセット - data remove storage asset:artifact MaskEquips - data remove storage asset:artifact Equipments - function asset_manager:artifact/data/current/reset \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/set_to_current.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/set_to_current.mcfunction deleted file mode 100644 index b1a59dbd8c..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/data/old/set_to_current.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/data/old/set_to_current -# -# Oldをcurrentデータにsetします -# -# @within function asset_manager:artifact/triggers/** - -# リセット - function asset_manager:artifact/data/current/reset -# 新しいデータを一つ上の階層に上げる - data modify storage asset:context id set from storage asset:context Old.id - data modify storage asset:context Items set from storage asset:context Old.Items - data modify storage asset:context Inventory set from storage asset:context Old.Inventory - data modify storage asset:context SelectedItemSlot set from storage asset:context Old.SelectedItemSlot -# autoの処理 - # 初期化 - data modify storage asset:context id.auto set value -1 - # idのputとAutoSlotの設定 - data modify storage asset:context Items.AutoSlot set from storage asset:artifact Argument.AutoSlot - execute if data storage asset:artifact Argument{AutoSlot:"mainhand"} run data modify storage asset:context id.auto set from storage asset:context id.mainhand - execute if data storage asset:artifact Argument{AutoSlot:"offhand"} run data modify storage asset:context id.auto set from storage asset:context id.offhand - execute if data storage asset:artifact Argument{AutoSlot:"feet"} run data modify storage asset:context id.auto set from storage asset:context id.feet - execute if data storage asset:artifact Argument{AutoSlot:"legs"} run data modify storage asset:context id.auto set from storage asset:context id.legs - execute if data storage asset:artifact Argument{AutoSlot:"chest"} run data modify storage asset:context id.auto set from storage asset:context id.chest - execute if data storage asset:artifact Argument{AutoSlot:"head"} run data modify storage asset:context id.auto set from storage asset:context id.head - # リセット - data remove storage asset:artifact Argument.AutoSlot \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction index 693141ab64..a8a479e0ba 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/.mcfunction @@ -13,33 +13,29 @@ data modify storage asset:artifact ArtifactEvents set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents set value {} # 装備の変更チェック - execute if data storage asset:context Old run function asset_manager:artifact/triggers/equipments/compare + execute if data storage asset:artifact Old run function asset_manager:artifact/triggers/equipments/compare # 変更時の更新処理 execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_cooldown/ execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_cooldown_type 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 entity @s[tag=Believe.Changed] unless data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equipments/update_attribute/ -# 各トリガーに処理受け渡し & AutoSlotのリセット - function asset_manager:artifact/triggers/tick - execute if entity @s[tag=TriggerFlag.ClickCarrot] run function asset_manager:artifact/triggers/click.carrot - execute if entity @s[tag=TriggerFlag.UseItem] run function asset_manager:artifact/triggers/use_item/ - execute if entity @s[tag=TriggerFlag.Sneak] run function asset_manager:artifact/triggers/sneak/ - execute if entity @s[tag=TriggerFlag.UsingItem] run function asset_manager:artifact/triggers/using_item - execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/dis_equip - execute if data storage asset:artifact {EquipmentChanges:[{_:{_:false}}]} run function asset_manager:artifact/triggers/equip - execute if data storage asset:artifact ArtifactEvents.Attack[0] run function asset_manager:artifact/triggers/attack/ - execute if data storage asset:artifact ArtifactEvents.Damage[0] run function asset_manager:artifact/triggers/damage/ - execute if data storage asset:artifact ArtifactEvents.Killed[0] run function asset_manager:artifact/triggers/killed/ - execute if data storage asset:artifact ArtifactEvents.Heal[0] run function asset_manager:artifact/triggers/heal/ - execute if data storage asset:artifact ArtifactEvents.ReceiveHeal[0] run function asset_manager:artifact/triggers/receive_heal/ + 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 data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] run tag @s add ShouldVanillaAttack +# 各神器にトリガー受けわたし + function asset_manager:artifact/triggers/trigger/ +# 神器でバニラ攻撃を処理していないならダメージを与える + execute if entity @s[tag=ShouldVanillaAttack] run function asset_manager:artifact/triggers/vanilla/ # EntityStorageにデータ突っ込む function asset_manager:artifact/data/new/stash_to_entity_storage # リセット - data remove storage api: PersistentArgument.AdditionalMPHeal data remove storage asset:artifact EquipmentChanges data remove storage asset:artifact ArtifactEvents - function asset_manager:artifact/data/current/reset + data remove storage asset:artifact New + data remove storage asset:artifact Old + tag @s remove Believe.Changed tag @s remove TriggerFlag.ClickCarrot tag @s remove TriggerFlag.UseItem tag @s remove TriggerFlag.Sneak diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/.mcfunction index 9c42690388..4a984e641f 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/.mcfunction @@ -1,12 +1,15 @@ #> asset_manager:artifact/triggers/attack/ # -# 各神器処理へデータ受け渡し # -# @within function asset_manager:artifact/triggers/ +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# イベントを順に発火する +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Attack[0] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[] +# それぞれについて処理する function asset_manager:artifact/triggers/attack/foreach -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/attack.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/attack.m.mcfunction new file mode 100644 index 0000000000..2d120f916f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/attack.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack/attack.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack/use + +$function asset:artifact/alias/$(id)/attack/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/check.m.mcfunction new file mode 100644 index 0000000000..8112332550 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack/foreach + +$function asset:artifact/alias/$(id)/attack/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/foreach.mcfunction index 16660e01f2..7bde1a6cad 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/foreach.mcfunction @@ -4,30 +4,28 @@ # # @within function asset_manager:artifact/triggers/attack/* -# イベントデータ取得 - data modify storage asset:context Attack set from storage asset:artifact ArtifactEvents.Attack[-1] - data remove storage asset:artifact ArtifactEvents.Attack[-1] -# 攻撃先を取得し、Victim を付与する (null の可能性もある) - data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To - execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/attack/add_tag_each_victim -# 最大ダメージの計算 - function lib:array/session/open - data modify storage lib: Array set from storage asset:context Attack.Amounts - function lib:array/math/max - data modify storage asset:context Attack.Amount set from storage lib: MaxResult - function lib:array/session/close -# 神器側に受け渡し - function #asset:artifact/attack - execute if data storage asset:context Attack{Type:"vanilla_melee" } run tag @s add ShouldVanillaAttack - execute if data storage asset:context Attack{Type:"vanilla_melee" } run function #asset:artifact/attack/melee - execute if data storage asset:context Attack{Type:"vanilla_melee" } if entity @s[tag=ShouldVanillaAttack] as @e[type=#lib:living,type=!player,tag=Victim,distance=..8] at @s run function asset_manager:artifact/triggers/attack/vanilla/ - execute if data storage asset:context Attack{Type:"vanilla_projectile"} run function #asset:artifact/attack/projectile - execute if data storage asset:context Attack{Type:"vanilla_projectile"} as @e[type=#lib:living,type=!player,tag=Victim,distance=..150] at @s run function asset_manager:artifact/triggers/attack/vanilla/ - execute if data storage asset:context Attack{Type:"vanilla_explosion" } run function #asset:artifact/attack/explosion +# イベントデータ処理 + # データを取得 + data modify storage asset:context Attack set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する + data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To + execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim + # 最大ダメージの計算 + function asset_manager:artifact/triggers/event/attack/get_max_amount + # MPを命中回数分回復する + function asset_manager:artifact/triggers/event/attack/mp_heal + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/attack/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack/use + # リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed data remove storage asset:context Attack data remove storage asset:artifact AttackTargets - tag @s remove ShouldVanillaAttack - tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim -# イベントがまだあれば再帰する - execute if data storage asset:artifact ArtifactEvents.Attack[0] run function asset_manager:artifact/triggers/attack/foreach + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/use.mcfunction new file mode 100644 index 0000000000..a2c222c8df --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/attack/use +# +# +# +# @within function asset_manager:artifact/triggers/attack/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/attack/attack.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/.mcfunction deleted file mode 100644 index 86a81be5dd..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/.mcfunction +++ /dev/null @@ -1,28 +0,0 @@ -#> asset_manager:artifact/triggers/attack/vanilla/ -# -# 神器に関係しない通常攻撃のダメージ処理 -# -# @within function asset_manager:artifact/triggers/attack/foreach - -#> Private -# @within asset_manager:artifact/triggers/attack/vanilla/* - #declare score_holder $Damage - -#> Private -# @private - #declare score_holder $Fluctuation - -# Damage - execute store result score $Damage Temporary run data get storage asset:context Attack.Amount -100 -# 減算 - scoreboard players operation @s MobHealth += $Damage Temporary -# ダメージ表示 - scoreboard players operation $Fluctuation Lib = $Damage Temporary - execute unless score $Fluctuation Lib matches 0 run function lib:status_log/show_health -# 代入 / kill - execute if score @s MobHealth matches ..0 run tag @s add Death - execute if score @s MobHealth matches ..0 run function asset_manager:artifact/triggers/attack/vanilla/push_kill_and_death_event - -# リセット - scoreboard players reset $Damage Temporary - tag @s remove ShouldVanillaAttack diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/.mcfunction new file mode 100644 index 0000000000..a82e70378c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/attack_explosion/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_explosion"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_explosion"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/attack_explosion/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/attack_explosion.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/attack_explosion.m.mcfunction new file mode 100644 index 0000000000..b45b8901cb --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/attack_explosion.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_explosion/attack_explosion.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_explosion/use + +$function asset:artifact/alias/$(id)/attack_explosion/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/check.m.mcfunction new file mode 100644 index 0000000000..3f3080a7f0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_explosion/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_explosion/foreach + +$function asset:artifact/alias/$(id)/attack_explosion/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/foreach.mcfunction new file mode 100644 index 0000000000..0aa60543e5 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/foreach.mcfunction @@ -0,0 +1,31 @@ +#> asset_manager:artifact/triggers/attack_explosion/foreach +# +# +# +# @within function asset_manager:artifact/triggers/attack_explosion/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Attack set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する + data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To + execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim + # 最大ダメージの計算 + function asset_manager:artifact/triggers/event/attack/get_max_amount + # MPを命中回数分回復する + function asset_manager:artifact/triggers/event/attack/mp_heal + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/attack_explosion/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack_explosion/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Attack + data remove storage asset:artifact AttackTargets + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack_explosion/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/use.mcfunction new file mode 100644 index 0000000000..eef65e506e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_explosion/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/attack_explosion/use +# +# +# +# @within function asset_manager:artifact/triggers/attack_explosion/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/attack_explosion/attack_explosion.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/.mcfunction new file mode 100644 index 0000000000..b0d38dcda2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/attack_melee/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/attack_melee/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/attack_melee.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/attack_melee.m.mcfunction new file mode 100644 index 0000000000..66fa9328b6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/attack_melee.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_melee/attack_melee.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_melee/use + +$function asset:artifact/alias/$(id)/attack_melee/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/check.m.mcfunction new file mode 100644 index 0000000000..91d276e805 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_melee/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_melee/foreach + +$function asset:artifact/alias/$(id)/attack_melee/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/foreach.mcfunction new file mode 100644 index 0000000000..d41cb180fc --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/foreach.mcfunction @@ -0,0 +1,34 @@ +#> asset_manager:artifact/triggers/attack_melee/foreach +# +# +# +# @within function asset_manager:artifact/triggers/attack_melee/* + +# バニラ攻撃はなかったことにする + tag @s remove ShouldVanillaAttack + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Attack set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する + data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To + execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim + # 最大ダメージの計算 + function asset_manager:artifact/triggers/event/attack/get_max_amount + # MPを命中回数分回復する + function asset_manager:artifact/triggers/event/attack/mp_heal + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/attack_melee/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack_melee/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Attack + data remove storage asset:artifact AttackTargets + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack_melee/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/use.mcfunction new file mode 100644 index 0000000000..050d35c6ca --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/attack_melee/use +# +# +# +# @within function asset_manager:artifact/triggers/attack_melee/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/attack_melee/attack_melee.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/.mcfunction new file mode 100644 index 0000000000..a950af3ab6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/attack_projectile/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_projectile"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_projectile"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/attack_projectile/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/attack_projectile.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/attack_projectile.m.mcfunction new file mode 100644 index 0000000000..9f64a2ee8e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/attack_projectile.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_projectile/attack_projectile.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_projectile/use + +$function asset:artifact/alias/$(id)/attack_projectile/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/check.m.mcfunction new file mode 100644 index 0000000000..29b91b96e8 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/attack_projectile/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/attack_projectile/foreach + +$function asset:artifact/alias/$(id)/attack_projectile/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/foreach.mcfunction new file mode 100644 index 0000000000..2702db66c6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/foreach.mcfunction @@ -0,0 +1,31 @@ +#> asset_manager:artifact/triggers/attack_projectile/foreach +# +# +# +# @within function asset_manager:artifact/triggers/attack_projectile/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Attack set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する + data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To + execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim + # 最大ダメージの計算 + function asset_manager:artifact/triggers/event/attack/get_max_amount + # MPを命中回数分回復する + function asset_manager:artifact/triggers/event/attack/mp_heal + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/attack_projectile/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack_projectile/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Attack + data remove storage asset:artifact AttackTargets + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack_projectile/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/use.mcfunction new file mode 100644 index 0000000000..5157c3b886 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/attack_projectile/use +# +# +# +# @within function asset_manager:artifact/triggers/attack_projectile/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/attack_projectile/attack_projectile.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click.carrot.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click.carrot.mcfunction deleted file mode 100644 index 3f89409728..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click.carrot.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset_manager:artifact/triggers/click.carrot -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - execute if predicate asset_manager:is_use_mainhand/carrot_on_a_stick run data modify storage asset:artifact Argument.AutoSlot set value "mainhand" - execute unless predicate asset_manager:is_use_mainhand/carrot_on_a_stick run data modify storage asset:artifact Argument.AutoSlot set value "offhand" - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し - function #asset:artifact/click.carrot_on_a_stick -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/.mcfunction new file mode 100644 index 0000000000..4c467a71f0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/.mcfunction @@ -0,0 +1,16 @@ +#> asset_manager:artifact/triggers/click/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.ClickCarrot] run return fail +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/click/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/click/use + +# リセット + tag @s remove CanUsed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/check.m.mcfunction new file mode 100644 index 0000000000..7366e5167f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/click/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/click/ + +$function asset:artifact/alias/$(id)/click/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/click.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/click.m.mcfunction new file mode 100644 index 0000000000..cbb781baf0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/click.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/click/click.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/click/use + +$function asset:artifact/alias/$(id)/click/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/use.mcfunction new file mode 100644 index 0000000000..35bbd2fc69 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/click/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/click/use +# +# +# +# @within function asset_manager:artifact/triggers/click/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/click/click.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/.mcfunction index 78cd400a9f..3d78a6da91 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/.mcfunction @@ -1,12 +1,15 @@ #> asset_manager:artifact/triggers/damage/ # -# 各神器処理へデータ受け渡し # -# @within function asset_manager:artifact/triggers/ +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[0] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[] +# それぞれについて処理する function asset_manager:artifact/triggers/damage/foreach -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/check.m.mcfunction new file mode 100644 index 0000000000..e7fabee6dc --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage/foreach + +$function asset:artifact/alias/$(id)/damage/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/damage.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/damage.m.mcfunction new file mode 100644 index 0000000000..890d6a96a5 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/damage.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage/damage.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage/use + +$function asset:artifact/alias/$(id)/damage/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/foreach.mcfunction index ed68f01f66..686e8fb493 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/foreach.mcfunction @@ -4,33 +4,22 @@ # # @within function asset_manager:artifact/triggers/damage/* -#> Private -# @private -#declare score_holder $AttackedFrom +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage/use -# イベントデータ取得 - data modify storage asset:context Damage set from storage asset:artifact ArtifactEvents.Damage[-1] - data remove storage asset:artifact ArtifactEvents.Damage[-1] -# 攻撃元を取得し、Attacker を付与する (null の可能性もある) - execute if data storage asset:context Damage.From store result score $AttackedFrom Temporary run data get storage asset:context Damage.From - execute if data storage asset:context Damage.From as @e[type=#lib:living,type=!player,distance=..150] if score @s MobUUID = $AttackedFrom Temporary run tag @s add Attacker - scoreboard players reset $AttackedFrom Temporary -# 神器側に受け渡し - function #asset:artifact/damage - execute if data storage asset:context Damage{Type:"vanilla_melee" } run function #asset:artifact/damage/melee - execute if data storage asset:context Damage{Type:"vanilla_drowning" } run function #asset:artifact/damage/drowning - execute if data storage asset:context Damage{Type:"vanilla_projectile"} run function #asset:artifact/damage/projectile - execute if data storage asset:context Damage{Type:"vanilla_explosion" } run function #asset:artifact/damage/explosion - execute if data storage asset:context Damage{Type:"vanilla_fire" } run function #asset:artifact/damage/fire - execute if data storage asset:context Damage{Type:"vanilla_freezing" } run function #asset:artifact/damage/freezing - execute if data storage asset:context Damage{Type:"vanilla_lightning" } run function #asset:artifact/damage/lightning - execute if data storage asset:context Damage{Type:"vanilla_other" } run function #asset:artifact/damage/other - execute if data storage asset:context Damage.From run function #asset:artifact/damage/from_entity/ - execute if data storage asset:context Damage.From if data storage asset:context Damage{Type:"vanilla_melee" } run function #asset:artifact/damage/from_entity/melee - execute if data storage asset:context Damage.From if data storage asset:context Damage{Type:"vanilla_projectile"} run function #asset:artifact/damage/from_entity/projectile - execute if data storage asset:context Damage.From if data storage asset:context Damage{Type:"vanilla_explosion" } run function #asset:artifact/damage/from_entity/explosion # リセット - data remove storage asset:context Damage tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker -# イベントがまだあれば再帰する - execute if data storage asset:artifact ArtifactEvents.Damage[0] run function asset_manager:artifact/triggers/damage/foreach + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/use.mcfunction new file mode 100644 index 0000000000..fbb7991e5c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage/use +# +# +# +# @within function asset_manager:artifact/triggers/damage/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage/damage.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/.mcfunction new file mode 100644 index 0000000000..3e636ff9d7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_drowning/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_drowning"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_drowning"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_drowning/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/check.m.mcfunction new file mode 100644 index 0000000000..66c0bc222d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_drowning/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_drowning/foreach + +$function asset:artifact/alias/$(id)/damage_drowning/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/damage_drowning.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/damage_drowning.m.mcfunction new file mode 100644 index 0000000000..482ab94948 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/damage_drowning.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_drowning/damage_drowning.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_drowning/use + +$function asset:artifact/alias/$(id)/damage_drowning/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/foreach.mcfunction new file mode 100644 index 0000000000..323a5e896f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_drowning/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_drowning/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_drowning/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_drowning/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_drowning/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/use.mcfunction new file mode 100644 index 0000000000..f8b11ef917 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_drowning/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_drowning/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_drowning/damage_drowning.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/.mcfunction new file mode 100644 index 0000000000..fb584e0429 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_entity/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[].From run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_entity/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/check.m.mcfunction new file mode 100644 index 0000000000..284ae43073 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity/foreach + +$function asset:artifact/alias/$(id)/damage_entity/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/damage_entity.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/damage_entity.m.mcfunction new file mode 100644 index 0000000000..62c68aea28 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/damage_entity.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity/damage_entity.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity/use + +$function asset:artifact/alias/$(id)/damage_entity/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/foreach.mcfunction new file mode 100644 index 0000000000..821ccf74c4 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_entity/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/use.mcfunction new file mode 100644 index 0000000000..9afc99d337 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_entity/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_entity/damage_entity.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/.mcfunction new file mode 100644 index 0000000000..7386fcc9bd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_entity_explosion/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}].From run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_entity_explosion/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/check.m.mcfunction new file mode 100644 index 0000000000..ddeff81058 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_explosion/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_explosion/foreach + +$function asset:artifact/alias/$(id)/damage_entity_explosion/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/damage_entity_explosion.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/damage_entity_explosion.m.mcfunction new file mode 100644 index 0000000000..16a753aed3 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/damage_entity_explosion.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_explosion/damage_entity_explosion.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_explosion/use + +$function asset:artifact/alias/$(id)/damage_entity_explosion/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/foreach.mcfunction new file mode 100644 index 0000000000..2aee802585 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_entity_explosion/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_explosion/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity_explosion/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity_explosion/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity_explosion/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/use.mcfunction new file mode 100644 index 0000000000..6af7d796f6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_entity_explosion/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_explosion/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_entity_explosion/damage_entity_explosion.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/.mcfunction new file mode 100644 index 0000000000..3fcb9b2398 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_entity_melee/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}].From run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_entity_melee/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/check.m.mcfunction new file mode 100644 index 0000000000..c0d80c9828 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_melee/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_melee/foreach + +$function asset:artifact/alias/$(id)/damage_entity_melee/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/damage_entity_melee.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/damage_entity_melee.m.mcfunction new file mode 100644 index 0000000000..0d40c6b318 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/damage_entity_melee.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_melee/damage_entity_melee.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_melee/use + +$function asset:artifact/alias/$(id)/damage_entity_melee/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/foreach.mcfunction new file mode 100644 index 0000000000..e200baf8b4 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_entity_melee/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_melee/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity_melee/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity_melee/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity_melee/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/use.mcfunction new file mode 100644 index 0000000000..82d3895f6a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_entity_melee/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_melee/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_entity_melee/damage_entity_melee.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/.mcfunction new file mode 100644 index 0000000000..f779a878d0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_entity_projectile/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_projectile"}].From run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_projectile"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_entity_projectile/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/check.m.mcfunction new file mode 100644 index 0000000000..bb3b496323 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_projectile/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_projectile/foreach + +$function asset:artifact/alias/$(id)/damage_entity_projectile/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/damage_entity_projectile.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/damage_entity_projectile.m.mcfunction new file mode 100644 index 0000000000..7a87c469c9 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/damage_entity_projectile.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_entity_projectile/damage_entity_projectile.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_entity_projectile/use + +$function asset:artifact/alias/$(id)/damage_entity_projectile/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/foreach.mcfunction new file mode 100644 index 0000000000..0bdb9472f7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_entity_projectile/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_projectile/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ + execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity_projectile/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity_projectile/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity_projectile/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/use.mcfunction new file mode 100644 index 0000000000..084bd9ff88 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_projectile/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_entity_projectile/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_entity_projectile/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_entity_projectile/damage_entity_projectile.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/.mcfunction new file mode 100644 index 0000000000..5069f2a4b2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_explosion/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_explosion/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/check.m.mcfunction new file mode 100644 index 0000000000..c0b512dbaf --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_explosion/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_explosion/foreach + +$function asset:artifact/alias/$(id)/damage_explosion/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/damage_explosion.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/damage_explosion.m.mcfunction new file mode 100644 index 0000000000..324b3e1697 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/damage_explosion.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_explosion/damage_explosion.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_explosion/use + +$function asset:artifact/alias/$(id)/damage_explosion/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/foreach.mcfunction new file mode 100644 index 0000000000..18c6b2fd92 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_explosion/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_explosion/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_explosion/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_explosion/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_explosion/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/use.mcfunction new file mode 100644 index 0000000000..36e9feab3d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_explosion/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_explosion/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_explosion/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_explosion/damage_explosion.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/.mcfunction new file mode 100644 index 0000000000..f90235d310 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_fire/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_burn"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_burn"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_fire/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/check.m.mcfunction new file mode 100644 index 0000000000..20d0584be7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_fire/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_fire/foreach + +$function asset:artifact/alias/$(id)/damage_fire/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/damage_fire.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/damage_fire.m.mcfunction new file mode 100644 index 0000000000..b7852e88b7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/damage_fire.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_fire/damage_fire.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_fire/use + +$function asset:artifact/alias/$(id)/damage_fire/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/foreach.mcfunction new file mode 100644 index 0000000000..b844a2a525 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_fire/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_fire/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_fire/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_fire/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_fire/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/use.mcfunction new file mode 100644 index 0000000000..a3836f609d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_fire/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_fire/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_fire/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_fire/damage_fire.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/.mcfunction new file mode 100644 index 0000000000..47f88f44f6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_freezing/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_freezing"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_freezing"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_freezing/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/check.m.mcfunction new file mode 100644 index 0000000000..28f434fb04 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_freezing/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_freezing/foreach + +$function asset:artifact/alias/$(id)/damage_freezing/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/damage_freezing.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/damage_freezing.m.mcfunction new file mode 100644 index 0000000000..9636e3a698 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/damage_freezing.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_freezing/damage_freezing.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_freezing/use + +$function asset:artifact/alias/$(id)/damage_freezing/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/foreach.mcfunction new file mode 100644 index 0000000000..c79e13a5c1 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_freezing/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_freezing/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_freezing/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_freezing/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_freezing/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/use.mcfunction new file mode 100644 index 0000000000..3ad9abb84b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_freezing/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_freezing/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_freezing/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_freezing/damage_freezing.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/.mcfunction new file mode 100644 index 0000000000..0de00515a4 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_lightning/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_lightning"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_lightning"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_lightning/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/check.m.mcfunction new file mode 100644 index 0000000000..2f17ac449b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_lightning/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_lightning/foreach + +$function asset:artifact/alias/$(id)/damage_lightning/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/damage_lightning.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/damage_lightning.m.mcfunction new file mode 100644 index 0000000000..71290e7d88 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/damage_lightning.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_lightning/damage_lightning.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_lightning/use + +$function asset:artifact/alias/$(id)/damage_lightning/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/foreach.mcfunction new file mode 100644 index 0000000000..7cded71747 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_lightning/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_lightning/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_lightning/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_lightning/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_lightning/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/use.mcfunction new file mode 100644 index 0000000000..1fc4d46192 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_lightning/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_lightning/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_lightning/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_lightning/damage_lightning.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/.mcfunction new file mode 100644 index 0000000000..9a63894734 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_melee/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_melee/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/check.m.mcfunction new file mode 100644 index 0000000000..d5a1d5efda --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_melee/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_melee/foreach + +$function asset:artifact/alias/$(id)/damage_melee/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/damage_melee.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/damage_melee.m.mcfunction new file mode 100644 index 0000000000..6b86c4ba2c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/damage_melee.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_melee/damage_melee.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_melee/use + +$function asset:artifact/alias/$(id)/damage_melee/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/foreach.mcfunction new file mode 100644 index 0000000000..f1a13f5d5d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_melee/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_melee/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_melee/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_melee/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_melee/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/use.mcfunction new file mode 100644 index 0000000000..920ceb46da --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_melee/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_melee/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_melee/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_melee/damage_melee.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/.mcfunction new file mode 100644 index 0000000000..b3239c8be2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/damage_projectile/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_projectile"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_projectile"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/damage_projectile/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/check.m.mcfunction new file mode 100644 index 0000000000..a51bb2dd20 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_projectile/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_projectile/foreach + +$function asset:artifact/alias/$(id)/damage_projectile/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/damage_projectile.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/damage_projectile.m.mcfunction new file mode 100644 index 0000000000..4ddbca4b4b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/damage_projectile.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/damage_projectile/damage_projectile.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/damage_projectile/use + +$function asset:artifact/alias/$(id)/damage_projectile/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/foreach.mcfunction new file mode 100644 index 0000000000..3a264b074a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/damage_projectile/foreach +# +# +# +# @within function asset_manager:artifact/triggers/damage_projectile/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Damage set from storage asset:artifact Events[-1] + # 攻撃元を取得し、Attacker を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/damage/add_tag_attacker + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/damage_projectile/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_projectile/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker + tag @s remove CanUsed + data remove storage asset:context Damage + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_projectile/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/use.mcfunction new file mode 100644 index 0000000000..28fda4e77c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_projectile/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/damage_projectile/use +# +# +# +# @within function asset_manager:artifact/triggers/damage_projectile/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/damage_projectile/damage_projectile.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction deleted file mode 100644 index 76887a07b6..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#> asset_manager:artifact/triggers/dis_equip -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - function asset_manager:artifact/data/old/set_to_current -# 全スロットを参照できるidを作る - data modify storage asset:context id.all set from storage asset:context id -# 変更のなかったスロットをマスクする - function asset_manager:artifact/triggers/equipments/mask_slot/ -# 神器側に受け渡し - function #asset:artifact/dis_equip -# イベント発火後に実行するやつ - function asset_manager:artifact/data/old/revert_from_current \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction index fa35902769..b437bd05e7 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/dis_equip/.mcfunction @@ -5,6 +5,6 @@ # @within function asset_manager:artifact/triggers/equipments/update_attribute/equip_trigger # idを取り出す - data modify storage asset:context id set from storage asset:context Old.CopiedItemData[-1].ID + data modify storage asset:context id set from storage asset:artifact Old.CopiedItemData[-1].ID # 処理を呼び出す function asset_manager:artifact/triggers/dis_equip/dis_equip.m with storage asset:context diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction deleted file mode 100644 index cd0a124596..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#> asset_manager:artifact/triggers/equip -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 全スロットを参照できるidを作る - data modify storage asset:context id.all set from storage asset:context id -# 変更のなかったスロットをマスクする - function asset_manager:artifact/triggers/equipments/mask_slot/ -# 神器側に受け渡し - function #asset:artifact/equip -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction index afa7711b5c..9ce6862f33 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equip/.mcfunction @@ -5,6 +5,6 @@ # @within function asset_manager:artifact/triggers/equipments/update_attribute/equip_trigger # idを取り出す - data modify storage asset:context id set from storage asset:context New.CopiedItemData[-1].ID + data modify storage asset:context id set from storage asset:artifact New.CopiedItemData[-1].ID # 処理を呼び出す function asset_manager:artifact/triggers/equip/equip.m with storage asset:context diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/compare.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/compare.mcfunction index 8666868214..e30ed99146 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/compare.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/compare.mcfunction @@ -7,8 +7,8 @@ # セッション開く function lib:array/session/open # データ設定 - data modify storage lib: ArrayA append from storage asset:context New.ItemData[].UUID - data modify storage lib: ArrayB append from storage asset:context Old.ItemData[].UUID + data modify storage lib: ArrayA append from storage asset:artifact New.ItemData[].UUID + data modify storage lib: ArrayB append from storage asset:artifact Old.ItemData[].UUID # 比較 function lib:array/compare # 比較結果を保存する diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/.mcfunction index 45d38c2251..a20345bd95 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/.mcfunction @@ -7,24 +7,24 @@ # 装備が変更されている箇所を抽出する # 新しい装備については、信仰が正しいか確認する data modify storage asset:artifact CopiedChanges set from storage asset:artifact EquipmentChanges - data modify storage asset:context Old.CopiedItemData set from storage asset:context Old.ItemData - data modify storage asset:context New.CopiedItemData set from storage asset:context New.ItemData + data modify storage asset:artifact Old.CopiedItemData set from storage asset:artifact Old.ItemData + data modify storage asset:artifact New.CopiedItemData set from storage asset:artifact New.ItemData function asset_manager:artifact/triggers/equipments/update_attribute/extract_changes # 各装備について、equip / dis_equip トリガーを走らせる - data modify storage asset:context Old.CopiedItemData set from storage asset:context Old.MaskedItemData - data modify storage asset:context New.CopiedItemData set from storage asset:context New.MaskedItemData + data modify storage asset:artifact Old.CopiedItemData set from storage asset:artifact Old.MaskedItemData + data modify storage asset:artifact New.CopiedItemData set from storage asset:artifact New.MaskedItemData function asset_manager:artifact/triggers/equipments/update_attribute/equip_trigger # セット装備効果の更新 function asset_manager:artifact/triggers/equipments/update_attribute/attire/ # 装備時補正を更新 - data modify storage asset:context Old.CopiedItemData set from storage asset:context Old.MaskedItemData + data modify storage asset:artifact Old.CopiedItemData set from storage asset:artifact Old.MaskedItemData function asset_manager:artifact/triggers/equipments/update_attribute/remove/ - data modify storage asset:context New.CopiedItemData set from storage asset:context New.MaskedItemData + data modify storage asset:artifact New.CopiedItemData set from storage asset:artifact New.MaskedItemData function asset_manager:artifact/triggers/equipments/update_attribute/add/ # リセット data remove storage asset:artifact CopiedChanges - data remove storage asset:context Old.CopiedItemData - data remove storage asset:context New.CopiedItemData - data remove storage asset:context Old.MaskedItemData - data remove storage asset:context New.MaskedItemData + data remove storage asset:artifact Old.CopiedItemData + data remove storage asset:artifact New.CopiedItemData + data remove storage asset:artifact Old.MaskedItemData + data remove storage asset:artifact New.MaskedItemData diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/add/stack/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/add/stack/.mcfunction index a16f19788e..7591e3d9a7 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/add/stack/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/add/stack/.mcfunction @@ -4,14 +4,14 @@ # asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ # Modifier一覧を切り出す - # execute if data storage asset:context New.CopiedItemData[-1].Modifiers[0] run data modify storage asset:context New.CopiedItemData[-1].Modifiers[].ID set from storage asset:context New.CopiedItemData[-1].ID - # execute if data storage asset:context New.CopiedItemData[-1].Modifiers[0] run data modify storage asset:context New.CopiedItemData[-1].Modifiers[].Slot set from storage asset:context New.CopiedItemData[-1].Slot - data modify storage asset:artifact Modifiers append from storage asset:context New.CopiedItemData[-1].Modifiers[] + # execute if data storage asset:artifact New.CopiedItemData[-1].Modifiers[0] run data modify storage asset:artifact New.CopiedItemData[-1].Modifiers[].ID set from storage asset:artifact New.CopiedItemData[-1].ID + # execute if data storage asset:artifact New.CopiedItemData[-1].Modifiers[0] run data modify storage asset:artifact New.CopiedItemData[-1].Modifiers[].Slot set from storage asset:artifact New.CopiedItemData[-1].Slot + data modify storage asset:artifact Modifiers append from storage asset:artifact New.CopiedItemData[-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:context New.CopiedItemData[-1] - execute if data storage asset:context New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ + data remove storage asset:artifact New.CopiedItemData[-1] + execute if data storage asset:artifact New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/add/stack/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/.mcfunction index a34585272f..60529a2539 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/.mcfunction @@ -6,9 +6,9 @@ # 2つの配列を重複を起こさないように結合する data modify storage asset:artifact Attire.List set value [] - data modify storage asset:artifact Attire.Target set from storage asset:context Old.MaskedItemData[].EquipID + data modify storage asset:artifact Attire.Target set from storage asset:artifact Old.MaskedItemData[].EquipID function asset_manager:artifact/triggers/equipments/update_attribute/attire/concat - data modify storage asset:artifact Attire.Target set from storage asset:context New.MaskedItemData[].EquipID + data modify storage asset:artifact Attire.Target set from storage asset:artifact New.MaskedItemData[].EquipID function asset_manager:artifact/triggers/equipments/update_attribute/attire/concat # 各要素ごとに当てはまる部位数を確認して反映する function asset_manager:artifact/triggers/equipments/update_attribute/attire/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/parts_count.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/parts_count.m.mcfunction index c1573c6768..9b682f5acc 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/parts_count.m.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/attire/parts_count.m.mcfunction @@ -2,4 +2,4 @@ # @input args ID : int # @within function asset_manager:artifact/triggers/equipments/update_attribute/attire/foreach -$execute store result storage api: Argument.Stack int 1 if data storage asset:context New.MaskedItemData[{EquipID:$(ID)}] +$execute store result storage api: Argument.Stack int 1 if data storage asset:artifact New.MaskedItemData[{EquipID:$(ID)}] diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/equip_trigger.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/equip_trigger.mcfunction index c15001ae10..81dfc742ed 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/equip_trigger.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/equip_trigger.mcfunction @@ -8,7 +8,7 @@ function lib:array/session/open # dis_equip - data modify storage lib: Array set from storage asset:context Old.CopiedItemData[-1].SubTriggers + data modify storage lib: Array set from storage asset:artifact Old.CopiedItemData[-1].SubTriggers data modify storage lib: CompareTarget set value "equip" function lib:array/compare_single execute if data storage lib: CompareResult[{_:{_:true}}] run function asset_manager:artifact/triggers/dis_equip/ @@ -17,15 +17,15 @@ data modify storage lib: Array set value [] # equip - data modify storage lib: Array set from storage asset:context New.CopiedItemData[-1].SubTriggers + data modify storage lib: Array set from storage asset:artifact New.CopiedItemData[-1].SubTriggers data modify storage lib: CompareTarget set value "equip" function lib:array/compare_single execute if data storage lib: CompareResult[{_:{_:true}}] run function asset_manager:artifact/triggers/equip/ # リセット function lib:array/session/close - data remove storage asset:context Old.CopiedItemData[-1] - data remove storage asset:context New.CopiedItemData[-1] + data remove storage asset:artifact Old.CopiedItemData[-1] + data remove storage asset:artifact New.CopiedItemData[-1] # 要素が残っていれば再帰 - execute if data storage asset:context New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/equip_trigger + execute if data storage asset:artifact New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/equip_trigger diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/extract_changes.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/extract_changes.mcfunction index 198bb98a60..acb64e1bc4 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/extract_changes.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/extract_changes.mcfunction @@ -9,22 +9,22 @@ # 改宗時は問答無用で通すようにする 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:context Old.MaskedItemData append from storage asset:context Old.CopiedItemData[-1] - execute if data storage asset:context Old.MaskedItemData[-1].Modifiers[0] run data modify storage asset:context Old.MaskedItemData[-1].Modifiers[].ID set from storage asset:context Old.CopiedItemData[-1].ID - execute if data storage asset:context Old.MaskedItemData[-1].Modifiers[0] run data modify storage asset:context Old.MaskedItemData[-1].Modifiers[].Slot set from storage asset:context Old.CopiedItemData[-1].Slot - data modify storage asset:context New.MaskedItemData append from storage asset:context New.CopiedItemData[-1] - execute if data storage asset:context New.MaskedItemData[-1].Modifiers[0] run data modify storage asset:context New.MaskedItemData[-1].Modifiers[].ID set from storage asset:context New.CopiedItemData[-1].ID - execute if data storage asset:context New.MaskedItemData[-1].Modifiers[0] run data modify storage asset:context New.MaskedItemData[-1].Modifiers[].Slot set from storage asset:context New.CopiedItemData[-1].Slot + data modify storage asset:artifact Old.MaskedItemData append from storage asset:artifact Old.CopiedItemData[-1] + 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 + execute if data storage asset:artifact Old.MaskedItemData[-1].Modifiers[0] run data modify storage asset:artifact Old.MaskedItemData[-1].Modifiers[].Slot set from storage asset:artifact Old.CopiedItemData[-1].Slot + data modify storage asset:artifact New.MaskedItemData append from storage asset:artifact New.CopiedItemData[-1] + execute if data storage asset:artifact New.MaskedItemData[-1].Modifiers[0] run data modify storage asset:artifact New.MaskedItemData[-1].Modifiers[].ID set from storage asset:artifact New.CopiedItemData[-1].ID + execute if data storage asset:artifact New.MaskedItemData[-1].Modifiers[0] run data modify storage asset:artifact New.MaskedItemData[-1].Modifiers[].Slot set from storage asset:artifact New.CopiedItemData[-1].Slot # 古い方のデータ - data modify storage asset:artifact TargetID set from storage asset:context Old.CopiedItemData[-1].ID - execute if data storage asset:artifact {Mask:true} unless data storage asset:artifact {TargetID:-2} run data modify storage asset:context Old.MaskedItemData[-1] merge value {ID:-1,UUID:-1} + data modify storage asset:artifact TargetID set from storage asset:artifact Old.CopiedItemData[-1].ID + execute if data storage asset:artifact {Mask:true} unless data storage asset:artifact {TargetID:-2} run data modify storage asset:artifact Old.MaskedItemData[-1] merge value {ID:-1,UUID:-1} # 新しい方のデータ # こっちは信仰が正しくなければ弾く - data modify storage asset:artifact TargetID set from storage asset:context New.CopiedItemData[-1].ID - execute if data storage asset:artifact {Mask:true} unless data storage asset:artifact {TargetID:-2} run data modify storage asset:context New.MaskedItemData[-1] merge value {ID:-1,UUID:-1} - execute unless data storage asset:artifact {Mask:true} run data modify storage asset:artifact CanUsedGod set from storage asset:context New.MaskedItemData[-1].CanUsedGod + data modify storage asset:artifact TargetID set from storage asset:artifact New.CopiedItemData[-1].ID + execute if data storage asset:artifact {Mask:true} unless data storage asset:artifact {TargetID:-2} run data modify storage asset:artifact New.MaskedItemData[-1] merge value {ID:-1,UUID:-1} + execute unless data storage asset:artifact {Mask:true} run data modify storage asset:artifact CanUsedGod set from storage asset:artifact New.MaskedItemData[-1].CanUsedGod execute unless data storage asset:artifact {Mask:true} run function asset_manager:artifact/triggers/equipments/update_attribute/check_religion - execute unless data storage asset:artifact {Mask:true} unless score $CheckBelieve Temporary matches 1 unless data storage asset:artifact {TargetID:-2} run data modify storage asset:context New.MaskedItemData[-1] merge value {ID:-1,UUID:-1,EquipID:-1,Modifiers:[]} + execute unless data storage asset:artifact {Mask:true} unless score $CheckBelieve Temporary matches 1 unless data storage asset:artifact {TargetID:-2} run data modify storage asset:artifact New.MaskedItemData[-1] merge value {ID:-1,UUID:-1,EquipID:-1,Modifiers:[]} # 要素を削除して、残っているならば再帰 scoreboard players reset $CheckBelieve Temporary @@ -32,6 +32,6 @@ data remove storage asset:artifact TargetID data remove storage asset:artifact CanUsedGod data remove storage asset:artifact CopiedChanges[-1] - data remove storage asset:context Old.CopiedItemData[-1] - data remove storage asset:context New.CopiedItemData[-1] + data remove storage asset:artifact Old.CopiedItemData[-1] + data remove storage asset:artifact New.CopiedItemData[-1] execute if data storage asset:artifact CopiedChanges[0] run function asset_manager:artifact/triggers/equipments/update_attribute/extract_changes diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/remove/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/remove/foreach.mcfunction index 2eebf1e13b..1855e4dca3 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/remove/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_attribute/remove/foreach.mcfunction @@ -2,10 +2,10 @@ # @within function asset_manager:artifact/triggers/equipments/update_attribute/remove/* # Modifiersに値を追加 - # execute if data storage asset:context Old.CopiedItemData[-1].Modifiers[0] run data modify storage asset:context Old.CopiedItemData[-1].Modifiers[].ID set from storage asset:context Old.CopiedItemData[-1].ID - # execute if data storage asset:context Old.CopiedItemData[-1].Modifiers[0] run data modify storage asset:context Old.CopiedItemData[-1].Modifiers[].Slot set from storage asset:context Old.CopiedItemData[-1].Slot - data modify storage asset:artifact Modifiers append from storage asset:context Old.CopiedItemData[-1].Modifiers[] + # execute if data storage asset:artifact Old.CopiedItemData[-1].Modifiers[0] run data modify storage asset:artifact Old.CopiedItemData[-1].Modifiers[].ID set from storage asset:artifact Old.CopiedItemData[-1].ID + # execute if data storage asset:artifact Old.CopiedItemData[-1].Modifiers[0] run data modify storage asset:artifact Old.CopiedItemData[-1].Modifiers[].Slot set from storage asset:artifact Old.CopiedItemData[-1].Slot + data modify storage asset:artifact Modifiers append from storage asset:artifact Old.CopiedItemData[-1].Modifiers[] # 要素を削除して、残っているならば再帰 - data remove storage asset:context Old.CopiedItemData[-1] - execute if data storage asset:context Old.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/remove/foreach + data remove storage asset:artifact Old.CopiedItemData[-1] + execute if data storage asset:artifact Old.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_attribute/remove/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction index 3a69473354..238e0d698c 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/.mcfunction @@ -10,8 +10,8 @@ function lib:array/session/open # 配列をコピー # mainhandは二重更新しないように削除する - data modify storage asset:context New.CopiedItemData set from storage asset:context New.ItemData - data remove storage asset:context New.CopiedItemData[0] + data modify storage asset:artifact New.CopiedItemData set from storage asset:artifact New.ItemData + data remove storage asset:artifact New.CopiedItemData[0] # それぞれについて更新 // New.CopiedItemData (normal) -> LocalCooldown (inverted) function asset_manager:artifact/triggers/equipments/update_cooldown/foreach # 反転する // LocalCooldown (inverted) -> Array (normal) @@ -21,6 +21,6 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown set from storage lib: Array # リセット function lib:array/session/close - data remove storage asset:context New.CopiedItemData + data remove storage asset:artifact New.CopiedItemData data remove storage asset:artifact LocalCooldown scoreboard players reset $Tick Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction index a4874e4e61..414a9df66c 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown/foreach.mcfunction @@ -6,8 +6,8 @@ # データを取得 execute store result score $Tick Temporary run time query gametime - execute store result score $Max Temporary run data get storage asset:context New.CopiedItemData[-1].LocalCooldown - execute store result score $LatestUsedTick Temporary run data get storage asset:context New.CopiedItemData[-1].LatestUseTick + execute store result score $Max Temporary run data get storage asset:artifact New.CopiedItemData[-1].LocalCooldown + execute store result score $LatestUsedTick Temporary run data get storage asset:artifact New.CopiedItemData[-1].LatestUseTick # 使用してからの時間を取得 scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary scoreboard players operation $Max Temporary -= $Tick Temporary @@ -15,10 +15,10 @@ # 設定 data modify storage asset:artifact LocalCooldown append value {} execute store result storage asset:artifact LocalCooldown[-1].Value int 1 run scoreboard players get $Max Temporary - execute store result storage asset:artifact LocalCooldown[-1].Max int 1 run data get storage asset:context New.CopiedItemData[-1].LocalCooldown + execute store result storage asset:artifact LocalCooldown[-1].Max int 1 run data get storage asset:artifact New.CopiedItemData[-1].LocalCooldown # リセット scoreboard players reset $Max Temporary scoreboard players reset $LatestUsedTick Temporary - data remove storage asset:context New.CopiedItemData[-1] + data remove storage asset:artifact New.CopiedItemData[-1] # ループ - execute if data storage asset:context New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach + execute if data storage asset:artifact New.CopiedItemData[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown_type.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown_type.mcfunction index dcbc40b92f..0afc836daa 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown_type.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/equipments/update_cooldown_type.mcfunction @@ -9,30 +9,30 @@ # 配列に設定する data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes set value [] data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[01].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[01].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[02].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[02].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[03].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[03].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[04].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[04].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[05].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[05].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[06].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[06].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[07].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[07].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[08].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[08].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[09].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[09].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[10].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[10].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[11].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[11].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[12].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[12].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[13].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[13].TypeCooldown.Type data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes append value "unknown" - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:context New.ItemData[14].TypeCooldown.Type + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].EquipmentCooldownTypes[-1] set from storage asset:artifact New.ItemData[14].TypeCooldown.Type diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/add_tag_each_victim.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/add_tag_each_victim.mcfunction similarity index 61% rename from TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/add_tag_each_victim.mcfunction rename to TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/add_tag_each_victim.mcfunction index b82da55379..c4a4c014a5 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/add_tag_each_victim.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/add_tag_each_victim.mcfunction @@ -1,10 +1,11 @@ -#> asset_manager:artifact/triggers/attack/add_tag_each_victim +#> asset_manager:artifact/triggers/event/attack/add_tag_each_victim # # # # @within function -# asset_manager:artifact/triggers/attack/foreach -# asset_manager:artifact/triggers/attack/add_tag_each_victim +# asset_manager:artifact/triggers/vanilla/ +# asset_manager:artifact/triggers/attack*/foreach +# asset_manager:artifact/triggers/event/attack/add_tag_each_victim #> Private # @private @@ -17,4 +18,4 @@ execute as @e[type=#lib:living,type=!player,distance=..150] if score @s MobUUID scoreboard players reset $AttackTarget Temporary -execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/attack/add_tag_each_victim +execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/get_max_amount.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/get_max_amount.mcfunction new file mode 100644 index 0000000000..0db0a2f186 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/get_max_amount.mcfunction @@ -0,0 +1,13 @@ +#> asset_manager:artifact/triggers/event/attack/get_max_amount +# +# +# +# @within function +# asset_manager:artifact/triggers/vanilla/ +# asset_manager:artifact/triggers/attack*/foreach + +function lib:array/session/open +data modify storage lib: Array set from storage asset:context Attack.Amounts +function lib:array/math/max +data modify storage asset:context Attack.Amount set from storage lib: MaxResult +function lib:array/session/close diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/mp_heal.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/mp_heal.mcfunction new file mode 100644 index 0000000000..fd6d1b9b4a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/attack/mp_heal.mcfunction @@ -0,0 +1,18 @@ +#> asset_manager:artifact/triggers/event/attack/mp_heal +# +# +# +# @within function asset_manager:artifact/triggers/attack*/foreach + +#> private +# @private + #declare score_holder $MPHeal + #declare score_holder $Hits + +execute if data storage asset:artifact TargetItem.MPHealWhenHit store result score $MPHeal Temporary run data get storage asset:artifact TargetItem.MPHealWhenHit +execute if data storage asset:artifact TargetItem.MPHealWhenHit store result score $Hits Temporary if data storage asset:context Attack.To[] +execute if data storage asset:artifact TargetItem.MPHealWhenHit store result storage api: Argument.Fluctuation int 1 run scoreboard players operation $MPHeal Temporary *= $Hits Temporary +execute if data storage asset:artifact TargetItem.MPHealWhenHit run data modify storage api: Argument.DisableLog set value true +execute if data storage asset:artifact TargetItem.MPHealWhenHit run function api:mp/fluctuation +scoreboard players reset $MPHeal Temporary +scoreboard players reset $Hits Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/damage/add_tag_attacker.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/damage/add_tag_attacker.mcfunction new file mode 100644 index 0000000000..3ac1142ea2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/damage/add_tag_attacker.mcfunction @@ -0,0 +1,13 @@ +#> asset_manager:artifact/triggers/event/damage/add_tag_attacker +# +# +# +# @within function asset_manager:artifact/triggers/damage*/foreach + +#> Private +# @private + #declare score_holder $AttackedFrom + +execute if data storage asset:context Damage.From store result score $AttackedFrom Temporary run data get storage asset:context Damage.From +execute if data storage asset:context Damage.From as @e[type=#lib:living,type=!player,distance=..150] if score @s MobUUID = $AttackedFrom Temporary run tag @s add Attacker +scoreboard players reset $AttackedFrom Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/kill/add_tag_victim.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/kill/add_tag_victim.mcfunction new file mode 100644 index 0000000000..d7faaf6a2a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/kill/add_tag_victim.mcfunction @@ -0,0 +1,13 @@ +#> asset_manager:artifact/triggers/event/kill/add_tag_victim +# +# +# +# @within function asset_manager:artifact/triggers/kill*/foreach + +#> Private +# @private + #declare score_holder $KillTarget + +execute if data storage asset:context Kill.To store result score $KillTarget Temporary run data get storage asset:context Kill.To +execute if data storage asset:context Kill.To as @e[type=#lib:living,type=!player,distance=..150] if score @s MobUUID = $KillTarget Temporary run tag @s add Victim +scoreboard players reset $KillTarget Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/.mcfunction new file mode 100644 index 0000000000..a868ec298d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/.mcfunction @@ -0,0 +1,13 @@ +#> asset_manager:artifact/triggers/event/sneak/get_sneak_time/ +# +# +# +# @within function asset_manager:artifact/triggers/*sneak*/ + +execute if data storage asset:artifact TargetItem{Slot:"mainhand"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Mainhand +execute if data storage asset:artifact TargetItem{Slot:"offhand"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Offhand +execute if data storage asset:artifact TargetItem{Slot:"feet"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Feet +execute if data storage asset:artifact TargetItem{Slot:"legs"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Legs +execute if data storage asset:artifact TargetItem{Slot:"chest"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Chest +execute if data storage asset:artifact TargetItem{Slot:"head"} store result storage asset:context SneakTime int 1 run scoreboard players get @s Sneak.Head +execute if data storage asset:artifact TargetItem{Slot:"hotbar"} store result storage asset:context SneakTime int 1 run function asset_manager:artifact/triggers/event/sneak/get_sneak_time/hotbar.m with storage asset:artifact TargetItem diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/hotbar.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/hotbar.m.mcfunction new file mode 100644 index 0000000000..adcd1db601 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/get_sneak_time/hotbar.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/event/sneak/get_sneak_time/hotbar.m +# +# +# +# @input args InvSlot : int +# @within function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + +$return run scoreboard players get @s Sneak.Hotbar$(InvSlot) diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset.mcfunction similarity index 73% rename from TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset.mcfunction rename to TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset.mcfunction index 6358fc72a5..51018e6a24 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset.mcfunction @@ -1,8 +1,10 @@ -#> asset_manager:artifact/triggers/sneak/reset +#> asset_manager:artifact/triggers/event/sneak/reset # -# スニークトリガー用スコアボードをすべてリセットします # -# @within function core:tick/player/post +# +# @within function +# core:tick/player/post +# asset_manager:artifact/triggers/ scoreboard players reset @s Sneak.Mainhand scoreboard players reset @s Sneak.Offhand @@ -18,4 +20,4 @@ scoreboard players reset @s Sneak.Hotbar4 scoreboard players reset @s Sneak.Hotbar5 scoreboard players reset @s Sneak.Hotbar6 scoreboard players reset @s Sneak.Hotbar7 -scoreboard players reset @s Sneak.Hotbar8 \ No newline at end of file +scoreboard players reset @s Sneak.Hotbar8 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset_when_change_item.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset_when_change_item.mcfunction new file mode 100644 index 0000000000..f7d5e34d10 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/event/sneak/reset_when_change_item.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/event/sneak/reset_when_change_item +# +# +# +# @within function asset_manager:artifact/triggers/ + +execute if data storage asset:artifact EquipmentChanges[00]._{_:false} run scoreboard players set @s Sneak.Mainhand 1 +execute if data storage asset:artifact EquipmentChanges[01]._{_:false} run scoreboard players set @s Sneak.Offhand 1 +execute if data storage asset:artifact EquipmentChanges[02]._{_:false} run scoreboard players set @s Sneak.Head 1 +execute if data storage asset:artifact EquipmentChanges[03]._{_:false} run scoreboard players set @s Sneak.Chest 1 +execute if data storage asset:artifact EquipmentChanges[04]._{_:false} run scoreboard players set @s Sneak.Legs 1 +execute if data storage asset:artifact EquipmentChanges[05]._{_:false} run scoreboard players set @s Sneak.Feet 1 +execute if data storage asset:artifact EquipmentChanges[06]._{_:false} run scoreboard players set @s Sneak.Hotbar0 1 +execute if data storage asset:artifact EquipmentChanges[07]._{_:false} run scoreboard players set @s Sneak.Hotbar1 1 +execute if data storage asset:artifact EquipmentChanges[08]._{_:false} run scoreboard players set @s Sneak.Hotbar2 1 +execute if data storage asset:artifact EquipmentChanges[09]._{_:false} run scoreboard players set @s Sneak.Hotbar3 1 +execute if data storage asset:artifact EquipmentChanges[10]._{_:false} run scoreboard players set @s Sneak.Hotbar4 1 +execute if data storage asset:artifact EquipmentChanges[11]._{_:false} run scoreboard players set @s Sneak.Hotbar5 1 +execute if data storage asset:artifact EquipmentChanges[12]._{_:false} run scoreboard players set @s Sneak.Hotbar6 1 +execute if data storage asset:artifact EquipmentChanges[13]._{_:false} run scoreboard players set @s Sneak.Hotbar7 1 +execute if data storage asset:artifact EquipmentChanges[14]._{_:false} run scoreboard players set @s Sneak.Hotbar8 1 diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/.mcfunction index d6841fac8e..56dbed3039 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/.mcfunction @@ -1,12 +1,15 @@ #> asset_manager:artifact/triggers/heal/ # -# 各神器処理へデータ受け渡し # -# @within function asset_manager:artifact/triggers/ +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Heal[0] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Heal[] +# それぞれについて処理する function asset_manager:artifact/triggers/heal/foreach -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/add_tag_each_receiver.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/add_tag_each_receiver.mcfunction index 08afe8b545..bc6b06c8bc 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/add_tag_each_receiver.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/add_tag_each_receiver.mcfunction @@ -8,7 +8,7 @@ #> Private # @private -#declare score_holder $HealTarget + #declare score_holder $HealTarget execute store result score $HealTarget Temporary run data get storage asset:artifact HealTargets[-1] data remove storage asset:artifact HealTargets[-1] diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/check.m.mcfunction new file mode 100644 index 0000000000..9aaf6b03fe --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/heal/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/heal/foreach + +$function asset:artifact/alias/$(id)/heal/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/foreach.mcfunction index 3cf761db93..972a7b02ba 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/foreach.mcfunction @@ -4,23 +4,30 @@ # # @within function asset_manager:artifact/triggers/heal/* -# イベントデータ取得 - data modify storage asset:context Heal set from storage asset:artifact ArtifactEvents.Heal[-1] - data remove storage asset:artifact ArtifactEvents.Heal[-1] -# ヒール先を取得し、Receiver を付与する (null の可能性もある) - data modify storage asset:artifact HealTargets set from storage asset:context Heal.To - execute if data storage asset:artifact HealTargets[0] run function asset_manager:artifact/triggers/heal/add_tag_each_receiver -# 最大ヒール量の計算 - function lib:array/session/open - data modify storage lib: Array set from storage asset:context Heal.Amounts - function lib:array/math/max - data modify storage asset:context Heal.Amount set from storage lib: MaxResult - function lib:array/session/close -# 神器側に受け渡し - function #asset:artifact/heal +# イベントデータ処理 + # データを取得 + data modify storage asset:context Heal set from storage asset:artifact Events[-1] + # ヒール先を取得し、Receiver を付与する (null の可能性もある) + data modify storage asset:artifact HealTargets set from storage asset:context Heal.To + function asset_manager:artifact/triggers/heal/add_tag_each_receiver + # 最大ヒール量の計算 + function lib:array/session/open + data modify storage lib: Array set from storage asset:context Heal.Amounts + function lib:array/math/max + data modify storage asset:context Heal.Amount set from storage lib: MaxResult + function lib:array/session/close + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/heal/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/heal/use + # リセット + tag @a[tag=Receiver] remove Receiver + tag @s remove CanUsed data remove storage asset:context Heal data remove storage asset:artifact HealTargets - tag @a[tag=Receiver] remove Receiver -# イベントがまだあれば再帰する - execute if data storage asset:artifact ArtifactEvents.Heal[0] run function asset_manager:artifact/triggers/heal/foreach + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/heal/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/heal.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/heal.m.mcfunction new file mode 100644 index 0000000000..ae517cec0a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/heal.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/heal/heal.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/heal/use + +$function asset:artifact/alias/$(id)/heal/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/use.mcfunction new file mode 100644 index 0000000000..e61344c4cf --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/heal/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/heal/use +# +# +# +# @within function asset_manager:artifact/triggers/heal/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/heal/heal.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/.mcfunction new file mode 100644 index 0000000000..07a2df2591 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/.mcfunction @@ -0,0 +1,16 @@ +#> asset_manager:artifact/triggers/keep_click/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.UsingItem] run return fail +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/keep_click/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_click/use + +# リセット + tag @s remove CanUsed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/check.m.mcfunction new file mode 100644 index 0000000000..0e1354bba6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_click/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_click/ + +$function asset:artifact/alias/$(id)/keep_click/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/keep_click.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/keep_click.m.mcfunction new file mode 100644 index 0000000000..05abe0353b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/keep_click.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_click/keep_click.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_click/use + +$function asset:artifact/alias/$(id)/keep_click/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/use.mcfunction new file mode 100644 index 0000000000..41c7378b3a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_click/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_click/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_click/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_click/keep_click.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/.mcfunction new file mode 100644 index 0000000000..8284e9b589 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/triggers/keep_sneak/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/check.m.mcfunction new file mode 100644 index 0000000000..26f242f103 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak/ + +$function asset:artifact/alias/$(id)/keep_sneak/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/keep_sneak.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/keep_sneak.m.mcfunction new file mode 100644 index 0000000000..8500078ddd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/keep_sneak.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak/keep_sneak.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak/use + +$function asset:artifact/alias/$(id)/keep_sneak/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/use.mcfunction new file mode 100644 index 0000000000..e164f83fe7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak/keep_sneak.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/.mcfunction new file mode 100644 index 0000000000..3a48d5fa85 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_10s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 200.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 200.. run function asset_manager:artifact/triggers/keep_sneak_10s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_10s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/check.m.mcfunction new file mode 100644 index 0000000000..3cbc2d7f4c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_10s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_10s/ + +$function asset:artifact/alias/$(id)/keep_sneak_10s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/keep_sneak_10s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/keep_sneak_10s.m.mcfunction new file mode 100644 index 0000000000..eeeec01837 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/keep_sneak_10s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_10s/keep_sneak_10s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_10s/use + +$function asset:artifact/alias/$(id)/keep_sneak_10s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/use.mcfunction new file mode 100644 index 0000000000..c251a6c4fb --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_10s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_10s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_10s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_10s/keep_sneak_10s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/.mcfunction new file mode 100644 index 0000000000..2b74360f56 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_1s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 20.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 20.. run function asset_manager:artifact/triggers/keep_sneak_1s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_1s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/check.m.mcfunction new file mode 100644 index 0000000000..d3c4b84b71 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_1s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_1s/ + +$function asset:artifact/alias/$(id)/keep_sneak_1s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/keep_sneak_1s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/keep_sneak_1s.m.mcfunction new file mode 100644 index 0000000000..36f0a1e41e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/keep_sneak_1s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_1s/keep_sneak_1s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_1s/use + +$function asset:artifact/alias/$(id)/keep_sneak_1s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/use.mcfunction new file mode 100644 index 0000000000..be70d6192e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_1s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_1s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_1s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_1s/keep_sneak_1s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/.mcfunction new file mode 100644 index 0000000000..64d2918c16 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_2s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 1.. run function asset_manager:artifact/triggers/keep_sneak_2s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_2s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/check.m.mcfunction new file mode 100644 index 0000000000..0362983df4 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_2s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_2s/ + +$function asset:artifact/alias/$(id)/keep_sneak_2s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/keep_sneak_2s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/keep_sneak_2s.m.mcfunction new file mode 100644 index 0000000000..f553f3b320 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/keep_sneak_2s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_2s/keep_sneak_2s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_2s/use + +$function asset:artifact/alias/$(id)/keep_sneak_2s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/use.mcfunction new file mode 100644 index 0000000000..8868f67a62 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_2s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_2s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_2s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_2s/keep_sneak_2s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/.mcfunction new file mode 100644 index 0000000000..1613b0a359 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_3s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 60.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 60.. run function asset_manager:artifact/triggers/keep_sneak_3s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_3s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/check.m.mcfunction new file mode 100644 index 0000000000..c8031cbb6a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_3s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_3s/ + +$function asset:artifact/alias/$(id)/keep_sneak_3s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/keep_sneak_3s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/keep_sneak_3s.m.mcfunction new file mode 100644 index 0000000000..73853a6ecb --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/keep_sneak_3s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_3s/keep_sneak_3s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_3s/use + +$function asset:artifact/alias/$(id)/keep_sneak_3s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/use.mcfunction new file mode 100644 index 0000000000..6c805415cd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_3s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_3s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_3s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_3s/keep_sneak_3s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/.mcfunction new file mode 100644 index 0000000000..73b4fcaa0e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_4s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 80.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 80.. run function asset_manager:artifact/triggers/keep_sneak_4s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_4s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/check.m.mcfunction new file mode 100644 index 0000000000..1ba1884237 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_4s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_4s/ + +$function asset:artifact/alias/$(id)/keep_sneak_4s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/keep_sneak_4s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/keep_sneak_4s.m.mcfunction new file mode 100644 index 0000000000..4f9d6a0816 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/keep_sneak_4s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_4s/keep_sneak_4s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_4s/use + +$function asset:artifact/alias/$(id)/keep_sneak_4s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/use.mcfunction new file mode 100644 index 0000000000..229a7ef64f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_4s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_4s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_4s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_4s/keep_sneak_4s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/.mcfunction new file mode 100644 index 0000000000..d379c65185 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/keep_sneak_5s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 100.. run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 100.. run function asset_manager:artifact/triggers/keep_sneak_5s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_sneak_5s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/check.m.mcfunction new file mode 100644 index 0000000000..9902af7e10 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_5s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_5s/ + +$function asset:artifact/alias/$(id)/keep_sneak_5s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/keep_sneak_5s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/keep_sneak_5s.m.mcfunction new file mode 100644 index 0000000000..e20bda0786 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/keep_sneak_5s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/keep_sneak_5s/keep_sneak_5s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/keep_sneak_5s/use + +$function asset:artifact/alias/$(id)/keep_sneak_5s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/use.mcfunction new file mode 100644 index 0000000000..fe581cf111 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/keep_sneak_5s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/keep_sneak_5s/use +# +# +# +# @within function asset_manager:artifact/triggers/keep_sneak_5s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/keep_sneak_5s/keep_sneak_5s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/.mcfunction new file mode 100644 index 0000000000..e4f5839d70 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/kill/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Kill[0] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Kill[] +# それぞれについて処理する + function asset_manager:artifact/triggers/kill/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/check.m.mcfunction new file mode 100644 index 0000000000..8834224916 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill/foreach + +$function asset:artifact/alias/$(id)/kill/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/foreach.mcfunction new file mode 100644 index 0000000000..07420bdb6e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/kill/foreach +# +# +# +# @within function asset_manager:artifact/triggers/kill/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Kill set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/kill/add_tag_victim + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/kill/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/kill/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Kill + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/kill/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/kill.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/kill.m.mcfunction new file mode 100644 index 0000000000..9a14a7eadc --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/kill.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill/kill.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill/use + +$function asset:artifact/alias/$(id)/kill/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/use.mcfunction new file mode 100644 index 0000000000..3c5a28a9be --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/kill/use +# +# +# +# @within function asset_manager:artifact/triggers/kill/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/kill/kill.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/.mcfunction new file mode 100644 index 0000000000..b3387db96a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/kill_explosion/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_explosion"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_explosion"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/kill_explosion/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/check.m.mcfunction new file mode 100644 index 0000000000..c3fae140d3 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_explosion/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_explosion/foreach + +$function asset:artifact/alias/$(id)/kill_explosion/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/foreach.mcfunction new file mode 100644 index 0000000000..035047fa36 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/kill_explosion/foreach +# +# +# +# @within function asset_manager:artifact/triggers/kill_explosion/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Kill set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/kill/add_tag_victim + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/kill_explosion/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/kill_explosion/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Kill + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/kill_explosion/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/kill_explosion.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/kill_explosion.m.mcfunction new file mode 100644 index 0000000000..cb8571a3ff --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/kill_explosion.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_explosion/kill_explosion.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_explosion/use + +$function asset:artifact/alias/$(id)/kill_explosion/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/use.mcfunction new file mode 100644 index 0000000000..7f15f18362 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_explosion/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/kill_explosion/use +# +# +# +# @within function asset_manager:artifact/triggers/kill_explosion/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/kill_explosion/kill_explosion.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/.mcfunction new file mode 100644 index 0000000000..8a3910febc --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/kill_melee/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_melee"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_melee"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/kill_melee/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/check.m.mcfunction new file mode 100644 index 0000000000..e5da866ca4 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_melee/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_melee/foreach + +$function asset:artifact/alias/$(id)/kill_melee/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/foreach.mcfunction new file mode 100644 index 0000000000..917dd6dac6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/kill_melee/foreach +# +# +# +# @within function asset_manager:artifact/triggers/kill_melee/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Kill set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/kill/add_tag_victim + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/kill_melee/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/kill_melee/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Kill + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/kill_melee/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/kill_melee.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/kill_melee.m.mcfunction new file mode 100644 index 0000000000..b811b2bbc6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/kill_melee.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_melee/kill_melee.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_melee/use + +$function asset:artifact/alias/$(id)/kill_melee/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/use.mcfunction new file mode 100644 index 0000000000..b1a15d0d2d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_melee/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/kill_melee/use +# +# +# +# @within function asset_manager:artifact/triggers/kill_melee/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/kill_melee/kill_melee.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/.mcfunction new file mode 100644 index 0000000000..23eac2383a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/.mcfunction @@ -0,0 +1,15 @@ +#> asset_manager:artifact/triggers/kill_projectile/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_projectile"}] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Kill[{Type:"vanilla_projectile"}] +# それぞれについて処理する + function asset_manager:artifact/triggers/kill_projectile/foreach + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/check.m.mcfunction new file mode 100644 index 0000000000..c3ec03f53b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_projectile/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_projectile/foreach + +$function asset:artifact/alias/$(id)/kill_projectile/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/foreach.mcfunction new file mode 100644 index 0000000000..9b4c310275 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/foreach.mcfunction @@ -0,0 +1,25 @@ +#> asset_manager:artifact/triggers/kill_projectile/foreach +# +# +# +# @within function asset_manager:artifact/triggers/kill_projectile/* + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Kill set from storage asset:artifact Events[-1] + # 攻撃先を取得し、Victim を付与する (null の可能性もある) + function asset_manager:artifact/triggers/event/kill/add_tag_victim + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/kill_projectile/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/kill_projectile/use + +# リセット + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim + tag @s remove CanUsed + data remove storage asset:context Kill + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/kill_projectile/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/kill_projectile.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/kill_projectile.m.mcfunction new file mode 100644 index 0000000000..bd89d34b37 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/kill_projectile.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/kill_projectile/kill_projectile.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/kill_projectile/use + +$function asset:artifact/alias/$(id)/kill_projectile/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/use.mcfunction new file mode 100644 index 0000000000..a35ca8d118 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/kill_projectile/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/kill_projectile/use +# +# +# +# @within function asset_manager:artifact/triggers/kill_projectile/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/kill_projectile/kill_projectile.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/.mcfunction deleted file mode 100644 index 70392828c9..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset_manager:artifact/triggers/killed/ -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し - function asset_manager:artifact/triggers/killed/foreach -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/foreach.mcfunction deleted file mode 100644 index de626aee18..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/killed/foreach.mcfunction +++ /dev/null @@ -1,27 +0,0 @@ -#> asset_manager:artifact/triggers/killed/foreach -# -# -# -# @within function asset_manager:artifact/triggers/killed/* - -#> Private -# @private -#declare score_holder $KillTarget - -# イベントデータ取得 - data modify storage asset:context Killed set from storage asset:artifact ArtifactEvents.Killed[-1] - data remove storage asset:artifact ArtifactEvents.Killed[-1] -# 攻撃先を取得し、Victim を付与する (null の可能性もある) - execute if data storage asset:context Killed.To store result score $KillTarget Temporary run data get storage asset:context Killed.To - execute if data storage asset:context Killed.To as @e[type=#lib:living,type=!player,distance=..150] if score @s MobUUID = $KillTarget Temporary run tag @s add Victim - scoreboard players reset $KillTarget Temporary -# 神器側に受け渡し - function #asset:artifact/killed - execute if data storage asset:context Killed{Type:"vanilla_melee" } run function #asset:artifact/killed/melee - execute if data storage asset:context Killed{Type:"vanilla_projectile"} run function #asset:artifact/killed/projectile - execute if data storage asset:context Killed{Type:"vanilla_explosion" } run function #asset:artifact/killed/explosion -# リセット - data remove storage asset:context Killed - tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim -# イベントがまだあれば再帰する - execute if data storage asset:artifact ArtifactEvents.Killed[0] run function asset_manager:artifact/triggers/killed/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/.mcfunction index 257083925d..781404b856 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/.mcfunction @@ -1,12 +1,15 @@ #> asset_manager:artifact/triggers/receive_heal/ # -# 各神器処理へデータ受け渡し # -# @within function asset_manager:artifact/triggers/ +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し +# フラグが存在しているか確認する + execute unless data storage asset:artifact ArtifactEvents.ReceiveHeal[0] run return fail +# イベントを取得する + data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.ReceiveHeal[] +# それぞれについて処理する function asset_manager:artifact/triggers/receive_heal/foreach -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current + +# リセット + data remove storage asset:artifact Events diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/check.m.mcfunction new file mode 100644 index 0000000000..7d75bcfe3d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/receive_heal/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/receive_heal/foreach + +$function asset:artifact/alias/$(id)/receive_heal/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/foreach.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/foreach.mcfunction index 2a7a1f6aaf..92ffea4b6a 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/foreach.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/foreach.mcfunction @@ -6,19 +6,26 @@ #> Private # @private -#declare score_holder $HealedFrom + #declare score_holder $HealedFrom + +# イベントデータ処理 + # データを取得 + data modify storage asset:context ReceiveHeal set from storage asset:artifact Events[-1] + # ヒール元を取得し、Healer を付与する (null の可能性もある) + execute if data storage asset:context ReceiveHeal.From store result score $HealedFrom Temporary run data get storage asset:context ReceiveHeal.From + execute if data storage asset:context ReceiveHeal.From as @a if score @s UserID = $HealedFrom Temporary run tag @s add Healer + scoreboard players reset $HealedFrom Temporary + +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/receive_heal/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/receive_heal/use -# イベントデータ取得 - data modify storage asset:context ReceiveHeal set from storage asset:artifact ArtifactEvents.ReceiveHeal[-1] - data remove storage asset:artifact ArtifactEvents.ReceiveHeal[-1] -# ヒール元を取得し、Healer を付与する (null の可能性もある) - execute if data storage asset:context ReceiveHeal.From store result score $HealedFrom Temporary run data get storage asset:context ReceiveHeal.From - execute if data storage asset:context ReceiveHeal.From as @a if score @s UserID = $HealedFrom Temporary run tag @s add Healer - scoreboard players reset $HealedFrom Temporary -# 神器側に受け渡し - function #asset:artifact/receive_heal # リセット - data remove storage asset:context ReceiveHeal tag @a[tag=Healer] remove Healer -# イベントがまだあれば再帰する - execute if data storage asset:artifact ArtifactEvents.ReceiveHeal[0] run function asset_manager:artifact/triggers/receive_heal/foreach + tag @s remove CanUsed + data remove storage asset:context ReceiveHeal + data remove storage asset:artifact Events[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/receive_heal/foreach diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/receive_heal.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/receive_heal.m.mcfunction new file mode 100644 index 0000000000..c3d21e337a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/receive_heal.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/receive_heal/receive_heal.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/receive_heal/use + +$function asset:artifact/alias/$(id)/receive_heal/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/use.mcfunction new file mode 100644 index 0000000000..e2a4735ea1 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/receive_heal/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/receive_heal/use +# +# +# +# @within function asset_manager:artifact/triggers/receive_heal/foreach + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/receive_heal/receive_heal.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/.mcfunction index b29503db0c..0d13701ebf 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/.mcfunction @@ -4,69 +4,18 @@ # # @within function asset_manager:artifact/triggers/ -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# スロット毎のチェック - function asset_manager:artifact/triggers/sneak/reset_when_change_item -# asset:contextにスニーク時間を設定する - function asset_manager:artifact/triggers/sneak/set_context -# 神器側に受け渡し - # keepトリガー類 - function #asset:artifact/sneak/keep/ +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 1 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 1 run function asset_manager:artifact/triggers/sneak/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak/use - execute if score @s Sneak matches 20.. run scoreboard players set $SneakThreshold Temporary 20 - execute if score @s Sneak matches 20.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 20.. run function #asset:artifact/sneak/keep/1s - - execute if score @s Sneak matches 40.. run scoreboard players set $SneakThreshold Temporary 40 - execute if score @s Sneak matches 40.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 40.. run function #asset:artifact/sneak/keep/2s - - execute if score @s Sneak matches 60.. run scoreboard players set $SneakThreshold Temporary 60 - execute if score @s Sneak matches 60.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 60.. run function #asset:artifact/sneak/keep/3s - - execute if score @s Sneak matches 80.. run scoreboard players set $SneakThreshold Temporary 80 - execute if score @s Sneak matches 80.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 80.. run function #asset:artifact/sneak/keep/4s - - execute if score @s Sneak matches 100.. run scoreboard players set $SneakThreshold Temporary 100 - execute if score @s Sneak matches 100.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 100.. run function #asset:artifact/sneak/keep/5s - - execute if score @s Sneak matches 200.. run scoreboard players set $SneakThreshold Temporary 200 - execute if score @s Sneak matches 200.. run function asset_manager:artifact/triggers/sneak/reset_threshold_less - execute if score @s Sneak matches 200.. run function #asset:artifact/sneak/keep/10s - - # 単発トリガー類 - scoreboard players set $SneakThreshold Temporary 1 - function asset_manager:artifact/triggers/sneak/reset_value_not-equal - function #asset:artifact/sneak/ - - execute if score @s Sneak matches 20.. run scoreboard players set $SneakThreshold Temporary 20 - execute if score @s Sneak matches 20.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 20.. run function #asset:artifact/sneak/1s - - execute if score @s Sneak matches 40.. run scoreboard players set $SneakThreshold Temporary 40 - execute if score @s Sneak matches 40.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 40.. run function #asset:artifact/sneak/2s - - execute if score @s Sneak matches 60.. run scoreboard players set $SneakThreshold Temporary 60 - execute if score @s Sneak matches 60.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 60.. run function #asset:artifact/sneak/3s - - execute if score @s Sneak matches 80.. run scoreboard players set $SneakThreshold Temporary 80 - execute if score @s Sneak matches 80.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 80.. run function #asset:artifact/sneak/4s - - execute if score @s Sneak matches 100.. run scoreboard players set $SneakThreshold Temporary 100 - execute if score @s Sneak matches 100.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 100.. run function #asset:artifact/sneak/5s - - execute if score @s Sneak matches 200.. run scoreboard players set $SneakThreshold Temporary 200 - execute if score @s Sneak matches 200.. run function asset_manager:artifact/triggers/sneak/reset_value_not-equal - execute if score @s Sneak matches 200.. run function #asset:artifact/sneak/10s -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current # リセット - data remove storage asset:context SneakTime \ No newline at end of file + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/check.m.mcfunction new file mode 100644 index 0000000000..c17290f315 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak/ + +$function asset:artifact/alias/$(id)/sneak/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_threshold_less.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_threshold_less.mcfunction deleted file mode 100644 index 844edeca6f..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_threshold_less.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> asset_manager:artifact/triggers/sneak/reset_threshold_less -# -# 各slotについて$SneakThreshold未満の値の場合、その値を-1に設定します -# -# @within function asset_manager:artifact/triggers/sneak/ - -# 処理 - execute unless score @s Sneak.Mainhand >= $SneakThreshold Temporary run data modify storage asset:context id.mainhand set value -1 - execute unless score @s Sneak.Offhand >= $SneakThreshold Temporary run data modify storage asset:context id.offhand set value -1 - execute unless score @s Sneak.Head >= $SneakThreshold Temporary run data modify storage asset:context id.head set value -1 - execute unless score @s Sneak.Chest >= $SneakThreshold Temporary run data modify storage asset:context id.chest set value -1 - execute unless score @s Sneak.Legs >= $SneakThreshold Temporary run data modify storage asset:context id.legs set value -1 - execute unless score @s Sneak.Feet >= $SneakThreshold Temporary run data modify storage asset:context id.feet set value -1 - execute unless score @s Sneak.Hotbar0 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[0] set value -1 - execute unless score @s Sneak.Hotbar1 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[1] set value -1 - execute unless score @s Sneak.Hotbar2 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[2] set value -1 - execute unless score @s Sneak.Hotbar3 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[3] set value -1 - execute unless score @s Sneak.Hotbar4 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[4] set value -1 - execute unless score @s Sneak.Hotbar5 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[5] set value -1 - execute unless score @s Sneak.Hotbar6 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[6] set value -1 - execute unless score @s Sneak.Hotbar7 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[7] set value -1 - execute unless score @s Sneak.Hotbar8 >= $SneakThreshold Temporary run data modify storage asset:context id.hotbar[8] set value -1 -# リセット - scoreboard players reset $SneakThreshold \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_value_not-equal.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_value_not-equal.mcfunction deleted file mode 100644 index b3cb110980..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_value_not-equal.mcfunction +++ /dev/null @@ -1,26 +0,0 @@ -#> asset_manager:artifact/triggers/sneak/reset_value_not-equal -# -# 各slotについて$SneakThresholdと同値ではない場合、その値を-1に設定します -# -# @within function asset_manager:artifact/triggers/sneak/ - -# 初期化 - data modify storage asset:context id set from storage asset:context New.id -# 処理 - execute unless score @s Sneak.Mainhand = $SneakThreshold Temporary run data modify storage asset:context id.mainhand set value -1 - execute unless score @s Sneak.Offhand = $SneakThreshold Temporary run data modify storage asset:context id.offhand set value -1 - execute unless score @s Sneak.Head = $SneakThreshold Temporary run data modify storage asset:context id.head set value -1 - execute unless score @s Sneak.Chest = $SneakThreshold Temporary run data modify storage asset:context id.chest set value -1 - execute unless score @s Sneak.Legs = $SneakThreshold Temporary run data modify storage asset:context id.legs set value -1 - execute unless score @s Sneak.Feet = $SneakThreshold Temporary run data modify storage asset:context id.feet set value -1 - execute unless score @s Sneak.Hotbar0 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[0] set value -1 - execute unless score @s Sneak.Hotbar1 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[1] set value -1 - execute unless score @s Sneak.Hotbar2 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[2] set value -1 - execute unless score @s Sneak.Hotbar3 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[3] set value -1 - execute unless score @s Sneak.Hotbar4 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[4] set value -1 - execute unless score @s Sneak.Hotbar5 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[5] set value -1 - execute unless score @s Sneak.Hotbar6 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[6] set value -1 - execute unless score @s Sneak.Hotbar7 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[7] set value -1 - execute unless score @s Sneak.Hotbar8 = $SneakThreshold Temporary run data modify storage asset:context id.hotbar[8] set value -1 -# リセット - scoreboard players reset $SneakThreshold \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_when_change_item.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_when_change_item.mcfunction deleted file mode 100644 index e545d361ed..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/reset_when_change_item.mcfunction +++ /dev/null @@ -1,28 +0,0 @@ -#> asset_manager:artifact/triggers/sneak/reset_when_change_item -# -# 各slotについて前のアイテムデータと一致していない場合、その値のスコアボードを1に設定します -# -# Q. なんで0やnullじゃなくて1なの? A. このfunctionが実行されるのはSneak時なので0|null+1の値 = 1になる -# -# @within function asset_manager:artifact/triggers/sneak/ - -#> private use -# @private - #declare score_holder $Temp - -# 変更のあったスロットのデータをリセットする - execute if data storage asset:artifact EquipmentChanges[00]._{_:false} run scoreboard players set @s Sneak.Mainhand 1 - execute if data storage asset:artifact EquipmentChanges[01]._{_:false} run scoreboard players set @s Sneak.Offhand 1 - execute if data storage asset:artifact EquipmentChanges[02]._{_:false} run scoreboard players set @s Sneak.Head 1 - execute if data storage asset:artifact EquipmentChanges[03]._{_:false} run scoreboard players set @s Sneak.Chest 1 - execute if data storage asset:artifact EquipmentChanges[04]._{_:false} run scoreboard players set @s Sneak.Legs 1 - execute if data storage asset:artifact EquipmentChanges[05]._{_:false} run scoreboard players set @s Sneak.Feet 1 - execute if data storage asset:artifact EquipmentChanges[06]._{_:false} run scoreboard players set @s Sneak.Hotbar0 1 - execute if data storage asset:artifact EquipmentChanges[07]._{_:false} run scoreboard players set @s Sneak.Hotbar1 1 - execute if data storage asset:artifact EquipmentChanges[08]._{_:false} run scoreboard players set @s Sneak.Hotbar2 1 - execute if data storage asset:artifact EquipmentChanges[09]._{_:false} run scoreboard players set @s Sneak.Hotbar3 1 - execute if data storage asset:artifact EquipmentChanges[10]._{_:false} run scoreboard players set @s Sneak.Hotbar4 1 - execute if data storage asset:artifact EquipmentChanges[11]._{_:false} run scoreboard players set @s Sneak.Hotbar5 1 - execute if data storage asset:artifact EquipmentChanges[12]._{_:false} run scoreboard players set @s Sneak.Hotbar6 1 - execute if data storage asset:artifact EquipmentChanges[13]._{_:false} run scoreboard players set @s Sneak.Hotbar7 1 - execute if data storage asset:artifact EquipmentChanges[14]._{_:false} run scoreboard players set @s Sneak.Hotbar8 1 \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/set_context.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/set_context.mcfunction deleted file mode 100644 index 95d07d15e1..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/set_context.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -#> asset_manager:artifact/triggers/sneak/set_context -# -# asset:contextにスニークした時間のデータを設定します -# -# @within function asset_manager:artifact/triggers/sneak/ - -execute store result storage asset:context SneakTime.mainhand int 1 run scoreboard players get @s Sneak.Mainhand -execute store result storage asset:context SneakTime.offhand int 1 run scoreboard players get @s Sneak.Offhand -execute store result storage asset:context SneakTime.head int 1 run scoreboard players get @s Sneak.Head -execute store result storage asset:context SneakTime.chest int 1 run scoreboard players get @s Sneak.Chest -execute store result storage asset:context SneakTime.legs int 1 run scoreboard players get @s Sneak.Legs -execute store result storage asset:context SneakTime.feet int 1 run scoreboard players get @s Sneak.Feet -execute store result storage asset:context SneakTime.hotbar[0] int 1 run scoreboard players get @s Sneak.Hotbar0 -execute store result storage asset:context SneakTime.hotbar[1] int 1 run scoreboard players get @s Sneak.Hotbar1 -execute store result storage asset:context SneakTime.hotbar[2] int 1 run scoreboard players get @s Sneak.Hotbar2 -execute store result storage asset:context SneakTime.hotbar[3] int 1 run scoreboard players get @s Sneak.Hotbar3 -execute store result storage asset:context SneakTime.hotbar[4] int 1 run scoreboard players get @s Sneak.Hotbar4 -execute store result storage asset:context SneakTime.hotbar[5] int 1 run scoreboard players get @s Sneak.Hotbar5 -execute store result storage asset:context SneakTime.hotbar[6] int 1 run scoreboard players get @s Sneak.Hotbar6 -execute store result storage asset:context SneakTime.hotbar[7] int 1 run scoreboard players get @s Sneak.Hotbar7 -execute store result storage asset:context SneakTime.hotbar[8] int 1 run scoreboard players get @s Sneak.Hotbar8 \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/sneak.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/sneak.m.mcfunction new file mode 100644 index 0000000000..63c904694a --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/sneak.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak/sneak.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak/use + +$function asset:artifact/alias/$(id)/sneak/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/use.mcfunction new file mode 100644 index 0000000000..1835893213 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak/sneak.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/.mcfunction new file mode 100644 index 0000000000..e63845d059 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_10s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 200 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 200 run function asset_manager:artifact/triggers/sneak_10s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_10s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/check.m.mcfunction new file mode 100644 index 0000000000..a5f1fba92f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_10s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_10s/ + +$function asset:artifact/alias/$(id)/sneak_10s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/sneak_10s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/sneak_10s.m.mcfunction new file mode 100644 index 0000000000..255d92a16d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/sneak_10s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_10s/sneak_10s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_10s/use + +$function asset:artifact/alias/$(id)/sneak_10s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/use.mcfunction new file mode 100644 index 0000000000..b7074faf8e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_10s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_10s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_10s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_10s/sneak_10s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/.mcfunction new file mode 100644 index 0000000000..3bf13efba5 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_1s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 20 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 20 run function asset_manager:artifact/triggers/sneak_1s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_1s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/check.m.mcfunction new file mode 100644 index 0000000000..90dfe723f0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_1s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_1s/ + +$function asset:artifact/alias/$(id)/sneak_1s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/sneak_1s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/sneak_1s.m.mcfunction new file mode 100644 index 0000000000..04b7c2f3dd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/sneak_1s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_1s/sneak_1s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_1s/use + +$function asset:artifact/alias/$(id)/sneak_1s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/use.mcfunction new file mode 100644 index 0000000000..b7685b1423 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_1s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_1s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_1s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_1s/sneak_1s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/.mcfunction new file mode 100644 index 0000000000..f755f0f41c --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_2s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 40 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 40 run function asset_manager:artifact/triggers/sneak_2s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_2s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/check.m.mcfunction new file mode 100644 index 0000000000..04566069bd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_2s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_2s/ + +$function asset:artifact/alias/$(id)/sneak_2s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/sneak_2s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/sneak_2s.m.mcfunction new file mode 100644 index 0000000000..5361a83e3f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/sneak_2s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_2s/sneak_2s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_2s/use + +$function asset:artifact/alias/$(id)/sneak_2s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/use.mcfunction new file mode 100644 index 0000000000..d301e87629 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_2s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_2s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_2s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_2s/sneak_2s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/.mcfunction new file mode 100644 index 0000000000..7ed9ce7d0f --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_3s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 60 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 60 run function asset_manager:artifact/triggers/sneak_3s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_3s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/check.m.mcfunction new file mode 100644 index 0000000000..be99d47d30 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_3s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_3s/ + +$function asset:artifact/alias/$(id)/sneak_3s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/sneak_3s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/sneak_3s.m.mcfunction new file mode 100644 index 0000000000..040bee7c66 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/sneak_3s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_3s/sneak_3s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_3s/use + +$function asset:artifact/alias/$(id)/sneak_3s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/use.mcfunction new file mode 100644 index 0000000000..1bab5477aa --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_3s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_3s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_3s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_3s/sneak_3s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/.mcfunction new file mode 100644 index 0000000000..2b9e59a3d6 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_4s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 80 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 80 run function asset_manager:artifact/triggers/sneak_4s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_4s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/check.m.mcfunction new file mode 100644 index 0000000000..6c6f3079ea --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_4s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_4s/ + +$function asset:artifact/alias/$(id)/sneak_4s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/sneak_4s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/sneak_4s.m.mcfunction new file mode 100644 index 0000000000..19e02b197d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/sneak_4s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_4s/sneak_4s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_4s/use + +$function asset:artifact/alias/$(id)/sneak_4s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/use.mcfunction new file mode 100644 index 0000000000..c2fd01f517 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_4s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_4s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_4s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_4s/sneak_4s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/.mcfunction new file mode 100644 index 0000000000..9ff85ad794 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/.mcfunction @@ -0,0 +1,21 @@ +#> asset_manager:artifact/triggers/sneak_5s/ +# +# 各神器処理へデータ受け渡し +# +# @within function asset_manager:artifact/triggers/ + +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.Sneak] run return fail +# スニークしている時間を取得する + function asset_manager:artifact/triggers/event/sneak/get_sneak_time/ + execute store result score $SneakTime Temporary run data get storage asset:context SneakTime +# 使用条件を満たしているか確認する + execute if score $SneakTime Temporary matches 100 run function asset_manager:artifact/check/ + execute if score $SneakTime Temporary matches 100 run function asset_manager:artifact/triggers/sneak_5s/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/sneak_5s/use + +# リセット + scoreboard players reset $SneakTime Temporary + tag @s remove CanUsed + data remove storage asset:context SneakTime diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/check.m.mcfunction new file mode 100644 index 0000000000..1d155fa8ac --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_5s/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_5s/ + +$function asset:artifact/alias/$(id)/sneak_5s/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/sneak_5s.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/sneak_5s.m.mcfunction new file mode 100644 index 0000000000..05169f0c58 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/sneak_5s.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/sneak_5s/sneak_5s.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/sneak_5s/use + +$function asset:artifact/alias/$(id)/sneak_5s/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/use.mcfunction new file mode 100644 index 0000000000..b35778245d --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/sneak_5s/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/sneak_5s/use +# +# +# +# @within function asset_manager:artifact/triggers/sneak_5s/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/sneak_5s/sneak_5s.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick.mcfunction deleted file mode 100644 index 62066cda38..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset_manager:artifact/triggers/tick -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し - function #asset:artifact/tick -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/.mcfunction new file mode 100644 index 0000000000..40e5319ed9 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/.mcfunction @@ -0,0 +1,16 @@ +#> asset_manager:artifact/triggers/tick/ +# +# +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m + +# フラグが存在しているか確認する + # return fail +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/tick/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/tick/use + +# リセット + tag @s remove CanUsed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/check.m.mcfunction new file mode 100644 index 0000000000..7c72372647 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/tick/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/tick/ + +$function asset:artifact/alias/$(id)/tick/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/tick.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/tick.m.mcfunction new file mode 100644 index 0000000000..a497421b6b --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/tick.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/tick/tick.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/tick/use + +$function asset:artifact/alias/$(id)/tick/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/use.mcfunction new file mode 100644 index 0000000000..1ae46d0cdd --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/tick/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/tick/use +# +# +# +# @within function asset_manager:artifact/triggers/tick/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/tick/tick.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/.mcfunction new file mode 100644 index 0000000000..dd3a7621bc --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/.mcfunction @@ -0,0 +1,16 @@ +#> asset_manager:artifact/triggers/trigger/ +# +# 各神器ごとにトリガー処理を行う +# +# @within function asset_manager:artifact/triggers/ + +# 神器のデータを取得する + data modify storage asset:artifact New.CopiedItemData set from storage asset:artifact New.ItemData +# データを扱いやすくする + scoreboard players set $SlotIndex Temporary 8 + function asset_manager:artifact/triggers/trigger/normalize/ +# 各神器ごとに処理を実行する + execute if data storage asset:artifact NormalizedItemData[0] run function asset_manager:artifact/triggers/trigger/foreach/ +# リセット + scoreboard players reset $SlotIndex Temporary + data remove storage asset:artifact NormalizedItemData diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/.mcfunction new file mode 100644 index 0000000000..d80ad4500e --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/.mcfunction @@ -0,0 +1,37 @@ +#> asset_manager:artifact/triggers/trigger/foreach/ +# +# +# +# @within function +# asset_manager:artifact/triggers/trigger/ +# asset_manager:artifact/triggers/trigger/foreach/ + +# 要素を取得 + data modify storage asset:artifact TargetItem set from storage asset:artifact NormalizedItemData[-1]._[0] + data modify storage asset:artifact TargetItemList set from storage asset:artifact NormalizedItemData[-1]._ +# contextを設定 + data modify storage asset:context id set from storage asset:artifact TargetItem.ID + +# サブトリガーを先に処理するのは、主トリガーでデータを潰してしまってもいいように +# サブトリガーを処理する + # equipは別処理をしているので弾く + function lib:array/session/open + data modify storage lib: Array set from storage asset:artifact TargetItem.SubTriggers + data modify storage lib: CompareTarget set value "equip" + function lib:array/compare_single + data modify storage lib: Masks set from storage lib: CompareResult + function lib:array/mask + data modify storage asset:artifact CopiedTriggers set from storage lib: Array + function lib:array/session/close + # サブトリガーが存在するようならそれぞれ処理する + execute if data storage asset:artifact CopiedTriggers[0] run function asset_manager:artifact/triggers/trigger/foreach/sub/ +# トリガーを持っていれば処理を実行する +# equipは別処理をしているので弾く + execute unless data storage asset:artifact TargetItem{Trigger:"equip"} run function asset_manager:artifact/triggers/trigger/foreach/call.m with storage asset:artifact TargetItem + +# リセット + data remove storage asset:artifact TargetItem + data remove storage asset:artifact CopiedTriggers + data remove storage asset:artifact NormalizedItemData[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact NormalizedItemData[0] run function asset_manager:artifact/triggers/trigger/foreach/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/call.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/call.m.mcfunction new file mode 100644 index 0000000000..4d3989f7f0 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/call.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/trigger/foreach/call.m +# +# +# +# @input args Trigger : Trigger +# @within function asset_manager:artifact/triggers/trigger/foreach/ + +$function asset_manager:artifact/triggers/$(Trigger)/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/.mcfunction new file mode 100644 index 0000000000..d899565ffe --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/.mcfunction @@ -0,0 +1,18 @@ +#> asset_manager:artifact/triggers/trigger/foreach/sub/ +# +# +# +# @within function +# asset_manager:artifact/triggers/trigger/foreach/ +# asset_manager:artifact/triggers/trigger/foreach/sub/ + +# トリガーを取りだす + data modify storage asset:context Trigger set from storage asset:artifact CopiedTriggers[-1] +# 問答無用で呼び出してしまってよいはず + function asset_manager:artifact/triggers/trigger/foreach/sub/call.m with storage asset:context + +# リセット + data remove storage asset:context Trigger + data remove storage asset:artifact CopiedTriggers[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact CopiedTriggers[0] run function asset_manager:artifact/triggers/trigger/foreach/sub/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/call.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/call.m.mcfunction new file mode 100644 index 0000000000..1a0c3dc337 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/foreach/sub/call.m.mcfunction @@ -0,0 +1,10 @@ +#> asset_manager:artifact/triggers/trigger/foreach/sub/call.m +# +# +# +# @input args +# id : int +# Trigger : Trigger +# @within function asset_manager:artifact/triggers/trigger/foreach/sub/ + +$function asset:artifact/alias/$(id)/$(Trigger) diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/.mcfunction new file mode 100644 index 0000000000..a0261845e2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/.mcfunction @@ -0,0 +1,27 @@ +#> asset_manager:artifact/triggers/trigger/normalize/ +# +# 処理しやすい形に揃える +# +# @within function +# asset_manager:artifact/triggers/trigger/ +# asset_manager:artifact/triggers/trigger/normalize/ + +#> private +# @private + #declare score_holder $ID + +# 要素を拾う + data modify storage asset:artifact CopiedItem set from storage asset:artifact New.CopiedItemData[-1] +# アイテムの真のslotを拾う + function asset_manager:artifact/triggers/trigger/normalize/slot_to_index +# IDが正規の数値なら更新する + execute store result score $ID Temporary run data get storage asset:artifact CopiedItem.ID + execute if score $ID Temporary matches 1.. run function asset_manager:artifact/triggers/trigger/normalize/upsert.m with storage asset:artifact CopiedItem + +# リセット + scoreboard players remove $SlotIndex Temporary 1 + scoreboard players reset $ID + data remove storage asset:artifact CopiedItem + data remove storage asset:artifact New.CopiedItemData[-1] +# 要素が残っているなら再帰 + execute if data storage asset:artifact New.CopiedItemData[0] run function asset_manager:artifact/triggers/trigger/normalize/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/slot_to_index.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/slot_to_index.mcfunction new file mode 100644 index 0000000000..f26633d4c7 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/slot_to_index.mcfunction @@ -0,0 +1,13 @@ +#> asset_manager:artifact/triggers/trigger/normalize/slot_to_index +# +# +# +# @within function asset_manager:artifact/triggers/trigger/normalize/ + +execute if data storage asset:artifact CopiedItem{Slot:"mainhand"} store result storage asset:artifact CopiedItem.InvSlot byte 1 run data get storage api: SelectedItemSlot +execute if data storage asset:artifact CopiedItem{Slot: "offhand"} run data modify storage asset:artifact CopiedItem.InvSlot set value -106b +execute if data storage asset:artifact CopiedItem{Slot: "feet"} run data modify storage asset:artifact CopiedItem.InvSlot set value 100b +execute if data storage asset:artifact CopiedItem{Slot: "legs"} run data modify storage asset:artifact CopiedItem.InvSlot set value 101b +execute if data storage asset:artifact CopiedItem{Slot: "chest"} run data modify storage asset:artifact CopiedItem.InvSlot set value 102b +execute if data storage asset:artifact CopiedItem{Slot: "head"} run data modify storage asset:artifact CopiedItem.InvSlot set value 103b +execute if data storage asset:artifact CopiedItem{Slot: "hotbar"} store result storage asset:artifact CopiedItem.InvSlot byte 1 run scoreboard players get $SlotIndex Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/upsert.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/upsert.m.mcfunction new file mode 100644 index 0000000000..24367af931 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/trigger/normalize/upsert.m.mcfunction @@ -0,0 +1,20 @@ +#> asset_manager:artifact/triggers/trigger/normalize/ +# +# +# +# @input args ID : int +# @within function asset_manager:artifact/triggers/trigger/normalize/ + +#> private +# @private + #declare score_holder $ExistsArtifact + +# 同じidのデータがあるならまとめる + $execute store result score $ExistsArtifact Temporary if data storage asset:artifact NormalizedItemData[{id:$(ID)}] + $execute if score $ExistsArtifact Temporary matches 1.. run data modify storage asset:artifact NormalizedItemData[{id:$(ID)}]._ append from storage asset:artifact CopiedItem +# ないなら生成して放り込む + $execute unless score $ExistsArtifact Temporary matches 1.. run data modify storage asset:artifact NormalizedItemData append value {id:$(ID),_:[]} + execute unless score $ExistsArtifact Temporary matches 1.. run data modify storage asset:artifact NormalizedItemData[-1]._ append from storage asset:artifact CopiedItem + +# リセット + scoreboard players reset $ExistsArtifact Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/.mcfunction index 1ed7370b70..0aecba77f7 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/.mcfunction @@ -1,31 +1,16 @@ #> asset_manager:artifact/triggers/use_item/ # -# 各神器処理へデータ受け渡し # -# @within function asset_manager:artifact/triggers/ +# +# @within function asset_manager:artifact/triggers/trigger/foreach/call.m -#> consumable判定用アマスタ -# @private -#declare tag CheckConsumableStand +# フラグが存在しているか確認する + execute if entity @s[tag=!TriggerFlag.UseItem] run return fail +# 使用条件を満たしているか確認する + function asset_manager:artifact/check/ + function asset_manager:artifact/triggers/use_item/check.m with storage asset:context +# 条件を満たしていれば使用する + execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/use_item/use -# 食べたスロットを特定する - # 下ごしらえ - data modify storage api: SelectedItemSlot set from storage asset:context Old.SelectedItemSlot - data modify storage api: Inventory set from storage asset:context New.Inventory - function api:inventory/refer_selected_item_slot/get_item - execute unless data storage api: Item.tag.TSB run data modify storage api: Item.tag.TSB set value {ID:-2,LocalCooldown:0,UUID:-2} - # アイテムの変更で特定を試みる - function asset_manager:artifact/triggers/use_item/check_change - # アイテムを入れ替えたかで特定を試みる - execute unless data storage asset:artifact Argument.AutoSlot run function asset_manager:artifact/triggers/use_item/check_hand_swap - # アイテムを投げたかで特定を試みる - execute unless data storage asset:artifact Argument.AutoSlot run function asset_manager:artifact/triggers/use_item/check_item_drop - # アイテムが食べれるかで特定を試みる - execute unless data storage asset:artifact Argument.AutoSlot run summon armor_stand 0.0 0.0 0.0 {Marker:1b,Invisible:1b,Tags:["CheckConsumableStand"]} - execute unless data storage asset:artifact Argument.AutoSlot as @e[type=armor_stand,tag=CheckConsumableStand,distance=..0.001,x=0.0,y=0.0,z=0.0,limit=1] run function asset_manager:artifact/triggers/use_item/check_has_consumable -# イベント発火前に実行するやつ - function asset_manager:artifact/data/old/set_to_current -# 神器側に受け渡し - function #asset:artifact/use_item -# イベント発火後に実行するやつ - function asset_manager:artifact/data/old/revert_from_current \ No newline at end of file +# リセット + tag @s remove CanUsed diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check.m.mcfunction new file mode 100644 index 0000000000..2d8bf268af --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/use_item/check.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/use_item/ + +$function asset:artifact/alias/$(id)/use_item/check diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_change.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_change.mcfunction deleted file mode 100644 index e63d2836f7..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_change.mcfunction +++ /dev/null @@ -1,27 +0,0 @@ -#> asset_manager:artifact/triggers/use_item/check_change -# -# -# -# @within function asset_manager:artifact/triggers/use_item/ - -#> private -# @private - #declare score_holder $notEqualM - #declare score_holder $notEqualO - -# メインハンドの比較 - data modify storage asset:artifact Temp set from storage asset:context Old.Items.mainhand - execute store success score $notEqualM Temporary run data modify storage asset:artifact Temp set from storage api: Item -# オフハンドの比較 - data modify storage asset:artifact Temp set from storage asset:context Old.Items.offhand - execute store success score $notEqualO Temporary run data modify storage asset:artifact Temp set from storage asset:context New.Items.offhand - -# 比較結果から設定 - execute if score $notEqualM Temporary matches 0 if score $notEqualO Temporary matches 0 run data modify storage asset:artifact Argument.AutoSlot set value 'none' - execute if score $notEqualM Temporary matches 1 if score $notEqualO Temporary matches 0 run data modify storage asset:artifact Argument.AutoSlot set value 'mainhand' - execute if score $notEqualM Temporary matches 0 if score $notEqualO Temporary matches 1 run data modify storage asset:artifact Argument.AutoSlot set value 'offhand' - -# リセット - scoreboard players reset $notEqualM Temporary - scoreboard players reset $notEqualO Temporary - data remove storage asset:artifact Temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_hand_swap.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_hand_swap.mcfunction deleted file mode 100644 index ca5322bd88..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_hand_swap.mcfunction +++ /dev/null @@ -1,29 +0,0 @@ -#> asset_manager:artifact/triggers/use_item/check_hand_swap -# -# -# -# @within function asset_manager:artifact/triggers/use_item/ - -#> p -# @private - #declare score_holder $notMainToOff - #declare score_holder $notOffToMain - -# メインハンド -> オフハンド - data modify storage asset:artifact Temp set from storage asset:context New.Items.offhand - data remove storage asset:artifact Temp.Slot - execute store success score $notMainToOff Temporary run data modify storage asset:artifact Temp set from storage asset:context Old.Items.mainhand -# オフハンド -> メインハンド - data modify storage asset:artifact Temp set from storage asset:context Old.Items.offhand - data remove storage asset:artifact Temp.Slot - execute store success score $notOffToMain Temporary run data modify storage asset:artifact Temp set from storage api: Item - -# 比較結果から設定 - execute if score $notMainToOff Temporary matches 0 if score $notOffToMain Temporary matches 0 run data modify storage asset:artifact Argument.AutoSlot set value 'none' - execute if score $notMainToOff Temporary matches 0 if score $notOffToMain Temporary matches 1 run data modify storage asset:artifact Argument.AutoSlot set value 'offhand' - execute if score $notMainToOff Temporary matches 1 if score $notOffToMain Temporary matches 0 run data modify storage asset:artifact Argument.AutoSlot set value 'mainhand' - -# リセット - scoreboard players reset $notMainToOff Temporary - scoreboard players reset $notOffToMain Temporary - data remove storage asset:artifact Temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_has_consumable.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_has_consumable.mcfunction deleted file mode 100644 index 27ed3af157..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_has_consumable.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -#> asset_manager:artifact/triggers/use_item/check_has_consumable -# -# -# -# @within function asset_manager:artifact/triggers/use_item/ - -# 下ごしらえ - data modify storage asset:artifact Temp set value [{},{}] - data modify storage asset:artifact Temp[0] set from storage asset:context Old.Items.mainhand - data modify storage asset:artifact Temp[1] set from storage asset:context Old.Items.offhand - data modify entity @s HandItems set from storage asset:artifact Temp - -# チェック - execute unless predicate asset_manager:has_consumable_item/mainhand unless predicate asset_manager:has_consumable_item/offhand run data modify storage asset:artifact Argument.AutoSlot set value 'none' - execute if predicate asset_manager:has_consumable_item/mainhand unless predicate asset_manager:has_consumable_item/offhand run data modify storage asset:artifact Argument.AutoSlot set value 'mainhand' - execute unless predicate asset_manager:has_consumable_item/mainhand if predicate asset_manager:has_consumable_item/offhand run data modify storage asset:artifact Argument.AutoSlot set value 'offhand' - -# リセット - kill @s - data remove storage asset:artifact Temp \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_item_drop.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_item_drop.mcfunction deleted file mode 100644 index d58f4a5fdb..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/check_item_drop.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset_manager:artifact/triggers/use_item/check_item_drop -# -# -# -# @within function asset_manager:artifact/triggers/use_item/ - -# タグがついてるならオフハンドです(maybe) - execute if entity @s[tag=StrictCheckMainhand] run data modify storage asset:artifact Argument.AutoSlot set value 'offhand' - -# リセット - tag @s remove StrictCheckMainhand \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use.mcfunction new file mode 100644 index 0000000000..08edabf423 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use.mcfunction @@ -0,0 +1,19 @@ +#> asset_manager:artifact/triggers/use_item/use +# +# +# +# @within function asset_manager:artifact/triggers/use_item/ + +# 共通処理 +# アイテムを破壊するとBrokeItemが追加される + function asset_manager:artifact/use/ + +# 処理対象の神器の重複数を取得する + execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] + +# 神器を呼び出し + function asset_manager:artifact/triggers/use_item/use_item.m with storage asset:context + +# リセット + data remove storage asset:context BrokeItem + data remove storage asset:context Count diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use_item.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use_item.m.mcfunction new file mode 100644 index 0000000000..f05af3e2c2 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/use_item/use_item.m.mcfunction @@ -0,0 +1,8 @@ +#> asset_manager:artifact/triggers/use_item/use_item.m +# +# +# +# @input args id : int +# @within function asset_manager:artifact/triggers/use_item/use + +$function asset:artifact/alias/$(id)/use_item/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/using_item.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/using_item.mcfunction deleted file mode 100644 index 79129c0f76..0000000000 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/using_item.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset_manager:artifact/triggers/using_item -# -# 各神器処理へデータ受け渡し -# -# @within function asset_manager:artifact/triggers/ - -# イベント発火前に実行するやつ - function asset_manager:artifact/data/new/set_to_current -# 神器側に受け渡し - function #asset:artifact/using_item -# イベント発火後に実行するやつ - function asset_manager:artifact/data/new/revert_from_current \ No newline at end of file diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/.mcfunction new file mode 100644 index 0000000000..4438d2a460 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/.mcfunction @@ -0,0 +1,29 @@ +#> asset_manager:artifact/triggers/vanilla/ +# +# バニラ攻撃を処理する +# +# @within function asset_manager:artifact/triggers/ + +#> Private +# @within asset_manager:artifact/triggers/vanilla/* + #declare score_holder $Damage + +# イベントデータ処理 + # データを取得 + data modify storage asset:context Attack set from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] + # 攻撃先を取得し、Victim を付与する + data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To + execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim + # 最大ダメージの計算 + function asset_manager:artifact/triggers/event/attack/get_max_amount + +# 各mobにダメージを与える + execute store result score $Damage Temporary run data get storage asset:context Attack.Amount -100 + execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..8] at @s run function asset_manager:artifact/triggers/vanilla/damage + +# リセット + scoreboard players reset $Damage Temporary + data remove storage asset:context Attack + data remove storage asset:artifact AttackTargets + tag @s remove ShouldVanillaAttack + tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/damage.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/damage.mcfunction new file mode 100644 index 0000000000..2a8b409265 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/damage.mcfunction @@ -0,0 +1,18 @@ +#> asset_manager:artifact/triggers/vanilla/damage +# +# バニラ攻撃を処理する +# +# @within function asset_manager:artifact/triggers/vanilla/ + +#> Private +# @private + #declare score_holder $Fluctuation + +# 減算 + scoreboard players operation @s MobHealth += $Damage Temporary +# ダメージ表示 + scoreboard players operation $Fluctuation Lib = $Damage Temporary + execute unless score $Fluctuation Lib matches 0 run function lib:status_log/show_health +# 代入 / kill + execute if score @s MobHealth matches ..0 run tag @s add Death + execute if score @s MobHealth matches ..0 run function asset_manager:artifact/triggers/vanilla/push_kill_and_death_event diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/push_kill_and_death_event.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/push_kill_and_death_event.mcfunction similarity index 91% rename from TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/push_kill_and_death_event.mcfunction rename to TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/push_kill_and_death_event.mcfunction index 57c455506d..2d00a82d25 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack/vanilla/push_kill_and_death_event.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/push_kill_and_death_event.mcfunction @@ -6,7 +6,7 @@ # プレイヤーにイベントを追加する execute as @p[tag=this] run function oh_my_dat:please - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed append from storage asset:context Attack + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Kill append from storage asset:context Attack # Mob にもイベントを追加する function oh_my_dat:please data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobEvents.Death append from storage asset:context Attack diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction index de2d8af0da..c0b9efbb8b 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/.mcfunction @@ -2,30 +2,32 @@ # # 神器使用時の処理を実行します # -# @within function asset:artifact/common/use/* +# @within function asset_manager:artifact/triggers/*/** + +#> private +# @private + #declare score_holder $OldItems + #declare score_holder $NewItems -# 神器データの取得 - function asset_manager:artifact/data/current/get -# 神器処理内で利用される DamageAPI 用に MP 回復量のデータを追加する -# DamageAPI で MP 回復をするのは設計上非常に正しくなく、 -# 本来は、DamageAPI 時に割り込みで呼び出された回数を記録し、 -# 神器処理終了後にまとめて MPHealWhenHit * Cnt を回復するのが正しいと思われる。 -# が、実装時点では神器の処理終了時に追加で処理を実行することが出来ないため、 -# すべてを諦めて DamageAPI で回復を行う。 - data remove storage api: PersistentArgument.AdditionalMPHeal - execute store result storage api: PersistentArgument.AdditionalMPHeal int 1 run data get storage asset:artifact TargetItems[0].tag.TSB.MPHealWhenHit # MP減少処理 - execute if data storage asset:artifact TargetItems[0].tag.TSB.MPCost run function asset_manager:artifact/use/remove_mp + execute if data storage asset:artifact TargetItem.MPCost run function asset_manager:artifact/use/remove_mp # 種別クールダウン保存 - execute if data storage asset:artifact TargetItems[0].tag.TSB.TypeCooldown run function asset_manager:artifact/use/update_type_cooldown.m with storage asset:artifact TargetItems[0].tag.TSB.TypeCooldown + execute if data storage asset:artifact TargetItem.TypeCooldown run function asset_manager:artifact/use/update_type_cooldown.m with storage asset:artifact TargetItem.TypeCooldown # 特殊クールダウン保存 - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown store result score $ArtifactSpecialCooldown Global run data get storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown store result bossbar asset:special_cooldown max run scoreboard players get $ArtifactSpecialCooldown Global - execute if data storage asset:artifact TargetItems[0].tag.TSB.SpecialCooldown run bossbar set asset:special_cooldown players @a + execute if data storage asset:artifact TargetItem.SpecialCooldown store result score $ArtifactSpecialCooldown Global run data get storage asset:artifact TargetItem.SpecialCooldown + execute if data storage asset:artifact TargetItem.SpecialCooldown store result bossbar asset:special_cooldown max run scoreboard players get $ArtifactSpecialCooldown Global + execute if data storage asset:artifact TargetItem.SpecialCooldown run bossbar set asset:special_cooldown players @a +# 対象アイテムの要素数を拾う + execute store result score $OldItems Temporary if data storage asset:artifact TargetItemList[] # すべてのアイテムについて更新処理を行う - execute unless data storage asset:artifact {IgnoreItemUpdate:true} run function asset_manager:artifact/use/item/ + function asset_manager:artifact/use/item/ +# データを更新する +# 要素数が変わっていれば一つ以上破壊されている + execute store result score $NewItems Temporary if data storage asset:artifact RenewedItemList[] + data modify storage asset:artifact TargetItemList set from storage asset:artifact RenewedItemList + execute if score $OldItems Temporary > $NewItems Temporary run data modify storage asset:context BrokeItem set value true # リセット - data remove storage asset:artifact IgnoreItemUpdate + scoreboard players reset $OldItems Temporary + scoreboard players reset $NewItems Temporary data remove storage asset:artifact TargetSlot - data remove storage asset:artifact TargetDefaultSlot - data remove storage asset:artifact TargetItems + data remove storage asset:artifact RenewedItemList diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction index f4b7397b71..7ea64ba1ce 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/.mcfunction @@ -6,12 +6,16 @@ # asset_manager:artifact/use/ # asset_manager:artifact/use/item/ +# 要素を拾う + data modify storage asset:artifact TargetItem set from storage asset:artifact TargetItemList[-1] # 最終使用tick保存 - execute store result storage asset:artifact TargetItems[-1].tag.TSB.LatestUseTick int 1 run time query gametime + execute store result storage asset:artifact TargetItem.LatestUseTick int 1 run time query gametime # アイテム更新 - execute unless data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run function asset_manager:artifact/use/item/update - execute if data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run function asset_manager:artifact/use/item/has_remain + execute unless data storage asset:artifact TargetItem.RemainingCount run function asset_manager:artifact/use/item/update + execute if data storage asset:artifact TargetItem.RemainingCount run function asset_manager:artifact/use/item/has_remain +# 破壊フラグがなければ新しい配列に追加 + execute unless data storage asset:artifact TargetItem{Broken:true} run data modify storage asset:artifact RenewedItemList append from storage asset:artifact TargetItem # 末尾削除 - data remove storage asset:artifact TargetItems[-1] + data remove storage asset:artifact TargetItemList[-1] # 要素が残ってるなら再帰 - execute if data storage asset:artifact TargetItems[0] run function asset_manager:artifact/use/item/ \ No newline at end of file + execute if data storage asset:artifact TargetItemList[0] run function asset_manager:artifact/use/item/ diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/break.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/break.mcfunction index a9085eb327..bf278bd7f8 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/break.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/break.mcfunction @@ -5,16 +5,16 @@ # @within function asset_manager:artifact/use/item/has_remain # 音 - execute unless data storage asset:artifact TargetItems[-1].tag.TSB{DisableBreakSound:true} run playsound entity.item.break player @a + execute unless data storage asset:artifact TargetItem{DisableBreakSound:true} run playsound entity.item.break player @a # そのスロットを消し飛ばす - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage api: SelectedItemSlot set from storage asset:context SelectedItemSlot - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function api:inventory/refer_selected_item_slot/replace_air - execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run item replace entity @s weapon.offhand with air - execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run item replace entity @s armor.feet with air - execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run item replace entity @s armor.legs with air - execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run item replace entity @s armor.chest with air - execute if data storage asset:artifact {TargetDefaultSlot:"head"} run item replace entity @s armor.head with air - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} store result storage api: SelectedItemSlot int 1 run data get storage asset:artifact TargetItems[-1].Slot - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function api:inventory/refer_selected_item_slot/replace_air -# current更新 - function asset_manager:artifact/data/current/update/ \ No newline at end of file + execute if data storage asset:artifact TargetItem{Slot:"mainhand"} run data modify storage api: SelectedItemSlot set from storage asset:artifact New.SelectedItemSlot + execute if data storage asset:artifact TargetItem{Slot:"mainhand"} run function api:inventory/refer_selected_item_slot/replace_air + execute if data storage asset:artifact TargetItem{Slot:"offhand"} run item replace entity @s weapon.offhand with air + execute if data storage asset:artifact TargetItem{Slot:"feet"} run item replace entity @s armor.feet with air + execute if data storage asset:artifact TargetItem{Slot:"legs"} run item replace entity @s armor.legs with air + execute if data storage asset:artifact TargetItem{Slot:"chest"} run item replace entity @s armor.chest with air + execute if data storage asset:artifact TargetItem{Slot:"head"} run item replace entity @s armor.head with air + execute if data storage asset:artifact TargetItem{Slot:"hotbar"} store result storage api: SelectedItemSlot int 1 run data get storage asset:artifact TargetItem.InvSlot + execute if data storage asset:artifact TargetItem{Slot:"hotbar"} run function api:inventory/refer_selected_item_slot/replace_air +# 破壊フラグを付与 + data modify storage asset:artifact TargetItem.Broken set value true diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/fetch_inventory.m.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/fetch_inventory.m.mcfunction new file mode 100644 index 0000000000..f1facf7512 --- /dev/null +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/fetch_inventory.m.mcfunction @@ -0,0 +1,12 @@ +#> asset_manager:artifact/use/item/fetch_inventory.m +# +# アイテムを更新します +# +# @input args TargetSlot : int +# @within function asset_manager:artifact/use/item/update + +data modify block 10000 0 10000 Items set value [] +$data modify storage asset:artifact Items append from storage asset:artifact New.Inventory[{Slot:$(TargetSlot)b}] +data remove storage asset:artifact Items[].Slot +data modify block 10000 0 10000 Items append from storage asset:artifact Items[0] +data remove storage asset:artifact Items diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/has_remain.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/has_remain.mcfunction index f70fdc2d4b..9e0170ba27 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/has_remain.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/has_remain.mcfunction @@ -4,23 +4,23 @@ # # @input # as player -# storage asset:artifact TargetItems : [ItemData] +# storage asset:artifact TargetItem : ItemData # @within function # asset_manager:artifact/check/ # asset_manager:artifact/use/item/ #> ScoreHolder # @private -#declare score_holder $Remain + #declare score_holder $Remain # 対象スロットの残り使用回数取得 - execute store result score $Remain Temporary run data get storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount + execute store result score $Remain Temporary run data get storage asset:artifact TargetItem.RemainingCount # 減算 scoreboard players remove $Remain Temporary 1 # アイテム更新処理 - execute store result storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount int 1 run scoreboard players get $Remain Temporary + execute store result storage asset:artifact TargetItem.RemainingCount int 1 run scoreboard players get $Remain Temporary execute if score $Remain Temporary matches 1.. run function asset_manager:artifact/use/item/update # 破壊処理 execute if score $Remain Temporary matches ..0 run function asset_manager:artifact/use/item/break # リセット - scoreboard players reset $Remain Temporary \ No newline at end of file + scoreboard players reset $Remain Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update.mcfunction index fd2458558c..841161a651 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update.mcfunction @@ -9,36 +9,35 @@ # CT設定 function asset_manager:artifact/use/item/update_local_cooldown/ # データ更新処理 - data modify storage asset:artifact Name set from storage asset:artifact TargetItems[-1].tag.TSB.rawName + data modify storage asset:artifact Name set from storage asset:artifact TargetItem.rawName # 残り回数が存在する場合 - execute if data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run data modify storage asset:artifact Item set from storage asset:artifact TargetItems[-1] - execute if data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/has_remain - execute if data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run data remove storage asset:artifact Item + execute if data storage asset:artifact TargetItem.RemainingCount run data modify storage asset:artifact Item.tag.TSB set from storage asset:artifact TargetItem + execute if data storage asset:artifact TargetItem.RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/has_remain + execute if data storage asset:artifact TargetItem.RemainingCount run data remove storage asset:artifact Item # 残り回数が存在しない場合 - execute unless data storage asset:artifact TargetItems[-1].tag.TSB.RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/ + execute unless data storage asset:artifact TargetItem.RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/ + # 名前をコピーしておく + data modify storage asset:artifact CopiedName set from block 10000 0 10000 Items[0].tag.display.Name # スロットをコピーしておく - data modify storage asset:artifact CopiedSlot set from storage asset:artifact TargetItems[-1].Slot + data modify storage asset:artifact TargetSlot set from storage asset:artifact TargetItem.InvSlot + data remove storage asset:artifact TargetItem.InvSlot + # Inventoryからshulker boxにコピペする + function asset_manager:artifact/use/item/fetch_inventory.m with storage asset:artifact # shulker boxでデータを完成させる - data remove storage asset:artifact TargetItems[-1].tag.display.Name - data remove storage asset:artifact TargetItems[-1].Slot - data modify block 10000 0 10000 Items[0] merge from storage asset:artifact TargetItems[-1] - # storage側データ更新 - data modify storage asset:artifact TargetItems[-1] set from block 10000 0 10000 Items[0] - execute if data storage asset:artifact CopiedSlot run data modify storage asset:artifact TargetItems[-1].Slot set from storage asset:artifact CopiedSlot - execute unless data storage asset:artifact CopiedSlot run data remove storage asset:artifact TargetItems[-1].Slot + data modify block 10000 0 10000 Items[0].tag.display.Name set from storage asset:artifact CopiedName + data modify block 10000 0 10000 Items[0].tag.TSB merge from storage asset:artifact TargetItem + # 後で使うのでデータを戻しておく + data modify storage asset:artifact TargetItem.InvSlot set from storage asset:artifact TargetSlot # 新しい神器で上書きする - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run data modify storage api: SelectedItemSlot set from storage asset:context SelectedItemSlot - execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function api:inventory/refer_selected_item_slot/replace_from_shulker_box - execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} run loot replace entity @s weapon.offhand 1 mine 10000 0 10000 debug_stick - execute if data storage asset:artifact {TargetDefaultSlot:"feet"} run loot replace entity @s armor.feet 1 mine 10000 0 10000 debug_stick - execute if data storage asset:artifact {TargetDefaultSlot:"legs"} run loot replace entity @s armor.legs 1 mine 10000 0 10000 debug_stick - execute if data storage asset:artifact {TargetDefaultSlot:"chest"} run loot replace entity @s armor.chest 1 mine 10000 0 10000 debug_stick - execute if data storage asset:artifact {TargetDefaultSlot:"head"} run loot replace entity @s armor.head 1 mine 10000 0 10000 debug_stick - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} store result storage api: SelectedItemSlot int 1 run data get storage asset:artifact TargetItems[-1].Slot - execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function api:inventory/refer_selected_item_slot/replace_from_shulker_box -# current更新 - data modify storage asset:artifact ProcessedItem set from storage asset:artifact TargetItems[-1] - function asset_manager:artifact/data/current/update/ + execute if data storage asset:artifact TargetItem{Slot:"mainhand"} run data modify storage api: SelectedItemSlot set from storage asset:artifact New.SelectedItemSlot + execute if data storage asset:artifact TargetItem{Slot:"mainhand"} run function api:inventory/refer_selected_item_slot/replace_from_shulker_box + execute if data storage asset:artifact TargetItem{Slot:"offhand"} run loot replace entity @s weapon.offhand 1 mine 10000 0 10000 debug_stick + execute if data storage asset:artifact TargetItem{Slot:"feet"} run loot replace entity @s armor.feet 1 mine 10000 0 10000 debug_stick + execute if data storage asset:artifact TargetItem{Slot:"legs"} run loot replace entity @s armor.legs 1 mine 10000 0 10000 debug_stick + execute if data storage asset:artifact TargetItem{Slot:"chest"} run loot replace entity @s armor.chest 1 mine 10000 0 10000 debug_stick + execute if data storage asset:artifact TargetItem{Slot:"head"} run loot replace entity @s armor.head 1 mine 10000 0 10000 debug_stick + execute if data storage asset:artifact TargetItem{Slot:"hotbar"} store result storage api: SelectedItemSlot int 1 run data get storage asset:artifact TargetSlot + execute if data storage asset:artifact TargetItem{Slot:"hotbar"} run function api:inventory/refer_selected_item_slot/replace_from_shulker_box # リセット data remove storage asset:artifact Name - data remove storage asset:artifact CopiedSlot \ No newline at end of file + data remove storage asset:artifact CopiedName diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction index c6c03935df..c29de25591 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/.mcfunction @@ -5,6 +5,5 @@ # @within function asset_manager:artifact/use/item/update function oh_my_dat:please -execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run data modify storage asset:artifact SpecificTargetSlot set from storage asset:artifact TargetItems[-1].Slot -execute if data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar -execute unless data storage asset:artifact {TargetDefaultSlot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/non-hotbar \ No newline at end of file +execute if data storage asset:artifact TargetItem{Slot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar +execute unless data storage asset:artifact TargetItem{Slot:"hotbar"} run function asset_manager:artifact/use/item/update_local_cooldown/non-hotbar diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction index 1afee42b59..caf4b5436e 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/hotbar.mcfunction @@ -7,14 +7,12 @@ # asset_manager:artifact/use/item/update_local_cooldown/non-hotbar # 設定 - execute if data storage asset:artifact {SpecificTargetSlot:0b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[05].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:1b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[06].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:2b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[07].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:3b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[08].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:4b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[09].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:5b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[10].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:6b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[11].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:7b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[12].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown - execute if data storage asset:artifact {SpecificTargetSlot:8b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[13].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -# リセット - data remove storage asset:artifact SpecificTargetSlot \ No newline at end of file + execute if data storage asset:artifact TargetItem{InvSlot:0b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[05].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[05].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:1b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[06].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[06].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:2b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[07].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[07].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:3b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[08].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[08].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:4b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[09].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[09].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:5b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[10].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[10].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:6b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[11].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[11].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:7b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[12].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[12].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown + execute if data storage asset:artifact TargetItem{InvSlot:8b} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[13].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[13].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction index 9a7f2946d2..aebaa355c9 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/item/update_local_cooldown/non-hotbar.mcfunction @@ -4,10 +4,9 @@ # # @within function asset_manager:artifact/use/item/update_local_cooldown/ -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} store result storage asset:artifact SpecificTargetSlot byte 1 run data get storage asset:context SelectedItemSlot -execute if data storage asset:artifact {TargetDefaultSlot:"mainhand"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar -execute if data storage asset:artifact {TargetDefaultSlot:"offhand"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[0].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"feet"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[1].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"legs"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[2].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"chest"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[3].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown -execute if data storage asset:artifact {TargetDefaultSlot:"head"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown[4].Max int 1 run data get storage asset:artifact TargetItems[-1].tag.TSB.LocalCooldown \ No newline at end of file +execute if data storage asset:artifact TargetItem{Slot:"mainhand"} run function asset_manager:artifact/use/item/update_local_cooldown/hotbar +execute if data storage asset:artifact TargetItem{Slot:"offhand"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[0].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[0].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown +execute if data storage asset:artifact TargetItem{Slot:"feet"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[1].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[1].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown +execute if data storage asset:artifact TargetItem{Slot:"legs"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[2].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[2].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown +execute if data storage asset:artifact TargetItem{Slot:"chest"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[3].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[3].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown +execute if data storage asset:artifact TargetItem{Slot:"head"} store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[4].Value int 1 store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown[4].Max int 1 run data get storage asset:artifact TargetItem.LocalCooldown diff --git a/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction b/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction index c554ee900b..577294893f 100644 --- a/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/artifact/use/remove_mp.mcfunction @@ -13,7 +13,7 @@ #declare score_holder $Length # 取得 - execute store result score $Fluctuation Lib run data get storage asset:artifact TargetItems[0].tag.TSB.MPCost + execute store result score $Fluctuation Lib run data get storage asset:artifact TargetItem.MPCost # アイテム数だけ増やす # execute store result score $Length Temporary if data storage asset:artifact TargetItems[] # scoreboard players operation $Fluctuation Lib *= $Length Temporary @@ -22,4 +22,4 @@ data modify storage lib: Argument.DisableLog set value true function lib:mp/fluctuation # リセット - scoreboard players reset $Length Temporary \ No newline at end of file + scoreboard players reset $Length Temporary diff --git a/TheSkyBlessing/data/asset_manager/functions/common/reset_all_context.mcfunction b/TheSkyBlessing/data/asset_manager/functions/common/reset_all_context.mcfunction index 16111a894a..e7a5282a8d 100644 --- a/TheSkyBlessing/data/asset_manager/functions/common/reset_all_context.mcfunction +++ b/TheSkyBlessing/data/asset_manager/functions/common/reset_all_context.mcfunction @@ -4,8 +4,4 @@ # # @within function core:tick/ -data remove storage asset:context New -data remove storage asset:context Old data remove storage asset:context id -data remove storage asset:context Items -data remove storage asset:context Inventory \ No newline at end of file diff --git a/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction b/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction index cb731d92da..b58d188c75 100644 --- a/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction +++ b/TheSkyBlessing/data/core/functions/handler/first_join.mcfunction @@ -20,7 +20,7 @@ data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default set value {Heal:1d,ReceiveHeal:1d,Attack:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},Defense:{Base:1d,Physical:1d,Magic:1d,None:1d,Fire:1d,Water:1d,Thunder:1d},MaxMP:100d,MPRegen:1d,MaxHealth:20d,FallDamage:1d} data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Value set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Attributes.Default # 神器クールダウンの初期化 - data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown set value [{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0}] + data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCooldown set value [{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0},{Value:-15,Max:0}] # 共通Join処理 function core:handler/join diff --git a/TheSkyBlessing/data/core/functions/tick/player/post.mcfunction b/TheSkyBlessing/data/core/functions/tick/player/post.mcfunction index feafabc27a..6a15c27b02 100644 --- a/TheSkyBlessing/data/core/functions/tick/player/post.mcfunction +++ b/TheSkyBlessing/data/core/functions/tick/player/post.mcfunction @@ -16,6 +16,6 @@ function player_manager:mp/viewer/check_xpbar # リセット - execute if entity @s[scores={Sneak=1..},predicate=!lib:is_sneaking] run function asset_manager:artifact/triggers/sneak/reset + execute if entity @s[scores={Sneak=1..},predicate=!lib:is_sneaking] run function asset_manager:artifact/triggers/event/sneak/reset scoreboard players reset @s[scores={Sneak=1..},predicate=!lib:is_sneaking] Sneak tag @s remove FlyingElytra diff --git a/TheSkyBlessing/data/lib/functions/status_log/show_health.mcfunction b/TheSkyBlessing/data/lib/functions/status_log/show_health.mcfunction index f64cf0fe00..83040dee6e 100644 --- a/TheSkyBlessing/data/lib/functions/status_log/show_health.mcfunction +++ b/TheSkyBlessing/data/lib/functions/status_log/show_health.mcfunction @@ -6,7 +6,7 @@ # api:damage/core/health_subtract/non-player/ # api:heal/core/non-player # lib:score_to_health_wrapper/fluctuation -# asset_manager:artifact/triggers/attack/vanilla/ +# asset_manager:artifact/triggers/vanilla/damage # mob_manager:fix_health #> For Init