-
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
5eb2000
commit d2a75db
Showing
8 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
29 changes: 29 additions & 0 deletions
29
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/.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,29 @@ | ||
#> asset_manager:artifact/triggers/vanilla/ | ||
# | ||
# バニラ攻撃を処理する | ||
# | ||
# @within function asset_manager:artifact/triggers/ | ||
|
||
#> Private | ||
# @within asset_manager:artifact/triggers/vanilla/* | ||
#declare score_holder $Damage | ||
|
||
# イベントデータ処理 | ||
# データを取得 | ||
data modify storage asset:context Attack set from storage asset:artifact ArtifactEvents.Attack[{Type:"vanilla_melee"}] | ||
# 攻撃先を取得し、Victim を付与する | ||
data modify storage asset:artifact AttackTargets set from storage asset:context Attack.To | ||
execute if data storage asset:artifact AttackTargets[0] run function asset_manager:artifact/triggers/event/attack/add_tag_each_victim | ||
# 最大ダメージの計算 | ||
function asset_manager:artifact/triggers/event/attack/get_max_amount | ||
|
||
# 各mobにダメージを与える | ||
execute store result score $Damage Temporary run data get storage asset:context Attack.Amount -100 | ||
execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..8] at @s run function asset_manager:artifact/triggers/vanilla/damage | ||
|
||
# リセット | ||
scoreboard players reset $Damage Temporary | ||
data remove storage asset:context Attack | ||
data remove storage asset:artifact AttackTargets | ||
tag @s remove ShouldVanillaAttack | ||
tag @e[type=#lib:living,type=!player,tag=Victim] remove Victim |
18 changes: 18 additions & 0 deletions
18
TheSkyBlessing/data/asset_manager/functions/artifact/triggers/vanilla/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,18 @@ | ||
#> asset_manager:artifact/triggers/vanilla/damage | ||
# | ||
# バニラ攻撃を処理する | ||
# | ||
# @within function asset_manager:artifact/triggers/vanilla/ | ||
|
||
#> Private | ||
# @private | ||
#declare score_holder $Fluctuation | ||
|
||
# 減算 | ||
scoreboard players operation @s MobHealth += $Damage Temporary | ||
# ダメージ表示 | ||
scoreboard players operation $Fluctuation Lib = $Damage Temporary | ||
execute unless score $Fluctuation Lib matches 0 run function lib:status_log/show_health | ||
# 代入 / kill | ||
execute if score @s MobHealth matches ..0 run tag @s add Death | ||
execute if score @s MobHealth matches ..0 run function asset_manager:artifact/triggers/vanilla/push_kill_and_death_event |
14 changes: 14 additions & 0 deletions
14
...ta/asset_manager/functions/artifact/triggers/vanilla/push_kill_and_death_event.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,14 @@ | ||
#> asset_manager:artifact/triggers/attack/vanilla/push_kill_and_death_event | ||
# | ||
# | ||
# | ||
# @within function asset_manager:artifact/triggers/attack/vanilla/ | ||
|
||
# プレイヤーにイベントを追加する | ||
execute as @p[tag=this] run function oh_my_dat:please | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].ArtifactEvents.Killed append from storage asset:context Attack | ||
# Mob にもイベントを追加する | ||
function oh_my_dat:please | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobEvents.Death append from storage asset:context Attack | ||
data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobEvents.Death[-1].To | ||
execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].MobEvents.Death[-1].From int 1 run scoreboard players get @p[tag=this] UserID |
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