Skip to content
Draft
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
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:21} run function asset:effect/0021.mp_regen_debuff/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/_/given
#
# Effectが付与された時に実行されるfunction
#
# @within tag/function asset:effect/given

execute if data storage asset:context {id:21} run function asset:effect/0021.mp_regen_debuff/given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/_/re-given
#
# Effectが上書きされた時に実行されるfunction
#
# @within tag/function asset:effect/re-given

execute if data storage asset:context {id:21} run function asset:effect/0021.mp_regen_debuff/re-given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:21} run function asset:effect/0021.mp_regen_debuff/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/_/remove
#
# Effectが神器や牛乳によって削除された時に実行されるfunction
#
# @within tag/function asset:effect/remove

execute if data storage asset:context {id:21} run function asset:effect/0021.mp_regen_debuff/remove/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0021.mp_regen_debuff/_/end

function asset:effect/0021.mp_regen_debuff/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/given/
#
# Effectが付与された時の処理
#
# @within function asset:effect/0021.mp_regen_debuff/_/given

function asset:effect/0021.mp_regen_debuff/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0021.mp_regen_debuff/modifier/add
# @within function asset:effect/0021.mp_regen_debuff/*/

data modify storage api: Argument.UUID set value [I;1,3,-1,0]
data modify storage api: Argument.UUID[2] set from storage asset:context id
execute store result storage api: Argument.Amount double 0.05 run data get storage asset:context Stack
data modify storage api: Argument.Operation set value "multiply"
function api:modifier/mp_regen/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> asset:effect/0021.mp_regen_debuff/modifier/remove
# @within function asset:effect/0021.mp_regen_debuff/*/

data modify storage api: Argument.UUID set value [I;1,3,-1,0]
data modify storage api: Argument.UUID[2] set from storage asset:context id
function api:modifier/mp_regen/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0021.mp_regen_debuff/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0021.mp_regen_debuff/_/re-given

function asset:effect/0021.mp_regen_debuff/modifier/remove
function asset:effect/0021.mp_regen_debuff/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#> asset:effect/0021.mp_regen_debuff/register
#
# Effectのデータを指定
#
# @within function asset:effect/0021.mp_regen_debuff/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 21
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"MP回復量低下"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"MPが回復しにくくなる"}']
# 効果時間 (int) (default = API || error)
# data modify storage asset:effect Duration set value
# スタック (int) (default = API || 1)
# data modify storage asset:effect Stack set value
# 効果時間の操作方法 (default = API || "replace")
# data modify storage asset:effect DurationOperation set value
# スタックの操作方法 (default = API || "replace")
# data modify storage asset:effect StackOperation set value
# 最大効果時間 (int) (default = 2147483647)
# data modify storage asset:effect MaxDuration set value
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 100
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value true
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 1
# エフェクトをUIに表示するか (boolean) (default = true)
# data modify storage asset:effect Visible set value
# エフェクトのスタックををUIに表示するか (boolean) (default = true)
# data modify storage asset:effect StackVisible set value

# フィールド
# data modify storage asset:effect Field set value {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0021.mp_regen_debuff/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0021.mp_regen_debuff/_/remove

function asset:effect/0021.mp_regen_debuff/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0071.mp_regen_debuff/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:71} run function asset:effect/0071.mp_regen_debuff/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:effect/0071.mp_regen_debuff/register
#
# Effectのデータを指定
#
# @within function asset:effect/0071.mp_regen_debuff/_/register

# 継承 (int)
data modify storage asset:effect Extends append value 21
function asset:effect/extends
# ID (int)
data modify storage asset:effect ID set value 71
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
execute unless data storage asset:context Attack{IsVanilla:true} run return fail

# ガス召喚
execute at @p[tag=Victim,distance=..32] run function asset:mob/0150.contamination/gus_summon
execute at @p[tag=Victim,distance=..32] run function asset:mob/0150.contamination/summon_gas

# ダメージ
data modify storage api: Argument.Damage set value 41f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
execute if data storage asset:context Hurt{IsDoT:true} run return fail

# 確率で召喚
execute if predicate lib:random_pass_per/20 unless entity @e[type=area_effect_cloud,scores={MobID=158},distance=..3] run function asset:mob/0150.contamination/gus_summon
execute if predicate lib:random_pass_per/20 unless entity @e[type=marker,scores={ObjectID=2072},distance=..3,limit=1] run function asset:mob/0150.contamination/summon_gas
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#> asset:mob/0150.contamination/gus_summon
#> asset:mob/0150.contamination/summon_gas
#
#
#
# @within function asset:mob/0150.contamination/**/**
# @within function
# asset:mob/0150.contamination/attack/
# asset:mob/0150.contamination/hurt/

# ガスを召喚する
data modify storage api: Argument.ID set value 2072
function api:object/summon
# 演出
playsound minecraft:entity.generic.extinguish_fire hostile @a ~ ~ ~ 1 0.7
playsound minecraft:entity.generic.extinguish_fire hostile @a ~ ~ ~ 1 1
playsound minecraft:entity.generic.extinguish_fire hostile @a ~ ~ ~ 1 1.7
# ガスを召喚する
data modify storage api: Argument.ID set value 2072
function api:object/summon
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# デバフを付与
function api:global_vars/get_difficulty
data modify storage api: Argument.ID set value 57
execute store result storage api: Argument.Stack int 2 run data get storage api: Return.Difficulty 1
execute store result storage api: Argument.Stack int 4 run data get storage api: Return.Difficulty 1
data modify storage api: Argument.Duration set value 60
execute as @p[tag=Victim] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,28 @@
# @within function asset:mob/0152.desire/attack/

# 演出
execute at @p[tag=Victim,distance=..10] run particle minecraft:dragon_breath ~ ~1 ~ 0.5 0.5 0.5 0.03 200
execute at @a[tag=Victim,distance=..6,limit=1] run particle minecraft:dragon_breath ~ ~1 ~ 0.5 0.5 0.5 0.03 200
playsound minecraft:entity.evoker.prepare_summon hostile @a ~ ~ ~ 1 2
playsound minecraft:entity.wither.hurt hostile @a ~ ~ ~ 1 1

# ダメージ
data modify storage api: Argument.Damage set value 55f
data modify storage api: Argument.Damage set value 41f
data modify storage api: Argument.AttackType set value "Magic"
data modify storage api: Argument.ElementType set value "None"
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sにあらゆる欲を押し付けられた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sに命までも吸い取られた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
function api:damage/modifier
execute as @p[tag=Victim,distance=..32] run function api:damage/
execute as @p[tag=Victim,distance=..6,limit=1] run function api:damage/
function api:damage/reset

# MP回復量減少
function api:global_vars/get_difficulty
data modify storage api: Argument.ID set value 72
execute store result storage api: Argument.Stack int 4 run data get storage api: Return.Difficulty 1
data modify storage api: Argument.Duration set value 100
execute as @a[tag=Victim,distance=..6,limit=1] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset

# タグリセット
tag @s remove RunOnce
tag @s remove 48.HasMP
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 名前 (TextComponentString) (オプション)
data modify storage asset:mob Name set value '{"text":"欲望","color":"#FF14F7"}'
# Mobの説明文 (TextComponentString[]) (オプション)
data modify storage asset:mob Lore set value ['{"text":"これは罪だ。","color":"white"}','{"text":"MPを吸い取り、そのMPで威力を増加させる。","color":"white"}']
data modify storage asset:mob Lore set value ['{"text":"これは罪だ。","color":"white"}','{"text":"MPを吸い取り利用して、敵性存在の魔力を乱す。","color":"white"}']
# 武器
# メインハンド (Compound(Item)) (オプション)
# data modify storage asset:mob Weapon.Mainhand set value
Expand Down
39 changes: 23 additions & 16 deletions Asset/data/asset/functions/mob/0154.ruin/attack/.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,38 @@

#> Private
# @private
#declare score_holder $DamageValue
#declare tag 4A.Target

# 腕振るやつ(タグなし)
# 腕を振る
execute unless entity @s[tag=4A.Madness] run item replace entity @s weapon.mainhand with stick{CustomModelData:20064}

# 腕振るやつ(タグあり)
execute if entity @s[tag=4A.Madness] run item replace entity @s weapon.mainhand with stick{CustomModelData:20065}

# ターゲット選択
# 理論上は1人しか存在しないはずだが念のため
execute as @a[tag=Victim,distance=..6,sort=random,limit=1] run tag @s add 4A.Target

# 演出
execute at @p[tag=Victim] run particle block redstone_block ~ ~1 ~ 0.1 0 0.1 4.2 80
execute at @p[tag=4A.Target] run particle block redstone_block ~ ~1 ~ 0.1 0 0.1 4.2 80
playsound minecraft:entity.zombie.break_wooden_door hostile @a ~ ~ ~ 2 2
playsound minecraft:item.trident.thunder hostile @a ~ ~ ~ 2 2

# 形態変化の前か後かで異なるダメージにする
execute unless entity @s[tag=4A.Madness] run data modify storage api: Argument.Damage set from storage asset:context this.Damage.Normal
execute if entity @s[tag=4A.Madness] run data modify storage api: Argument.Damage set from storage asset:context this.Damage.Madness

# ダメージ
data modify storage api: Argument.AttackType set value "Physical"
data modify storage api: Argument.ElementType set value "None"
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって存在が崩壊した","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sにより跡形もなく破壊された","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
function api:damage/modifier
execute as @p[tag=Victim,distance=..6] run function api:damage/
function api:damage/reset

# スコアリセット
scoreboard players reset $DamageValue Temporary
# ダメージ処理
# 通常攻撃
data modify storage api: Argument.AttackType set value "Physical"
data modify storage api: Argument.ElementType set value "None"
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sによって存在が崩壊した","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sにより跡形もなく破壊された","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
function api:damage/modifier
execute as @a[tag=4A.Target,distance=..6,limit=1] run function api:damage/
# 破滅時は周囲のプレイヤーも巻き込む
execute if entity @s[tag=4A.Madness] store result storage api: Argument.Damage double 0.0050 run data get storage api: Argument.Damage 100
execute if entity @s[tag=4A.Madness] as @a[tag=4A.Target,distance=..6,limit=1] at @s as @a[tag=!4A.Target,distance=..4] run function api:damage/
# リセット
function api:damage/reset

# リセット
tag @a[tag=4A.Target,distance=..6,limit=1] remove 4A.Target
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
playsound entity.generic.explode hostile @a ~ ~ ~

# ダメージ
data modify storage api: Argument.Damage set value 35f
execute if predicate api:global_vars/difficulty/min/3_blessless run data modify storage api: Argument.Damage set value 45f
data modify storage api: Argument.Damage set value 50f
execute if predicate api:global_vars/difficulty/min/3_blessless run data modify storage api: Argument.Damage set value 65f
data modify storage api: Argument.AttackType set value "Physical"
data modify storage api: Argument.ElementType set value "Water"
data modify storage api: Argument.DeathMessage append value '{"translate": "%1$sは%2$sに存在を侵害された","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#> asset:object/2072.contamination_gus/register
#> asset:object/2072.contamination_gas/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/2072/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のObjectに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# Tickするかどうか(boolean) (オプション)
# data modify storage asset:object IsTicking set value
# data modify storage asset:object IsTicking set value

# ID (int)
data modify storage asset:object ID set value 2072
# フィールド(オプション)
# data modify storage asset:object Field.myValue set value
# data modify storage asset:object Field.myValue set value
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> asset:object/2072.contamination_gus/summon/
#> asset:object/2072.contamination_gas/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> asset:object/2072.contamination_gus/summon/debug
#> asset:object/2072.contamination_gas/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
Expand All @@ -7,4 +7,4 @@

# 召喚
data modify storage api: Argument.ID set value 2072
function api:object/summon
function api:object/summon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#> asset:object/2072.contamination_gus/tick/
#> asset:object/2072.contamination_gas/tick/
#
# Objectのtick時の処理
#
Expand All @@ -13,7 +13,7 @@

# 効果
# デバフの種類が多く実行数が多いためif entityで条件をつけておく
execute if entity @a[gamemode=!spectator,distance=..3] run function asset:object/2072.contamination_gus/tick/debuff
execute if entity @a[gamemode=!spectator,distance=..3,limit=1] run function asset:object/2072.contamination_gas/tick/debuff

# 消滅処理
kill @s[scores={General.Object.Tick=20..}]
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#> asset:object/2072.contamination_gus/tick/debuff
#> asset:object/2072.contamination_gas/tick/debuff
#
#
#
# @within function asset:object/2072.contamination_gus/tick/
# @within function asset:object/2072.contamination_gas/tick/

# 移動速度低下、暗闇、採掘速度低下、吐き気
# 移動速度低下、暗闇、採掘速度低下、吐き気、非回復量低下

# スタックのあるものは難易度比例でスタックが増える
# スタックのないものは難易度比例で効果時間が増える

# 難易度値取得
function api:global_vars/get_difficulty

# 被回復量低下
data modify storage api: Argument set value {ID:64,Duration:60}
execute store result storage api: Argument.Stack int 4 run data get storage api: Return.Difficulty
execute as @a[gamemode=!spectator,distance=..3] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset

# 移動速度低下
data modify storage api: Argument set value {ID:67,Duration:60}
data modify storage api: Argument.ID set value {ID:67,Duration:60}
execute store result storage api: Argument.Stack int 3 run data get storage api: Return.Difficulty
execute as @a[gamemode=!spectator,distance=..3] run function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Expand Down
Loading