Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) (オプション)
Expand All @@ -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 {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
function asset:artifact/0468.raging_demon/trigger/3.main

# リセット
tag @e[type=#lib:living_without_player,tag=D0.Target,distance=..10] remove D0.Target
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

This file was deleted.

This file was deleted.

Loading