-
Notifications
You must be signed in to change notification settings - Fork 2
[Artifact 0101] グリモワールの作成 #2057
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?
Changes from 7 commits
c111f99
f949112
c65927c
733e014
3bd028c
ab638c5
8b0e381
afec537
7755cd6
04ed171
9d3d1e0
259e0ab
2e30426
e4e265e
763567b
529108a
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/0101.grimoire/give/1.trigger | ||
| # | ||
| # 神器の取得処理の呼び出し時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:artifact/give | ||
|
|
||
| execute if data storage asset:context {id:101} run function asset:artifact/0101.grimoire/give/2.give |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #> asset:artifact/0101.grimoire/give/2.give | ||
| # | ||
| # 神器の作成部 ここでID等を定義する | ||
| # | ||
| # @user | ||
| # @within function asset:artifact/0101.grimoire/give/1.trigger | ||
|
|
||
| # 神器の説明や消費MPなどをここで設定する。 | ||
| # 最後にasset:artifact/common/giveを実行することで入手可能。 | ||
|
|
||
| # 神器のID (int) スプレッドシートの値を入れる | ||
| data modify storage asset:artifact ID set value 101 | ||
| # 神器のベースアイテム | ||
| data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick" | ||
| # 神器の名前 (TextComponentString) | ||
| data modify storage asset:artifact Name set value '{"text":"グリモワール","color":"dark_green"}' | ||
| # 神器の説明文 (TextComponentString[]) | ||
| data modify storage asset:artifact Lore set value ['{"text":"ランダムな属性の遠距離魔法を召喚する魔術書"}'] | ||
| # 消費アイテム ({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 "onClick" | ||
| # 神器の発動条件 (TextComponentString) (オプション) | ||
| # data modify storage asset:artifact Condition set value | ||
| # 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.Damage set value [80] | ||
| # 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.AttackType set value [Magic] | ||
| # 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder] | ||
| # 攻撃に関する情報 -防御無視 (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 10 | ||
| # MP消費量 (int) | ||
| # data modify storage asset:artifact MPCost set value | ||
| # MP必要量 (int) (オプション) | ||
| # data modify storage asset:artifact MPRequire set value 20 | ||
| # MP回復量 (int) | ||
| data modify storage asset:artifact MPHealWhenHit set value 11 | ||
| # 神器のクールダウン (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 16 | ||
| # グローバルクールダウン (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 ["Flora","Nyaptov","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/0101.grimoire/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:101} run function asset:artifact/0101.grimoire/trigger/2.check_condition |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/2.check_condition | ||
| # | ||
| # 神器の発動条件をチェックします | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/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/0101.grimoire/trigger/3.main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/3.main | ||
| # | ||
| # 神器のメイン処理部 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/2.check_condition | ||
|
|
||
| # 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
| function asset:artifact/common/use/mainhand | ||
|
|
||
| # ここから先は神器側の効果の処理を書く | ||
| # 音 | ||
| playsound item.book.page_turn player @s ~ ~ ~ | ||
| # 属性抽選 | ||
| execute store result storage asset:temp type int 1 run random value 0..2 | ||
| execute if data storage asset:temp {type:0} at @s anchored eyes run function asset:artifact/0101.grimoire/trigger/balletfire | ||
| execute if data storage asset:temp {type:1} at @s anchored eyes run function asset:artifact/0101.grimoire/trigger/balletwater | ||
| execute if data storage asset:temp {type:2} at @s anchored eyes run function asset:artifact/0101.grimoire/trigger/balletthunder | ||
| data remove storage asset:temp type | ||
|
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. 各ballet○○ってやつ、ディレクトリを変えて、ballet/の中にfire, water. thunderを入れる感じにしたほうが良いかも~~
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. 命名規則がまだ理解しきれてないけど、修正しました |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||||||||
| #> asset:artifact/0101.grimoire/trigger/balletfire | ||||||||||||
| # | ||||||||||||
| # 弾道 | ||||||||||||
| # | ||||||||||||
| # @within function asset:artifact/0101.grimoire/trigger/3.main | ||||||||||||
| # @within function asset:artifact/0101.grimoire/trigger/balletfire | ||||||||||||
|
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
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. 修正しました |
||||||||||||
|
|
||||||||||||
| particle minecraft:dust 1 0 0 1 | ||||||||||||
| execute unless block ~ ~ ~ #lib:no_collision/ run return run function asset:artifact/0101.grimoire/trigger/fire | ||||||||||||
| execute unless entity @s[distance=..10] run return run function asset:artifact/0101.grimoire/trigger/fire | ||||||||||||
| execute at @e[tag=Enemy,distance=..2,sort=nearest,limit=1] run return run function asset:artifact/0101.grimoire/trigger/fire | ||||||||||||
|
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. at @.eじゃなくて、positioned ~-0.5 ~-0.5 ~-0.5 at @.e[dx=0]ってしたほうが良い
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. 修正済みです |
||||||||||||
| execute positioned ^ ^ ^0.5 run function asset:artifact/0101.grimoire/trigger/balletfire | ||||||||||||
|
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. 入れときます |
||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/balletthunder | ||
| # | ||
| # 弾道 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/3.main | ||
| # @within function asset:artifact/0101.grimoire/trigger/balletthunder | ||
|
|
||
| particle minecraft:dust 1 0.902 0 1 | ||
| execute unless block ~ ~ ~ #lib:no_collision/ run return run function asset:artifact/0101.grimoire/trigger/thunder | ||
| execute unless entity @s[distance=..10] run return run function asset:artifact/0101.grimoire/trigger/thunder | ||
| execute at @e[tag=Enemy,distance=..2,sort=nearest,limit=1] run return run function asset:artifact/0101.grimoire/trigger/thunder | ||
| execute positioned ^ ^ ^0.5 run function asset:artifact/0101.grimoire/trigger/balletthunder |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/balletwater | ||
| # | ||
| # 弾道 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/3.main | ||
| # @within function asset:artifact/0101.grimoire/trigger/balletwater | ||
|
|
||
| particle minecraft:dust 0.133 0 1 1 | ||
| execute unless block ~ ~ ~ #lib:no_collision/ run return run function asset:artifact/0101.grimoire/trigger/water | ||
| execute unless entity @s[distance=..10] run return run function asset:artifact/0101.grimoire/trigger/water | ||
| execute at @e[tag=Enemy,distance=..2,sort=nearest,limit=1] run return run function asset:artifact/0101.grimoire/trigger/water | ||
| execute positioned ^ ^ ^0.5 run function asset:artifact/0101.grimoire/trigger/balletwater |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/fire | ||
| # | ||
| # 着弾処理 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/balletfire | ||
| #1840 | ||
|
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. 演出のミスタイプですかね |
||
| particle minecraft:flame ~ ~1 ~ 0.5 0.5 0.5 0.05 40 | ||
| playsound item.firecharge.use player @a ~ ~ ~ | ||
| # 引数の設定 | ||
| data modify storage api: Argument.Damage set value 80f | ||
| data modify storage api: Argument.AttackType set value "Magic" | ||
| data modify storage api: Argument.ElementType set value "Fire" | ||
| # 補正functionを実行 | ||
| function api:damage/modifier | ||
| # 範囲5m以内の敵を対象に | ||
| execute as @e[tag=Enemy,distance=..2] run function api:damage/ | ||
| # リセット | ||
| function api:damage/reset | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/thunder | ||
| # | ||
| # 着弾処理 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/balletthunder | ||
| #演出 | ||
| data modify storage api: Argument.ID set value 2257 | ||
| data modify storage api: Argument.FieldOverride.Scale set value 4f | ||
| function api:object/summon | ||
| playsound entity.generic.explode player @a ~ ~ ~ | ||
| # 引数の設定 | ||
| data modify storage api: Argument.Damage set value 80f | ||
| data modify storage api: Argument.AttackType set value "Magic" | ||
| data modify storage api: Argument.ElementType set value "Thunder" | ||
| # 補正functionを実行 | ||
| function api:damage/modifier | ||
| # 範囲5m以内の敵を対象に | ||
| execute as @e[tag=Enemy,distance=..2] run function api:damage/ | ||
| # リセット | ||
| function api:damage/reset |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #> asset:artifact/0101.grimoire/trigger/water | ||
| # | ||
| # 着弾処理 | ||
| # | ||
| # @within function asset:artifact/0101.grimoire/trigger/balletwater | ||
| #1840 | ||
| data modify storage api: Argument.ID set value 2256 | ||
| data modify storage api: Argument.FieldOverride.Scale set value 4f | ||
| function api:object/summon | ||
| playsound entity.player.splash player @a ~ ~ ~ | ||
| # 引数の設定 | ||
| data modify storage api: Argument.Damage set value 80f | ||
| data modify storage api: Argument.AttackType set value "Magic" | ||
| data modify storage api: Argument.ElementType set value "Water" | ||
| # 補正functionを実行 | ||
| function api:damage/modifier | ||
| # 範囲5m以内の敵を対象に | ||
|
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. コメントが嘘すぎるので、もういっそDamageAPIのコメントは「ダメージ」だけでもいいんじゃないかな
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. 修正しました |
||
| execute as @e[tag=Enemy,distance=..2] run function api:damage/ | ||
| # リセット | ||
| function api:damage/reset | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@.sなのがちょっと気になった
ダメというわけではなくて、マルチの際に周りに使用音が聞こえてもいいかも?くらい
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正済み