diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/give/2.give.mcfunction index f9b6369070..90e7afd678 100644 --- a/Asset/data/asset/functions/artifact/0468.raging_demon/give/2.give.mcfunction +++ b/Asset/data/asset/functions/artifact/0468.raging_demon/give/2.give.mcfunction @@ -15,7 +15,7 @@ # 神器の名前 (TextComponentString) data modify storage asset:artifact Name set value '{"text":"瞬獄殺","color":"dark_red","bold":true}' # 神器の説明文 (TextComponentString[]) - data modify storage asset:artifact Lore set value ['[{"text":"周囲10M以内の","color":"white"},{"text":"体力が30以下","color":"light_purple"},{"text":"の","color":"white"},{"text":"敵","color":"red"},{"text":"にダメージを与える","color":"white"}]','{"text":"「我こそ、拳を極めし者」","color":"dark_red"}'] + data modify storage asset:artifact Lore set value ['[{"text":"周囲10M以内の","color":"white"},{"text":"体力が5%以下","color":"light_purple"},{"text":"の","color":"white"},{"text":"敵","color":"red"},{"text":"を倒す","color":"white"}]','{"text":"ただし、天使には効果がない"}','{"text":"「我こそ、拳を極めし者」","color":"dark_red"}'] # 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション) # data modify storage asset:artifact ConsumeItem.Item set value # data modify storage asset:artifact ConsumeItem.Count set value @@ -29,17 +29,17 @@ # 神器の発動条件 (TextComponentString) (オプション) # data modify storage asset:artifact Condition set value # 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.Damage set value [30] + # data modify storage asset:artifact AttackInfo.Damage set value # 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.AttackType set value [Physical] + # data modify storage asset:artifact AttackInfo.AttackType set value # 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.ElementType set value [None] + # data modify storage asset:artifact AttackInfo.ElementType set value # 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.BypassResist set value 1b + # data modify storage asset:artifact AttackInfo.BypassResist set value # 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never" + # data modify storage asset:artifact AttackInfo.IsRangeAttack set value # 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション) - data modify storage asset:artifact AttackInfo.AttackRange set value 10 + # data modify storage asset:artifact AttackInfo.AttackRange set value # MP消費量 (int) data modify storage asset:artifact MPCost set value 10 # MP必要量 (int) (オプション) @@ -56,7 +56,7 @@ # MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション) # data modify storage asset:artifact DisableMPMessage set value # 扱える神 (string[]) Wikiを参照 - data modify storage asset:artifact CanUsedGod set value ["Urban", "Nyaptov", "Wi-ki"] + data modify storage asset:artifact CanUsedGod set value ["Urban", "Rumor"] # カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション) # data modify storage asset:artifact CustomNBT set value {} diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition.mcfunction index be82eb7a6e..9f9247aca1 100644 --- a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition.mcfunction +++ b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition.mcfunction @@ -8,8 +8,16 @@ function asset:artifact/common/check_condition/offhand # 他にアイテム等確認する場合はここに書く -# 周囲10M以内に体力が20以下の敵がいるか確認 - execute if entity @s[tag=CanUsed] run function asset:artifact/0468.raging_demon/trigger/check_target +# CanUsedでなければreturn + execute if entity @s[tag=!CanUsed] run return fail + +# 周囲10M以内に体力割合が一定以下の敵がいるか確認 + execute as @e[type=#lib:living_without_player,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=..10] run function asset:artifact/0468.raging_demon/trigger/2.check_condition/check_health_per + execute unless entity @e[type=#lib:living_without_player,tag=D0.Target,distance=..10] run tag @s remove CanUsed + execute if entity @s[tag=!CanUsed] run return fail # CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/0468.raging_demon/trigger/3.main \ No newline at end of file + function asset:artifact/0468.raging_demon/trigger/3.main + +# リセット + tag @e[type=#lib:living_without_player,tag=D0.Target,distance=..10] remove D0.Target diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition/check_health_per.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition/check_health_per.mcfunction new file mode 100644 index 0000000000..2d9f065d1e --- /dev/null +++ b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/2.check_condition/check_health_per.mcfunction @@ -0,0 +1,19 @@ +#> asset:artifact/0468.raging_demon/trigger/2.check_condition/check_health_per +# +# 体力割合をチェックし、一定以下ならtagを付与 +# +# @within function asset:artifact/0468.raging_demon/trigger/2.check_condition + +#> private +# @private + #declare score_holder $Per + +# 自身の体力割合を取得 + function api:mob/get_health_percent + execute store result score $Per Temporary run data get storage api: Return.HealthPer 100 + +# 一定以下ならtagを付与 + execute if score $Per Temporary matches ..5 run tag @s add D0.Target + +# リセット + scoreboard players reset $Per Temporary diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/3.main.mcfunction index 84fc62977b..e0da315ba4 100644 --- a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/3.main.mcfunction @@ -9,13 +9,5 @@ # ここから先は神器側の効果の処理を書く -# 防御無視・補正なし・物理・無属性の30のダメージを与える - data modify storage api: Argument.Damage set value 30f - data modify storage api: Argument.AttackType set value "Physical" - data modify storage api: Argument.FixedDamage set value true - function api:damage/modifier - execute as @e[tag=D0.Target] run function api:damage/ - -# リセット - function api:damage/reset - tag @e[tag=D0.Target] remove D0.Target +# 倒す + execute as @e[type=#lib:living_without_player,tag=D0.Target,distance=..10] run function api:mob/kill diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/check_target.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/check_target.mcfunction deleted file mode 100644 index 3a32ed4f5b..0000000000 --- a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/check_target.mcfunction +++ /dev/null @@ -1,19 +0,0 @@ -#> asset:artifact/0468.raging_demon/trigger/check_target -# -# 周囲10M以内の体力が20以下の敵1体に7k.Targetタグを付与 -# 対象の敵がいないときはCanUsedを削除 -# -# @within function asset:artifact/0468.raging_demon/trigger/2.check_condition -#> Private -# @private - #declare tag CanUsed - -# 周囲10M以内の敵全てのHPを取得 - execute as @e[tag=Enemy,tag=!Uninterferable,distance=..10] store result score @s Temporary run function asset:artifact/0468.raging_demon/trigger/get_health -# 周囲10M以内のHPが20以下のエンティティ1体を絞り込み、ターゲットタグを付与 - execute as @e[tag=Enemy,tag=!Uninterferable,scores={Temporary=..20},distance=..10,limit=1] run tag @s add D0.Target -# 対象となるターゲットがいない場合、処理を実行しない - execute unless entity @e[tag=Enemy,tag=D0.Target,tag=!Uninterferable,distance=..10] run tag @s remove CanUsed - -# リセット - scoreboard players reset @e[tag=Enemy,tag=!Uninterferable,distance=..10] Temporary diff --git a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/get_health.mcfunction b/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/get_health.mcfunction deleted file mode 100644 index 5a17664328..0000000000 --- a/Asset/data/asset/functions/artifact/0468.raging_demon/trigger/get_health.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/0468.raging_demon/trigger/get_health -# -# 体力を取得する -# -# @within function asset:artifact/0468.raging_demon/trigger/check_target - -# 現在体力を取得し、返り値として返す - function api:mob/get_health - return run data get storage api: Return.Health