Skip to content

Commit

Permalink
[Artifact 1045] 一定時間後に強制的に効果を発動するように (没)
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Mar 6, 2025
1 parent 1dd6010 commit d36a62b
Show file tree
Hide file tree
Showing 117 changed files with 444 additions and 402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '[{"text":"ブラックホール・ミニ","color":"#A100FF","bold":true}]'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"小さな紫の弾を前方に発射する","color":"white","italic":false}','{"text":"弾は着弾した瞬間にブラックホールを生み出し、","color":"white","italic":false}','{"text":"周囲の敵を無慈悲に吸い込む","color":"white","italic":false}','{"text":"宇宙の破壊力に叶うものはいないだろうに","color":"#B973FF","italic":false}']
data modify storage asset:artifact Lore set value ['{"text":"小さな紫の弾を前方に発射する","color":"white","italic":false}','{"text":"弾は着弾あるいは一定時間経過した時にブラックホールを生み出し、","color":"white","italic":false}','{"text":"周囲の敵を無慈悲に吸い込む","color":"white","italic":false}','{"text":"宇宙の破壊力に叶うものはいないだろうに","color":"#B973FF","italic":false}']
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
# data modify storage asset:artifact ConsumeItem.Item set value
# data modify storage asset:artifact ConsumeItem.Count set value
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,18 @@
#
# @within function asset:artifact/1045.mini_black_hole/trigger/2.check_condition

#> Val
# @private
#declare score_holder $T1.OwnerId

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

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

# 雪玉を召喚する
execute anchored eyes run summon snowball ^ ^ ^0.5 {Tags:["T1.SnowBall","T1.SnowBallInit"],NoGravity:1b,Item:{Count:1b,id:"minecraft:stick",tag:{CustomModelData:1037}},Passengers:[{id:"minecraft:marker",Tags:["T1.Marker"]}]}

# スコアセット
scoreboard players operation $T1.OwnerId Temporary = @s UserID
execute as @e[type=snowball,tag=T1.SnowBallInit,distance=..3,limit=1] on passengers run scoreboard players operation @s T1.OwnerID = $T1.OwnerId Temporary
execute as @e[type=snowball,tag=T1.SnowBallInit,distance=..3,limit=1] on passengers run scoreboard players set @s T1.FlyingTick 100
execute as @e[type=snowball,tag=T1.SnowBallInit,distance=..3,limit=1] on passengers run scoreboard players set @s T1.LandingTick 0

# 雪玉にMotionをセットする
data modify storage lib: Argument.VectorMagnitude set value 0.75
execute as @e[type=snowball,tag=T1.SnowBallInit,distance=..3] run function lib:motion/

# 命中判定を行うためのscheduleをセットする
schedule function asset:artifact/1045.mini_black_hole/trigger/schedule/1.tick 1t replace

# 発動時の音
# 演出
playsound block.respawn_anchor.deplete player @a[distance=..16] ~ ~ ~ 1.0 2 0.0
playsound entity.wither.hurt player @a[distance=..16] ~ ~ ~ 0.5 1.5
execute anchored eyes positioned ^ ^ ^0.5 run function asset:artifact/1045.mini_black_hole/trigger/vfx

# 演出
execute anchored eyes positioned ^ ^ ^0.5 run function asset:artifact/1045.mini_black_hole/trigger/3.1.vfx

# リセット処理
tag @e[type=snowball,tag=T1.SnowBallInit,distance=..3] remove T1.SnowBallInit
data remove storage lib: Argument
scoreboard players reset $T1.OwnerId Temporary
# Object1106 を召喚
data modify storage api: Argument.ID set value 1106
execute store result storage api: Argument.FieldOverride.OwnerID int 1 run scoreboard players get @s UserID
data modify storage api: Argument.FieldOverride.Fuse set value 100
execute anchored eyes positioned ^ ^ ^0.5 run function api:object/summon

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:artifact/1045.mini_black_hole/trigger/3.1.vfx
#> asset:artifact/1045.mini_black_hole/trigger/vfx
#
# 発動時演出
#
# @within function asset:artifact/1045.mini_black_hole/trigger/3.main
#
# @within asset:artifact/1045.mini_black_hole/trigger/3.main

# 発動パーティクル
particle dust -1 0 -1 0.75 ^-0.0 ^0.25 ^-0.0 0.0 0.0 0.0 0.0 1 normal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:object/1106.mini_black_hole/_index.d
# @private

#> tag
# @within function asset:object/1106.mini_black_hole/**
#declare score_holder $UQ.Temp
#declare tag UQ.Owner
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#> asset:object/1106.mini_black_hole/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/1106/init

# 雪玉を殴る(描画更新で)
# execute on vehicle run damage @s 0
# モーションでぶっ飛ばす。飛ぶのは下の雪玉
data modify storage lib: Argument.VectorMagnitude set value 0.75d
execute on vehicle run function lib:motion/
data remove storage lib: Argument

# 信管の起爆時間の上限設定
execute store result score $UQ.Temp Temporary run data get storage asset:context this.Fuse
scoreboard players operation $UQ.Temp Temporary > $0 Const
scoreboard players operation @s General.Object.Tick -= $UQ.Temp Temporary
scoreboard players reset $UQ.Temp Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:object/1106.mini_black_hole/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1106/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 1106
# フィールド(オプション)
# data modify storage asset:object Field.Fuse set value 100
# data modify storage asset:object Field.OwnerID set value -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/1106.mini_black_hole/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1106/summon

# 元となるEntityを召喚する
execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ ~
data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation
function asset:object/1106.mini_black_hole/summon/m with storage asset:temp Args
data remove storage asset:temp Args
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/1106.mini_black_hole/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# 召喚
data modify storage api: Argument.ID set value 1106
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:object/1106.mini_black_hole/summon/m
#
# @input args:
# Rotation : float @ 2
# @within function asset:object/1106.mini_black_hole/summon/

# 元となるEntityを召喚する
# 雪玉をそのまま使ってるのはより厳密な着弾判定のため
$summon snowball ~ ~ ~ {Rotation:$(Rotation),NoGravity:1b,Silent:1b,Tags:["Uninterferable"],Passengers:[{id:"minecraft:marker",Tags:["ObjectInit"]}],Item:{Count:1b,id:"minecraft:stone",tag:{CustomModelData:20019}}}
Loading

0 comments on commit d36a62b

Please sign in to comment.