-
Notifications
You must be signed in to change notification settings - Fork 0
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
[神器1123]ライドミサイルを作成 #330
Open
quikku
wants to merge
3
commits into
master
Choose a base branch
from
dev/noname_1123
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
[神器1123]ライドミサイルを作成 #330
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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/1123.ride_missile/give/1.trigger.mcfunction
This file contains 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/1123.ride_missile/give/1.trigger | ||
# | ||
# 神器の取得処理の呼び出し時に実行されるfunction | ||
# | ||
# @within tag/function asset:artifact/give | ||
|
||
execute if data storage asset:context {id:1123} run function asset:artifact/1123.ride_missile/give/2.give |
61 changes: 61 additions & 0 deletions
61
Asset/data/asset/functions/artifact/1123.ride_missile/give/2.give.mcfunction
This file contains 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,61 @@ | ||
#> asset:artifact/1123.ride_missile/give/2.give | ||
# | ||
# 神器の作成部 ここでID等を定義する | ||
# | ||
# @user | ||
# @within function asset:artifact/1123.ride_missile/give/1.trigger | ||
|
||
# 神器の説明や消費MPなどをここで設定する。 | ||
# 最後にasset:artifact/common/giveを実行することで入手可能。 | ||
|
||
# 神器のID (int) スプレッドシートの値を入れる | ||
data modify storage asset:artifact ID set value 1123 | ||
# 神器のベースアイテム | ||
data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick" | ||
# 神器の名前 (TextComponentString) | ||
data modify storage asset:artifact Name set value '{"text":"ライドミサイル","color":"white","bold":true,"underlined":true}' | ||
# 神器の説明文 (TextComponentString[]) | ||
data modify storage asset:artifact Lore set value ['{"text":"乗って飛ぶことのできるロケットを召喚できる"}','{"text":"64ブロック程度なら飛べる"}','{"text":"爆発しても痛くない"}'] | ||
# MP以外の消費物 (TextComponentString) (オプション) | ||
# data modify storage asset:artifact CostText set value | ||
# 使用回数 (int) (オプション) | ||
# data modify storage asset:artifact RemainingCount set value | ||
# 神器を発動できるスロット (string) Wikiを参照 | ||
data modify storage asset:artifact Slot set value "auto" | ||
# 神器のトリガー (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 60 | ||
# MP必要量 (int) (オプション) | ||
# data modify storage asset:artifact MPRequire set value | ||
# 神器のクールダウン (int) (オプション) | ||
data modify storage asset:artifact LocalCooldown set value 360 | ||
# グローバルクールダウン (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 ["Urban", "Nyaptov", "Wi-ki"] | ||
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション) | ||
# data modify storage asset:artifact CustomNBT set value {} | ||
|
||
# 神器の入手用function | ||
function asset:artifact/common/give |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/artifact/1123.ride_missile/trigger/1.trigger.mcfunction
This file contains 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/1123.ride_missile/trigger/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:1123} run function asset:artifact/1123.ride_missile/trigger/2.check_condition |
12 changes: 12 additions & 0 deletions
12
Asset/data/asset/functions/artifact/1123.ride_missile/trigger/2.check_condition.mcfunction
This file contains 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,12 @@ | ||
#> asset:artifact/1123.ride_missile/trigger/2.check_condition | ||
# | ||
# 神器の発動条件をチェックします | ||
# | ||
# @within function asset:artifact/1123.ride_missile/trigger/1.trigger | ||
|
||
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く | ||
function asset:artifact/common/check_condition/auto | ||
# 他にアイテム等確認する場合はここに書く | ||
|
||
# CanUsedタグをチェックして3.main.mcfunctionを実行する | ||
execute if entity @s[tag=CanUsed] run function asset:artifact/1123.ride_missile/trigger/3.main |
16 changes: 16 additions & 0 deletions
16
Asset/data/asset/functions/artifact/1123.ride_missile/trigger/3.main.mcfunction
This file contains 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,16 @@ | ||
#> asset:artifact/1123.ride_missile/trigger/3.main | ||
# | ||
# 神器のメイン処理部 | ||
# | ||
# @within function asset:artifact/1123.ride_missile/trigger/2.check_condition | ||
|
||
# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
function asset:artifact/common/use/auto | ||
|
||
# ここから先は神器側の効果の処理を書く | ||
|
||
# 召喚する | ||
data modify storage api: Argument.ID set value 1054 | ||
data modify storage api: Argument.FieldOverride.Rotation set from entity @s Rotation | ||
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID | ||
execute positioned ~ ~0.75 ~ run function api:object/summon |
6 changes: 6 additions & 0 deletions
6
Asset/data/asset/functions/object/1054.ride_missile/_index.d.mcfunction
This file contains 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,6 @@ | ||
#> asset:object/1054.ride_missile/_index.d | ||
# @private | ||
|
||
#> tag | ||
# @within function asset:object/1054.ride_missile/** | ||
#declare tag 1054.Owner |
25 changes: 25 additions & 0 deletions
25
Asset/data/asset/functions/object/1054.ride_missile/init/.mcfunction
This file contains 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,25 @@ | ||
#> asset:object/1054.ride_missile/init/ | ||
# | ||
# Objectのinit時の処理 | ||
# | ||
# @within asset:object/alias/1054/init | ||
|
||
#> private | ||
# @private | ||
#declare score_holder $OwnerID | ||
#declare tag 1054.Init | ||
|
||
# 演出 | ||
playsound minecraft:entity.firework_rocket.launch player @a ~ ~ ~ 1 1 | ||
|
||
# タグ付け | ||
tag @s add 1054.Init | ||
|
||
# プレイヤーをライドさせる | ||
execute store result score $OwnerID Temporary run data get storage asset:context this.UserID | ||
execute at @a if score $OwnerID Temporary = @p UserID as @p run ride @s mount @e[tag=1054.Init,distance=..2,sort=nearest,limit=1] | ||
|
||
# タグ消す | ||
tag @s remove 1054.Init | ||
# リセット | ||
scoreboard players reset $OwnerID Temporary |
18 changes: 18 additions & 0 deletions
18
Asset/data/asset/functions/object/1054.ride_missile/register.mcfunction
This file contains 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,18 @@ | ||
#> asset:object/1054.ride_missile/register | ||
# | ||
# Objectのデータを指定 | ||
# | ||
# @within function asset:object/alias/1054/register | ||
|
||
# 継承(オプション) | ||
# data modify storage asset:object Extends append value | ||
# function asset:object/extends | ||
# 他のモブに継承されることを許可するか (boolean) (オプション) | ||
# data modify storage asset:object ExtendsSafe set value | ||
# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) | ||
data modify storage asset:object IsAbstract set value false | ||
|
||
# ID (int) | ||
data modify storage asset:object ID set value 1054 | ||
# フィールド(オプション) | ||
# data modify storage asset:object Field.myValue set value |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/object/1054.ride_missile/summon/.mcfunction
This file contains 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:object/1054.ride_missile/summon/ | ||
# | ||
# Object召喚処理の呼び出し時に実行されるfunction | ||
# | ||
# @within asset:object/alias/1054/summon | ||
|
||
# 元となるEntityを召喚する | ||
function asset:object/1054.ride_missile/summon/macro.m with storage asset:context this |
10 changes: 10 additions & 0 deletions
10
Asset/data/asset/functions/object/1054.ride_missile/summon/debug.mcfunction
This file contains 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,10 @@ | ||
#> asset:object/1054.ride_missile/summon/debug | ||
# | ||
# 動作チェック用の召喚処理 使い終わったら消してもいいかも | ||
# | ||
# @user | ||
# @private | ||
|
||
# 召喚 | ||
data modify storage api: Argument.ID set value 1054 | ||
function api:object/summon |
7 changes: 7 additions & 0 deletions
7
Asset/data/asset/functions/object/1054.ride_missile/summon/macro.m.mcfunction
This file contains 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:object/1054.ride_missile/summon/macro.m | ||
# | ||
# | ||
# | ||
# @within function asset:object/1054.ride_missile/summon/ | ||
|
||
$summon item_display ~ ~ ~ {teleport_duration:1,item_display:"head",Tags:["ObjectInit"],item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20407}},Rotation:$(Rotation)} |
43 changes: 43 additions & 0 deletions
43
Asset/data/asset/functions/object/1054.ride_missile/tick/.mcfunction
This file contains 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,43 @@ | ||
#> asset:object/1054.ride_missile/tick/ | ||
# | ||
# Objectのtick時の処理 | ||
# | ||
# @within asset:object/alias/1054/tick | ||
|
||
#> private | ||
# @private | ||
#declare score_holder $OwnerID | ||
#declare tag 1054.Target | ||
|
||
# Tick加算 | ||
scoreboard players add @s General.Object.Tick 1 | ||
|
||
# 演出 | ||
particle flame ^ ^ ^-0.2 0 0 0 0 0 | ||
particle smoke ^ ^ ^-0.2 0 0 0 0 0 | ||
|
||
# プレイヤーを紐づけ | ||
execute store result score $OwnerID Temporary run data get storage asset:context this.UserID | ||
execute at @a if score $OwnerID Temporary = @p UserID as @p run tag @s add 1054.Owner | ||
|
||
# ブロック判定 | ||
execute unless block ^ ^ ^0.5 #lib:no_collision run function asset:object/1054.ride_missile/tick/kill | ||
execute unless block ^ ^ ^1 #lib:no_collision run function asset:object/1054.ride_missile/tick/kill | ||
|
||
# プレイヤーの前方にマーカーを召喚し、それを狙って追尾する | ||
execute at @p[tag=1054.Owner,distance=..64] positioned ^ ^ ^64 run summon marker ~ ~ ~ {Tags:["1054.Target"]} | ||
execute facing entity @e[type=marker,tag=1054.Target,distance=..200,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-1500 facing entity @s eyes positioned as @s run tp @s ^ ^ ^1 ~ ~ | ||
|
||
# マーカー消す | ||
kill @e[type=marker,tag=1054.Target,distance=..200] | ||
|
||
# 消える前には警告音 | ||
execute if score @s General.Object.Tick matches 44.. run playsound minecraft:block.note_block.harp player @a ~ ~ ~ 1 2 | ||
|
||
# 消滅処理 | ||
execute if score @s General.Object.Tick matches 64.. run function asset:object/1054.ride_missile/tick/kill | ||
execute unless entity @p[tag=1054.Owner,distance=..64] run function asset:object/1054.ride_missile/tick/kill | ||
|
||
# リセット | ||
scoreboard players reset $OwnerID Temporary | ||
tag @p[tag=1054.Owner] remove 1054.Owner |
17 changes: 17 additions & 0 deletions
17
Asset/data/asset/functions/object/1054.ride_missile/tick/kill.mcfunction
This file contains 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,17 @@ | ||
#> asset:object/1054.ride_missile/tick/kill | ||
# | ||
# | ||
# | ||
# @within function asset:object/1054.ride_missile/tick/ | ||
|
||
# 演出 | ||
particle explosion ~ ~ ~ 0.3 0.3 0.3 1 10 | ||
particle explosion_emitter ~ ~ ~ 0 0 0 1 1 force | ||
playsound entity.generic.explode player @a ~ ~ ~ 1 1 | ||
|
||
# 隠し要素。10m以上離れた上で、ブロックに着弾したら音を鳴らす。その場所に到達できるかのチェックができる! | ||
execute if entity @p[tag=1054.Owner,distance=10..] unless block ^ ^ ^0.5 #lib:no_collision run playsound entity.arrow.hit_player player @p[tag=1054.Owner] ~ ~ ~ 0.3 0 0.3 | ||
execute if entity @p[tag=1054.Owner,distance=10..] unless block ^ ^ ^1 #lib:no_collision run playsound entity.arrow.hit_player player @p[tag=1054.Owner] ~ ~ ~ 0.3 0 0.3 | ||
|
||
# 殺す | ||
kill @s |
This file contains 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:object/alias/1054/init | ||
# | ||
# Init処理のエイリアス | ||
# | ||
# @within asset_manager:object/init/init.m | ||
|
||
# 元のInit処理を呼び出す | ||
function asset:object/1054.ride_missile/init/ |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/object/alias/1054/register.mcfunction
This file contains 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:object/alias/1054/register | ||
# | ||
# Objectのデータ指定処理のエイリアス | ||
# | ||
# @within asset_manager:object/summon/register.m | ||
|
||
# 元の登録処理を呼び出す | ||
function asset:object/1054.ride_missile/register |
8 changes: 8 additions & 0 deletions
8
Asset/data/asset/functions/object/alias/1054/summon.mcfunction
This file contains 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:object/alias/1054/summon | ||
# | ||
# Object召喚処理のエイリアス | ||
# | ||
# @within asset_manager:object/summon/summon.m | ||
|
||
# 元の召喚処理を呼び出す | ||
function asset:object/1054.ride_missile/summon/ |
This file contains 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:object/alias/1054/tick | ||
# | ||
# Tick時処理のエイリアス | ||
# | ||
# @within asset_manager:object/tick/tick.m | ||
|
||
# 元のTick処理を呼び出す | ||
function asset:object/1054.ride_missile/tick/ |
This file contains 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 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.
$OwnerIDがリセットされてなさそう