Skip to content
Open
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/1572.after_glow/give/1.trigger
#
# 神器の取得処理の呼び出し時に実行されるfunction
#
# @within tag/function asset:artifact/give

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

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

# 神器のID (int) スプレッドシートの値を入れる
data modify storage asset:artifact ID set value 1572
# 神器のベースアイテム
data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick"
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '[{"text":"ア","color":"#ff9900"},{"text":"フ","color":"#ff8000"},{"text":"タ","color":"#ff6600"},{"text":"ー","color":"#ff4d00"},{"text":"グ","color":"#ff3300"},{"text":"ロ","color":"#ff1a00"},{"text":"ウ","color":"#ff0000"}]'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"きわめて強力なレーザーを上空に向けて射出する","color":"white"}','{"text":"レーザーは30秒後に着弾し、敵に致命的なダメージを与える","color":"white"}','{"text":"“希望がある限り、奇跡は起こる”","color":"gray"}']
# 消費アイテム ({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 "9999.9"
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackType set value [Magic]
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.ElementType set value [Thunder]
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
#data modify storage asset:artifact AttackInfo.BypassResist set value true
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.IsRangeAttack set value "every"
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
data modify storage asset:artifact AttackInfo.AttackRange set value 5
# MP消費量 (int)
data modify storage asset:artifact MPCost set value 120
# 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 600
# 種別クールダウン ({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 ["Flora", "Urban", "Nyaptov", "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,8 @@
#> asset:artifact/1572.after_glow/passive/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:1572} run function asset:artifact/1572.after_glow/passive/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:artifact/1572.after_glow/passive/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1572.after_glow/passive/1.trigger

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

# CanUsedタグをチェックして3.main.mcfunctionを実行する
function asset:artifact/1572.after_glow/passive/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:artifact/1572.after_glow/passive/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1572.after_glow/passive/2.check_condition

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

# ここから先は神器側の効果の処理を書く
execute anchored eyes positioned ^ ^ ^0.5 run function asset:artifact/1572.after_glow/passive/pointer
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:artifact/1572.after_glow/passive/pointer
#
# 神器のメイン処理部
#
# @within function
# asset:artifact/1572.after_glow/passive/3.main
# asset:artifact/1572.after_glow/passive/pointer


# 視点方向に赤い点
# ブロックに当たったら
execute unless block ^ ^ ^ #lib:no_collision/ positioned ^ ^ ^-0.5 run return run particle minecraft:dust 1.0 0.0 0.0 0.5 ~ ~ ~ 0 0 0 0 1 normal
# 射程限界でも(ついでに無限再起防止)
execute unless entity @s[distance=..5] run return run particle minecraft:dust 1.0 0.0 0.0 0.5 ~ ~ ~ 0 0 0 0 1 normal
# どちらも満たさないなら再起
execute positioned ^ ^ ^0.5 run function asset:artifact/1572.after_glow/passive/pointer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1572.after_glow/register
#
# 神器プールへの登録処理
#
# @within tag/function asset:artifact/register

data modify storage asset:artifact RarityRegistry[4] append value [1572]
data modify storage asset:artifact RarityRegistryWithColor.Red[4] append value [1572]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:artifact/1572.after_glow/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:1572} run function asset:artifact/1572.after_glow/trigger/2.check_condition
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:artifact/1572.after_glow/trigger/2.check_condition
#
# 神器の発動条件をチェックします
#
# @within function asset:artifact/1572.after_glow/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/1572.after_glow/trigger/3.main
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:artifact/1572.after_glow/trigger/3.main
#
# 神器のメイン処理部
#
# @within function asset:artifact/1572.after_glow/trigger/2.check_condition

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

# ここから先は神器側の効果の処理を書く
# 召喚位置を視点方向に
execute anchored eyes positioned ^ ^ ^0.5 run function asset:artifact/1572.after_glow/trigger/pointer
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#> asset:artifact/1572.after_glow/trigger/object_summon
#
# ビーム召喚
#
# @within function asset:artifact/1572.after_glow/trigger/pointer

# ビーム召喚(真上向く)
data modify storage api: Argument.ID set value 2168
data modify storage api: Argument.FieldOverride set value {Color:16711680,Scale:[0.5f,100f,0.5f],Frames:[20335,20336,20337]}
execute rotated ~ ~-90 run function api:object/summon
# 効果音
playsound minecraft:entity.allay.death player @a ~ ~ ~ 1 2
playsound minecraft:entity.allay.hurt player @a ~ ~ ~ 1 2
playsound minecraft:block.respawn_anchor.charge player @a ~ ~ ~ 1 1.2

# Object召喚
data modify storage api: Argument.ID set value 1166
# ダメージセット
data modify storage api: Argument.FieldOverride.Damage set value 9999.9
# 着弾までの時間
data modify storage api: Argument.FieldOverride.Tick set value 600
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,15 @@
#> asset:artifact/1572.after_glow/trigger/pointer
#
# 神器のメイン処理部
#
# @within function
# asset:artifact/1572.after_glow/trigger/3.main
# asset:artifact/1572.after_glow/trigger/pointer

# 視点方向にビーム召喚
# ブロックに当たったらビーム
execute unless block ^ ^ ^ #lib:no_collision/ positioned ^ ^ ^-0.5 rotated ~ -90 run return run function asset:artifact/1572.after_glow/trigger/object_summon
# 射程限界でビーム(ついでに無限再起防止)
execute unless entity @s[distance=..5] rotated ~ -90 run return run function asset:artifact/1572.after_glow/trigger/object_summon
# どちらも満たさないなら再起
execute positioned ^ ^ ^0.5 run function asset:artifact/1572.after_glow/trigger/pointer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:object/1166.after_glow/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1166/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 1166
# フィールド(オプション)
# data modify storage asset:object Field.myValue set value
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1166.after_glow/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1166/summon

# 元となるEntityを召喚する
summon marker ~ ~ ~ {Tags:["ObjectInit"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1166.after_glow/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# 召喚
data modify storage api: Argument.ID set value 1166
function api:object/summon
11 changes: 11 additions & 0 deletions Asset/data/asset/functions/object/1166.after_glow/tick/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/1166.after_glow/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1166/tick

# Tick加算
execute store result storage asset:context this.Tick int 0.9999999999 run data get storage asset:context this.Tick 1
execute if data storage asset:context this{Tick:0} run function asset:object/1166.after_glow/tick/beem
# 着弾地点表示
function asset:object/1166.after_glow/tick/preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#> asset:object/1166.after_glow/tick/beem
#
# Objectのビームの攻撃処理
#
# @within asset:object/1166.after_glow/tick/
#> Private
# @private
#declare score_holder $UserID

# ビーム召喚(真上向く)
data modify storage api: Argument.ID set value 2168
data modify storage api: Argument.FieldOverride set value {Color:16711680,Scale:[2f,100f,2f],Frames:[20335,20336,20337]}
execute rotated ~ ~-90 run function api:object/summon
# 音
playsound minecraft:entity.generic.explode player @a ~ ~ ~ 2.0 0.6
playsound minecraft:entity.lightning_bolt.impact player @a ~ ~ ~ 2.0 1.5
playsound minecraft:block.beacon.deactivate player @a ~ ~ ~ 1.5 0.5
playsound minecraft:entity.dragon_fireball.explode player @a ~ ~ ~ 2.0 0.6
playsound minecraft:block.glass.break player @a ~ ~ ~ 1.5 0.5
playsound minecraft:block.lava.extinguish player @a ~ ~ ~ 1.5 0.5
playsound minecraft:block.respawn_anchor.deplete player @a ~ ~ ~ 2 1.4

# 半径1高さ100の円柱型範囲内
data modify storage lib: Argument.BoundingCylinder.Radius set value 1
data modify storage lib: Argument.BoundingCylinder.Height set value 101
data modify storage lib: Argument.BoundingCylinder.Selector set value "@e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable]"
execute positioned ~ ~-1 ~ run function lib:bounding_cylinder/
# ダメージ
data modify storage api: Argument.Damage set from storage asset:context this.Damage
data modify storage api: Argument.AttackType set value "Magic"
data modify storage api: Argument.ElementType set value "Thunder"
execute store result score $UserID Temporary run data get storage asset:context this.UserID
execute as @a if score @s UserID = $UserID Temporary run function api:damage/modifier
execute as @e[type=#lib:living_without_player,tag=Enemy,tag=BoundingCylinder,tag=!Uninterferable] run function api:damage/
function api:damage/reset
scoreboard players reset $UserID Temporary
# tagリセット
tag @e[type=#lib:living_without_player,tag=Enemy,tag=BoundingCylinder,tag=!Uninterferable] remove BoundingCylinder
kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#> asset:object/1166.after_glow/tick/beem
#
# Objectのビームの予告円
#
# @within asset:object/1166.after_glow/tick/


# X, Z座標を円形(半径2m)にずらして24個のパーティクルを同時生成
particle minecraft:dust 1.0 0.0 0.0 0.7 ~1.00 ~0.1 ~0.00 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.97 ~0.1 ~0.26 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.87 ~0.1 ~0.50 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.71 ~0.1 ~0.71 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.50 ~0.1 ~0.87 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.26 ~0.1 ~0.97 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.00 ~0.1 ~1.00 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.26 ~0.1 ~0.97 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.50 ~0.1 ~0.87 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.71 ~0.1 ~0.71 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.87 ~0.1 ~0.50 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.97 ~0.1 ~0.26 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-1.00 ~0.1 ~0.00 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.97 ~0.1 ~-0.26 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.87 ~0.1 ~-0.50 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.71 ~0.1 ~-0.71 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.50 ~0.1 ~-0.87 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~-0.26 ~0.1 ~-0.97 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.00 ~0.1 ~-1.00 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.26 ~0.1 ~-0.97 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.50 ~0.1 ~-0.87 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.71 ~0.1 ~-0.71 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.87 ~0.1 ~-0.50 0 0 0 0 1 normal
particle minecraft:dust 1.0 0.0 0.0 0.7 ~0.97 ~0.1 ~-0.26 0 0 0 0 1 normal
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1166/register
#
# Objectのデータ指定処理のエイリアス
#
# @within asset_manager:object/summon/register.m

# 元の登録処理を呼び出す
function asset:object/1166.after_glow/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1166/summon
#
# Object召喚処理のエイリアス
#
# @within asset_manager:object/summon/summon.m

# 元の召喚処理を呼び出す
function asset:object/1166.after_glow/summon/
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/1166/tick.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/1166/tick
#
# Tick時処理のエイリアス
#
# @within asset_manager:object/tick/tick.m

# 元のTick処理を呼び出す
function asset:object/1166.after_glow/tick/
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1572.after_glow/trigger/1.trigger",
"asset:artifact/1332.bebebeam/trigger/1.trigger",
"asset:artifact/1306.will_o_wisp/trigger/1.trigger",
"asset:artifact/1144.cradle_of_azure_moon/trigger/1.trigger",
Expand Down Expand Up @@ -177,4 +178,4 @@
"asset:artifact/2001.staff_of_the_willless/trigger/1.trigger",
"asset:artifact/0019.scripture/trigger/1.trigger"
]
}
}
1 change: 1 addition & 0 deletions Asset/data/asset/tags/functions/artifact/give.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"values": [
"asset:artifact/1572.after_glow/give/1.trigger",
"asset:artifact/1430.shield_of_fate/give/1.trigger",
"asset:artifact/1453.frost_flake_bow/give/1.trigger",
"asset:artifact/1534.drop_in_the_bucket/give/1.trigger",
Expand Down
Loading
Loading