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

エレメンタルソードの補正の対象をプレイヤーに変更 #287

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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

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,6 +3,7 @@
# 神器のメイン処理部
#
# @within function asset:artifact/0057.elemental_sword/trigger/2.check_condition

#> private
# @private
#declare score_holder $ElementalSwordAttack
Expand All @@ -17,9 +18,21 @@
execute store result score $ElementalSwordAttack Temporary run data get storage asset:context Items.mainhand.tag.TSB.RemainingCount
# 使用回数を3で剰余算
scoreboard players operation $ElementalSwordAttack Temporary %= $3 Const
# 属性を変える
execute if score $ElementalSwordAttack Temporary matches 0 as @e[type=#lib:living,type=!player,tag=Victim,distance=..10] at @s run function asset:artifact/0057.elemental_sword/trigger/3.1.fireattack
execute if score $ElementalSwordAttack Temporary matches 1 as @e[type=#lib:living,type=!player,tag=Victim,distance=..10] at @s run function asset:artifact/0057.elemental_sword/trigger/3.2.waterattack
execute if score $ElementalSwordAttack Temporary matches 2 as @e[type=#lib:living,type=!player,tag=Victim,distance=..10] at @s run function asset:artifact/0057.elemental_sword/trigger/3.3.thunderattack
# リセット
scoreboard players reset $ElementalSwordAttack Temporary

# 属性それぞれの演出
execute if score $ElementalSwordAttack Temporary matches 0 at @e[type=#lib:living,tag=Victim,distance=..10] run function asset:artifact/0057.elemental_sword/trigger/vfx/fire
execute if score $ElementalSwordAttack Temporary matches 1 at @e[type=#lib:living,tag=Victim,distance=..10] run function asset:artifact/0057.elemental_sword/trigger/vfx/water
execute if score $ElementalSwordAttack Temporary matches 2 at @e[type=#lib:living,tag=Victim,distance=..10] run function asset:artifact/0057.elemental_sword/trigger/vfx/thunder

# ダメージ
data modify storage api: Argument.Damage set value 80.0f
data modify storage api: Argument.AttackType set value "Physical"
execute if score $ElementalSwordAttack Temporary matches 0 run data modify storage api: Argument.ElementType set value "Fire"
execute if score $ElementalSwordAttack Temporary matches 1 run data modify storage api: Argument.ElementType set value "Water"
execute if score $ElementalSwordAttack Temporary matches 2 run data modify storage api: Argument.ElementType set value "Thunder"
function api:damage/modifier
execute as @e[type=#lib:living,tag=Victim,distance=..10] run function api:damage/
function api:damage/reset

# リセット
scoreboard players reset $ElementalSwordAttack Temporary
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:artifact/0057.elemental_sword/trigger/vfx/fire
#
# 火属性
#
# @within function asset:artifact/0057.elemental_sword/trigger/3.main

# 演出
particle minecraft:flame ~ ~0.5 ~ 0 0.5 0 0.1 100
playsound minecraft:entity.blaze.shoot player @a ~ ~ ~ 1 0.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:artifact/0057.elemental_sword/trigger/vfx/thunder
#
# 雷属性
#
# @within function asset:artifact/0057.elemental_sword/trigger/3.main

# 演出
particle crit ~ ~3 ~ 0.025 3 0.025 0 100 normal @a
playsound entity.lightning_bolt.thunder player @a ~ ~ ~ 1 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:artifact/0057.elemental_sword/trigger/vfx/water
#
# 水属性
#
# @within function asset:artifact/0057.elemental_sword/trigger/3.main

# 演出
particle minecraft:falling_water ~ ~1 ~ 0.4 1 0.4 1 100
particle minecraft:bubble_pop ~ ~0.5 ~ 0 0 0 0.2 100
playsound minecraft:item.bucket.fill player @a ~ ~ ~ 1 1
playsound minecraft:entity.generic.swim player @a ~ ~ ~ 1 1
Loading