-
Notifications
You must be signed in to change notification settings - Fork 2
[Artifact 0015] ガソリンの作成 #2074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[Artifact 0015] ガソリンの作成 #2074
Changes from all commits
4d775be
7643f92
1dc4c63
108d7be
2ca7713
dc6d983
48b61f6
db7b87d
207aa3a
9c99ea3
0d40f17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:artifact/0015.gasoline/give/1.trigger | ||
| # | ||
| # 神器の取得処理の呼び出し時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:artifact/give | ||
|
|
||
| execute if data storage asset:context {id:15} run function asset:artifact/0015.gasoline/give/2.give |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #> asset:artifact/0015.gasoline/give/2.give | ||
| # | ||
| # 神器の作成部 ここでID等を定義する | ||
| # | ||
| # @user | ||
| # @within function asset:artifact/0015.gasoline/give/1.trigger | ||
|
|
||
| # 神器の説明や消費MPなどをここで設定する。 | ||
| # 最後にasset:artifact/common/giveを実行することで入手可能。 | ||
|
|
||
| # 神器のID (int) スプレッドシートの値を入れる | ||
| data modify storage asset:artifact ID set value 15 | ||
| # 神器のベースアイテム | ||
| data modify storage asset:artifact Item set value "minecraft:potion" | ||
| # 神器の名前 (TextComponentString) | ||
| data modify storage asset:artifact Name set value '{"text":"ガソリン","color":"red"}' | ||
| # 神器の説明文 (TextComponentString[]) | ||
| data modify storage asset:artifact Lore set value ['{"text":"大量のガソリンをぶっかけて攻撃する"}','[{"text":"攻撃した敵に","color":"white"},{"text":"火耐性-30%","color":"red"},{"text":"を10秒間付与する","color":"white"}]','{"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 "onAttackByMelee" | ||
| # 神器の発動条件 (TextComponentString) (オプション) | ||
| # data modify storage asset:artifact Condition set value | ||
| # 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.Damage set value [40] | ||
| # 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.AttackType set value [Physical] | ||
| # 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.ElementType set value [Water] | ||
| # 攻撃に関する情報 -防御無視 (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 80 | ||
| # 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 100 | ||
| # 種別クールダウン ({Type: string, Duration: int}) (オプション) | ||
| data modify storage asset:artifact TypeCooldown.Type set value "shortRange" | ||
| data modify storage asset:artifact TypeCooldown.Duration set value 40 | ||
| # グローバルクールダウン (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 CustomNBT set value {HideFlags:32,CustomPotionColor:15220575} | ||
|
|
||
| # 神器の入手用function | ||
| function asset:artifact/common/give |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #> asset:artifact/0015.gasoline/melee/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:15} run function asset:artifact/0015.gasoline/melee/2.check_condition |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #> asset:artifact/0015.gasoline/melee/2.check_condition | ||
| # | ||
| # 神器の発動条件をチェックします | ||
| # | ||
| # @within function asset:artifact/0015.gasoline/melee/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/0015.gasoline/melee/3.main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #> asset:artifact/0015.gasoline/melee/3.main | ||
| # | ||
| # 神器のメイン処理部 | ||
| # | ||
| # @within function asset:artifact/0015.gasoline/melee/2.check_condition | ||
|
|
||
| # 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
| function asset:artifact/common/use/mainhand | ||
|
|
||
| # パーティクル | ||
| execute at @e[type=#lib:living_without_player,tag=Victim,distance=..10] positioned ~ ~1 ~ run function asset:artifact/0015.gasoline/melee/particle | ||
|
|
||
| # 物理水属性ダメージ | ||
| data modify storage api: Argument.Damage set value 40.0f | ||
| data modify storage api: Argument.AttackType set value "Physical" | ||
| data modify storage api: Argument.ElementType set value "Water" | ||
| function api:damage/modifier | ||
| execute as @e[type=#lib:living_without_player,tag=Victim,distance=..10] run function api:damage/ | ||
| function api:damage/reset | ||
| # デバフ(ガソリン)付与 | ||
| data modify storage api: Argument.ID set value 372 | ||
| data modify storage api: Argument.Duration set value 200 | ||
| data modify storage api: Argument.FieldOverride.Amount set value -0.3d | ||
| execute as @e[type=#lib:living_without_player,tag=Victim,distance=..10] run 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,17 @@ | ||
| #> asset:artifact/0015.gasoline/melee/particle | ||
| # | ||
| # 神器の演出 | ||
| # | ||
| # @within function asset:artifact/0015.gasoline/melee/3.main | ||
|
|
||
|
|
||
| # ここから先は神器側の効果の処理を書く | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. コピペしたんだろうけど、ココは演出のファイルなので違うよね |
||
| # 粘度の高い液体が撒き散らされる音(溶岩を撒く音) | ||
| playsound minecraft:item.bucket.empty_lava player @a ~ ~ ~ 0.8 0.8 0 | ||
| # 濁って重い「バシャッ」という水音(通常飛沫を低ピッチで) | ||
| playsound minecraft:entity.generic.splash player @a ~ ~ ~ 0.1 0.6 0 | ||
|
|
||
| # 油のような濁った色(暗い黄土色〜黒)の細かい飛沫 | ||
| particle minecraft:dust 0.2 0.15 0.05 1.5 ~ ~ ~ 0.8 0.4 0.8 0.05 100 normal @a | ||
| # ドロリとした質量のある液体の飛び散り(泥ブロックの破片を利用) | ||
| particle minecraft:block minecraft:mud ~ ~ ~ 0.6 0.4 0.6 0.15 50 normal @a | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #> asset:artifact/0015.gasoline/register | ||
| # | ||
| # 神器プールへの登録処理 | ||
| # | ||
| # @within tag/function asset:artifact/register | ||
|
|
||
| data modify storage asset:artifact RarityRegistry[1] append value [15] | ||
| data modify storage asset:artifact RarityRegistryWithColor.Red[1] append value [15] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #> asset:artifact/0015.gasoline/use_item/1.trigger | ||
| # | ||
| # 指定したイベントタイミングで実行されるfunction | ||
| # | ||
| # @within tag/function asset:artifact/** | ||
|
|
||
| # storage asset:idのautoに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する | ||
| execute if data storage asset:context id{auto:15} run function asset:artifact/0015.gasoline/use_item/2.check_condition |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||||||||
| #> asset:artifact/0015.gasoline/use_item/2.check_condition | ||||||||||||
| # | ||||||||||||
| # 神器の発動条件をチェックします | ||||||||||||
| # | ||||||||||||
| # @within function asset:artifact/0015.gasoline/use_item/1.trigger | ||||||||||||
|
|
||||||||||||
| # 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く | ||||||||||||
| #function asset:artifact/common/check_condition/auto | ||||||||||||
|
Comment on lines
+7
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. やりたいことのニュアンスは理解しつつ、そもそも実行しない、という状態は避けたいので
Suggested change
|
||||||||||||
| # 3.main.mcfunctionを実行する | ||||||||||||
| function asset:artifact/0015.gasoline/use_item/3.main | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #> asset:artifact/0015.gasoline/use_item/3.main | ||
| # | ||
| # 神器のメイン処理部 | ||
| # | ||
| # @within function asset:artifact/0015.gasoline/use_item/2.check_condition | ||
|
|
||
| # 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
| #function asset:artifact/common/use/auto | ||
|
|
||
| # ここから先は神器側の効果の処理を書く | ||
| # 毒 | ||
| data modify storage api: Argument.ID set value 29 | ||
| data modify storage api: Argument.Duration set value 200 | ||
| function api:entity/mob/effect/give | ||
| function api:entity/mob/effect/reset | ||
| # ダメージ | ||
| data modify storage api: Argument.Damage set value 10.0f | ||
| 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はガソリン中毒で死んだ","with":[{"selector":"@s"}]}]' | ||
| data modify storage api: Argument.DeathMessage append value '[{"translate":"%1$sは自分を車と勘違いした","with":[{"selector":"@s"}]}]' | ||
|
Comment on lines
+16
to
+21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これダメージ入る?ダメージの設定だけして肝心のダメージ与える処理なくない?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. なんか消えてた() |
||
| function api:damage/modifier | ||
| function api:damage/ | ||
| function api:damage/reset | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/_/end | ||
| # | ||
| # Effectの効果の終了時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:effect/end | ||
|
|
||
| execute if data storage asset:context {id:372} run function asset:effect/0372.gasoline/end/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/_/given | ||
| # | ||
| # Effectが付与された時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:effect/given | ||
|
|
||
| execute if data storage asset:context {id:372} run function asset:effect/0372.gasoline/given/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/_/register | ||
| # | ||
| # | ||
| # | ||
| # @within tag/function asset:effect/register | ||
|
|
||
| execute if data storage asset:context {id:372} run function asset:effect/0372.gasoline/register |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/_/remove | ||
| # | ||
| # Effectが神器や牛乳によって削除された時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:effect/remove | ||
|
|
||
| execute if data storage asset:context {id:372} run function asset:effect/0372.gasoline/remove/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/_/tick | ||
| # | ||
| # Effectが発動している間毎tick実行されるfunction | ||
| # | ||
| # @within tag/function asset:effect/tick | ||
|
|
||
| execute if data storage asset:context {id:372} run function asset:effect/0372.gasoline/tick/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #> asset:effect/0372.gasoline/end/ | ||
| # | ||
| # Effectの効果が切れた時の処理 | ||
| # | ||
| # @within function asset:effect/0372.gasoline/_/end | ||
|
|
||
| # modifier削除 | ||
| function asset:effect/0372.gasoline/modifier/remove |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:effect/0372.gasoline/given/ | ||
| # | ||
| # Effectが付与された時の処理 | ||
| # | ||
| # @within function asset:effect/0372.gasoline/_/given | ||
|
|
||
| function asset:effect/0372.gasoline/modifier/add |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #> asset:effect/0372.gasoline/modifier/add | ||
| # | ||
| # 補正を付与する | ||
| # | ||
| # @within function asset:effect/0372.gasoline/given/ | ||
|
|
||
| # 火耐性低下 | ||
| data modify storage api: Argument.UUID set value [I;1,3,372,0] | ||
| 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.Amount | ||
| data modify storage api: Argument.Operation set value "add" | ||
| function api:modifier/defense/fire/add |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #> asset:effect/0372.gasoline/modifier/remove | ||
| # | ||
| # 補正を削除する | ||
| # | ||
| # @within function | ||
| # asset:effect/0372.gasoline/end/ | ||
| # asset:effect/0372.gasoline/remove/ | ||
|
|
||
| # 解除 | ||
| data modify storage api: Argument.UUID set value [I;1,3,372,0] | ||
| function api:modifier/defense/fire/remove |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #> asset:effect/0372.gasoline/register | ||
| # | ||
| # Effectのデータを指定 | ||
| # | ||
| # @within function asset:effect/0372.gasoline/_/register | ||
|
|
||
| # ExtendsSafe (boolean) (default = false) | ||
| # data modify storage asset:effect ExtendsSafe set value true | ||
| # ID (int) | ||
| data modify storage asset:effect ID set value 372 | ||
| # 名前 (TextComponentString) | ||
| data modify storage asset:effect Name set value '{"text":"ガソリン","color":"#947C62"}' | ||
| # 説明文 (TextComponentString[]) | ||
| data modify storage asset:effect Description set value ['{"text":"火属性被ダメージが大きく上昇する"}'] | ||
| # 効果時間 (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 | ||
| # 悪い効果か否か (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 3 | ||
| # エフェクトをUIに表示するか (boolean) (default = true) | ||
| data modify storage asset:effect Visible set value true | ||
| # エフェクトのスタックをを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,8 @@ | ||
| #> asset:effect/0372.gasoline/remove/ | ||
| # | ||
| # Effectが削除された時の処理 | ||
| # | ||
| # @within function asset:effect/0372.gasoline/_/remove | ||
|
|
||
| # modifier削除 | ||
| function asset:effect/0372.gasoline/modifier/remove |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #> asset:effect/0372.gasoline/tick/ | ||
| # | ||
| # Effectのtick処理 | ||
| # | ||
| # @within function asset:effect/0372.gasoline/_/tick | ||
|
|
||
| # ガソリンの垂れた感じのパーティクル | ||
| #particle minecraft:dust 0.2 0.15 0.05 1.5 ~ ~1 ~ 0.4 0.4 0.4 0.05 2 normal @a | ||
| particle minecraft:block minecraft:mud ~ ~1 ~ 0.3 0.2 0.3 0.15 2 normal @a |
Uh oh!
There was an error while loading. Please reload this page.