diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/give/2.give.mcfunction index 75b7030602..576041d149 100644 --- a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/give/2.give.mcfunction +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/give/2.give.mcfunction @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/3.main.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/3.main.mcfunction index 3f0f16db78..1c5d355e47 100644 --- a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/3.main.mcfunction @@ -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 @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/.mcfunction new file mode 100644 index 0000000000..62065c0f7b --- /dev/null +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/.mcfunction @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/damage_attenuation.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/damage_attenuation.mcfunction similarity index 77% rename from Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/damage_attenuation.mcfunction rename to Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/damage_attenuation.mcfunction index c1f3e0343e..8dd0c6dae6 100644 --- a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/damage_attenuation.mcfunction +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/damage_attenuation.mcfunction @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/hit.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/hit.mcfunction similarity index 83% rename from Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/hit.mcfunction rename to Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/hit.mcfunction index 4bf918b12c..307d872f2d 100644 --- a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/hit.mcfunction +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/hit.mcfunction @@ -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 @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/bullet.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/recursive.mcfunction similarity index 66% rename from Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/bullet.mcfunction rename to Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/recursive.mcfunction index a5cb4319f3..0c009c678c 100644 --- a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/bullet.mcfunction +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/shoot/recursive.mcfunction @@ -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 # ここから先は神器側の効果の処理を書く @@ -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 diff --git a/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/spread.mcfunction b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/spread.mcfunction new file mode 100644 index 0000000000..783ce2b7c6 --- /dev/null +++ b/Asset/data/asset/functions/artifact/0971.laser_eye_helmet/shot/spread.mcfunction @@ -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