-
Notifications
You must be signed in to change notification settings - Fork 2
[Artifact 1555] シフトチェンジの作成 #2069
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
Open
ogachu0331
wants to merge
10
commits into
master
Choose a base branch
from
dev/ogachu_artifact1555
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bd22143
神器の機能の作成
ogachu0331 ef0d916
Merge branch 'master' into dev/ogachu_artifact1555
ogachu0331 406e19e
自身がワープ不能のときに使用できなくした
ogachu0331 8a29bdb
Merge branch 'dev/ogachu_artifact1555' of https://github.com/ProjectT…
ogachu0331 20d8712
コマンドの構文エラーの修正
ogachu0331 201abf4
発動条件の修正
ogachu0331 4d87ff6
名前をテクスチャに合わせた色に変更
ogachu0331 abfb6d8
指摘点の修正
ogachu0331 2cfbc02
デバック時の記述の修正
ogachu0331 393608e
加工機に登録
ogachu0331 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/artifact/1555.shift_change/give/1.trigger.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:artifact/1555.shift_change/give/1.trigger | ||
| # | ||
| # 神器の取得処理の呼び出し時に実行されるfunction | ||
| # | ||
| # @within tag/function asset:artifact/give | ||
|
|
||
| execute if data storage asset:context {id:1555} run function asset:artifact/1555.shift_change/give/2.give |
67 changes: 67 additions & 0 deletions
67
Asset/data/asset/functions/artifact/1555.shift_change/give/2.give.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #> asset:artifact/1555.shift_change/give/2.give | ||
| # | ||
| # 神器の作成部 ここでID等を定義する | ||
| # | ||
| # @user | ||
| # @within function asset:artifact/1555.shift_change/give/1.trigger | ||
|
|
||
| # 神器の説明や消費MPなどをここで設定する。 | ||
| # 最後にasset:artifact/common/giveを実行することで入手可能。 | ||
|
|
||
| # 神器のID (int) スプレッドシートの値を入れる | ||
| data modify storage asset:artifact ID set value 1555 | ||
| # 神器のベースアイテム | ||
| data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick" | ||
| # 神器の名前 (TextComponentString) | ||
| data modify storage asset:artifact Name set value '[{"text":"シフト","color":"#0E82E8","bold":true},{"text":"チェンジ","color":"#C9A410"}]' | ||
| data modify storage asset:artifact Lore set value ['{"text":"サーバー内のランダムな味方1名と位置を入れ替える","color":"white"}'] | ||
| # 消費アイテム ({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 5 | ||
| # 神器を発動できるスロット (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 [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 30 | ||
| # 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 200 | ||
| # 種別クールダウン ({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 CustomNBT set value {} | ||
|
|
||
| # 神器の入手用function | ||
| function asset:artifact/common/give | ||
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/artifact/1555.shift_change/register.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #> asset:artifact/1555.shift_change/register | ||
| # | ||
| # 神器プールへの登録処理 | ||
| # | ||
| # @within tag/function asset:artifact/register | ||
|
|
||
| data modify storage asset:artifact RarityRegistry[2] append value [1555] |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/artifact/1555.shift_change/trigger/1.trigger.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #> asset:artifact/1555.shift_change/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:1555} run function asset:artifact/1555.shift_change/trigger/2.check_condition |
21 changes: 21 additions & 0 deletions
21
Asset/data/asset/functions/artifact/1555.shift_change/trigger/2.check_condition.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #> asset:artifact/1555.shift_change/trigger/2.check_condition | ||
| # | ||
| # 神器の発動条件をチェックします | ||
| # | ||
| # @within function asset:artifact/1555.shift_change/trigger/1.trigger | ||
|
|
||
| # 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く | ||
| function asset:artifact/common/check_condition/mainhand | ||
|
|
||
| # 他にアイテム等確認する場合はここに書く | ||
| # 自身がワープ可能か | ||
| execute if entity @s[tag=CanUsed] if entity @s[predicate=lib:is_ban_tp_area] run tellraw @s {"text":"不思議な力が転送を妨害した。","color":"dark_aqua"} | ||
|
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. おそらくソウルメイトから持ってきたんだろうけど、使用不可メッセージとして使うならcolorはredのほうが良いかも? |
||
| execute if entity @s[predicate=lib:is_ban_tp_area] run tag @s remove CanUsed | ||
| # そもそも他人がいるか | ||
| execute if entity @s[tag=CanUsed] unless entity @a[tag=!this] run return run tellraw @s [{"text": "おや?このサーバーにはあなたしかいないようですよ?","color": "gray"}] | ||
| execute unless entity @a[tag=!this] run tag @s remove CanUsed | ||
| # 入れ替え可能なプレイヤーがいるか | ||
| execute if entity @s[tag=CanUsed] unless entity @a[tag=!this,predicate=!lib:is_ban_tp_area] run return run tellraw @s [{"text": "皆さんは今立て込んだ状況のようです...時間をおいて再度お試しください","color": "gray"}] | ||
| execute unless entity @a[tag=!this,predicate=!lib:is_ban_tp_area] run tag @s remove CanUsed | ||
| # CanUsedタグをチェックして3.main.mcfunctionを実行する | ||
| execute if entity @s[tag=CanUsed] run function asset:artifact/1555.shift_change/trigger/3.main | ||
47 changes: 47 additions & 0 deletions
47
Asset/data/asset/functions/artifact/1555.shift_change/trigger/3.main.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #> asset:artifact/1555.shift_change/trigger/3.main | ||
| # | ||
| # 神器のメイン処理部 | ||
| # | ||
| # @within function asset:artifact/1555.shift_change/trigger/2.check_condition | ||
| #> private | ||
| # @private | ||
| #declare tag 177.Changed | ||
| #declare tag 177.ChangeMarker | ||
|
|
||
|
|
||
| # 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
| function asset:artifact/common/use/mainhand | ||
|
|
||
| # ここから先は神器側の効果の処理を書く | ||
| # 念のためtagとmarkerを削除 | ||
| tag @a remove 177.Changed | ||
| kill @e[type=marker,tag=177.ChangeMarker] | ||
|
|
||
| # 入れ替え対象を決定 | ||
| tag @r[tag=!this,predicate=!lib:is_ban_tp_area] add 177.Changed | ||
|
|
||
| # 対象の場所にマーカー設置 | ||
| execute at @a[tag=177.Changed,limit=1] run summon marker ~ ~ ~ {Tags:["177.ChangeMarker"]} | ||
|
|
||
| # マーカー自身の向きを、対象のプレイヤーの向きと同期する | ||
| execute as @e[type=marker,tag=177.ChangeMarker,limit=1] at @s rotated as @a[tag=177.Changed,limit=1] run tp @s ~ ~ ~ ~ ~ | ||
|
|
||
| # 対象を自身の場所・向きへtp | ||
| tp @a[tag=177.Changed,limit=1] ~ ~ ~ ~ ~ | ||
|
|
||
| # 自分をマーカー(対象が元いた場所・向き)にテレポートさせる | ||
| execute at @e[type=marker,tag=177.ChangeMarker,limit=1] rotated as @e[type=marker,tag=177.ChangeMarker,limit=1] run tp @s ~ ~ ~ ~ ~ | ||
|
|
||
| # 1. 自分の場所でパーティクルと音を鳴らす | ||
| particle minecraft:reverse_portal ~ ~1 ~ 0.5 1 0.5 0.05 40 normal @a | ||
| playsound minecraft:item.chorus_fruit.teleport player @a ~ ~ ~ 1.0 1.0 0 | ||
|
|
||
| # 2. 対象の場所でパーティクルと音を鳴らす | ||
| execute at @a[tag=177.Changed,limit=1] run particle minecraft:reverse_portal ~ ~1 ~ 0.5 1 0.5 0.05 40 normal @a | ||
| execute at @a[tag=177.Changed,limit=1] run playsound minecraft:item.chorus_fruit.teleport player @a ~ ~ ~ 1.0 1.0 0 | ||
|
|
||
| # マーカーを削除する | ||
| kill @e[type=marker,tag=177.ChangeMarker] | ||
|
|
||
| # 味方のターゲットタグを外してリセットする | ||
| tag @a remove 177.Changed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
なんか本来Loreの1行上にあったコメントが消えてる?
ちょっと気になった