Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f0b71f4
ArtifactとEffectの基本機能を作成
firgde Jun 20, 2026
95bf7fa
攻撃1 スパーク
firgde Jul 2, 2026
a2bbbd2
ObjectのEntityを変更
firgde Jul 2, 2026
97db26a
攻撃2 ビーム
firgde Jul 2, 2026
fae7c8e
攻撃2 ビーム
firgde Jul 3, 2026
8de8ed1
Merge branch 'dev/firgde_artifact1465' of https://github.com/ProjectT…
firgde Jul 3, 2026
f7fb80a
記述を修正
firgde Jul 3, 2026
cf30668
攻撃2にノックバック追加
firgde Jul 3, 2026
cac824c
攻撃3 貫通レーザー
firgde Jul 3, 2026
bde71d5
ノックバックを調整
firgde Jul 3, 2026
d815bdf
音量調節
firgde Jul 3, 2026
3f826d1
チャージ用バフのスタックが変動したときのみにMPを消費するように
firgde Jul 3, 2026
3f62b6e
攻撃判定を強化
firgde Jul 3, 2026
d6cafe2
攻撃2を調節
firgde Jul 3, 2026
1d27028
ダメージ量をFieldで管理
firgde Jul 3, 2026
fe461cf
チャージ時のMP消費チェックを修正
firgde Jul 3, 2026
2a629dd
ツールチップを整備
firgde Jul 3, 2026
b781eee
演出を追加
firgde Jul 3, 2026
80994c3
playsoundで再生する音をogg名前空間のものに変更
firgde Jul 4, 2026
01fe0d4
攻撃1の発射数を増加
firgde Jul 4, 2026
b0bc9db
MP回復量を半分に
firgde Jul 4, 2026
a186c03
攻撃2の視認性を改善
firgde Jul 4, 2026
92f4a96
UserIDが正しく紐づいていない問題を修正
firgde Jul 4, 2026
ea84040
Effectの説明を追加
firgde Jul 4, 2026
b5c2522
EffectのID表記が規則に合うように
firgde Jul 24, 2026
ef5ccd8
範囲攻撃に関する情報を適切なものに変更
firgde Jul 24, 2026
1ad0847
playsoundのタイプを修正
firgde Jul 24, 2026
96870e7
実行位置の修正
firgde Jul 24, 2026
e1248a2
セレクターを修正
firgde Jul 24, 2026
d36576c
スコアリセット時のobjectiveを明記
firgde Jul 24, 2026
19cb086
攻撃情報を神器依存に
firgde Jul 25, 2026
bd3724a
ツールチップを分かりやすく
firgde Jul 25, 2026
5b97c88
不要なFieldを削除
firgde Jul 25, 2026
a1ffded
重複した処理を一つのfunctionに
firgde Jul 25, 2026
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/1465.versatile_plasma/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

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

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

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1465
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:ender_eye"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text": "ヴァースティル・プラズマ", "color": "#D4FFBA"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text": "チャージ段階に応じて異なる方法で攻撃する。"}', '{"text": "1段:短射程の小さい弾を、幅広めにばらまく"}', '{"text": "2段:三方位に、ノックバックするビームを撃つ"}', '{"text": "3段:貫通ビームを撃つ"}', '{"text": "チャージを2層重ねると25、3層重ねると追加で35のMPを消費する。"}']
# 消費アイテム ({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 "30 / 150 / 300"
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackType set value [Physical]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.ElementType set value [Thunder]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
# data modify storage asset:artifact AttackInfo.BypassResist set value
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "condition"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackRange set value "???"
# MP消費量 (int)
# data modify storage asset:artifact MPCost set value
# MP必要量 (int) (オプション)
# data modify storage asset:artifact MPRequire set value
# MP回復量 (int)
data modify storage asset:artifact MPHealWhenHit set value 5
# 神器のクールダウン (int) (オプション)
data modify storage asset:artifact LocalCooldown set value 100
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
data modify storage asset:artifact TypeCooldown.Type set value "longRange"
data modify storage asset:artifact TypeCooldown.Duration set value 50
# グローバルクールダウン (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", "Wi-ki"]
# カスタム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,7 @@
#> asset:artifact/1465.versatile_plasma/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[3] append value [1465]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1465.versatile_plasma/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:1465} run function asset:artifact/1465.versatile_plasma/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:artifact/1465.versatile_plasma/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1465.versatile_plasma/trigger/1.trigger

# チャージ段階のEffect取得
data modify storage api: Argument.ID set value 374
function api:entity/mob/effect/get/from_id
# チャージ中ならば強制的にチャージ続行
execute if data storage api: Return.Effect run return run function asset:artifact/1465.versatile_plasma/trigger/charge

# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
function asset:artifact/common/check_condition/mainhand

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

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

# Fieldを設定
data modify storage api: Argument.FieldOverride.DamagePool set value [30, 150, 300]
data modify storage api: Argument.FieldOverride.AttackType set value "Physical"
data modify storage api: Argument.FieldOverride.ElementType set value "Thunder"
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal

# チャージ用Effectを付与
data modify storage api: Argument.ID set value 374
function api:entity/mob/effect/give
function api:entity/mob/effect/reset

# 演出
playsound block.iron_door.open player @a ~ ~ ~ 2 0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:artifact/1465.versatile_plasma/trigger/charge
#
#
#
# @within function asset:artifact/1465.versatile_plasma/trigger/2.check_condition

# チャージ用Effectを付与
data modify storage api: Argument.ID set value 374
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,7 @@
#> asset:effect/0374.charge_plasma/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:374} run function asset:effect/0374.charge_plasma/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0374.charge_plasma/_/re-given
#
# Effectが上書きされた時に実行されるfunction
#
# @within tag/function asset:effect/re-given

execute if data storage asset:context {id:374} run function asset:effect/0374.charge_plasma/re-given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0374.charge_plasma/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:374} run function asset:effect/0374.charge_plasma/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:effect/0374.charge_plasma/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0374.charge_plasma/_/end

# スタック数に応じてそれぞれの攻撃処理を実行
execute if data storage asset:context {Stack:1} run function asset:effect/0374.charge_plasma/end/attack/1/
execute if data storage asset:context {Stack:2} anchored eyes positioned ^ ^-0.25 ^ run function asset:effect/0374.charge_plasma/end/attack/2/
execute if data storage asset:context {Stack:3} run function asset:effect/0374.charge_plasma/end/attack/3/
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#> asset:effect/0374.charge_plasma/end/attack/1
#
# 攻撃(ため1段階):スパーク
#
# @within function asset:effect/0374.charge_plasma/end/**

#> Private
# @within function asset:effect/0374.charge_plasma/end/attack/**
#declare score_holder $rec

# 36回実行
scoreboard players set $rec Temporary 36

# 向いている方向に確定で一個だす
data modify storage api: Argument.ID set value 1168
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute anchored eyes positioned ^ ^ ^2.5 run function api:object/summon

# 本体
execute anchored eyes positioned ^ ^ ^ run function asset:effect/0374.charge_plasma/end/attack/1/rec

# リセット
scoreboard players reset $rec
data remove storage asset:temp Args
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:effect/0374.charge_plasma/end/attack/1/m
#
# Object 1168を召喚
#
# @within function asset:effect/0374.charge_plasma/end/attack/1/rec

data modify storage api: Argument.ID set value 1168
data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.DamagePool[0]
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal
data modify storage api: Argument.FieldOverride.AttackType set from storage asset:context this.AttackType
data modify storage api: Argument.FieldOverride.ElementType set from storage asset:context this.ElementType
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
$execute positioned ^$(OffsetX) ^$(OffsetY) ^$(OffsetZ) run function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:effect/0374.charge_plasma/end/attack/1/rec
#
# 再帰処理
#
# @within function asset:effect/0374.charge_plasma/end/attack/1/**

# rec減算
scoreboard players remove $rec Temporary 1

# ランダムなoffsetを設定
execute store result storage asset:temp Args.OffsetX float 0.1 run random value -20..20
execute store result storage asset:temp Args.OffsetY float 0.1 run random value -5..5
execute store result storage asset:temp Args.OffsetZ float 0.1 run random value 5..35

# マクロでObject召喚
function asset:effect/0374.charge_plasma/end/attack/1/m with storage asset:temp Args

# 再帰
execute if score $rec Temporary matches 1.. run function asset:effect/0374.charge_plasma/end/attack/1/rec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:effect/0374.charge_plasma/end/attack/2
#
# プラズマ攻撃2: 拡散レーザー
#
# @within function asset:effect/0374.charge_plasma/end/**

# 3発撃つ
execute rotated ~-30 ~ run function asset:effect/0374.charge_plasma/end/attack/2/summon

execute rotated ~ ~ run function asset:effect/0374.charge_plasma/end/attack/2/summon

execute rotated ~30 ~ run function asset:effect/0374.charge_plasma/end/attack/2/summon

# 演出
playsound block.respawn_anchor.deplete player @a ~ ~ ~ 2 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:effect/0374.charge_plasma/end/attack/2
#
# 攻撃2の共通処理
#
# @within function asset:effect/0374.charge_plasma/end/**

data modify storage api: Argument.ID set value 1169
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage asset:context this.AdditionalMPHeal
data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.DamagePool[1]
data modify storage api: Argument.FieldOverride.AttackType set from storage asset:context this.AttackType
data modify storage api: Argument.FieldOverride.ElementType set from storage asset:context this.ElementType
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:effect/0374.charge_plasma/end/attack/3/
#
# 攻撃3: 貫通レーザー
#
# @within function asset:effect/0374.charge_plasma/end/**

#> Private
# @within function asset:effect/0374.charge_plasma/end/attack/3/**
#declare tag Hit
#declare tag HitTarget

# 再帰処理
execute anchored eyes positioned ^ ^ ^ run function asset:effect/0374.charge_plasma/end/attack/3/rec
tag @s remove Hit
tag @e[type=#lib:living_without_player,tag=HitTarget,distance=..20] remove HitTarget

# 演出
playsound ogg:block.vault.open_shutter player @a ~ ~ ~ 2 2
playsound ogg:block.vault.break player @a ~ ~ ~ 1 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#> asset:effect/0374.charge_plasma/end/attack/3/damage
#
#
#
# @within function asset:effect/0374.charge_plasma/end/attack/3/rec


# ヒット済みタグ
execute positioned ~-0.5 ~-0.5 ~-0.5 run tag @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0,limit=1] add HitTarget

# ダメージ
data modify storage api: Argument.Damage set from storage asset:context this.DamagePool[2]
data modify storage api: Argument.AttackType set from storage asset:context this.AttackType
data modify storage api: Argument.ElementType set from storage asset:context this.ElementType
data modify storage api: Argument.AdditionalMPHeal set from storage asset:context this.AdditionalMPHeal
function api:damage/modifier
execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0,limit=1] run function api:damage/
function api:damage/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:effect/0374.charge_plasma/end/attack/3/rec
#
#
#
# @within function asset:effect/0374.charge_plasma/end/attack/3/**

# 着弾検知
execute unless block ^ ^ ^0.5 #lib:no_collision/ run tag @s add Hit

# 命中
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living_without_player,tag=!HitTarget,tag=!Uninterferable,dx=0,limit=1] run function asset:effect/0374.charge_plasma/end/attack/3/damage

# 演出
particle dust 0.8 1.0 0.5 1.0 ~ ~ ~ 0.0 0.0 0.0 1 1
particle dust 0.5 1.0 0.5 1.5 ~ ~ ~ 0.0 0.0 0.0 1 1
particle dust 0.8 0.8 0.3 0.5 ~ ~ ~ 0.0 0.0 0.0 1 1

# 再起
execute positioned ^ ^ ^0.5 if entity @s[tag=!Hit,distance=..20] run function asset:effect/0374.charge_plasma/end/attack/3/rec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#> asset:effect/0374.charge_plasma/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0374.charge_plasma/_/re-given

#> Private
# @private
#declare score_holder $Charge
#declare score_holder $MP

# Field引き継ぎ
execute if data storage asset:context PreviousField.DamagePool run data modify storage asset:context this.DamagePool set from storage asset:context PreviousField.DamagePool
execute if data storage asset:context PreviousField.AdditionalMPHeal run data modify storage asset:context this.AdditionalMPHeal set from storage asset:context PreviousField.AdditionalMPHeal
execute if data storage asset:context PreviousField.AttackType run data modify storage asset:context this.AttackType set from storage asset:context PreviousField.AttackType
execute if data storage asset:context PreviousField.ElementType run data modify storage asset:context this.ElementType set from storage asset:context PreviousField.ElementType

# チャージ時間を取得
execute store result score $Charge Temporary run data get storage asset:context PreviousField.Charge

# MPを取得
function api:mp/get_current
execute store result score $MP Temporary run data get storage api: Return.CurrentMP

# Field.Chargeを+1
execute store result storage asset:context this.Charge int 1 run scoreboard players add $Charge Temporary 1

# 時間に応じてバフをスタック
execute if data storage asset:context {Stack:1} if score $Charge Temporary matches 25.. if score $MP Temporary matches 25.. run function asset:effect/0374.charge_plasma/re-given/charge/2
execute if data storage asset:context {Stack:2} if score $Charge Temporary matches 50.. if score $MP Temporary matches 35.. run function asset:effect/0374.charge_plasma/re-given/charge/3

# リセット
scoreboard players reset $Charge
scoreboard players reset $MP
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:effect/0374.charge_plasma/re-given/charge/2
#
#
#
# @within function asset:effect/0374.charge_plasma/re-given/

# スタック数を増やす
data modify storage asset:context Stack set value 2

# MP消費
data modify storage api: Argument.Fluctuation set value -25
data modify storage api: Argument.DisableLog set value 1b
function api:mp/fluctuation

# 演出
playsound block.piston.extend player @a ~ ~ ~ 2 2
particle dust 0.8 1.0 0.5 2.0 ~ ~ ~ 0.5 1.0 0.5 1 8
particle dust 0.5 1.0 0.5 2.5 ~ ~ ~ 0.5 1.0 0.5 1 8
particle dust 0.8 0.8 0.3 1.5 ~ ~ ~ 0.5 1.0 0.5 1 8
Loading
Loading