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
Expand Up @@ -15,7 +15,7 @@
# 神器の名前 (TextComponentString)
data modify storage asset:artifact Name set value '{"text":"レーザーアイヘルメット","color":"green"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"レーザーアイ形をしたヘルメット"}','{"text":"ビームを放出することができる"}']
data modify storage asset:artifact Lore set value ['{"text":"レーザーアイを模したヘルメット"}','{"text":"ビームを放出することができる"}']
# 消費アイテム ({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
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#
# @within function asset:artifact/0971.laser_eye_helmet/shot/2.check_condition

#> Private
# @private
#declare tag SpreadMarker

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

Expand All @@ -16,18 +12,11 @@
# 演出
playsound minecraft:block.respawn_anchor.deplete player @a ~ ~ ~ 1 2

# 前方拡散設定
execute anchored eyes positioned ^ ^ ^ run summon marker ~ ~ ~ {Tags:["SpreadMarker"]}
data modify storage lib: Argument.Distance set value 3.0
data modify storage lib: Argument.Spread set value 0.5
# 前方拡散を実行する
execute as @e[type=marker,tag=SpreadMarker,limit=1] run function lib:forward_spreader/circle
# 発砲
execute anchored eyes facing entity @e[type=marker,tag=SpreadMarker,limit=1] feet run function asset:artifact/0971.laser_eye_helmet/shot/bullet
execute anchored eyes positioned ^ ^ ^15 facing ^ ^ ^-1 summon marker run function asset:artifact/0971.laser_eye_helmet/shot/spread
tag @s remove Landing

# リセット
kill @e[type=marker,tag=SpreadMarker]
scoreboard players reset $Appropriate_Distance Temporary
scoreboard players reset $Distance_Damping Temporary
scoreboard players reset $MinDamage Temporary
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:artifact/0971.laser_eye_helmet/shot/shoot/
#
#
#
# @within function asset:artifact/0971.laser_eye_helmet/shot/spread

# 発射
function asset:artifact/0971.laser_eye_helmet/shot/shoot/recursive

# レーザーobject召喚
data modify storage api: Argument.ID set value 2168
data modify storage api: Argument.FieldOverride set value {Scale:[0.25f,0f,0.25f],Color:7733114,DisappearInterpolation:2,LifeTime:7}
execute store result storage api: Argument.FieldOverride.Scale[1] float 0.5 run scoreboard players get $Distance_Damping Temporary
execute positioned ^ ^ ^0.5 run function api:object/summon
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#> asset:artifact/0971.laser_eye_helmet/shot/damage_attenuation
#> asset:artifact/0971.laser_eye_helmet/shot/shoot/damage_attenuation
#
#
#
# @within function asset:artifact/0971.laser_eye_helmet/shot/hit
# @within function asset:artifact/0971.laser_eye_helmet/shot/shoot/hit

# ダメージ減らす
scoreboard players operation $Distance_Damping Temporary -= $Appropriate_Distance Temporary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#> asset:artifact/0971.laser_eye_helmet/shot/hit
#> asset:artifact/0971.laser_eye_helmet/shot/shoot/hit
#
#
# @within function
# asset:artifact/0971.laser_eye_helmet/shot/3.main
# asset:artifact/0971.laser_eye_helmet/shot/bullet
# asset:artifact/0971.laser_eye_helmet/shot/shoot/
# asset:artifact/0971.laser_eye_helmet/shot/shoot/recursive

# 一定の距離から距離減衰するための距離(適正距離をメートル*2で指定)
scoreboard players set $Appropriate_Distance Temporary 5
Expand All @@ -12,7 +12,7 @@
# 最大ダメージ
scoreboard players add $Damage Temporary 50
# もし、適正距離じゃなかった場合、距離-適正距離=減少ダメージにする
execute if score $Distance_Damping Temporary >= $Appropriate_Distance Temporary run function asset:artifact/0971.laser_eye_helmet/shot/damage_attenuation
execute if score $Distance_Damping Temporary >= $Appropriate_Distance Temporary run function asset:artifact/0971.laser_eye_helmet/shot/shoot/damage_attenuation

# ダメージ設定
execute store result storage api: Argument.Damage float 1 run scoreboard players get $Damage Temporary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#> asset:artifact/0971.laser_eye_helmet/shot/bullet
#> asset:artifact/0971.laser_eye_helmet/shot/shoot/recursive
#
# ビーム部
#
# @within function
# asset:artifact/0971.laser_eye_helmet/shot/3.main
# asset:artifact/0971.laser_eye_helmet/shot/bullet
# asset:artifact/0971.laser_eye_helmet/shot/shoot/
# asset:artifact/0971.laser_eye_helmet/shot/shoot/recursive

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

Expand All @@ -16,14 +16,14 @@
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0] run tag @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0,limit=1] add LandingTarget

# 演出
particle minecraft:composter ~ ~ ~ 0.1 0.1 0.1 0 1
particle minecraft:dust 0.075 0.604 0.063 0.7 ~ ~ ~ 0 0 0 0 0
execute if predicate lib:random_pass_per/10 run particle minecraft:composter ~ ~ ~ 0.1 0.1 0.1 0 1
execute if predicate lib:random_pass_per/10 run particle minecraft:dust 0.075 0.604 0.063 0.35 ~ ~ ~ 0 0 0 0 0

# 距離減衰をするためにスコアを増やす
scoreboard players add $Distance_Damping Temporary 1

# 着弾
execute if entity @s[tag=Landing] run function asset:artifact/0971.laser_eye_helmet/shot/hit
execute if entity @s[tag=Landing] run function asset:artifact/0971.laser_eye_helmet/shot/shoot/hit

# 再起
execute positioned ^ ^ ^0.5 if entity @s[tag=!Landing,distance=..15] run function asset:artifact/0971.laser_eye_helmet/shot/bullet
execute positioned ^ ^ ^0.5 if entity @s[tag=!Landing,distance=..15] run function asset:artifact/0971.laser_eye_helmet/shot/shoot/recursive
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:artifact/0971.laser_eye_helmet/shot/spread
#
#
#
# @within function asset:artifact/0971.laser_eye_helmet/shot/3.main

# 前方拡散
data modify storage lib: Argument.Distance set value 3
data modify storage lib: Argument.Spread set value 0.1
function lib:forward_spreader/circle
execute facing entity @s eyes facing ^ ^ ^-1 positioned as @s positioned ^ ^ ^-11.5 as @p[tag=this] run function asset:artifact/0971.laser_eye_helmet/shot/shoot/

# Markerを消しておく
kill @s
Loading