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 @@ -25,9 +25,9 @@
# 神器を発動できるスロット (string) Wikiを参照
data modify storage asset:artifact Slot set value "hotbar"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "passive"
data modify storage asset:artifact Trigger set value "equipping"
# 神器の発動条件 (TextComponentString) (オプション)
data modify storage asset:artifact Condition set value '{"text":"水中にいる","color":"white"}'
# data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.Damage set value [0,0]
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
Expand All @@ -45,7 +45,7 @@
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# 神器のクールダウン (int) (オプション)
data modify storage asset:artifact LocalCooldown set value 200
# data modify storage asset:artifact LocalCooldown set value
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
# data modify storage asset:artifact TypeCooldown.Type set value
# data modify storage asset:artifact TypeCooldown.Duration set value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
function asset:artifact/common/check_condition/hotbar
# 他にアイテム等確認する場合はここに書く

# 水中にいない場合CanUsedを削除
execute unless predicate lib:is_in_water/include_flowing run tag @s remove CanUsed
# 装備済みならCanUsedを削除
execute if entity @s[tag=CanUsed,tag=LG.Equipped] run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/0772.dolphin_amulet/trigger/3.main
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

# ここから先は神器側の効果の処理を書く

# 演出
particle dolphin ~ ~ ~ 1 1 1 0 140 normal @a
# 装備判定tag
tag @s add LG.Equipped

# 確率で音
execute if predicate lib:random_pass_per/15 run playsound entity.dolphin.ambient_water neutral @s ~ ~ ~ 0.4 1 0
# 演出
particle dolphin ~ ~1.2 ~ 0.5 0.5 0.5 0 80 normal @a
playsound entity.dolphin.ambient_water neutral @a ~ ~ ~ 0.8 1 0

# エフェクト
effect give @s dolphins_grace 11 0 true
effect give @s water_breathing 11 0 true
data modify storage api: Argument.ID set value 356
function api:entity/mob/effect/give
function api:entity/mob/effect/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> asset:artifact/0772.dolphin_amulet/trigger/_index.d
# @private

#> tag
# @within function asset:artifact/0772.dolphin_amulet/trigger/**
#declare tag LG.Equipped
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/0772.dolphin_amulet/trigger/dis_equip/
#
# 装備を外した時に外した部位にのみのidが入った状態でトリガーされる
#
# @within tag/function asset:artifact/dis_equip

execute if data storage asset:context id{hotbar:[772]} run function asset:artifact/0772.dolphin_amulet/trigger/dis_equip/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:artifact/0772.dolphin_amulet/trigger/dis_equip/main
#
# 装備を外した時のメイン処理
#
# @within function asset:artifact/0772.dolphin_amulet/trigger/dis_equip/

#> prv
# @private
#declare score_holder $LG.ItemCount

# まだ持ってるか確認する
execute store result score $LG.ItemCount Temporary if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:772}}}]
# なければ削除
execute if score $LG.ItemCount Temporary matches ..0 run function asset:artifact/0772.dolphin_amulet/trigger/dis_equip/not_in_hotbar
# リセット
scoreboard players reset $LG.ItemCount Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:artifact/0772.dolphin_amulet/trigger/dis_equip/not_in_hotbar
#
#
#
# @within function asset:artifact/0772.dolphin_amulet/trigger/dis_equip/main

# エフェクト解除
data modify storage api: Argument.ID set value 356
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset

# tag削除
tag @s remove LG.Equipped
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0356.dolphin_blessing/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:356} run function asset:effect/0356.dolphin_blessing/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0356.dolphin_blessing/_/register
#
#
#
# @within tag/function asset:effect/register

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

execute if data storage asset:context {id:356} run function asset:effect/0356.dolphin_blessing/remove/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0356.dolphin_blessing/_/tick
#
# Effectが発動している間毎tick実行されるfunction
#
# @within tag/function asset:effect/tick

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

# エフェクト解除
effect clear @s water_breathing
effect clear @s dolphins_grace
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#> asset:effect/0356.dolphin_blessing/register
#
# Effectのデータを指定
#
# @within function asset:effect/0356.dolphin_blessing/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 356
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"イルカの加護","color":"#96FFFC"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"水中で呼吸でき、速く泳げる","color":"white"}']
# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 2147483647
# スタック (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 1
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value false
# 死亡時のエフェクトの処理 (default = "remove")
data modify storage asset:effect ProcessOnDied set value "keep"
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 3
# エフェクトをUIに表示するか (boolean) (default = true)
# data modify storage asset:effect Visible set value
# エフェクトのスタックををUIに表示するか (boolean) (default = true)
data modify storage asset:effect StackVisible set value false

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

# エフェクト解除
effect clear @s water_breathing
effect clear @s dolphins_grace
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:effect/0356.dolphin_blessing/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0356.dolphin_blessing/_/tick

# 水中呼吸とドルフィンズグレイズ
effect give @s water_breathing 1 0 true
effect give @s dolphins_grace 1 0 true

# 水中にいれば、時々イルカの声がする
execute if predicate lib:is_in_water/ if predicate lib:random_pass_per/1 if predicate lib:random_pass_per/30 run playsound entity.dolphin.ambient_water neutral @s ~ ~ ~ 0.4 1 0
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/artifact/dis_equip.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/0772.dolphin_amulet/trigger/dis_equip/",
"asset:artifact/1318.blue_bouquet/trigger/dis_equip/",
"asset:artifact/1317.oblivious_feather/trigger/dis_equip/",
"asset:artifact/0740.flower_of_hazy_moon/dis_equip/",
Expand Down Expand Up @@ -64,4 +65,4 @@
"asset:artifact/0961.light_charm/trigger/dis_equip/",
"asset:artifact/0960.heavy_charm/trigger/dis_equip/"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/artifact/equip.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/0772.dolphin_amulet/trigger/1.trigger",
"asset:artifact/1318.blue_bouquet/trigger/1.trigger",
"asset:artifact/1317.oblivious_feather/trigger/1.trigger",
"asset:artifact/1140.over_pulse_booster/equip/1.trigger",
Expand Down Expand Up @@ -109,4 +110,4 @@
"asset:artifact/0709.mage_robe_lower/trigger/1.trigger",
"asset:artifact/0710.mage_boots/trigger/1.trigger"
]
}
}
1 change: 0 additions & 1 deletion Asset/data/asset/tags/functions/artifact/tick.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"asset:artifact/1074.farothdal/trigger/1.trigger",
"asset:artifact/0963.hunters_amulet/trigger/1.trigger",
"asset:artifact/1054.quick_charging_battery/trigger/1.trigger",
"asset:artifact/0772.dolphin_amulet/trigger/1.trigger",
"asset:artifact/0702.bright_lamp/trigger/1.trigger",
"asset:artifact/0741.abyss_insurance_card/trigger/1.trigger",
"asset:artifact/0844.closed_eyes_of_love/trigger/1.trigger",
Expand Down
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/end.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0356.dolphin_blessing/_/end",
"asset:effect/0345.topaz_protection/_/end",
"asset:effect/0342.prayer_amidst_blight/_/end",
"asset:effect/0340.endless_thirst/_/end",
Expand Down Expand Up @@ -106,4 +107,4 @@
"asset:effect/0007.defense_base_debuff/_/end",
"asset:effect/0258.spirit_melody/_/end"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/register.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0356.dolphin_blessing/_/register",
"asset:effect/0345.topaz_protection/_/register",
"asset:effect/0339.will_o_wisp/_/register",
"asset:effect/0342.prayer_amidst_blight/_/register",
Expand Down Expand Up @@ -171,4 +172,4 @@
"asset:effect/0007.defense_base_debuff/_/register",
"asset:effect/0258.spirit_melody/_/register"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/remove.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0356.dolphin_blessing/_/remove",
"asset:effect/0345.topaz_protection/_/remove",
"asset:effect/0342.prayer_amidst_blight/_/remove",
"asset:effect/0340.endless_thirst/_/remove",
Expand Down Expand Up @@ -114,4 +115,4 @@
"asset:effect/0007.defense_base_debuff/_/remove",
"asset:effect/0258.spirit_melody/_/remove"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/effect/tick.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0356.dolphin_blessing/_/tick",
"asset:effect/0339.will_o_wisp/_/tick",
"asset:effect/0342.prayer_amidst_blight/_/tick",
"asset:effect/0340.endless_thirst/_/tick",
Expand Down Expand Up @@ -101,4 +102,4 @@
"asset:effect/0279.poison_of_vinderre/_/tick",
"asset:effect/0258.spirit_melody/_/tick"
]
}
}
Loading