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

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

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

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1109
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"巫女の黒百合","color":"#8e2c30"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"自身に付与されたデバフ1つにつき"}','[{"text":"攻撃+2.5%","color":"green"},{"text":"、","color":"white"},{"text":"与回復量-5%","color":"red"},{"text":"を10秒間得る","color":"white"}]','{"text":"(それぞれ最大12.5%、-25%)"}','{"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 "hotbar"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value "onAttack"
# 効果が重複可能か否か (boolean) (オプション)
# data modify storage asset:artifact EnableDuplication set value
# 神器の発動条件 (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 20
# 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 300
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
# data modify storage asset:artifact TypeCooldown.Type set value
# data modify storage asset:artifact TypeCooldown.Duration set value
# 第二種別クールダウン ({Type: string, Duration: int}) (オプション)
# data modify storage asset:artifact SecondaryTypeCooldown.Type set value
# data modify storage asset:artifact SecondaryTypeCooldown.Duration set value
# グローバルクールダウン (int) (オプション)
# data modify storage asset:artifact SpecialCooldown set value
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
data modify storage asset:artifact DisableCooldownMessage set value true
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
data modify storage asset:artifact DisableMPMessage set value true
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
# data modify storage asset:artifact DisableBreakSound set value
# 扱える神 (string[]) Wikiを参照
data modify storage asset:artifact CanUsedGod set value ["Flora", "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,7 @@
#> asset:artifact/1109.black_lily_of_priestess/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact HideRarityRegistry[3] append value [1109]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1109.black_lily_of_priestess/trigger/1.trigger
#
# 指定したイベントタイミングで実行されるfunction
#
# @within tag/function asset:artifact/**

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

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

# IsDoT:trueの際は発動しない
execute if entity @s[tag=CanUsed] if data storage asset:context Attack{IsDoT:true} run tag @s remove CanUsed

# 自身にデバフがあるかをチェック
execute if entity @s[tag=CanUsed] run function api:entity/mob/effect/get/size/bad
execute if entity @s[tag=CanUsed] store result score $UT.DebuffCount Temporary run data get storage api: Return.EffectSize.Bad
execute if entity @s[tag=CanUsed] unless score $UT.DebuffCount Temporary matches 1.. run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/1109.black_lily_of_priestess/trigger/3.main

# リセット
scoreboard players reset $UT.DebuffCount Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:artifact/1109.black_lily_of_priestess/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1109.black_lily_of_priestess/trigger/2.check_condition

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

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

# 演出
#playsound ogg:ambient.nether.crimson_forest.shine3 player @a ~ ~ ~ 0.4 2
particle minecraft:dust_color_transition 0.4 0 0 1 0. 0 0 ~ ~1.2 ~ 1.5 1 1.5 0 60
playsound ogg:ambient.nether.crimson_forest.shine3 player @a ~ ~ ~ 0.2 1.4
playsound ogg:ambient.nether.crimson_forest.shine3 player @a ~ ~ ~ 0.2 1.2
playsound minecraft:weather.rain.above player @a ~ ~ ~ 0.2 0.8

# エフェクト
function asset:artifact/1109.black_lily_of_priestess/trigger/effect
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> asset:artifact/1109.black_lily_of_priestess/trigger/_index.d
# @private

#> tag
# @within function asset:artifact/1109.black_lily_of_priestess/trigger/**
#declare score_holder $UT.DebuffCount
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#> asset:artifact/1109.black_lily_of_priestess/trigger/effect
#
#
#
# @within function asset:artifact/1109.black_lily_of_priestess/trigger/3.main

#> Private
# @private
#declare score_holder $MaxStack 調整班用にここで設定しておく

# スタック最大値
scoreboard players set $MaxStack Temporary 5

# Stackをデバフ数にしておく
execute store result storage api: Argument.Stack int 1 run scoreboard players operation $UT.DebuffCount Temporary < $MaxStack Temporary

# 調整班用効果量設定
# 効果時間
data modify storage api: Argument.Duration set value 200
# 攻撃補正
execute store result storage api: Argument.FieldOverride.Modifier.Attack float 0.025 run scoreboard players get $UT.DebuffCount Temporary
# 与回復補正
execute store result storage api: Argument.FieldOverride.Modifier.Heal float -0.05 run scoreboard players get $UT.DebuffCount Temporary

# 付与
data modify storage api: Argument.ID set value 342
function api:entity/mob/effect/give
function api:entity/mob/effect/reset

# リセット
scoreboard players reset $MaxStack Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0342.prayer_amidst_blight/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

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

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

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

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

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

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

# 補正を付与
function asset:effect/0342.prayer_amidst_blight/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:effect/0342.prayer_amidst_blight/modifier/add
#
#
#
# @within function asset:effect/0342.prayer_amidst_blight/given/

# スタックなんてただの飾りです 偉い人にはそれがわからんのですよ

# 攻撃補正
data modify storage api: Argument.UUID set from storage asset:context this.UUID
data modify storage api: Argument.Amount set from storage asset:context this.Modifier.Attack
data modify storage api: Argument.Operation set value "multiply"
function api:modifier/attack/base/add

# 回復補正
data modify storage api: Argument.UUID set from storage asset:context this.UUID
data modify storage api: Argument.Amount set from storage asset:context this.Modifier.Heal
data modify storage api: Argument.Operation set value "multiply"
function api:modifier/heal/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:effect/0342.prayer_amidst_blight/modifier/remove
#
#
#
# @within function
# asset:effect/0342.prayer_amidst_blight/end/
# asset:effect/0342.prayer_amidst_blight/remove/

# 攻撃補正
data modify storage api: Argument.UUID set from storage asset:context this.UUID
function api:modifier/attack/base/remove

# 回復補正
data modify storage api: Argument.UUID set from storage asset:context this.UUID
function api:modifier/heal/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#> asset:effect/0342.prayer_amidst_blight/register
#
# Effectのデータを指定
#
# @within function asset:effect/0342.prayer_amidst_blight/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 342
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"穢中の祈り","color":"#8e2c30"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"与ダメージが上昇し、与回復量が減少する","color":"white"}']
# 効果時間 (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 1
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value false
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (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

# フィールド
data modify storage asset:effect Field.UUID set value [I;1,3,342,0]
data modify storage asset:effect Field.Modifier.Attack set value 0.02
data modify storage asset:effect Field.Modifier.Heal set value -0.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0342.prayer_amidst_blight/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0342.prayer_amidst_blight/_/remove

# 補正を付与
function asset:effect/0342.prayer_amidst_blight/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0342.prayer_amidst_blight/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0342.prayer_amidst_blight/_/tick

# 演出
execute if predicate lib:random_pass_per/30 run particle minecraft:dust_color_transition 0.4 0 0 0.6 0 0 0 ~ ~1.2 ~ 1 0.4 1 0 1
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/artifact/attack.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1109.black_lily_of_priestess/trigger/1.trigger",
"asset:artifact/0897.lightning_broach/trigger/1.trigger",
"asset:artifact/0554.catastrophe/attack/1.trigger",
"asset:artifact/1110.lantern_of_firefly/trigger/1.trigger",
Expand Down
3 changes: 2 additions & 1 deletion Asset/data/asset/tags/functions/artifact/give.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1109.black_lily_of_priestess/give/1.trigger",
"asset:artifact/1140.over_pulse_booster/give/1.trigger",
"asset:artifact/1139.over_pulse_legframe/give/1.trigger",
"asset:artifact/1138.over_pulse_bodyarmor/give/1.trigger",
Expand Down Expand Up @@ -517,4 +518,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/register.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1109.black_lily_of_priestess/register",
"asset:artifact/1137.over_pulse_headgear/register",
"asset:artifact/1228.fatalerror/register",
"asset:artifact/1273.maidchan_plush/register",
Expand Down Expand Up @@ -295,4 +296,4 @@
"asset:artifact/1027.fire_of_rebirth/register",
"asset:artifact/1111.rod_o_redeem/register"
]
}
}
1 change: 1 addition & 0 deletions 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/0342.prayer_amidst_blight/_/end",
"asset:effect/0025.levitation/_/end",
"asset:effect/0621.loyalty_shield/_/end",
"asset:effect/0653.absolute_drive/_/end",
Expand Down
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/effect/given.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:effect/0342.prayer_amidst_blight/_/given",
"asset:effect/0315.charge_of_aurora_scythe/_/given",
"asset:effect/0621.loyalty_shield/_/given",
"asset:effect/0653.absolute_drive/_/given",
Expand Down
Loading