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

♻️ [Object1055-1056] エレメンタルファミリアのObjectを移行 #331

Merged
merged 14 commits into from
Dec 5, 2024
Merged

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,5 @@
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね
function asset:artifact/common/check_condition/auto

# 既に召喚済みなら使えない。タグ付与じゃないと残ってるファミリアの数だけコマンドが実行されてしまう。つまりめっちゃうるさい。
execute at @e[type=armor_stand,tag=87.Familiar] if score @s UserID = @e[type=armor_stand,tag=87.Familiar,distance=..0.01,sort=nearest,limit=1] 87.UserID run tag @s add 87.CannotUse
execute if entity @s[tag=87.CannotUse] run tag @s remove CanUsed
execute if entity @s[tag=87.CannotUse] run function asset:artifact/0295.call_elemental_familiar/trigger/3.cannot_use

# CanUsedタグをチェックして3.main.mcfunctionを実行する
execute if entity @s[tag=CanUsed] run function asset:artifact/0295.call_elemental_familiar/trigger/3.main
execute if entity @s[tag=CanUsed] run function asset:artifact/0295.call_elemental_familiar/trigger/3.main

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@

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

# 精霊召喚
execute rotated ~ 0 run summon armor_stand ^2 ^ ^ {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]}
execute rotated ~ 0 run summon armor_stand ^ ^ ^-2 {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]}
execute rotated ~ 0 run summon armor_stand ^-2 ^ ^ {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]}

# 精霊Init
execute as @e[type=armor_stand,tag=87.FamiliarInit,distance=..5] at @s run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/1.init
# 精霊を3体召喚する
execute rotated ~ 0 positioned ^2 ^ ^ run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy
execute rotated ~ 0 positioned ^ ^ ^-2 run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy
execute rotated ~ 0 positioned ^-2 ^ ^ run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy

# 音とパーティクル neutralになってるのは妖精側の音だから
playsound minecraft:item.bottle.fill_dragonbreath player @a ~ ~ ~ 2 2
playsound minecraft:entity.experience_orb.pickup player @a ~ ~ ~ 2 1.75
playsound minecraft:entity.ender_eye.death player @a ~ ~ ~ 2 2
playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 1.75
playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 2

# 精霊さんを動かす
schedule function asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick 1t replace

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.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#> asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy
#
#
#
# @within function asset:artifact/0295.call_elemental_familiar/trigger/3.main

#> Private
# @private
#declare score_holder $Random

# 乱数
execute store result score $Random Temporary run function lib:random/
scoreboard players operation $Random Temporary %= $3 Const

# ダメージ設定
data modify storage api: Argument.FieldOverride.Damage set value 40.0f

# 属性を決める
execute if score $Random Temporary matches 0 run data modify storage api: Argument.FieldOverride.Element set value "Fire"
execute if score $Random Temporary matches 1 run data modify storage api: Argument.FieldOverride.Element set value "Thunder"
execute if score $Random Temporary matches 2 run data modify storage api: Argument.FieldOverride.Element set value "Water"

# 召喚する
data modify storage api: Argument.ID set value 1055
execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID
function api:object/summon

# リセット
scoreboard players reset $Random Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/1055.elemental_fish/_index.d
# @private

#> tag
# @within function asset:object/1055.elemental_fish/**
#declare tag 1055.Forward
#declare tag 1055.Upper
#declare tag 1055.Lower
Loading
Loading