text:
#> asset_manager:artifact/create/set_trigger
#
# 使用の条件を設定します
#
# @within function asset_manager:artifact/create/set_lore

# スロット
    execute if data storage asset:artifact {Slot:"auto"} run data modify storage asset:artifact Temp.Trigger.A set value "どちらかの手に所持"
    execute if data storage asset:artifact {Slot:"mainhand"} run data modify storage asset:artifact Temp.Trigger.A set value "メインハンドに所持"
    execute if data storage asset:artifact {Slot:"offhand"} run data modify storage asset:artifact Temp.Trigger.A set value "オフハンドに所持"
    execute if data storage asset:artifact {Slot:"head"} run data modify storage asset:artifact Temp.Trigger.A set value "装備"
    execute if data storage asset:artifact {Slot:"chest"} run data modify storage asset:artifact Temp.Trigger.A set value "装備"
    execute if data storage asset:artifact {Slot:"legs"} run data modify storage asset:artifact Temp.Trigger.A set value "装備"
    execute if data storage asset:artifact {Slot:"feet"} run data modify storage asset:artifact Temp.Trigger.A set value "装備"
    execute if data storage asset:artifact {Slot:"inventory"} run data modify storage asset:artifact Temp.Trigger.A set value "インベントリ内に保持"
    execute if data storage asset:artifact {Slot:"hotbar"} run data modify storage asset:artifact Temp.Trigger.A set value "ホットバーに保持"
# 接続詞
    data modify storage asset:artifact Temp.Trigger.AB set value "し"
# トリガー
    execute if data storage asset:artifact {Trigger:"onClick"} run data modify storage asset:artifact Temp.Trigger.B set value "右クリック"
    execute if data storage asset:artifact {Trigger:"shot"} run data modify storage asset:artifact Temp.Trigger.B set value "発射"
    execute if data storage asset:artifact {Trigger:"itemUse"} run data modify storage asset:artifact Temp.Trigger.B set value "使用"
    execute if data storage asset:artifact {Trigger:"passive"} run data modify storage asset:artifact Temp.Trigger.B set value "ている限り"
    execute if data storage asset:artifact {Trigger:"onAttack"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを攻撃"
    execute if data storage asset:artifact {Trigger:"onAttackByMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを近接攻撃"
    execute if data storage asset:artifact {Trigger:"onAttackByProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを遠距離攻撃"
    execute if data storage asset:artifact {Trigger:"onDamage"} run data modify storage asset:artifact Temp.Trigger.B set value "被ダメージ"
    execute if data storage asset:artifact {Trigger:"onDamageFromExplode"} run data modify storage asset:artifact Temp.Trigger.B set value "被爆発ダメージ"
    execute if data storage asset:artifact {Trigger:"onDamageFromBurn"} run data modify storage asset:artifact Temp.Trigger.B set value "被延焼ダメージ"
    execute if data storage asset:artifact {Trigger:"onDamageFromEntity"} run data modify storage asset:artifact Temp.Trigger.B set value "被攻撃ダメージ"
    execute if data storage asset:artifact {Trigger:"onDamageFromMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "被近接ダメージ"
    execute if data storage asset:artifact {Trigger:"onDamageFromProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "被遠距離ダメージ"
    execute if data storage asset:artifact {Trigger:"onKilled"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを殺害"
    execute if data storage asset:artifact {Trigger:"onKilledByMelee"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを近接攻撃で殺害"
    execute if data storage asset:artifact {Trigger:"onKilledByProjectile"} run data modify storage asset:artifact Temp.Trigger.B set value "Entityを遠距離攻撃で殺害"
    execute if data storage asset:artifact {Trigger:"sneak"} run data modify storage asset:artifact Temp.Trigger.B set value "スニーク"
    execute if data storage asset:artifact {Trigger:"sneak1s"} run data modify storage asset:artifact Temp.Trigger.B set value "1秒間スニーク"
    execute if data storage asset:artifact {Trigger:"sneak2s"} run data modify storage asset:artifact Temp.Trigger.B set value "2秒間スニーク"
    execute if data storage asset:artifact {Trigger:"sneak3s"} run data modify storage asset:artifact Temp.Trigger.B set value "3秒間スニーク"
    execute if data storage asset:artifact {Trigger:"sneak4s"} run data modify storage asset:artifact Temp.Trigger.B set value "4秒間スニーク"
    execute if data storage asset:artifact {Trigger:"sneak5s"} run data modify storage asset:artifact Temp.Trigger.B set value "5秒間スニーク"
    execute if data storage asset:artifact {Trigger:"sneak10s"} run data modify storage asset:artifact Temp.Trigger.B set value "10秒間スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak"} run data modify storage asset:artifact Temp.Trigger.B set value "0秒以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak1s"} run data modify storage asset:artifact Temp.Trigger.B set value "1秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak2s"} run data modify storage asset:artifact Temp.Trigger.B set value "2秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak3s"} run data modify storage asset:artifact Temp.Trigger.B set value "3秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak4s"} run data modify storage asset:artifact Temp.Trigger.B set value "4秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak5s"} run data modify storage asset:artifact Temp.Trigger.B set value "5秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"keepSneak10s"} run data modify storage asset:artifact Temp.Trigger.B set value "10秒間以上スニーク"
    execute if data storage asset:artifact {Trigger:"equipping"} run data modify storage asset:artifact Temp.Trigger.AB set value ""
    execute if data storage asset:artifact {Trigger:"equipping"} run data modify storage asset:artifact Temp.Trigger.B set value ""
# 設定されてなかったらエラーメッセージ
    execute unless data storage asset:artifact Temp.Trigger.A run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないSlotが指定されています","color":"white"}]
    execute unless data storage asset:artifact Temp.Trigger.B run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"登録されていないTriggerが指定されています","color":"white"}]
# 生成
    loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/generate_lore/trigger
# リセット
    data remove storage asset:artifact Temp


text:
#> asset_manager:artifact/create/set_special_cooltime
#
# スペシャルクールタイムを秒数にする 1tickとかだと表示が変になる
#
# @within function asset_manager:artifact/create/set_lore

#> Temp
# @private
    #declare score_holder $Cooldown
    #declare score_holder $CooldownDecimal
    #declare score_holder $CooldownMinutes

# 5? スペシャル☆クールタイムを秒数に変換
    execute store result score $Cooldown Temporary run data get storage asset:artifact SpecialCooldown
    scoreboard players operation $Cooldown Temporary /= $20 Const
# 5? スペシャル☆クールタイムの小数第一位まで求める
    execute store result score $CooldownDecimal Temporary run data get storage asset:artifact SpecialCooldown
    scoreboard players operation $CooldownDecimal Temporary %= $20 Const
    scoreboard players operation $CooldownDecimal Temporary *= $5 Const
# 5? 秒数を分に変換
    scoreboard players operation $CooldownMinutes Temporary = $Cooldown Temporary
    scoreboard players operation $CooldownMinutes Temporary /= $60 Const
    # 用がなくなったらmod演算
        scoreboard players operation $Cooldown Temporary %= $60 Const
    # 分がいるかをloot_table側で判断するためのフラグ
        execute if score $CooldownMinutes Temporary matches 1.. run scoreboard players set @s Temporary 1
# 5?ストレージに入れる
    execute store result storage asset:artifact SpecialCooldownSecond int 1 run scoreboard players get $Cooldown Temporary
    execute store result storage asset:artifact SpecialCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary
    execute store result storage asset:artifact SpecialCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary

# lootする
    loot replace block 10000 0 10000 container.7 loot asset_manager:artifact/generate_lore/special_cooldown

# リセット
    scoreboard players reset $Cooldown
    scoreboard players reset $CooldownDecimal
    scoreboard players reset $CooldownMinutes
    scoreboard players reset @s Temporary
    data remove storage asset:artifact SpecialCooldownSecond
    data remove storage asset:artifact SpecialCooldownDecimal
    data remove storage asset:artifact SpecialCooldownMinutes

repo_name: ProjectTSB/TheSkyBlessing

repo_language: mcfunction

mime_type: text/plain


text:
#> asset_manager:artifact/create/set_cooltime
#
# 普通のクールタイムを秒数に変換 クールタイムが1tickだったりすると正確な秒数が出ない
#
# @within function asset_manager:artifact/create/set_lore

#> Temp
# @private
    #declare score_holder $Cooldown
    #declare score_holder $CooldownDecimal
    #declare score_holder $CooldownMinutes

# 5? クールタイムを秒数に変換
    execute store result score $Cooldown Temporary run data get storage asset:artifact LocalCooldown
    scoreboard players operation $Cooldown Temporary /= $20 Const
# 5? クールタイムの小数第一位まで求める
    execute store result score $CooldownDecimal Temporary run data get storage asset:artifact LocalCooldown
    scoreboard players operation $CooldownDecimal Temporary %= $20 Const
    scoreboard players operation $CooldownDecimal Temporary *= $5 Const
# 5? 秒数を分に変換
    scoreboard players operation $CooldownMinutes Temporary = $Cooldown Temporary
    scoreboard players operation $CooldownMinutes Temporary /= $60 Const
    # 用がなくなったらmod演算
        scoreboard players operation $Cooldown Temporary %= $60 Const
    # 分がいるかをloot_table側で判断するためのフラグ
        execute if score $CooldownMinutes Temporary matches 1.. run scoreboard players set @s Temporary 1
# 5?ストレージに入れる
    execute store result storage asset:artifact LocalCooldownSecond int 1 run scoreboard players get $Cooldown Temporary
    execute store result storage asset:artifact LocalCooldownDecimal int 1 run scoreboard players get $CooldownDecimal Temporary
    execute store result storage asset:artifact LocalCooldownMinutes int 1 run scoreboard players get $CooldownMinutes Temporary

# lootする
    loot replace block 10000 0 10000 container.6 loot asset_manager:artifact/generate_lore/cooldown

# リセット
    scoreboard players reset $Cooldown
    scoreboard players reset $CooldownDecimal
    scoreboard players reset $CooldownMinutes
    scoreboard players reset @s Temporary
    data remove storage asset:artifact LocalCooldownSecond
    data remove storage asset:artifact LocalCooldownDecimal
    data remove storage asset:artifact LocalCooldownMinutes


text:
#> asset_manager:artifact/create/set_data
#
# storageから神器を作成します
#
# @input
#   as Data
#   storage asset:artifact
#       ID : int
#       Item : ItemID
#       Name : TextComponent
#       Lore : TextComponent[]
#       RemainingCount? : int
#       Slot : Slot
#       Trigger : Trigger
#       Condition? : TextComponent
#       AttackInfo? : Component
#       MPCost : int
#       MPRequire : int
#       CostText? : TextComponent
#       LocalCooldown : int
#       SpecialCooldown : int
#       CanUsedGod : God[]
#       CustomNBT : Item.tag
# @within function asset:artifact/common/give

#> Private
# @private
    #declare score_holder $ArtifactIndex

# 移行
    data modify storage asset:artifact BaseItem set from storage asset:artifact Item
# 初期化
    data modify storage asset:artifact Item set value {}
# Count
    data modify storage asset:artifact Item.Count set value 1b

# Version
    data modify storage asset:artifact Item.tag.TSB.Version set from storage global GameVersion
# Unique Universal Identifier
    scoreboard players add $ArtifactIndex Global 1
    execute store result storage asset:artifact Item.tag.TSB.UUID int 1 run scoreboard players get $ArtifactIndex Global
# 扱える神のエイリアスを修正する
    execute if data storage asset:artifact {CanUsedGod:"ALL"} run data modify storage asset:artifact CanUsedGod set value ['Flora','Urban','Nyaptov','Wi-ki','Rumor']
# そのまま入れれるやつ
    data modify storage asset:artifact Item.id set from storage asset:artifact BaseItem
    data modify storage asset:artifact Item.tag.CustomModelData set from storage asset:artifact ID
    data modify storage asset:artifact Item.tag.TSB.rawName set from storage asset:artifact Name
    data modify storage asset:artifact Item.tag.TSB.ID set from storage asset:artifact ID
    data modify storage asset:artifact Item.tag.TSB.Trigger set from storage asset:artifact Trigger
    data modify storage asset:artifact Item.tag.TSB.MPCost set from storage asset:artifact MPCost
    data modify storage asset:artifact Item.tag.TSB.MPRequire set from storage asset:artifact MPRequire
    data modify storage asset:artifact Item.tag.TSB.CanUsedGod set from storage asset:artifact CanUsedGod
    data modify storage asset:artifact Item.tag.TSB.RemainingCount set from storage asset:artifact RemainingCount
    data modify storage asset:artifact Item.tag.TSB.RemainingCountMAX set from storage asset:artifact RemainingCount
    data modify storage asset:artifact Item.tag.TSB.LocalCooldown set from storage asset:artifact LocalCooldown
    data modify storage asset:artifact Item.tag.TSB.SpecialCooldown set from storage asset:artifact SpecialCooldown
    data modify storage asset:artifact Item.tag.TSB.DisableCooldownMessage set from storage asset:artifact DisableCooldownMessage
    data modify storage asset:artifact Item.tag.TSB.DisableMPMessage set from storage asset:artifact DisableMPMessage

# 名前
    # 残り回数が存在する場合
        execute if data storage asset:artifact RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/has_remain
    # 残り回数が存在しない場合
        execute unless data storage asset:artifact RemainingCount run loot replace block 10000 0 10000 container.0 loot asset_manager:artifact/get_name/
    data modify storage asset:artifact Item.tag.display.Name set from block 10000 0 10000 Items[0].tag.display.Name

# Lore
    function asset_manager:artifact/create/set_lore
# カスタムNBT
    data modify storage asset:artifact Item.tag merge from storage asset:artifact CustomNBT

# データの適用
    item replace block 10000 0 10000 container.0 with stone
    data modify block 10000 0 10000 Items[0] set from storage asset:artifact Item

# リセット
    data remove storage asset:artifact BaseItem


text:
#> asset_manager:artifact/create/set_lore
#
# Loreを構成します
#
# @within function asset_manager:artifact/create/set_data

# 初期化
    data modify block 10000 0 10000 Items set value []
# 通常説明文
    function asset_manager:artifact/create/lore_append
# 空行セパレータ
    data modify storage asset:artifact Item.tag.display.Lore append value '""'
# 0 使用方法
    function asset_manager:artifact/create/set_trigger
# 1? 使用条件
    execute if data storage asset:artifact Condition run loot replace block 10000 0 10000 container.1 loot asset_manager:artifact/generate_lore/condition
# 2? 攻撃情報
    execute if data storage asset:artifact AttackInfo run function asset_manager:artifact/create/set_attack_info
# 3? 必要MP
    execute if data storage asset:artifact MPRequire run loot replace block 10000 0 10000 container.3 loot asset_manager:artifact/generate_lore/mp_require
# 4 消費MP
    loot replace block 10000 0 10000 container.4 loot asset_manager:artifact/generate_lore/mp_cost
# 5? 消費アイテム
    execute if data storage asset:artifact CostText run loot replace block 10000 0 10000 container.5 loot asset_manager:artifact/generate_lore/cost_item
# 6? クールタイム
    execute if data storage asset:artifact LocalCooldown run function asset_manager:artifact/create/set_cooltime
# 7? スペシャル☆クールタイム
    execute if data storage asset:artifact SpecialCooldown run function asset_manager:artifact/create/set_special_cooltime
# 8 使える神
    function asset_manager:artifact/create/set_god
# Lore一括追加
    data modify storage asset:artifact Item.tag.display.Lore append from block 10000 0 10000 Items[].tag.display.Lore[]
# リセット
    data modify block 10000 0 10000 Items set value []


text:
#> asset_manager:artifact/cooldown/main_bar/append_bar_left
#
#
#
# @within function
#   asset_manager:artifact/cooldown/main_bar/
#   asset_manager:artifact/cooldown/main_bar/append_bar_left

data modify storage asset:artifact MainBarMessage append value '{"text":"|."}'
scoreboard players remove $LeftBar Temporary 1
execute if score $LeftBar Temporary matches 1.. run function asset_manager:artifact/cooldown/main_bar/append_bar_left


text:
#> asset_manager:artifact/cooldown/main_bar/append_bar_right
#
#
#
# @within function
#   asset_manager:artifact/cooldown/main_bar/
#   asset_manager:artifact/cooldown/main_bar/append_bar_right

data modify storage asset:artifact MainBarMessage append value '{"text":"|.","color":"#233645"}'
scoreboard players remove $Value Temporary 1
execute if score $Value Temporary matches 1.. run function asset_manager:artifact/cooldown/main_bar/append_bar_right


text:
#> asset_manager:artifact/cooldown/main_bar/_index.d
# @private

#> declare
# @within function asset_manager:artifact/cooldown/main_bar/*
    #declare score_holder $LeftBar


text:
#> asset_manager:artifact/cooldown/foreach/store_lcd_bar
#
#
#
# @within function asset_manager:artifact/cooldown/foreach/construct_msgs_and_revert_lcds

execute if score $NormalizedValue Temporary matches 00 run data modify storage asset:artifact LCDMessages append value '{"text":"a","color":"white"}'
execute if score $NormalizedValue Temporary matches 01 run data modify storage asset:artifact LCDMessages append value '{"text":"b","color":"white"}'
execute if score $NormalizedValue Temporary matches 02 run data modify storage asset:artifact LCDMessages append value '{"text":"c","color":"white"}'
execute if score $NormalizedValue Temporary matches 03 run data modify storage asset:artifact LCDMessages append value '{"text":"d","color":"white"}'
execute if score $NormalizedValue Temporary matches 04 run data modify storage asset:artifact LCDMessages append value '{"text":"e","color":"white"}'
execute if score $NormalizedValue Temporary matches 05 run data modify storage asset:artifact LCDMessages append value '{"text":"f","color":"white"}'
execute if score $NormalizedValue Temporary matches 06 run data modify storage asset:artifact LCDMessages append value '{"text":"g","color":"white"}'
execute if score $NormalizedValue Temporary matches 07 run data modify storage asset:artifact LCDMessages append value '{"text":"h","color":"white"}'
execute if score $NormalizedValue Temporary matches 08 run data modify storage asset:artifact LCDMessages append value '{"text":"i","color":"white"}'
execute if score $NormalizedValue Temporary matches 09 run data modify storage asset:artifact LCDMessages append value '{"text":"j","color":"white"}'
execute if score $NormalizedValue Temporary matches 10 run data modify storage asset:artifact LCDMessages append value '{"text":"k","color":"white"}'
execute if score $NormalizedValue Temporary matches 11 run data modify storage asset:artifact LCDMessages append value '{"text":"l","color":"white"}'
execute if score $NormalizedValue Temporary matches 12 run data modify storage asset:artifact LCDMessages append value '{"text":"m","color":"white"}'
execute if score $NormalizedValue Temporary matches 13 run data modify storage asset:artifact LCDMessages append value '{"text":"n","color":"white"}'
execute if score $NormalizedValue Temporary matches 14 run data modify storage asset:artifact LCDMessages append value '{"text":"o","color":"white"}'
execute if score $NormalizedValue Temporary matches 15 run data modify storage asset:artifact LCDMessages append value '{"text":"p","color":"white"}'
execute if score $NormalizedValue Temporary matches 16 run data modify storage asset:artifact LCDMessages append value '{"text":"q","color":"white"}'


text:
#> asset_manager:artifact/cooldown/foreach/construct_msgs_and_revert_lcds
#
#
#
# @within function
#   asset_manager:artifact/cooldown/
#   asset_manager:artifact/cooldown/foreach/construct_msgs_and_revert_lcds

# a 16/16
# b 15/16
# c 14/16
# d 13/16
# e 12/16
# f 11/16
# g 10/16
# h  9/16
# i  8/16
# j  7/16
# k  6/16
# l  5/16
# m  4/16
# n  3/16
# o  2/16
# p  1/16
# q  0/16
# ε  null

# LCDにそのまま戻す
    data modify storage asset:artifact LCDs append from storage asset:artifact DecrementedLCDs[-1]
# 表示する値を算出する
    # 取得
        execute store result score $Value Temporary run data get storage asset:artifact LCDs[-1].Value
        execute store result score $Max Temporary run data get storage asset:artifact LCDs[-1].Max
    # 0除算回避の為に0なら1にする
        execute if score $Max Temporary matches 0 run scoreboard players set $Max Temporary 1
    # $Valueを移す
        scoreboard players operation $NormalizedValue Temporary = $Value Temporary
    # valueが負数(!= -15)なら0にする
        execute if score $NormalizedValue Temporary matches -14..-1 run scoreboard players set $NormalizedValue Temporary 0
    # 0~16の範囲に切り上げで補正する
        scoreboard players operation $NormalizedValue Temporary *= $-16 Const
        scoreboard players operation $NormalizedValue Temporary /= $Max Temporary
        scoreboard players operation $NormalizedValue Temporary *= $-1 Const
    # LCDMessagesに追加
        execute if score $Value Temporary matches -15 run data modify storage asset:artifact LCDMessages append value '{"text":"ε","color":"white"}'
        execute unless score $Value Temporary matches -15 run function asset_manager:artifact/cooldown/foreach/store_lcd_bar
# 末尾削除
    data remove storage asset:artifact DecrementedLCDs[-1]
# 要素があれば再帰
    execute if data storage asset:artifact DecrementedLCDs[0] run function asset_manager:artifact/cooldown/foreach/construct_msgs_and_revert_lcds


text:
#> asset_manager:artifact/cooldown/foreach/decrement
#
#
#
# @within function
#   asset_manager:artifact/cooldown/
#   asset_manager:artifact/cooldown/foreach/decrement

# デクリメント
    data modify storage asset:artifact DecrementedLCDs append from storage asset:artifact LCDs[-1]
    execute store result score $Value Temporary run data get storage asset:artifact LCDs[-1].Value
    execute if score $Value Temporary matches -14.. run scoreboard players remove $Value Temporary 1
    execute store result storage asset:artifact DecrementedLCDs[-1].Value int 1 run scoreboard players get $Value Temporary
# 末尾削除
    data remove storage asset:artifact LCDs[-1]
# 要素があれば再帰
    execute if data storage asset:artifact LCDs[0] run function asset_manager:artifact/cooldown/foreach/decrement


text:
#> asset_manager:artifact/triggers/attack
#
# 各神器処理へデータ受け渡し
#
# @within function asset_manager:artifact/triggers/

# イベント発火前に実行するやつ
    function asset_manager:artifact/data/new/set_to_current
# Victim付与
    execute as @e[type=#lib:living,type=!player,tag=AttackedEntity,distance=..150] if score @s AttackedEntity = @a[tag=this,limit=1] AttackedEntity run tag @s add Victim
# 神器側に受け渡し
    function #asset:artifact/attack
    execute if entity @s[advancements={asset_manager:artifact/attack/melee=true}] run function #asset:artifact/attack/melee
    execute if entity @s[advancements={asset_manager:artifact/attack/projectile=true}] run function #asset:artifact/attack/projectile
# イベント発火後に実行するやつ
    function asset_manager:artifact/data/new/revert_from_current
# リセット
    advancement revoke @s only asset_manager:artifact/attack/melee
    advancement revoke @s only asset_manager:artifact/attack/projectile


text:
#> asset_manager:artifact/triggers/damage
#
# 各神器処理へデータ受け渡し
#
# @within function asset_manager:artifact/triggers/

# イベント発火前に実行するやつ
    function asset_manager:artifact/data/new/set_to_current
# Attackerのセット
    execute as @e[type=#lib:living,type=!player,tag=AttackingEntity,distance=..150] if score @s AttackingEntity = @a[tag=this,limit=1] AttackingEntity run tag @s add Attacker
# 神器側に受け渡し
    function #asset:artifact/damage
    execute if entity @s[advancements={asset_manager:artifact/damage/fire=true}] run function #asset:artifact/damage/fire
    execute if entity @s[advancements={asset_manager:artifact/damage/explode=true}] run function #asset:artifact/damage/explode
    execute if entity @s[advancements={asset_manager:artifact/damage/from_entity/=true}] run function #asset:artifact/damage/from_entity/
    execute if entity @s[advancements={asset_manager:artifact/damage/from_entity/blocked=true}] run function #asset:artifact/damage/from_entity/blocked
    execute if entity @s[advancements={asset_manager:artifact/damage/from_entity/melee=true}] run function #asset:artifact/damage/from_entity/melee
    execute if entity @s[advancements={asset_manager:artifact/damage/from_entity/projectile=true}] run function #asset:artifact/damage/from_entity/projectile
# イベント発火後に実行するやつ
    function asset_manager:artifact/data/new/revert_from_current
# リセット
    advancement revoke @s only asset_manager:artifact/damage/fire
    advancement revoke @s only asset_manager:artifact/damage/explode
    advancement revoke @s only asset_manager:artifact/damage/from_entity/
    advancement revoke @s only asset_manager:artifact/damage/from_entity/blocked
    advancement revoke @s only asset_manager:artifact/damage/from_entity/melee
    advancement revoke @s only asset_manager:artifact/damage/from_entity/projectile


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> asset_manager:artifact/triggers/killed
#
# 各神器処理へデータ受け渡し
#
# @within function asset_manager:artifact/triggers/

# イベント発火前に実行するやつ
    function asset_manager:artifact/data/new/set_to_current
# 神器側に受け渡し
    function #asset:artifact/killed
    execute if entity @s[advancements={asset_manager:artifact/killed/melee=true}] run function #asset:artifact/killed/melee
    execute if entity @s[advancements={asset_manager:artifact/killed/projectile=true}] run function #asset:artifact/killed/projectile
# イベント発火後に実行するやつ
    function asset_manager:artifact/data/new/revert_from_current
# リセット
    advancement revoke @s only asset_manager:artifact/killed/melee
    advancement revoke @s only asset_manager:artifact/killed/projectile


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> asset_manager:artifact/triggers/sneak/reset
#
# スニークトリガー用スコアボードをすべてリセットします
#
# @within function core:tick/player/post

scoreboard players reset @s Sneak.Mainhand
scoreboard players reset @s Sneak.Offhand
scoreboard players reset @s Sneak.Head
scoreboard players reset @s Sneak.Chest
scoreboard players reset @s Sneak.Legs
scoreboard players reset @s Sneak.Feet
scoreboard players reset @s Sneak.Hotbar0
scoreboard players reset @s Sneak.Hotbar1
scoreboard players reset @s Sneak.Hotbar2
scoreboard players reset @s Sneak.Hotbar3
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


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> 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


text:
#> asset_manager:artifact/triggers/equipments/compare
#
# 各slotについて前のアイテムデータと一致していない場合、タグを付与します。
#
# @within function asset_manager:artifact/triggers/

#> private use
# @private
    #declare score_holder $Temp

# イベント発火前に実行するやつ
    function asset_manager:artifact/data/new/set_to_current
# セッション開く
    function lib:array/session/open
# データ設定
    data modify storage lib: ArrayA append from storage asset:context New.Items.mainhand.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.offhand.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.feet.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.legs.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.chest.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.head.tag.TSB.UUID
    data modify storage lib: ArrayA append from storage asset:context New.Items.hotbar[].tag.TSB.UUID

    data modify storage lib: ArrayB append from storage asset:context Old.Items.mainhand.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.offhand.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.feet.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.legs.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.chest.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.head.tag.TSB.UUID
    data modify storage lib: ArrayB append from storage asset:context Old.Items.hotbar[].tag.TSB.UUID
# 比較
    function lib:array/compare
# 比較結果を保存する
    data modify storage asset:artifact EquipmentChanges set from storage lib: CompareResult
# リセット
    function lib:array/session/close
    scoreboard players reset $Temp Temporary


text:
#> asset_manager:artifact/triggers/equipments/update_cooldown/foreach
#
#
#
# @within function asset_manager:artifact/triggers/equipments/update_cooldown/*

#> Private
# @private
    #declare score_holder $Max

# データ取得
    execute store result score $Tick Temporary run time query gametime
    execute store result score $Max Temporary run data get storage asset:artifact ItemData[-1].LocalCooldown
    execute store result score $LatestUsedTick Temporary run data get storage asset:artifact ItemData[-1].LatestUseTick
# 使用してからの時間を取得
    scoreboard players operation $Tick Temporary -= $LatestUsedTick Temporary
    scoreboard players operation $Max Temporary -= $Tick Temporary
    execute if score $Max Temporary matches ..-15 run scoreboard players set $Max Temporary -15
# 設定
    data modify storage lib: Array append value {}
    execute store result storage lib: Array[-1].Value int 1 run scoreboard players get $Max Temporary
    execute store result storage lib: Array[-1].Max int 1 run data get storage asset:artifact ItemData[-1].LocalCooldown
# 末尾削除
    data remove storage asset:artifact ItemData[-1]
# 要素があれば再帰
    execute if data storage asset:artifact ItemData[0] run function asset_manager:artifact/triggers/equipments/update_cooldown/foreach


text:
#> asset_manager:artifact/triggers/equipments/mask_slot/masking_foreach
#
#
#
# @within function asset_manager:artifact/triggers/equipments/mask_slot/*

# 末尾要素に応じて追加するものを変える
    execute if data storage asset:artifact CopiedEquipChanges[-1]._{_: true} run data modify storage asset:artifact NewEquips append value -1
    execute if data storage asset:artifact CopiedEquipChanges[-1]._{_:false} run data modify storage asset:artifact NewEquips append from storage asset:artifact Equipments[-1]
# 末尾削除
    data remove storage asset:artifact CopiedEquipChanges[-1]
    data remove storage asset:artifact Equipments[-1]
# 要素がまだあるなら再帰
    execute if data storage asset:artifact CopiedEquipChanges[0] if data storage asset:artifact Equipments[0] run function asset_manager:artifact/triggers/equipments/mask_slot/masking_foreach


text:
#> asset_manager:artifact/tick/player
#
#
#
# @within function core:tick/player/

# トリガー処理
    function asset_manager:artifact/triggers/
# 神器使用条件失敗時ログのクールダウンを減らす
    scoreboard players remove @s[scores={MPLogCD=0..}] MPLogCD 1
    scoreboard players remove @s[scores={BelieveLogCD=0..}] BelieveLogCD 1
    scoreboard players remove @s[scores={LocalCDLogCD=0..}] LocalCDLogCD 1
    scoreboard players remove @s[scores={SpecialCDLogCD=0..}] SpecialCDLogCD 1
# 神器クールダウン表示処理
    function asset_manager:artifact/cooldown/


text:
#> asset_manager:mob/_index.d
# @private

#> storage
# @within *
#   api:mob/core/**
#   asset:mob/*/register
#   asset:mob/*/*/
#   asset:mob/extends
#   asset:mob/super.*
#   asset_manager:mob/**
#   asset:mob/*/summon/2.summon
#   asset:mob/common/**
    #declare storage asset:mob

#> 初期化タグ
# @within function
#   api:mob/core/summon
#   asset:mob/*/summon/
#   asset:mob/*/summon/2.summon
#   asset:mob/common/summon
    #declare tag MobInit

#> MobAsset側で定義されたMobに付けられるタグ
# @within function
#   core:tick/
#   mob_manager:init/
#   asset:mob/**
#   asset_manager:mob/**
    #declare tag AssetMob

#> MobAsset以外のEntityにCommonTagを実行させるためのタグ
# @within function
#   core:tick/
#   asset:**
    #declare tag AllowProcessingCommonTag

#> this
# @within *
#   asset_manager:mob/triggers/
#   asset_manager:mob/triggers/death/
#   asset:mob/**
    #declare tag this

#> Killer
# @within *
#   asset_manager:mob/triggers/death/*
#   api:damage/core/health_subtract/non-player
#   asset:mob/*/death/**
    #declare tag Killer

#> Victim
# @within *
#   asset_manager:mob/triggers/
#   asset:mob/*/attack/**
    #declare tag Victim

#> Attacker
# @within *
#   asset_manager:mob/triggers/
#   asset:mob/*/hurt/**
    #declare tag Attacker

#> 汎用タグ類
# @within function
#   asset_manager:mob/common_tag/*
#   asset:**
    #declare tag AllowRideBannedVehicle
    #declare tag AntiFallDamage
    #declare tag AntiVoid
    #declare tag AntiBurn
    #declare tag AlwaysBurn
    #declare tag AlwaysInvisible
    #declare tag AlwaysSlowFall
    #declare tag AutoKillWhenDieVehicle
    #declare tag AutoKillWhenDiePassenger
    #declare tag Frozen
    #declare tag Drown

#> 汎用奈落耐性処理用タグ
# @within function
#   asset_manager:mob/common_tag/anti_void_action/**
    #declare tag AntiVoidTargets
    #declare tag AntiVoidTarget
    #declare tag DefaultNoGravity
    #declare tag this

#> Bossbar用のタグ
# @within function
#   asset_manager:mob/tick/*
#   asset_manager:mob/bossbar/*
#declare tag BossbarTarget


text:
#> asset_manager:mob/summon/set_tag
#
# 召喚されたAssetMobのタグを初期化します
#
# @within function asset_manager:mob/summon/set_data

# デフォルト
    tag @s add AssetMob
# Friend
    execute if data storage asset:mob {Type:"Friend"} run tag @s add Friend
# Enemy
    execute if data storage asset:mob {Type:"Enemy"} run tag @s add Enemy

    execute if data storage asset:mob {Type:"Enemy.Boss"} run data modify entity @s PersistenceRequired set value 1b
    execute if data storage asset:mob {Type:"Enemy.Boss"} run tag @s add Enemy
    execute if data storage asset:mob {Type:"Enemy.Boss"} run tag @s add Enemy.Boss
# Projectile
    execute if data storage asset:mob {Type:"Projectile"} run tag @s add Projectile
# Npc
    execute if data storage asset:mob {Type:"Npc"} run tag @s add Npc
# Object
    execute if data storage asset:mob {Type:"Object"} run tag @s add Object

# Uninterferable
    execute if data storage asset:mob {Interferable:false} run data modify entity @s Invulnerable set value 1b
    execute if data storage asset:mob {Interferable:false} run tag @s add Uninterferable


text:
#> asset_manager:mob/summon/set_data
#
# 召喚されたAssetMobのデータを初期化します
#
# @input storage asset:mob
#   ID : int
#   Name? : TextComponentString
#   Health? : float
#   AttackDamage? : double
#   Defense? : double
#   SpecialDefense? : double
#   Speed? : double
#   FollowRange? : double
#   KnockBackResist? : double
#
#   Resist.Physical : float
#   Resist.Magic : float
#   Resist.Fire : float
#   Resist.Water : float
#   Resist.Thunder : float
#   Field? : compound
#   FieldOverride? : compound
# @within function asset:mob/common/summon

# リリース時、負荷軽減のためツールでsummonコマンドに統合し削除する
    # 武器防具の事前追加
        data modify storage asset:mob HandItems set value []
        data modify storage asset:mob HandItems append from storage asset:mob Weapon.Mainhand
        data modify storage asset:mob HandItems append from storage asset:mob Weapon.Offhand
        data modify storage asset:mob ArmorItems set value []
        data modify storage asset:mob ArmorItems append from storage asset:mob Armor.Feet
        data modify storage asset:mob ArmorItems append from storage asset:mob Armor.Legs
        data modify storage asset:mob ArmorItems append from storage asset:mob Armor.Chest
        data modify storage asset:mob ArmorItems append from storage asset:mob Armor.Head
    # 武器防具
        data modify entity @s HandItems set from storage asset:mob HandItems
        data modify entity @s ArmorItems set from storage asset:mob ArmorItems
        data modify entity @s HandDropChances set from storage asset:mob WeaponDropChances
        data modify entity @s ArmorDropChances set from storage asset:mob ArmorDropChances
    # Attributeの事前追加
        data modify storage asset:mob Attributes set value []
        data modify storage asset:mob Attributes append value {Name:"generic.max_health"}
        execute if data storage asset:mob AttackDamage run data modify storage asset:mob Attributes append value {Name:"generic.attack_damage"}
        execute if data storage asset:mob Defense run data modify storage asset:mob Attributes append value {Name:"generic.armor"}
        execute if data storage asset:mob SpecialDefense run data modify storage asset:mob Attributes append value {Name:"generic.armor_toughness"}
        execute if data storage asset:mob Speed run data modify storage asset:mob Attributes append value {Name:"generic.movement_speed"}
        execute if data storage asset:mob FollowRange run data modify storage asset:mob Attributes append value {Name:"generic.follow_range"}
        execute if data storage asset:mob KnockBackResist run data modify storage asset:mob Attributes append value {Name:"generic.knockback_resistance"}
    # Attribute
        data modify storage asset:mob Attributes[{Name:"generic.max_health"}].Base set value 0.01d
        data modify storage asset:mob Attributes[{Name:"generic.attack_damage"}].Base set from storage asset:mob AttackDamage
        data modify storage asset:mob Attributes[{Name:"generic.armor"}].Base set from storage asset:mob Defense
        data modify storage asset:mob Attributes[{Name:"generic.armor_toughness"}].Base set from storage asset:mob SpecialDefense
        data modify storage asset:mob Attributes[{Name:"generic.movement_speed"}].Base set from storage asset:mob Speed
        data modify storage asset:mob Attributes[{Name:"generic.follow_range"}].Base set from storage asset:mob FollowRange
        data modify storage asset:mob Attributes[{Name:"generic.knockback_resistance"}].Base set from storage asset:mob KnockBackResist
    # 適用
        data modify entity @s Attributes set from storage asset:mob Attributes
    # 体力
        data modify entity @s Health set value 0.01f
        execute store result score @s MobHealthMax run data get storage asset:mob Health 1
        execute if data storage asset:mob {Type:"Enemy"} run function mob_manager:init/multiplay_multiplier/normal
        execute if data storage asset:mob {Type:"Enemy.Boss"} run function mob_manager:init/multiplay_multiplier/angel
        execute store result entity @s AbsorptionAmount float 1 run scoreboard players get @s MobHealthMax
    # そのまま適用するやつ
        execute store result score @s MobID run data get storage asset:mob ID
        execute if data storage asset:mob Name run data modify entity @s CustomName set from storage asset:mob Name
        data modify entity @s CustomNameVisible set value 0b
# タグ周り
    function asset_manager:mob/summon/set_tag
# Enemyのチーム設定
    execute if data storage asset:mob {Type:"Enemy"} run team join Enemy
    execute if data storage asset:mob {Type:"Enemy.Boss"} run team join Enemy
# EntityStorage呼び出し
    function oh_my_dat:please
# 属性耐性
    # Baseを追加
        data modify storage asset:mob Resist.Base set value 1f
    # 適用
        data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].Modifiers.Defense set from storage asset:mob Resist
# フィールド
    execute if data storage asset:mob FieldOverride run data modify storage asset:mob Field merge from storage asset:mob FieldOverride
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobField set from storage asset:mob Field
# ボスバーの表示
    execute if data storage asset:mob {Type:"Enemy.Boss"} run function asset_manager:mob/bossbar/init
# データ初期化
    function mob_manager:init/
# リセット
    data remove storage asset:mob HandItems
    data remove storage asset:mob ArmorItems
    data remove storage asset:mob Attributes


text:
#> asset_manager:mob/common_tag/check_fall_distance
#
# FallDistanceNBTをチェックします
#
# @within function asset_manager:mob/common_tag/

#> Temp
# @private
    #declare score_holder $FallDistance

# FallDistanceを取得
    execute store result score $FallDistance Temporary run data get entity @s FallDistance 100
# 1以上なら負数に設定する
    execute if score $FallDistance Temporary matches 1.. run data modify entity @s FallDistance set value -200000f
# リセット
    scoreboard players reset $FallDistance Temporary


text:
#> asset_manager:mob/common_tag/check_frozen
#
# StrayConversionTimeNBTの数値を巨大にしてストレイ化を延長させます
#
# @within function asset_manager:mob/common_tag/

#> Temp
# @private
    #declare score_holder $Frozen

# Frozenを取得
    execute store result score $Frozen Temporary run data get entity @s StrayConversionTime 100
# 300以下なら巨大な数に設定する
    execute if score $Frozen Temporary matches 1..300 run data modify entity @s StrayConversionTime set value 100000
# リセット
    scoreboard players reset $Frozen Temporary


text:
#> asset_manager:mob/common_tag/check_drowning
#
# InWaterTimeNBTを検知して、ドラウンド化しないようにします
#
# @within function asset_manager:mob/common_tag/

#> Temp
# @private
    #declare score_holder $InWaterTime

# InWaterTimeを取得
    execute store result score $InWaterTime Temporary run data get entity @s InWaterTime 100
# InWaterTimeが1以上なら値をマイナスにして溺れないように
    execute if score $InWaterTime Temporary matches 1.. run data modify entity @s InWaterTime set value -999999
# リセット
    scoreboard players reset $InWaterTime Temporary


text:
#> asset_manager:mob/common_tag/break_rides
#
# 乗ったボートやトロッコを粉砕する。アイテムは返してやらん。
#
# @within function asset_manager:mob/common_tag/

# 演出がほしいな
    # トロッコ
        execute if entity @e[type=minecart,distance=..1,sort=nearest,limit=1] run playsound minecraft:entity.iron_golem.hurt hostile @a ~ ~ ~ 1 2

    # ボート
        execute if entity @e[type=boat,distance=..1,sort=nearest,limit=1] run playsound minecraft:entity.zombie.attack_wooden_door hostile @a ~ ~ ~ 1 1.2
        execute if entity @e[type=chest_boat,distance=..1,sort=nearest,limit=1] run playsound minecraft:entity.zombie.attack_wooden_door hostile @a ~ ~ ~ 1 1.2

    # 共通パーティクル
        particle minecraft:crit ~ ~1 ~ 0.2 0.2 0.2 1 10
        particle minecraft:poof ~ ~1 ~ 0.2 0.2 0.2 0.1 20

# プレイヤーが置ける乗り物を破壊
    kill @e[type=#lib:placeable_vehicles,distance=..1,sort=nearest,limit=1]


text:
#> asset_manager:mob/common_tag/check_burning
#
# FireNBTをチェックします
#
# @within function asset_manager:mob/common_tag/

#> Temp
# @private
    #declare score_holder $Fire

# Fireを取得
    execute store result score $Fire Temporary run data get entity @s Fire 100
# AntiかAlwaysかによって処理を変える
    execute if entity @s[tag=AntiBurn] if score $Fire Temporary matches 1.. run data modify entity @s Fire set value 0s
    execute if entity @s[tag=AlwaysBurn] if score $Fire Temporary matches 0 run data modify entity @s Fire set value 32767s
# リセット
    scoreboard players reset $Fire Temporary


text:
#> asset_manager:mob/common_tag/anti_void_action/damage
#
# 距離に応じて最大体力依存ダメージを与える
#
# @within function asset_manager:mob/common_tag/anti_void_action/

# 引数設定 - ダメージ
    execute if entity @s[distance=..5] store result storage lib: Argument.Damage float 0.020 run attribute @s generic.max_health get 10
    execute if entity @s[distance=..4] store result storage lib: Argument.Damage float 0.035 run attribute @s generic.max_health get 10
    execute if entity @s[distance=..3] store result storage lib: Argument.Damage float 0.050 run attribute @s generic.max_health get 10
    execute if entity @s[distance=..2] store result storage lib: Argument.Damage float 0.065 run attribute @s generic.max_health get 10
    execute if entity @s[distance=..1] store result storage lib: Argument.Damage float 0.080 run attribute @s generic.max_health get 10
# 引数設定 - その他
    data modify storage lib: Argument.AttackType set value "Physical"
    data modify storage lib: Argument.ElementType set value "None"
    data modify storage lib: Argument.FixedDamage set value 1b
# 補正
    execute as @e[tag=AntiVoidTarget,distance=..0.01,limit=1] run function lib:damage/modifier
# ダメージ
    function lib:damage/
# リセット
    function lib:damage/reset


text:
#> asset_manager:mob/common_tag/anti_void_action/init
#
# 初期化
#
# @within function asset_manager:mob/common_tag/anti_void_action/

#> Temp
# @private
    #declare tag AntiVoidTargetInit
    #declare score_holder $isSetSuccess

# Entity座標にAEC召喚
    summon minecraft:area_effect_cloud ~ ~ ~ {Age:0,Duration:120,WaitTime:0,Tags:["AntiVoidTargets", "AntiVoidTargetInit"]}
# AECにMobUUIDを移す
    scoreboard players operation @e[type=area_effect_cloud,tag=AntiVoidTargetInit,distance=..0.01,limit=1] VoidMobID = @s MobUUID
# 落下距離取得
    execute store result score $Move Lib run data get entity @s FallDistance 10000
# 落下元らしき場所にAECをTPする
    execute as @e[type=area_effect_cloud,tag=AntiVoidTargetInit,distance=..0.01,limit=1] at @s rotated ~ -90 run function lib:score_to_move/
# その位置から35m以内のランダムなプレイヤーにAECをTPする / 居ない場合は一番近いプレイヤー
    execute as @e[type=area_effect_cloud,tag=AntiVoidTargetInit,limit=1] at @s at @a[distance=..35,sort=random,limit=1] run tp @s ~ ~ ~
    execute as @e[type=area_effect_cloud,tag=AntiVoidTargetInit,limit=1] at @s unless entity @p[distance=..35] at @p run tp @s ~ ~ ~
# AECから初期化タグ外す
    tag @e[type=area_effect_cloud,tag=AntiVoidTargetInit,limit=1] remove AntiVoidTargetInit

# entityにNoGravity付与と慣性リセットをする
    execute store success score $isSetSuccess Temporary run data modify entity @s NoGravity set value 1b
    effect give @s slow_falling 1 255 true
    tp @s @s
# NoGravityのセットに失敗してた場合は元から1bなので後で戻せるようにタグ付与
    execute if score $isSetSuccess Temporary matches 0 run tag @s add DefaultNoGravity
# リセット
    scoreboard players reset $isSetSuccess Temporary


text:
#> asset_manager:mob/common_tag/anti_void_action/teleport
#
# 対象座標にテレポートする
#
# @within function asset_manager:mob/common_tag/anti_void_action/

playsound entity.enderman.teleport hostile @a ~ ~ ~
execute at @e[type=area_effect_cloud,tag=AntiVoidTarget,limit=1] run playsound entity.enderman.teleport hostile @a ~ ~ ~

data modify entity @s[tag=!DefaultNoGravity] NoGravity set value 0b
tag @s remove DefaultNoGravity

tp @s @e[type=area_effect_cloud,tag=AntiVoidTarget,limit=1]


text:
#> asset_manager:mob/common_tag/anti_void_action/reset
#
# リセット処理
#
# @within function asset_manager:mob/common_tag/anti_void_action/

scoreboard players reset @s VoidActionTime
kill @e[type=area_effect_cloud,tag=AntiVoidTarget,limit=1]


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/warning
#
# 範囲予告パーティクル
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle dust 0.6 0 0 0.75 ~0 ~ ~-5 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~0.627 ~ ~-4.961 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~1.243 ~ ~-4.843 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~1.841 ~ ~-4.649 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~2.409 ~ ~-4.382 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~2.939 ~ ~-4.045 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~3.423 ~ ~-3.645 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~3.853 ~ ~-3.187 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.222 ~ ~-2.679 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.524 ~ ~-2.129 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.755 ~ ~-1.545 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.911 ~ ~-0.937 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.99 ~ ~-0.314 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.99 ~ ~0.314 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.911 ~ ~0.937 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.755 ~ ~1.545 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.524 ~ ~2.129 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~4.222 ~ ~2.679 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~3.853 ~ ~3.187 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~3.423 ~ ~3.645 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~2.939 ~ ~4.045 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~2.409 ~ ~4.382 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~1.841 ~ ~4.649 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~1.243 ~ ~4.843 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~0.627 ~ ~4.961 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~0 ~ ~5 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-0.627 ~ ~4.961 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-1.243 ~ ~4.843 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-1.841 ~ ~4.649 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-2.409 ~ ~4.382 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-2.939 ~ ~4.045 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-3.423 ~ ~3.645 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-3.853 ~ ~3.187 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.222 ~ ~2.679 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.524 ~ ~2.129 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.755 ~ ~1.545 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.911 ~ ~0.937 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.99 ~ ~0.314 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.99 ~ ~-0.314 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.911 ~ ~-0.937 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.755 ~ ~-1.545 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.524 ~ ~-2.129 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-4.222 ~ ~-2.679 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-3.853 ~ ~-3.187 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-3.423 ~ ~-3.645 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-2.939 ~ ~-4.045 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-2.409 ~ ~-4.382 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-1.841 ~ ~-4.649 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-1.243 ~ ~-4.843 0 0 0 0 1
particle dust 0.6 0 0 0.75 ~-0.627 ~ ~-4.961 0 0 0 0 1


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/tp_line
#
# テレポート時の縦線パーティクル
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

execute if score @s VoidActionTime matches 56 run particle electric_spark ~ ~3.8 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 56 run particle electric_spark ~ ~3.6 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 56 run particle electric_spark ~ ~3.4 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 56 run particle electric_spark ~ ~3.2 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 57 run particle electric_spark ~ ~3.0 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 57 run particle electric_spark ~ ~2.8 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 57 run particle electric_spark ~ ~2.6 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 57 run particle electric_spark ~ ~2.4 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 58 run particle electric_spark ~ ~2.2 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 58 run particle electric_spark ~ ~2.0 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 58 run particle electric_spark ~ ~1.8 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 58 run particle electric_spark ~ ~1.6 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 59 run particle electric_spark ~ ~1.4 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 59 run particle electric_spark ~ ~1.2 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 59 run particle electric_spark ~ ~1.0 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 59 run particle electric_spark ~ ~0.8 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 60 run particle electric_spark ~ ~0.6 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 60 run particle electric_spark ~ ~0.4 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 60 run particle electric_spark ~ ~0.2 ~ 0 0 0 0 1 force @a
execute if score @s VoidActionTime matches 60 run particle electric_spark ~ ~0.0 ~ 0 0 0 0 1 force @a


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/aoe/1
#
# 範囲攻撃パーティクル(1m)
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle electric_spark ~0 ~ ~-1 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.30902 ~ ~-0.95106 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.58779 ~ ~-0.80902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.80902 ~ ~-0.58779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.95106 ~ ~-0.30902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.95106 ~ ~0.30902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.80902 ~ ~0.58779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.58779 ~ ~0.80902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.30902 ~ ~0.95106 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0 ~ ~1 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.30902 ~ ~0.95106 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.58779 ~ ~0.80902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.80902 ~ ~0.58779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.95106 ~ ~0.30902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.95106 ~ ~-0.30902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.80902 ~ ~-0.58779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.58779 ~ ~-0.80902 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.30902 ~ ~-0.95106 ~ ~1000 ~ 0.0001 0


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/aoe/5
#
# 範囲攻撃パーティクル(5m)
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle electric_spark ~0 ~ ~-5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31395 ~ ~-4.99013 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62667 ~ ~-4.96057 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.93691 ~ ~-4.91144 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.24345 ~ ~-4.84292 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.54508 ~ ~-4.75528 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.84062 ~ ~-4.64888 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.1289 ~ ~-4.52414 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.40877 ~ ~-4.38153 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.67913 ~ ~-4.22164 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.93893 ~ ~-4.04508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.18712 ~ ~-3.85257 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.42274 ~ ~-3.64484 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.64484 ~ ~-3.42274 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.85257 ~ ~-3.18712 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.04508 ~ ~-2.93893 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.22164 ~ ~-2.67913 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.38153 ~ ~-2.40877 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.52414 ~ ~-2.1289 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.64888 ~ ~-1.84062 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.75528 ~ ~-1.54508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.84292 ~ ~-1.24345 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.91144 ~ ~-0.93691 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.96057 ~ ~-0.62667 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.99013 ~ ~-0.31395 ~ ~1000 ~ 0.0001 0
particle electric_spark ~5 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.99013 ~ ~0.31395 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.96057 ~ ~0.62667 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.91144 ~ ~0.93691 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.84292 ~ ~1.24345 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.75528 ~ ~1.54508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.64888 ~ ~1.84062 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.52414 ~ ~2.1289 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.38153 ~ ~2.40877 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.22164 ~ ~2.67913 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4.04508 ~ ~2.93893 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.85257 ~ ~3.18712 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.64484 ~ ~3.42274 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.42274 ~ ~3.64484 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.18712 ~ ~3.85257 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.93893 ~ ~4.04508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.67913 ~ ~4.22164 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.40877 ~ ~4.38153 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.1289 ~ ~4.52414 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.84062 ~ ~4.64888 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.54508 ~ ~4.75528 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.24345 ~ ~4.84292 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.93691 ~ ~4.91144 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62667 ~ ~4.96057 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31395 ~ ~4.99013 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0 ~ ~5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31395 ~ ~4.99013 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62667 ~ ~4.96057 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.93691 ~ ~4.91144 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.24345 ~ ~4.84292 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.54508 ~ ~4.75528 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.84062 ~ ~4.64888 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.1289 ~ ~4.52414 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.40877 ~ ~4.38153 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.67913 ~ ~4.22164 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.93893 ~ ~4.04508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.18712 ~ ~3.85257 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.42274 ~ ~3.64484 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.64484 ~ ~3.42274 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.85257 ~ ~3.18712 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.04508 ~ ~2.93893 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.22164 ~ ~2.67913 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.38153 ~ ~2.40877 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.52414 ~ ~2.1289 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.64888 ~ ~1.84062 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.75528 ~ ~1.54508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.84292 ~ ~1.24345 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.91144 ~ ~0.93691 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.96057 ~ ~0.62667 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.99013 ~ ~0.31395 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-5 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.99013 ~ ~-0.31395 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.96057 ~ ~-0.62667 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.91144 ~ ~-0.93691 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.84292 ~ ~-1.24345 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.75528 ~ ~-1.54508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.64888 ~ ~-1.84062 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.52414 ~ ~-2.1289 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.38153 ~ ~-2.40877 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.22164 ~ ~-2.67913 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4.04508 ~ ~-2.93893 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.85257 ~ ~-3.18712 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.64484 ~ ~-3.42274 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.42274 ~ ~-3.64484 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.18712 ~ ~-3.85257 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.93893 ~ ~-4.04508 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.67913 ~ ~-4.22164 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.40877 ~ ~-4.38153 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.1289 ~ ~-4.52414 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.84062 ~ ~-4.64888 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.54508 ~ ~-4.75528 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.24345 ~ ~-4.84292 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.93691 ~ ~-4.91144 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62667 ~ ~-4.96057 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31395 ~ ~-4.99013 ~ ~1000 ~ 0.0001 0


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/aoe/2
#
# 範囲攻撃パーティクル(2m)
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle electric_spark ~0 ~ ~-2 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31287 ~ ~-1.97538 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.61803 ~ ~-1.90211 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.90798 ~ ~-1.78201 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.17557 ~ ~-1.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.41421 ~ ~-1.41421 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.61803 ~ ~-1.17557 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.78201 ~ ~-0.90798 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.90211 ~ ~-0.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.97538 ~ ~-0.31287 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.97538 ~ ~0.31287 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.90211 ~ ~0.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.78201 ~ ~0.90798 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.61803 ~ ~1.17557 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.41421 ~ ~1.41421 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.17557 ~ ~1.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.90798 ~ ~1.78201 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.61803 ~ ~1.90211 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31287 ~ ~1.97538 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0 ~ ~2 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31287 ~ ~1.97538 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.61803 ~ ~1.90211 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.90798 ~ ~1.78201 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.17557 ~ ~1.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.41421 ~ ~1.41421 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.61803 ~ ~1.17557 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.78201 ~ ~0.90798 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.90211 ~ ~0.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.97538 ~ ~0.31287 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.97538 ~ ~-0.31287 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.90211 ~ ~-0.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.78201 ~ ~-0.90798 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.61803 ~ ~-1.17557 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.41421 ~ ~-1.41421 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.17557 ~ ~-1.61803 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.90798 ~ ~-1.78201 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.61803 ~ ~-1.90211 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31287 ~ ~-1.97538 ~ ~1000 ~ 0.0001 0


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/aoe/3
#
# 範囲攻撃パーティクル(3m)
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle electric_spark ~0 ~ ~-3 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31359 ~ ~-2.98357 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62374 ~ ~-2.93444 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.92705 ~ ~-2.85317 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.22021 ~ ~-2.74064 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.5 ~ ~-2.59808 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.76336 ~ ~-2.42705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.00739 ~ ~-2.22943 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.22943 ~ ~-2.00739 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.42705 ~ ~-1.76336 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.59808 ~ ~-1.5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.74064 ~ ~-1.22021 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.85317 ~ ~-0.92705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.93444 ~ ~-0.62374 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.98357 ~ ~-0.31359 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.98357 ~ ~0.31359 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.93444 ~ ~0.62374 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.85317 ~ ~0.92705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.74064 ~ ~1.22021 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.59808 ~ ~1.5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.42705 ~ ~1.76336 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.22943 ~ ~2.00739 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.00739 ~ ~2.22943 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.76336 ~ ~2.42705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.5 ~ ~2.59808 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.22021 ~ ~2.74064 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.92705 ~ ~2.85317 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62374 ~ ~2.93444 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31359 ~ ~2.98357 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0 ~ ~3 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31359 ~ ~2.98357 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62374 ~ ~2.93444 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.92705 ~ ~2.85317 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.22021 ~ ~2.74064 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.5 ~ ~2.59808 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.76336 ~ ~2.42705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.00739 ~ ~2.22943 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.22943 ~ ~2.00739 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.42705 ~ ~1.76336 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.59808 ~ ~1.5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.74064 ~ ~1.22021 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.85317 ~ ~0.92705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.93444 ~ ~0.62374 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.98357 ~ ~0.31359 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.98357 ~ ~-0.31359 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.93444 ~ ~-0.62374 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.85317 ~ ~-0.92705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.74064 ~ ~-1.22021 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.59808 ~ ~-1.5 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.42705 ~ ~-1.76336 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.22943 ~ ~-2.00739 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.00739 ~ ~-2.22943 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.76336 ~ ~-2.42705 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.5 ~ ~-2.59808 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.22021 ~ ~-2.74064 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.92705 ~ ~-2.85317 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62374 ~ ~-2.93444 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31359 ~ ~-2.98357 ~ ~1000 ~ 0.0001 0


text:
#> asset_manager:mob/common_tag/anti_void_action/vfx/aoe/4
#
# 範囲攻撃パーティクル(4m)
#
# @within function asset_manager:mob/common_tag/anti_void_action/vfx/

particle electric_spark ~0 ~ ~-4 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31384 ~ ~-3.98767 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62574 ~ ~-3.95075 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.93378 ~ ~-3.88948 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.23607 ~ ~-3.80423 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.53073 ~ ~-3.69552 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.81596 ~ ~-3.56403 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.08999 ~ ~-3.41056 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.35114 ~ ~-3.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.59779 ~ ~-3.04162 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.82843 ~ ~-2.82843 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.04162 ~ ~-2.59779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.23607 ~ ~-2.35114 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.41056 ~ ~-2.08999 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.56403 ~ ~-1.81596 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.69552 ~ ~-1.53073 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.80423 ~ ~-1.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.88948 ~ ~-0.93378 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.95075 ~ ~-0.62574 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.98767 ~ ~-0.31384 ~ ~1000 ~ 0.0001 0
particle electric_spark ~4 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.98767 ~ ~0.31384 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.95075 ~ ~0.62574 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.88948 ~ ~0.93378 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.80423 ~ ~1.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.69552 ~ ~1.53073 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.56403 ~ ~1.81596 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.41056 ~ ~2.08999 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.23607 ~ ~2.35114 ~ ~1000 ~ 0.0001 0
particle electric_spark ~3.04162 ~ ~2.59779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.82843 ~ ~2.82843 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.59779 ~ ~3.04162 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.35114 ~ ~3.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~2.08999 ~ ~3.41056 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.81596 ~ ~3.56403 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.53073 ~ ~3.69552 ~ ~1000 ~ 0.0001 0
particle electric_spark ~1.23607 ~ ~3.80423 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.93378 ~ ~3.88948 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.62574 ~ ~3.95075 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0.31384 ~ ~3.98767 ~ ~1000 ~ 0.0001 0
particle electric_spark ~0 ~ ~4 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31384 ~ ~3.98767 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62574 ~ ~3.95075 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.93378 ~ ~3.88948 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.23607 ~ ~3.80423 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.53073 ~ ~3.69552 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.81596 ~ ~3.56403 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.08999 ~ ~3.41056 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.35114 ~ ~3.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.59779 ~ ~3.04162 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.82843 ~ ~2.82843 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.04162 ~ ~2.59779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.23607 ~ ~2.35114 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.41056 ~ ~2.08999 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.56403 ~ ~1.81596 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.69552 ~ ~1.53073 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.80423 ~ ~1.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.88948 ~ ~0.93378 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.95075 ~ ~0.62574 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.98767 ~ ~0.31384 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-4 ~ ~0 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.98767 ~ ~-0.31384 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.95075 ~ ~-0.62574 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.88948 ~ ~-0.93378 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.80423 ~ ~-1.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.69552 ~ ~-1.53073 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.56403 ~ ~-1.81596 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.41056 ~ ~-2.08999 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.23607 ~ ~-2.35114 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-3.04162 ~ ~-2.59779 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.82843 ~ ~-2.82843 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.59779 ~ ~-3.04162 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.35114 ~ ~-3.23607 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-2.08999 ~ ~-3.41056 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.81596 ~ ~-3.56403 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.53073 ~ ~-3.69552 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-1.23607 ~ ~-3.80423 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.93378 ~ ~-3.88948 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.62574 ~ ~-3.95075 ~ ~1000 ~ 0.0001 0
particle electric_spark ~-0.31384 ~ ~-3.98767 ~ ~1000 ~ 0.0001 0


text:
#> asset_manager:mob/triggers/death/find_player
#
# 殺したプレイヤーを特定します
#
# @within function asset_manager:mob/triggers/death/

#> Private
# @private
    #declare score_holder $isSuccess

# UUIDの取得
    function api:data_get/uuid
    data modify storage asset:mob Temp set from storage api: UUID
# 比較
    execute store success score $isSuccess Temporary run data modify storage asset:mob Temp set from storage asset:mob UUID
# 当人ならtag追加
    execute if score $isSuccess Temporary matches 0 run tag @s add Killer
# リセット
    data remove storage asset:mob Temp
    scoreboard players reset $isSuccess Temporary


text:
#> asset_manager:mob/triggers/death/call_super_method
#
#
#
# @within function
#   asset_manager:mob/triggers/death/call
#   asset:mob/super.death

# IDをアドレスとしてROMを呼び出す
    data modify storage api: Argument.Address set from storage asset:context id
    function api:rom/please

# 既存のasset:context idを退避させる
    function asset_manager:common/context_id/stash

# ROMから継承元の情報を持ってくる
    data modify storage asset:context id set from storage rom: _[-4][-4][-4][-4][-4][-4][-4][-4].Mob.Extends

# super.death呼び出し
    execute if data storage asset:context id run function asset_manager:mob/triggers/death/call

# 退避させたasset:context idを戻す
    function asset_manager:common/context_id/pop


text:
#> asset_manager:mob/triggers/death/call
#
#
#
# @within function
#   asset_manager:mob/triggers/death/
#   asset_manager:mob/triggers/death/call_super_method

function #asset:mob/death

execute unless data storage asset:mob {Implement:true} run function asset_manager:mob/triggers/death/call_super_method

data remove storage asset:mob Implement


text:
#> asset_manager:mob/triggers/death/resolve_uuid/str2int
#
#
#
# @within function asset_manager:mob/triggers/death/resolve_uuid/*

data modify storage asset:mob BitStr set from storage asset:mob DeathLog.display.Lore[-1]
data remove storage asset:mob DeathLog.display.Lore[-1]

execute if data storage asset:mob {BitStr:'{"text":"0"}'} run data modify storage lib: Argument.BitArray append value 0
execute if data storage asset:mob {BitStr:'{"text":"1"}'} run data modify storage lib: Argument.BitArray append value 1

execute if data storage asset:mob DeathLog.display.Lore[0] run function asset_manager:mob/triggers/death/resolve_uuid/str2int


text:
#> asset_manager:mob/triggers/hurt/call_super_method
#
#
#
# @within function
#   asset_manager:mob/triggers/hurt/
#   asset:mob/super.hurt

# IDをアドレスとしてROMを呼び出す
    data modify storage api: Argument.Address set from storage asset:context id
    function api:rom/please

# 既存のasset:context idを退避させる
    function asset_manager:common/context_id/stash

# ROMから継承元の情報を持ってくる
    data modify storage asset:context id set from storage rom: _[-4][-4][-4][-4][-4][-4][-4][-4].Mob.Extends

# super.hurt呼び出し
    execute if data storage asset:context id run function asset_manager:mob/triggers/hurt/

# 退避させたasset:context idを戻す
    function asset_manager:common/context_id/pop


text:
#> asset_manager:mob/triggers/attack/call_super_method
#
#
#
# @within function
#   asset_manager:mob/triggers/attack/
#   asset:mob/super.attack

# IDをアドレスとしてROMを呼び出す
    data modify storage api: Argument.Address set from storage asset:context id
    function api:rom/please

# 既存のasset:context idを退避させる
    function asset_manager:common/context_id/stash

# ROMから継承元の情報を持ってくる
    data modify storage asset:context id set from storage rom: _[-4][-4][-4][-4][-4][-4][-4][-4].Mob.Extends

# super.attack呼び出し
    execute if data storage asset:context id run function asset_manager:mob/triggers/attack/

# 退避させたasset:context idを戻す
    function asset_manager:common/context_id/pop


text:
#> asset_manager:mob/triggers/tick/call_super_method
#
#
#
# @within function
#   asset_manager:mob/triggers/tick/
#   asset:mob/super.tick

# IDをアドレスとしてROMを呼び出す
    data modify storage api: Argument.Address set from storage asset:context id
    function api:rom/please

# 既存のasset:context idを退避させる
    function asset_manager:common/context_id/stash

# ROMから継承元の情報を持ってくる
    data modify storage asset:context id set from storage rom: _[-4][-4][-4][-4][-4][-4][-4][-4].Mob.Extends

# super.tick呼び出し
    execute if data storage asset:context id run function asset_manager:mob/triggers/tick/

# 退避させたasset:context idを戻す
    function asset_manager:common/context_id/pop


text:
#> asset_manager:mob/bossbar/tick
#
#
#
# @within function asset_manager:mob/tick/

# maxが100倍で入ってるので100倍で現在値を設定する
    execute store result bossbar asset:bossbar value run data get entity @s AbsorptionAmount 100


text:
#> asset_manager:mob/bossbar/init
#
#
#
# @within function asset_manager:mob/summon/set_data

#> Val
# @private
#declare score_holder $MaxHealth

# 追跡対象の設定
    tag @e[type=#lib:living,tag=BossbarTarget] remove BossbarTarget
    tag @s add BossbarTarget
# ボスバー名に天使の名前を入れる
    bossbar set asset:bossbar name {"selector":"@s"}
# ボスバーに体力を設定する
    execute store result score $MaxHealth Temporary run function api:mob/get_max_health
    scoreboard players operation $MaxHealth Temporary *= $100 Const
    execute store result bossbar asset:bossbar value store result bossbar asset:bossbar max run scoreboard players get $MaxHealth Temporary
# ボスバーを表示する
    bossbar set asset:bossbar players @a
# リセット
    scoreboard players reset $MaxHealth Temporary


text:
#> asset_manager:mob/bossbar/reset
#
#
#
# @within function asset_manager:mob/tick/global

# 見えなくする
    bossbar set asset:bossbar players


text:
#> asset_manager:mob/tick/global
#
#
#
# @within function core:tick/

execute unless entity @e[type=#lib:living,tag=BossbarTarget] run function asset_manager:mob/bossbar/reset


text:
#> asset_manager:trader/to_spawn
#
# 実行者のTraderをEntityStorage内に保存された既定座標に移動させます
#
# @within function asset_manager:trader/tick/4_interval

# EntityStorage呼び出し
    function oh_my_dat:please
# 移動
    data modify entity @s Pos set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TraderData.DefaultPos
    data modify entity @s Rotation[0] set from storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TraderData.DefaultRotation
# ついでに回復
    data modify entity @s AbsorptionAmount set value 20.0f


text:
#> asset_manager:trader/_index.d
# @private

#>
# @within asset_manager:trader/**
    #declare tag TraderInit

#> tag
# @within
#   asset_manager:trader/**
#   asset:trader/*/register/
    #declare tag Trader

#> storage
# @within
#   asset_manager:trader/**
#   asset:trader/*/register/*
#   asset:trader/common/register
    #declare storage asset:trader


text:
#> asset_manager:trader/register/set_data
#
#
#
# @within function asset_manager:trader/register/

# セッション開ける
    function lib:array/session/open
# storage呼び出し
    function oh_my_dat:please
# ID
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TraderData.ID set from storage asset:trader ID
# Default位置
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TraderData.DefaultPos set from entity @s Pos
    data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].TraderData.DefaultRotation set from storage asset:trader Rotation
# そのまま適用するやつ
    data modify entity @s CustomName set from storage asset:trader Name
    data modify entity @s Rotation[0] set from storage asset:trader Rotation
# 取引データ
    data modify storage lib: Array set from storage asset:trader Trades
    function lib:array/reverse
    data modify storage asset:trader Trades set from storage lib: Array
    execute if data storage asset:trader Trades[0] run function asset_manager:trader/register/trades_map/
    data modify entity @s Offers.Recipes set from storage asset:trader Recipes

# リセット
    function lib:array/session/close
    data remove storage asset:trader Recipes
    tag @s remove TraderInit


text:
#> asset_manager:trader/register/trades_map/item_normalize/from_preset
#
#
#
# @within function asset_manager:trader/register/trades_map/item_normalize/

# 初期化
    item replace block 10000 0 10000 container.0 with air
# プリセット読み込み
    execute if data storage asset:trader Item{PresetItem:"currency/"} run loot replace block 10000 0 10000 container.0 loot common:currency/
    execute if data storage asset:trader Item{PresetItem:"currency/high"} run loot replace block 10000 0 10000 container.0 loot common:currency/high
    execute if data storage asset:trader Item{PresetItem:"sacred_shard/lv-1"} run loot replace block 10000 0 10000 container.0 loot common:sacred_shard/lv-1
    execute if data storage asset:trader Item{PresetItem:"sacred_shard/lv-2"} run loot replace block 10000 0 10000 container.0 loot common:sacred_shard/lv-2
    execute if data storage asset:trader Item{PresetItem:"sacred_shard/lv-3"} run loot replace block 10000 0 10000 container.0 loot common:sacred_shard/lv-3
    execute if data storage asset:trader Item{PresetItem:"sacred_shard/lv-4"} run loot replace block 10000 0 10000 container.0 loot common:sacred_shard/lv-4
# 個数をコピーする(消えちゃうので)
    data modify storage asset:trader Count set from storage asset:trader Item.Count
# 設定
    data modify storage asset:trader Item set from block 10000 0 10000 Items[{Slot:0b}]
    data modify storage asset:trader Item.Count set from storage asset:trader Count
    data remove storage asset:trader Item.Slot
# ところで存在しない場合もありますよね
    execute unless data storage asset:trader Item.id run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"次のプリセットは存在しません: "},{"storage":"asset:trader","nbt":"Item.PresetItem","color":"red"}]
# リセット
    data remove storage asset:trader Count


text:
#> asset_manager:trader/register/trades_map/item_normalize/from_artifact
#
#
#
# @within function asset_manager:trader/register/trades_map/item_normalize/

# 初期化
    item replace block 10000 0 10000 container.0 with air
# 神器読み込み
    data modify storage api: Argument.ID set from storage asset:trader Item
    function api:artifact/box/from_id
# 設定
    data modify storage asset:trader Item set from block 10000 0 10000 Items[{Slot:0b}]
    data remove storage asset:trader Item.Slot
# ところで存在しない場合もありますよね
    execute unless data storage asset:trader Item.id run tellraw @a [{"storage":"global","nbt":"Prefix.ERROR"},{"text":"次のIDの神器は存在しません: "},{"storage":"asset:trader","nbt":"Item.PresetItem","color":"red"}]


text:
#> asset_manager:trader/tick/4_interval
#
#
#
# @within function core:tick/4_interval

# 登録処理
    execute if data storage global {IsProduction:1b} run function #asset:trader/register

# 奈落回避
    execute as @e[type=villager,tag=Npc,tag=Trader] at @s if predicate lib:is_void unless predicate lib:is_vehicle run function asset_manager:trader/to_spawn


text:
#> asset_manager:spawner/_index.d
# @private

#> storage
# @within *
#   asset:spawner/*/*
#   asset_manager:spawner/**
    #declare storage asset:spawner

#> SpawnerTag
# @within *
#   asset_manager:spawner/**
#   asset:spawner/*/
#   core:tick/
    #declare tag Spawner

#> SpawnerTag
# @within *
#   asset_manager:spawner/**
#   core:tick/
    #declare tag BreakSpawner

#> Register
# @within * asset_manager:spawner/register/**
    #declare tag SpawnerInit
    #declare score_holder $SpawnPotentialsWeightSum
    #declare score_holder $Weight

#> Process tag
# @within * asset_manager:spawner/tick/*
    #declare tag Success
    #declare score_holder $RequiredPlayerRange
    #declare tag this

#> SpawnData
# @within * asset_manager:spawner/spawn/**
    #declare score_holder $SpawnPotentialsWeightSum
    #declare score_holder $MobID
    #declare score_holder $PosX
    #declare score_holder $PosY
    #declare score_holder $PosZ
    #declare score_holder $MinSpawnDelay
    #declare score_holder $MaxSpawnDelay
    #declare score_holder $SpawnCount
    #declare score_holder $SpawnRange
    #declare score_holder $NearbyEntities
    #declare score_holder $MaxNearbyEntities
    #declare tag SpawnMarker

#> Choose
# @within * asset_manager:spawner/spawn/choose_mob_id/*
    #declare score_holder $TargetWeight

#> SubtractHPSystem
# @within * asset_manager:spawner/subtract_hp/**
    #declare score_holder $TargetMobID