-
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
d2a75db
commit 41c599a
Showing
10 changed files
with
165 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/attack_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/attack_melee/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/attack_melee/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...yBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/attack.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/attack_melee/attack.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/attack_melee/use | ||
|
||
$function asset:artifact/alias/$(id)/attack/ |
8 changes: 8 additions & 0 deletions
8
...kyBlessing/data/asset_manager/functions/artifact/triggers/attack_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/attack_melee/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/attack_melee/foreach | ||
|
||
$function asset:artifact/alias/$(id)/attack/check |
31 changes: 31 additions & 0 deletions
31
...kyBlessing/data/asset_manager/functions/artifact/triggers/attack_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,31 @@ | ||
#> asset_manager:artifact/triggers/attack_melee/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/attack_melee/* | ||
|
||
# バニラ攻撃はなかったことにする | ||
tag @s remove ShouldVanillaAttack | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Attack set from storage asset:artifact Events[-1] | ||
# 攻撃先を取得し、Victim を付与する | ||
data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To | ||
execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim | ||
# 最大ダメージの計算 | ||
function asset_manager:artifact/triggers/event/attack/get_max_amount | ||
# MPを命中回数分回復する | ||
function asset_manager:artifact/triggers/event/attack/mp_heal | ||
|
||
# 使用条件を満たしているか確認する | ||
function asset_manager:artifact/check/ | ||
function asset_manager:artifact/triggers/attack_melee/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack_melee/use | ||
|
||
# リセット | ||
tag @s remove CanUsed | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack_melee/foreach |
22 changes: 22 additions & 0 deletions
22
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_melee/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,22 @@ | ||
#> asset_manager:artifact/triggers/attack_melee/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/attack_melee/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/attack_melee/attack.m with storage asset:context | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Attack | ||
data remove storage asset:context Count | ||
data remove storage asset:artifact AttackTargets |
15 changes: 15 additions & 0 deletions
15
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/.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/attack_projectile/ | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m | ||
|
||
# フラグが存在しているか確認する | ||
execute unless data storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] run return fail | ||
# イベントを取得する | ||
data modify storage asset:artifact Events append from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] | ||
# それぞれについて処理する | ||
function asset_manager:artifact/triggers/attack_projectile/foreach | ||
|
||
# リセット | ||
data remove storage asset:artifact Events |
8 changes: 8 additions & 0 deletions
8
...sing/data/asset_manager/functions/artifact/triggers/attack_projectile/attack.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/attack_projectile/attack.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/attack_projectile/use | ||
|
||
$function asset:artifact/alias/$(id)/attack/ |
8 changes: 8 additions & 0 deletions
8
...ssing/data/asset_manager/functions/artifact/triggers/attack_projectile/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/attack_projectile/check.m | ||
# | ||
# | ||
# | ||
# @input args id : int | ||
# @within function asset_manager:artifact/triggers/attack_projectile/foreach | ||
|
||
$function asset:artifact/alias/$(id)/attack/check |
28 changes: 28 additions & 0 deletions
28
...ssing/data/asset_manager/functions/artifact/triggers/attack_projectile/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,28 @@ | ||
#> asset_manager:artifact/triggers/attack_projectile/foreach | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/attack_projectile/* | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Attack set from storage asset:artifact Events[-1] | ||
# 攻撃先を取得し、Victim を付与する | ||
data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To | ||
execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim | ||
# 最大ダメージの計算 | ||
function asset_manager:artifact/triggers/event/attack/get_max_amount | ||
# MPを命中回数分回復する | ||
function asset_manager:artifact/triggers/event/attack/mp_heal | ||
|
||
# 使用条件を満たしているか確認する | ||
function asset_manager:artifact/check/ | ||
function asset_manager:artifact/triggers/attack_projectile/check.m with storage asset:context | ||
# 条件を満たしていれば使用する | ||
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/attack_projectile/use | ||
|
||
# リセット | ||
tag @s remove CanUsed | ||
data remove storage asset:artifact Events[-1] | ||
# 要素が残っているなら再帰 | ||
execute if data storage asset:artifact Events[0] run function asset_manager:artifact/triggers/attack_projectile/foreach |
22 changes: 22 additions & 0 deletions
22
...yBlessing/data/asset_manager/functions/artifact/triggers/attack_projectile/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,22 @@ | ||
#> asset_manager:artifact/triggers/attack_projectile/use | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/attack_projectile/foreach | ||
|
||
# 共通処理 | ||
# アイテムを破壊するとBrokeItemが追加される | ||
function asset_manager:artifact/use/ | ||
|
||
# 処理対象の神器の重複数を取得する | ||
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[] | ||
|
||
# 神器を呼び出し | ||
function asset_manager:artifact/triggers/attack_projectile/attack.m with storage asset:context | ||
|
||
# リセット | ||
tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim | ||
data remove storage asset:context BrokeItem | ||
data remove storage asset:context Attack | ||
data remove storage asset:context Count | ||
data remove storage asset:artifact AttackTargets |