Skip to content

Commit

Permalink
⚖️ [Artifact 1045] ブラックホール・ミニの弾が一定時間経過後に強制的に起動するように (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lapis-LJA authored Mar 6, 2025
1 parent efe476e commit 5b4521b
Show file tree
Hide file tree
Showing 126 changed files with 559 additions and 393 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 @@ -13,30 +13,15 @@

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

# 雪玉を召喚する
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/3.1.vfx
execute anchored eyes positioned ^ ^ ^0.5 run function asset:artifact/1045.mini_black_hole/trigger/vfx

# リセット処理
tag @e[type=snowball,tag=T1.SnowBallInit,distance=..3] remove T1.SnowBallInit
data remove storage lib: Argument
scoreboard players reset $T1.OwnerId Temporary
# Object召喚
data modify storage api: Argument.ID set value 1042
data modify storage api: Argument.FieldOverride.Damage set value 180
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
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,4 +1,4 @@
#> asset:artifact/1045.mini_black_hole/trigger/3.1.vfx
#> asset:artifact/1045.mini_black_hole/trigger/vfx
#
# 発動時演出
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1042.mini_black_hole_flying/detect_hit_block/
#
# 継承先などから実行される処理
#
# @within asset:object/alias/1042/detect_hit_block

# 判定
execute unless block ^ ^ ^0.375 #lib:no_collision run data modify storage asset:context IsHitBlock set value true
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1042.mini_black_hole_flying/detect_hit_entity/
#
# 継承先などから実行される処理
#
# @within asset:object/alias/1042/detect_hit_entity

# 判定
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,type=!player,tag=Enemy,tag=!Uninterferable,dx=0,limit=1] run data modify storage asset:context IsHitEntity set value true
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:object/1042.mini_black_hole_flying/kill/
#
# 継承先などから実行される処理
#
# @within asset:object/alias/1042/kill

# ブラックホール(吸い込み)を召喚
data modify storage api: Argument.ID set value 1043
data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage
data modify storage api: Argument.FieldOverride.UserID set from storage asset:context this.UserID
execute anchored eyes positioned ^ ^ ^0.5 run function api:object/summon

# 消滅
kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#> asset:object/1042.mini_black_hole_flying/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/1042/register

# 継承(オプション)
data modify storage asset:object Extends append value 1
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 1042
# フィールド(オプション)
data modify storage asset:object Field.Speed set value 2
data modify storage asset:object Field.Range set value 200
data modify storage asset:object Field.MovePerStep set value 0.375
data modify storage asset:object Field.Damage set value 1
data modify storage asset:object Field.UserID set value -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/1042.mini_black_hole_flying/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/1042/summon

# 召喚
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/1042.mini_black_hole_flying/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/1042.mini_black_hole_flying/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

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

# 元となるEntityを召喚する
$summon marker ~ ~ ~ {Rotation:$(Rotation),Tags:["ObjectInit"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#> asset:object/1042.mini_black_hole_flying/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/1042/tick

# 演出のためにランダムな方向を向かせる
execute store result storage asset:temp Args.Yaw float 0.01 run random value 0..35999
execute store result storage asset:temp Args.Pitch float 0.01 run random value 0..35999

# 演出
function asset:object/1042.mini_black_hole_flying/tick/vfx/m with storage asset:temp Args

# リセット
data remove storage asset:temp Args

# super.tick
execute at @s run function asset:object/super.tick
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:object/1042.mini_black_hole_flying/tick/vfx/m
#
# @input args:
# Yaw : float
# Pitch : float
# @within function asset:object/1042.mini_black_hole_flying/tick/

#
$execute rotated $(Yaw) $(Pitch) run function asset:object/1042.mini_black_hole_flying/tick/vfx/particle
Loading

0 comments on commit 5b4521b

Please sign in to comment.