Skip to content

✨ エンディングを作成 #1244

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

Merged
merged 8 commits into from
Apr 15, 2025
Merged
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/2001.staff_of_the_willless/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

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

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

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 2001
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"第一の杖","color":"#FFFFFF"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"全てを終わらせよう","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 1
# 神器を発動できるスロット (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 '{"text":"全てを浄化し、神殿にいる時"}'
# 攻撃に関する情報 -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 true
# 扱える神 (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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/2001.staff_of_the_willless/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:2001} run function asset:artifact/2001.staff_of_the_willless/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#> asset:artifact/2001.staff_of_the_willless/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/2001.staff_of_the_willless/trigger/1.trigger

#> Val
# @private
#declare score_holder $Progress

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

# 攻略度取得
function api:global_vars/game_progress
execute store result score $Progress Temporary run data get storage api: Return.Progress 100
# チェック
execute unless score $Progress Temporary matches 99.. run tellraw @s {"text":"まだ全ての島の浄化が済んでいないようだ","color":"red"}
# タグ消す
execute unless score $Progress Temporary matches 99.. run tag @s remove CanUsed
# デバッグメッセージ
#tellraw @a [{"text":"Progress: "},{"score":{"name":"$Progress","objective":"Temporary"}}]
# リセット
scoreboard players reset $Progress Temporary

# 場所チェック
#execute unless predicate world_manager:area/01.god_boundaries run tellraw @s[tag=CanUsed] {"text":"神殿で使わなければならない","color":"red"}
execute positioned 3071 117 -512 unless entity @s[distance=..100] run tellraw @s[tag=CanUsed] {"text":"神殿で使わなければならない","color":"red"}
# くだらん要素
execute if predicate world_manager:area/01-01.flora_temple run tellraw @s[tag=CanUsed] {"text":"...私にだけ捧げられても困る","color":"red"}
execute if predicate world_manager:area/01-02.nyaptov_temple run tellraw @s[tag=CanUsed] {"text":"...(もっとふさわしい場所があるだろ?)","color":"red"}
execute if predicate world_manager:area/01-03.rumor_temple run tellraw @s[tag=CanUsed] {"text":"ここじゃ...ないかな?","color":"red"}
execute if predicate world_manager:area/01-04.urban_temple run tellraw @s[tag=CanUsed] {"text":"使うべきはここではないぞ","color":"red"}
execute if predicate world_manager:area/01-05.wi-ki_temple run tellraw @s[tag=CanUsed] {"text":"悪いが、外で使ってくれ","color":"red"}
# タグ消す
execute positioned 3071 117 -512 unless entity @s[distance=..100] run tag @s remove CanUsed
#execute unless predicate world_manager:area/01.god_boundaries run tag @s remove CanUsed

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/2001.staff_of_the_willless/trigger/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:artifact/2001.staff_of_the_willless/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/2001.staff_of_the_willless/trigger/2.check_condition

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

# ここから先は神器側の効果の処理を書く

# 召喚
data modify storage api: Argument.ID set value 1119
execute positioned 3071 120 -512 facing entity @s eyes rotated ~ 0 positioned ^ ^ ^1 run function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:object/1119.staff_of_the_willless_ending/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/1119/init

# 出現演出
particle explosion ~ ~ ~ 0 0 0 0 0 force
playsound minecraft:block.beacon.power_select player @a[distance=..100] ~ ~ ~ 1 2 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:object/1119.staff_of_the_willless_ending/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1119/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のObjectに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# Tickするかどうか(boolean) (オプション)
# data modify storage asset:object IsTicking set value

# ID (int)
data modify storage asset:object ID set value 1119
# フィールド(オプション)
# data modify storage asset:object Field.myValue set value
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:object/1119.staff_of_the_willless_ending/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1119/summon

# 書き足したいならこれつかって
# TSB制作メンバー
# \n\n ハル\n ちぇん / Chen\n uran\n 匿名希望お姉ちゃん\n anminmakura\n MT\n yavu\n nutbox\n Rook0612\n ぴっける\n 逢坂\n ぴっく\n prince\n 氷鮭\n nemo\n フレイシェル\n 1024Kiwi\n IWBTK\n なれんじ\n 最北のヒロッピー\n Chuzume\n kaputina\n anitmyan\n マリン\n けも\n ノータッチ\n とみー\n まっしゅ\n Piano58\n 瑠璃\n きつゅね\n こま\n いーら\n 冴月 ハル\n はいいろ\n nukk\n ばんく\n Yuzunosuke\n しゃもじ

# 元となるEntityを召喚する
summon item_display ~ ~ ~ {start_interpolation:0,teleport_duration:1,Tags:["ObjectInit"],item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20516}},transformation:{left_rotation:[0.3827f,-0.9239f,0f,0f],right_rotation:[0f,0f,0f,1f],translation:[0f,1f,0f],scale:[2f,2f,2f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1119.staff_of_the_willless_ending/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# 召喚
data modify storage api: Argument.ID set value 1119
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#> asset:object/1119.staff_of_the_willless_ending/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1119/tick

#> val
# @private
#declare score_holder $Interval

# Tick加算
scoreboard players add @s General.Object.Tick 1

# くるくる回りだす
execute if score @s General.Object.Tick matches 10..20 run tp @s ~ ~ ~ ~2.5 ~
# 回転加速
execute if score @s General.Object.Tick matches 20..30 run tp @s ~ ~ ~ ~5 ~
execute if score @s General.Object.Tick matches 30.. run tp @s ~ ~ ~ ~10 ~
# スタッフロール召喚!
execute if score @s General.Object.Tick matches 340 facing entity @p eyes rotated ~ 0 positioned ^-3 ^ ^2 run function asset:object/1119.staff_of_the_willless_ending/tick/summon_staff_roll
# 演出適当に
execute if score @s General.Object.Tick matches 40..80 run particle end_rod ~ ~1.5 ~ 0 0 0 0.5 2 force
execute if score @s General.Object.Tick matches 80..160 run particle end_rod ~ ~1.5 ~ 0 0 0 0.9 5 force
execute if score @s General.Object.Tick matches 160..320 run particle end_rod ~ ~1.5 ~ 0 0 0 1.3 10 force
execute if score @s General.Object.Tick matches 320..640 run particle end_rod ~ ~1.5 ~ 0 0 0 0.5 5 force
execute if score @s General.Object.Tick matches 320..640 run particle end_rod ~ ~1.5 ~ 0 0 0 1.8 5 normal

# 6ickおきに実行するやつ
# 実行時間を移す
scoreboard players operation $Interval Temporary = @s General.Object.Tick
# 6tickおきに実行
scoreboard players operation $Interval Temporary %= $6 Const
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches 600..640 run function asset:object/1119.staff_of_the_willless_ending/tick/vfx/2
# リセット
scoreboard players reset $Interval

# 10tickおきに実行するやつ
# 実行時間を移す
scoreboard players operation $Interval Temporary = @s General.Object.Tick
# 10tickおきに実行
scoreboard players operation $Interval Temporary %= $10 Const
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches 320..599 run function asset:object/1119.staff_of_the_willless_ending/tick/vfx/2
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches 420..600 run particle explosion ~ ~7 ~ 7 7 7 0 4
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches 420..640 run particle flash ~ ~1.5 ~ 0 0 0 1 1 force
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches ..640 positioned ~ ~-2 ~ run function asset:object/1119.staff_of_the_willless_ending/tick/vfx/1
# リセット
scoreboard players reset $Interval

# 40tickおきに実行するやつ
# 実行時間を移す
scoreboard players operation $Interval Temporary = @s General.Object.Tick
# 40tickおきに実行
scoreboard players operation $Interval Temporary %= $40 Const
execute if score $Interval Temporary matches 0 if score @s General.Object.Tick matches 160..319 run function asset:object/1119.staff_of_the_willless_ending/tick/vfx/2
# リセット
scoreboard players reset $Interval

# 徐々に上昇
execute if score @s General.Object.Tick matches 640..660 run execute at @s run tp @s ~ ~0.2 ~
# 一気に上昇
execute if score @s General.Object.Tick matches 660..690 run execute at @s run tp @s ~ ~0.8 ~
execute if score @s General.Object.Tick matches 660..690 run particle dust 1 1 1 1 ~ ~ ~ 0 0 0 0 1
# 豪華な演出
execute if score @s General.Object.Tick matches 690 run function asset:object/1119.staff_of_the_willless_ending/tick/direction

# 消滅処理
kill @s[scores={General.Object.Tick=690..}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#> asset:object/1119.staff_of_the_willless_ending/tick/direction
#
#
#
# @within function asset:object/1119.staff_of_the_willless_ending/tick/

# タイトルコマンド
title @a times 10 60 30
title @a title [{"text":"WORLD PURIFIED","bold":true,"color":"yellow"}]

# Particle
execute at @a run particle end_rod ~ ~1.1 ~ 0.15 0.15 0.15 2 150 force @a
# SE
playsound ogg:random.levelup player @a ~ ~ ~ 1 0.8 1

# 神の花火(いらんかも
# ウィキ
summon firework_rocket 3060 117 -501 {LifeTime:30,FireworksItem:{id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Type:0b,Flicker:1b,Trail:1b,Colors:[I;8913151],FadeColors:[I;13391103]}]}}}}
# ウルバン
summon firework_rocket 3060 117 -523 {LifeTime:30,FireworksItem:{id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Type:1b,Colors:[I;16715535],FadeColors:[I;16725558]}]}}}}
# フローラ
summon firework_rocket 3071 117 -529 {LifeTime:30,FireworksItem:{id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Type:4b,Flicker:1b,Trail:1b,Colors:[I;16774912],FadeColors:[I;6749952]}]}}}}
# ルーモア
summon firework_rocket 3082 117 -501 {LifeTime:30,FireworksItem:{id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Type:2b,Colors:[I;16774912]}]}}}}
# ニャプトフ
summon firework_rocket 3082 117 -523 {LifeTime:20,FireworksItem:{id:"firework_rocket",Count:1b,tag:{Fireworks:{Explosions:[{Type:4b,Colors:[I;16751831]}]}}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:object/1119.staff_of_the_willless_ending/tick/summon_staff_roll
#
#
#
# @within function asset:object/1119.staff_of_the_willless_ending/tick/

# 召喚
data modify storage api: Argument.ID set value 1120
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#> asset:object/1119.staff_of_the_willless_ending/tick/vfx/1
#
#
#
# @within function asset:object/1119.staff_of_the_willless_ending/tick/

# 円 1
execute rotated ~00 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~15 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~30 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~45 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~60 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~75 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~90 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~105 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~120 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~135 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~150 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~165 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~180 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~195 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~210 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~225 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~240 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~255 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~270 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~285 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~300 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~315 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~330 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
execute rotated ~345 0 run particle cloud ~ ~ ~ ^ ^ ^100000000 0.000000003 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/1119.staff_of_the_willless_ending/tick/vfx/2
#
#
#
# @within function asset:object/1119.staff_of_the_willless_ending/tick/

# 爆発
playsound minecraft:block.amethyst_block.step neutral @a ~ ~ ~ 1 1
playsound minecraft:block.amethyst_block.step neutral @a ~ ~ ~ 1 1
playsound minecraft:block.amethyst_block.step neutral @a ~ ~ ~ 1 1
particle explosion ~ ~1.5 ~ 0 0 0 0 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:object/1120.staff_roll/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1120/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のObjectに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# Tickするかどうか(boolean) (オプション)
# data modify storage asset:object IsTicking set value

# ID (int)
data modify storage asset:object ID set value 1120
# フィールド(オプション)
# data modify storage asset:object Field.myValue set value
Loading