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:artifact/1598.banisher/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:1598} run function asset:artifact/1598.banisher/give/2.give
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#> asset:artifact/1598.banisher/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/1598.banisher/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1598
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text": "堕天", "color": "#e1c6f5"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text": "天使を攻撃すると、威力が", "extra": [{"text": "10倍", "color": "#9c81d3"}, {"text": "になり、体力を", "color": "white"}, {"text": "20", "color": "green"}, {"text": "回復する。", "color": "white"}]}', '{"text": "弾が尽きても、非戦闘時ならリロードが可能だ。"}', '{"text": "「力ある者、天より堕とされる運命にあり」", "color": "gray"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
# data modify storage asset:artifact ConsumeItem.Count set value 1
# data modify storage asset:artifact ConsumeItem.Extra set value
# 使用回数 (int) (オプション)
data modify storage asset:artifact RemainingCount set value 4
# 神器を発動できるスロット (string) Wikiを参照
data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "onClick"
# 神器の発動条件 (TextComponentString) (オプション)
# data modify storage asset:artifact Condition set value
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.Damage set value "200 / 2000"
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackType set value [Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.ElementType set value [None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackRange set value "30.0"
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 15
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# MP回復量 (int)
# data modify storage asset:artifact MPHealWhenHit set value
# 神器のクールダウン (int) (オプション)
# data modify storage asset:artifact LocalCooldown set value
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
data modify storage asset:artifact TypeCooldown.Type set value "longRange"
data modify storage asset:artifact TypeCooldown.Duration set value 8
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
data modify storage asset:artifact DisableBreakSound set value true
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Wi-ki", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1598.banisher/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{mainhand:1598} run function asset:artifact/1598.banisher/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:artifact/1598.banisher/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1598.banisher/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/1598.banisher/trigger/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#> asset:artifact/1598.banisher/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1598.banisher/trigger/2.check_condition

#> SpreadLib
# @private
#declare tag SpreadMarker

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く
# 前方拡散
summon marker ~ ~ ~ {Tags:["SpreadMarker"]}
data modify storage lib: Argument.Distance set value 0.8
data modify storage lib: Argument.Spread set value 0.1
execute as @e[type=marker,tag=SpreadMarker,distance=..0.01,limit=1] run function lib:forward_spreader/circle

# 発射
execute facing entity @e[type=marker,tag=SpreadMarker,distance=..1,limit=1] feet anchored eyes positioned ^-0.14 ^-0.05 ^0.35 run function asset:artifact/1598.banisher/trigger/rec

# 演出
playsound entity.firework_rocket.blast player @a ~ ~ ~ 1.0 0.7
playsound entity.evoker.cast_spell player @a ~ ~ ~ 1.0 1.75
playsound entity.illusioner.prepare_mirror player @a ~ ~ ~ 1.0 2.0
# 特殊vfx
data modify storage api: Argument.FieldOverride.Item set value {id:"minecraft:stick",Count:1b}
data modify storage api: Argument.FieldOverride.Scale set value [0.5f,0.5f,0.0f]
data modify storage api: Argument.FieldOverride.Frames set value [20640,20641,20642,20643,20644,20645,20646]
data modify storage api: Argument.FieldOverride.LockRotation set value false
data modify storage api: Argument.FieldOverride.Transformation.left_rotation set value {axis:[1.0f, 0.0f, 0.0f], angle:1.577f}
data modify storage api: Argument.ID set value 2001
execute anchored eyes positioned ^-0.14 ^-0.05 ^0.35 run function api:object/summon

# 消費時の処理
function asset:artifact/1598.banisher/trigger/reload

# リセット
kill @e[type=marker,tag=SpreadMarker,distance=..1,limit=1]
data remove storage lib: Argument
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:artifact/1598.banisher/trigger/damage/
#
#
#
# @within function asset:artifact/1598.banisher/trigger/rec

# 攻撃情報設定
#通常
execute if entity @s[tag=!Enemy.Boss] run data modify storage api: Argument.Damage set value 200
#天使
execute if entity @s[tag=Enemy.Boss] as @p[tag=this] run function asset:artifact/1598.banisher/trigger/damage/boss

data modify storage api: Argument.AttackType set value "Magic"
execute as @p[tag=this] run function api:damage/modifier
function api:damage/
function api:damage/reset

# 演出
particle crit ~ ~ ~ 0.2 0.5 0.2 1.0 25
particle enchanted_hit ~ ~ ~ 0.2 0.5 0.2 1.0 20
playsound item.trident.return player @a ~ ~ ~ 1.0 2.0
playsound block.enchantment_table.use player @a ~ ~ ~ 1.0 1.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:artifact/1598.banisher/trigger/damage/boss
#
#
#
# @within function asset:artifact/1598.banisher/trigger/damage/

# 先に回復
data modify storage api: Argument.Heal set value 20.0f
function api:heal/modifier
function api:heal/
function api:heal/reset

# ダメージ値を設定
data modify storage api: Argument.Damage set value 2000
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:artifact/1598.banisher/trigger/rec
#
#
#
# @within function asset:artifact/1598.banisher/trigger/**

#> Private
# @within function asset:artifact/1598.banisher/trigger/**
#declare tag 1598.Target

# 着弾検知
execute as @e[type=#lib:living_without_player,tag=!Uninterferable,distance=..2] run tag @s add 1598.Target
execute unless block ^ ^ ^0.5 #lib:no_collision/ run return 0
# ダメージ処理
execute as @e[type=#lib:living_without_player,tag=1598.Target,distance=..2,limit=1] run return run function asset:artifact/1598.banisher/trigger/damage/

# 演出
particle dust 0.22 0.082 0.345 0.2 ~ ~ ~ 0.1 0.1 0.1 0 7
particle dust 0.478 0.176 0.553 0.2 ~ ~ ~ 0.1 0.1 0.1 0 5
particle dust 0.973 0.769 0.973 0.5 ~ ~ ~ 0.0 0.0 0.0 0 1

# 再帰
execute positioned ^ ^ ^0.5 if entity @s[distance=..30] run function asset:artifact/1598.banisher/trigger/rec
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:artifact/1598.banisher/trigger/reload
#
#
#
# @within function asset:artifact/1598.banisher/trigger/3.main

# 使用回数が残っているならキャンセル
execute if data storage asset:context Items.mainhand.id run return fail

# アイテム置き換え
data modify storage api: Argument.ID set value 1599
data modify storage api: Argument.Slot set value "mainhand"
function api:artifact/replace/from_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:artifact/1599.banisher_empty/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

execute if data storage asset:context {id:1599} run function asset:artifact/1599.banisher_empty/give/2.give
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#> asset:artifact/1599.banisher_empty/give/2.give
#
# 神器の作成部 ここでID等を定義する
#
# @user
# @within function asset:artifact/1599.banisher_empty/give/1.trigger

# 神器の説明や消費MPなどをここで設定する。
# 最後にasset:artifact/common/giveを実行することで入手可能。

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1599
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text": "堕天 <Empty>", "color": "#635671"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text": "非戦闘時にのみ、リロードができる。"}', '{"text": "天からの遣いを堕とすべく、力を使い果たした銃。", "color": "gray"}', '{"text": "集中の乱れを好まないようだ。", "color": "gray"}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
# data modify storage asset:artifact ConsumeItem.Count set value 1
# data modify storage asset:artifact ConsumeItem.Extra set value
# 使用回数 (int) (オプション)
# data modify storage asset:artifact RemainingCount set value
# 神器を発動できるスロット (string) Wikiを参照
data modify storage asset:artifact Slot set value "mainhand"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "sneak"
# 神器の発動条件 (TextComponentString) (オプション)
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を参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.IsRangeAttack set value
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.AttackRange set value
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 50
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# MP回復量 (int)
# data modify storage asset:artifact MPHealWhenHit set value
# 神器のクールダウン (int) (オプション)
# 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
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableCooldownMessage set value
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
# data modify storage asset:artifact DisableMPMessage set value
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
# data modify storage asset:artifact DisableBreakSound set value
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Wi-ki", "Rumor"]
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
# data modify storage asset:artifact CustomNBT set value {}

# 神器の入手用function
function asset:artifact/common/give
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1599.banisher_empty/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
execute if data storage asset:context id{mainhand:1599} run function asset:artifact/1599.banisher_empty/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:artifact/1599.banisher_empty/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1599.banisher_empty/trigger/1.trigger

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
function asset:artifact/common/check_condition/mainhand
# 他にアイテム等確認する場合はここに書く
# 戦闘時ならCanUsed剝奪
execute if predicate lib:in_battle run tellraw @s {"text":"戦闘中はリロードができない!","color":"red"}
execute if predicate lib:in_battle run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/1599.banisher_empty/trigger/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#> asset:artifact/1599.banisher_empty/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1599.banisher_empty/trigger/2.check_condition

# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
function asset:artifact/common/use/mainhand

# ここから先は神器側の効果の処理を書く
# リロード
data modify storage api: Argument.ID set value 1598
data modify storage api: Argument.Slot set value "mainhand"
function api:artifact/replace/from_id

# 演出
playsound block.iron_door.open player @a ~ ~ ~ 2.0 1.7
playsound block.amethyst_block.break player @a ~ ~ ~ 1.0 0.5
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1598.banisher/trigger/1.trigger",
"asset:artifact/1332.bebebeam/trigger/1.trigger",
"asset:artifact/1306.will_o_wisp/trigger/1.trigger",
"asset:artifact/1144.cradle_of_azure_moon/trigger/1.trigger",
Expand Down Expand Up @@ -177,4 +178,4 @@
"asset:artifact/2001.staff_of_the_willless/trigger/1.trigger",
"asset:artifact/0019.scripture/trigger/1.trigger"
]
}
}
4 changes: 3 additions & 1 deletion Asset/data/asset/tags/functions/artifact/give.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"values": [
"asset:artifact/1599.banisher_empty/give/1.trigger",
"asset:artifact/1598.banisher/give/1.trigger",
"asset:artifact/1562.tsukimi_dango/give/1.trigger",
"asset:artifact/1430.shield_of_fate/give/1.trigger",
"asset:artifact/1453.frost_flake_bow/give/1.trigger",
Expand Down Expand Up @@ -540,4 +542,4 @@
"asset:artifact/0735.collision_plate/give/1.trigger",
"asset:artifact/0745.blade_of_whirlwind/give/1.trigger"
]
}
}
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/artifact/sneak/.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"values": [
"asset:artifact/1599.banisher_empty/trigger/1.trigger"
]
}
}
2 changes: 1 addition & 1 deletion Asset/data/asset/tags/functions/artifact/sneak/keep/.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"asset:artifact/0971.laser_eye_helmet/charge/1.trigger",
"asset:artifact/0573.final_prism/trigger/1.trigger"
]
}
}
Loading