Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ [Artifact 1065] 魔弾の処理をObjectAssetへ移行 & 魔法陣の回転を実装 #1079

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bf4e9ce
[Object 1045] 魔弾の魔法陣を作成
Lapis-LJA Mar 9, 2025
07a2db8
[Object 1046] 魔弾を作成
Lapis-LJA Mar 9, 2025
528a528
神器側を修正 7発目がプレイヤーを狙う処理以外は終わり
Lapis-LJA Mar 9, 2025
bdeeb2c
DisplayDelay ⇢ Delay
Lapis-LJA Mar 9, 2025
712a54d
Interpolationをフィールドで定義するように
Lapis-LJA Mar 9, 2025
d7fe79f
_index.dを最小限に
Lapis-LJA Mar 9, 2025
cac0dd7
マクロに必要な引数をIMP-Docに記述
Lapis-LJA Mar 9, 2025
ce96c04
召喚する魔法陣のscaleがおかしいのを修正
Lapis-LJA Mar 9, 2025
39695c6
サブコマンドを短縮
Lapis-LJA Mar 9, 2025
72fa8bc
NonPlayerとPlayerでのダメージ計算で使うスコアホルダーを別のものに修正
Lapis-LJA Mar 9, 2025
41ce7ee
ランダムなプレイヤーの後ろから弾が出る処理を実装
Lapis-LJA Mar 9, 2025
75e138a
プレイヤーに対して当たらない問題を修正
Lapis-LJA Mar 9, 2025
cb743b5
IDがあるときのみスコアに代入するように
Lapis-LJA Mar 9, 2025
b720290
コメント等を修正
Lapis-LJA Mar 9, 2025
6881800
ダメージを計算式ではなく1発ごとに定義するように
Lapis-LJA Mar 9, 2025
df2159d
魔法陣の回転を実装
Lapis-LJA Mar 9, 2025
2a24751
PlayerShouldInvernerableをターゲットにしない/ダメージを与えないように
Lapis-LJA Mar 9, 2025
1042e07
魔法陣の回転処理のwithinを修正
Lapis-LJA Mar 9, 2025
2d483ef
神器の説明を修正
Lapis-LJA Mar 9, 2025
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":"#4F5BFF"}'
# 神器の説明文 (TextComponentString[])
data modify storage asset:artifact Lore set value ['{"text":"敵味方を無差別に貫く弾丸を放つ","color":"white"}','{"text":"残り弾数が減るほど与えるダメージが上昇する","color":"white"}','{"text":"7つ目の弾丸は50%の確率でランダムなプレイヤーを狙う","color":"white"}','{"text":"弾が切れても自動でリロードされる","color":"white"}','{"text":"「最後の弾丸は愛する人の頭を貫くだろう。」","color":"gray"}']
data modify storage asset:artifact Lore set value ['{"text":"敵味方を無差別に貫く弾丸を放つ","color":"white"}','{"text":"残り弾数が減るほど与えるダメージが上昇する","color":"white"}','{"text":"7つ目の弾丸は50%の確率でランダムなプレイヤーを狙う","color":"white"}','{"text":"弾が切れても自動でリロードされる","color":"white"}','{"text":"「最後の弾丸は愛する人の頭を貫くだろう。」","color":"gray"}']
# MP以外の消費物 (TextComponentString) (オプション)
# data modify storage asset:artifact CostText set value
# 使用回数 (int) (オプション)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,61 @@

# 7回目なら確率でプレイヤーを狙うTagを付与
execute if score $UseCount Temporary matches 7 if predicate lib:random_pass_per/50 run tag @s add TL.AimToPlayer
#execute if score $UseCount Temporary matches 7 run tag @s add TL.AimToPlayer

# 魔弾を召喚
execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 summon marker run function asset:artifact/1065.magic_bullet/trigger/5.init_bullet
# debug
# tag @s add TL.AimToPlayer
# scoreboard players set $UseCount Temporary 7

# プレイヤーのRotationをstorageに入れる
data modify storage asset:temp TL.Rotation set from entity @s Rotation
# プレイヤーを狙う状態なら、ランダムなIDを用意する
execute if entity @s[tag=TL.AimToPlayer] store result score $Random Temporary run random value 0..65535

# マクロを使って魔法陣を召喚
# 魔法陣を召喚
# 使用回数に応じて魔法陣の召喚数を増やす
# プレイヤーを狙う状態の際は魔方陣を1つ追加
execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL
execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL
execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL
execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL
execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2,LeftRotate:false}
execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4,LeftRotate:true}
execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2,LeftRotate:false}
execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2,LeftRotate:true}

# プレイヤーを狙う状態の時に実行
execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/4.aim_to_player
# 魔弾を召喚する

# ダメージ定義
# 非プレイヤー
# 7発目なら強制的に2000
execute if score $UseCount Temporary matches 1 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 500f
execute if score $UseCount Temporary matches 2 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 650f
execute if score $UseCount Temporary matches 3 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 800f
execute if score $UseCount Temporary matches 4 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 950f
execute if score $UseCount Temporary matches 5 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 1050f
execute if score $UseCount Temporary matches 6 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 1350f
execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 2000f

# プレイヤー
# 7発目なら強制的に50
execute if score $UseCount Temporary matches 1 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 25.0f
execute if score $UseCount Temporary matches 2 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 27.5f
execute if score $UseCount Temporary matches 3 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 30.0f
execute if score $UseCount Temporary matches 4 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 32.5f
execute if score $UseCount Temporary matches 5 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 35.0f
execute if score $UseCount Temporary matches 6 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 37.5f
execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 50.0f

# スケジュールループ
schedule function asset:artifact/1065.magic_bullet/trigger/loop/ 1t replace
# プレイヤーを狙う状態に弾に渡すデータ
# $RandomをIDとして渡す
execute if entity @s[tag=TL.AimToPlayer] store result storage api: Argument.FieldOverride.ID int 1 run scoreboard players get $Random Temporary
execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.AimToPlayer set value true

# 魔弾を召喚
data modify storage api: Argument.ID set value 1046
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 run function api:object/summon

# プレイヤーを狙う状態の時に実行
execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/summon_square/aim_to_player

# 使用回数が0になったら再度give
execute unless data storage asset:context Items.mainhand.id run playsound block.iron_trapdoor.close player @a ~ ~ ~ 0.7 0.7
execute unless data storage asset:context Items.mainhand.id run playsound entity.horse.armor player @p ~ ~ ~ 0.6 0.7
execute unless data storage asset:context Items.mainhand.id run playsound entity.horse.armor player @a ~ ~ ~ 0.6 0.7
execute unless data storage asset:context Items.mainhand.id run data modify storage api: Argument.ID set value 1065
execute unless data storage asset:context Items.mainhand.id run function api:artifact/replace/from_id

Expand All @@ -50,5 +80,5 @@
scoreboard players reset $7 Temporary
scoreboard players reset $UseCount Temporary
scoreboard players reset $RemainCount Temporary
scoreboard players reset $SquareCount Temporary
data remove storage asset:temp TL
scoreboard players reset $Damage Temporary
scoreboard players reset $Random Temporary

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@

#> tag
# @within function asset:artifact/1065.magic_bullet/trigger/**
#declare tag TL.Bullet
#declare tag TL.Square
#declare tag TL.LoopTarget
#declare tag TL.Init
#declare tag TL.AimToPlayer
#declare tag TL.TargetPlayer
#declare tag TL.TeleportPosition
#declare tag TL.TargetEntity
#declare score_holder $Recursive
#declare score_holder $UseCount
#declare score_holder $RemainCount
#declare score_holder $SquareCount
#declare score_holder $7
#declare score_holder $Damage
#declare score_holder $Random

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading