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

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

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

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1500
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:iron_helmet"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"エレメンタルアフェクション","color":"#7fff00"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"火、水、雷属性の攻撃を受けた時、"}','{"text":"該当属性の耐性+2%、上限+60%"}']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

効果時間を書きましょう、あと最大60%でもいいかもね

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正します

# 消費アイテム ({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 "head"
# 神器のトリガー (string) Wikiを参照
data modify storage asset:artifact Trigger set value onDamage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""で囲おうね
あとこれ自傷でも発動するけど仕様?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""忘れてました。
自傷でも発動するのは仕様です

# 神器の発動条件 (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 0
# 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 "ALL"
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
data modify storage asset:artifact Equipment.Modifiers append value {Type:"defense/fire",Amount:0.1d,Operation:"multiply_base"}
data modify storage asset:artifact Equipment.Modifiers append value {Type:"defense/water",Amount:0.1d,Operation:"multiply_base"}
data modify storage asset:artifact Equipment.Modifiers append value {Type:"defense/thunder",Amount:0.1d,Operation:"multiply_base"}
# data modify storage asset:artifact Equipment.Modifiers append value {Type:"generic.armor",Amount:3d,Operation:"add"}

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

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

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

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if data storage asset:context Damage{IsVanilla:1b} run tag @s remove CanUsed
execute if entity @s[tag=CanUsed] run function asset:artifact/1500.elemental_affection/trigger/3.main
Comment on lines +12 to +13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ無属性でも発動しない?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

execute if data storage asset:context Damage{ElementType:None} run tag @s remove CanUsed
であっていますか?

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:artifact/1500.elemental_affection/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1500.elemental_affection/trigger/2.check_condition

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

# ここから先は神器側の効果の処理を書く
# say test: 1500.elemental_affection
# particle minecraft:nautilus ~ ~1.25 ~ 0.0 0.5 0.0 0.5 75
execute if data storage asset:context Damage{ElementType:Fire} run data modify storage api: Argument.ID set value 366
execute if data storage asset:context Damage{ElementType:Fire} run function api:entity/mob/effect/give
execute if data storage asset:context Damage{ElementType:Fire} run function api:entity/mob/effect/reset

execute if data storage asset:context Damage{ElementType:Water} run data modify storage api: Argument.ID set value 367
execute if data storage asset:context Damage{ElementType:Water} run function api:entity/mob/effect/give
execute if data storage asset:context Damage{ElementType:Water} run function api:entity/mob/effect/reset

execute if data storage asset:context Damage{ElementType:Thunder} run data modify storage api: Argument.ID set value 368
execute if data storage asset:context Damage{ElementType:Thunder} run function api:entity/mob/effect/give
execute if data storage asset:context Damage{ElementType:Thunder} run function api:entity/mob/effect/reset
Comment on lines +13 to +23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID指定だけ属性別にして、giveとリセットは共通で良さそう

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

execute if data storage asset:context id{head:1500} run function asset:artifact/1500.elemental_affection/trigger/dis_equip/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:artifact/1500.elemental_affection/trigger/dis_equip/main
#
# 装備を外した時のメイン処理
#
# @within function asset:artifact/1500.elemental_affection/trigger/dis_equip/
data modify storage api: Argument.ID set value 366
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset
data modify storage api: Argument.ID set value 367
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset
data modify storage api: Argument.ID set value 368
function api:entity/mob/effect/remove/from_id
function api:entity/mob/effect/reset
Comment on lines +6 to +14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

意図は理解しつつ、一応コメントはつけよう

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントつけます!

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0366.fire_affection/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

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

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

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

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

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

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

function asset:effect/0366.fire_affection/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:effect/0366.fire_affection/modifier/add
#
# 補正を付与する
#
# @within function
# asset:effect/0366.fire_affection/given/
# asset:effect/0366.fire_affection/re-given/

# 火耐性+5%
data modify storage api: Argument.UUID set value [I;1,3,366,0]
execute store result storage api: Argument.Amount double 0.02 run data get storage asset:context Stack

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stackも神器側で指定できるとGoodなのだが、正直めんどいのでどっちでもよい

data modify storage api: Argument.Operation set value "multiply_base"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiplyにしてね、バフ/デバフはそういうルールなので

# リセット
function api:modifier/defense/fire/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:effect/0366.fire_affection/modifier/remove
#
# 補正を削除する
#
# @within function
# asset:effect/0366.fire_affection/re-given/
# asset:effect/0366.fire_affection/end/
# asset:effect/0366.fire_affection/remove/

# バフ解除
data modify storage api: Argument.UUID set value [I;1,3,366,0]
function api:modifier/defense/fire/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0366.fire_affection/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0366.fire_affection/_/re-given

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

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 366
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"ファイアアフェクション","color":"red"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"火属性ダメージを受けるたびに、火耐性がアップする"}']
Comment on lines 13 to +14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ココは周りに合わせるなら↓かな~って感じ、

Suggested change
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"水属性与ダメージが上昇するが","color":"white"}','{"text":"スタックが一定値になると固定ダメージを受ける","color":"white"}']
data modify storage asset:effect Description set value ['{"text":"火属性ダメージを受けるたびに、火耐性がアップする"}']
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value ['{"text":"火属性被ダメージが低下する"}']

# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 200
Comment on lines 15 to 16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

効果時間は神器側で定義すると調整班が喜ぶのでそうしてほしい

# スタック (int) (default = API || 1)
data modify storage asset:effect Stack set value 1
# 効果時間の操作方法 (default = API || "replace")
data modify storage asset:effect DurationOperation set value add
# スタックの操作方法 (default = API || "replace")
data modify storage asset:effect StackOperation set value add
# 最大効果時間 (int) (default = 2147483647)
data modify storage asset:effect MaxDuration set value 200
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 30
# 悪い効果か否か (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 set value {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0366.fire_affection/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0366.fire_affection/_/remove

function asset:effect/0366.fire_affection/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0367.water_affection/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

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

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

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

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

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

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

function asset:effect/0367.water_affection/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:effect/0367.water_affection/modifier/add
#
# 補正を付与する
#
# @within function
# asset:effect/0367.water_affection/given/
# asset:effect/0367.water_affection/re-given/

# 火耐性+5%
data modify storage api: Argument.UUID set value [I;1,3,367,0]
execute store result storage api: Argument.Amount double 0.02 run data get storage asset:context Stack
data modify storage api: Argument.Operation set value "multiply_base"
# リセット
function api:modifier/defense/water/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:effect/0367.water_affection/modifier/remove
#
# 補正を削除する
#
# @within function
# asset:effect/0367.water_affection/re-given/
# asset:effect/0367.water_affection/end/
# asset:effect/0367.water_affection/remove/

# バフ解除
data modify storage api: Argument.UUID set value [I;1,3,367,0]
function api:modifier/defense/water/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0367.water_affection/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0367.water_affection/_/re-given

function asset:effect/0367.water_affection/modifier/remove
function asset:effect/0367.water_affection/modifier/add
Loading
Loading