-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ffe8a9
commit 6dea091
Showing
61 changed files
with
925 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#> asset_manager:artifact/triggers/damage/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Damage[0] run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/damage/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/check.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage/foreach | ||
|
||
$function asset:artifact/alias/$(id)/damage/check |
8 changes: 8 additions & 0 deletions
8
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/damage.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage/damage.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage/use | ||
|
||
$function asset:artifact/alias/$(id)/damage/ |
26 changes: 26 additions & 0 deletions
26
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/foreach.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#> asset_manager:artifact/triggers/damage/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Damage set from storage asset:artifact Events[-1] | ||
# 攻撃元を取得し、Attacker を付与する (null の可能性もある) | ||
function asset_manager:artifact/triggers/event/damage/add_tag_attacker | ||
|
||
# 使用条件を満たしているか確認する | ||
function asset_manager:artifact/check/ | ||
function asset_manager:artifact/triggers/damage/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage/use | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker | ||
tag @s remove CanUsed | ||
data remove storage asset:context Damage | ||
data remove storage asset:artifact AttackTargets | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage/foreach |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage/use.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#> asset_manager:artifact/triggers/damage/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/damage/damage.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
15 changes: 15 additions & 0 deletions
15
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#> asset_manager:artifact/triggers/damage_drowning/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_drowning"}] run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_drowning"}] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/damage_drowning/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...lessing/data/asset_manager/functions/artifact/triggers/damage_drowning/check.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_drowning/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_drowning/foreach | ||
|
||
$function asset:artifact/alias/$(id)/damage_drowning/check |
8 changes: 8 additions & 0 deletions
8
...ta/asset_manager/functions/artifact/triggers/damage_drowning/damage_drowning.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_drowning/damage_drowning.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_drowning/use | ||
|
||
$function asset:artifact/alias/$(id)/damage_drowning/ |
26 changes: 26 additions & 0 deletions
26
...lessing/data/asset_manager/functions/artifact/triggers/damage_drowning/foreach.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#> asset_manager:artifact/triggers/damage_drowning/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_drowning/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Damage set from storage asset:artifact Events[-1] | ||
# 攻撃元を取得し、Attacker を付与する (null の可能性もある) | ||
function asset_manager:artifact/triggers/event/damage/add_tag_attacker | ||
|
||
# 使用条件を満たしているか確認する | ||
function asset_manager:artifact/check/ | ||
function asset_manager:artifact/triggers/damage_drowning/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_drowning/use | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker | ||
tag @s remove CanUsed | ||
data remove storage asset:context Damage | ||
data remove storage asset:artifact AttackTargets | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_drowning/foreach |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_drowning/use.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#> asset_manager:artifact/triggers/damage_drowning/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_drowning/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/damage_drowning/damage_drowning.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
15 changes: 15 additions & 0 deletions
15
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#> asset_manager:artifact/triggers/damage_entity/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Damage[].From run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/damage_entity/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...yBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/check.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity/foreach | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity/check |
8 changes: 8 additions & 0 deletions
8
...g/data/asset_manager/functions/artifact/triggers/damage_entity/damage_entity.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity/damage_entity.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity/use | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity/ |
26 changes: 26 additions & 0 deletions
26
...yBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/foreach.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#> asset_manager:artifact/triggers/damage_entity/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_entity/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Damage set from storage asset:artifact Events[-1] | ||
# 攻撃元を取得し、Attacker を付与する (null の可能性もある) | ||
function asset_manager:artifact/triggers/event/damage/add_tag_attacker | ||
|
||
# 使用条件を満たしているか確認する | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity/use | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker | ||
tag @s remove CanUsed | ||
data remove storage asset:context Damage | ||
data remove storage asset:artifact AttackTargets | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity/foreach |
19 changes: 19 additions & 0 deletions
19
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity/use.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#> asset_manager:artifact/triggers/damage_entity/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_entity/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/damage_entity/damage_entity.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
15 changes: 15 additions & 0 deletions
15
...essing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_explosion/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}].From run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_explosion"}] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/damage_entity_explosion/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...data/asset_manager/functions/artifact/triggers/damage_entity_explosion/check.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_explosion/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity_explosion/foreach | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity_explosion/check |
8 changes: 8 additions & 0 deletions
8
.../functions/artifact/triggers/damage_entity_explosion/damage_entity_explosion.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_explosion/damage_entity_explosion.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity_explosion/use | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity_explosion/ |
26 changes: 26 additions & 0 deletions
26
...data/asset_manager/functions/artifact/triggers/damage_entity_explosion/foreach.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_explosion/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_entity_explosion/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Damage set from storage asset:artifact Events[-1] | ||
# 攻撃元を取得し、Attacker を付与する (null の可能性もある) | ||
function asset_manager:artifact/triggers/event/damage/add_tag_attacker | ||
|
||
# 使用条件を満たしているか確認する | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity_explosion/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity_explosion/use | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker | ||
tag @s remove CanUsed | ||
data remove storage asset:context Damage | ||
data remove storage asset:artifact AttackTargets | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity_explosion/foreach |
19 changes: 19 additions & 0 deletions
19
...ing/data/asset_manager/functions/artifact/triggers/damage_entity_explosion/use.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_explosion/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_entity_explosion/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/damage_entity_explosion/damage_entity_explosion.m with storage asset:context | ||
|
||
# リセット | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Count |
15 changes: 15 additions & 0 deletions
15
...kyBlessing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_melee/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}].From run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Damage[{Type:"vanilla_melee"}] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/damage_entity_melee/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...ing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/check.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_melee/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity_melee/foreach | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity_melee/check |
8 changes: 8 additions & 0 deletions
8
..._manager/functions/artifact/triggers/damage_entity_melee/damage_entity_melee.m.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_melee/damage_entity_melee.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/damage_entity_melee/use | ||
|
||
$function asset:artifact/alias/$(id)/damage_entity_melee/ |
26 changes: 26 additions & 0 deletions
26
...ing/data/asset_manager/functions/artifact/triggers/damage_entity_melee/foreach.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#> asset_manager:artifact/triggers/damage_entity_melee/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/damage_entity_melee/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Damage set from storage asset:artifact Events[-1] | ||
# 攻撃元を取得し、Attacker を付与する (null の可能性もある) | ||
function asset_manager:artifact/triggers/event/damage/add_tag_attacker | ||
|
||
# 使用条件を満たしているか確認する | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/check/ | ||
execute if entity @e[type=#lib:living,type=!player,tag=Attacker] run function asset_manager:artifact/triggers/damage_entity_melee/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/damage_entity_melee/use | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Attacker] remove Attacker | ||
tag @s remove CanUsed | ||
data remove storage asset:context Damage | ||
data remove storage asset:artifact AttackTargets | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/damage_entity_melee/foreach |
Oops, something went wrong.