Skip to content

Commit

Permalink
予告線 実装 ワープ斬撃 実装
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 11, 2024
1 parent 78fd57c commit b10d58c
Show file tree
Hide file tree
Showing 33 changed files with 454 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
#declare tag AV.SlashEffect
#declare tag AV.SlashEffectMini
#declare tag AV.SlashEffectInit
#declare tag AV.SlashEffectInbisible
#declare tag AV.Inbisible
#declare tag AV.SlashSonicInit
#declare tag AV.SlashSonic
#declare tag AV.Predict
#declare tag AV.SonicBoomEffect
#declare tag AV.AnnounceInit
#declare tag AV.AnnounceLine

#> val
# @within function asset:mob/0391.axia_first/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@

# 斬撃砲
execute if score @s AV.AnimationNum matches 70 run function asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/

# ワープ斬撃(隙ありアリー!)
execute if score @s AV.AnimationNum matches 80 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@

# 斬撃飛ばし
execute if score @s AV.AnimationTick matches 51 run function asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/slash_sonic_start

# 予告線
execute if score @s AV.AnimationTick matches 41 run function asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/announce_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/announce_line
#
# 予告線 召喚
#
# @within function
# asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/

execute anchored eyes run summon item_display ^ ^ ^2 {interpolation_duration:0,teleport_duration:0,Tags:["AV.AnnounceInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0.383f,0.924f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,13.5f],scale:[0.1f,0.1f,25f]},item:{id:"air",Count:1b}}

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AV.AnnounceInit,distance=..0.1] run tp @s ^ ^ ^ ~ ~

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AV.AnnounceInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/announce_line/1.init.m {Num:-10}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
#
# @within function asset:mob/0391.axia_first/ai/animation/

# 対象プレイヤー保存
execute if score @s AV.AnimationTick matches 1 run scoreboard players operation @s AV.UUID = @p[tag=!PlayerShouldInvulnerable,distance=..100] UserID

# 近くのプレイヤーの方を向く
# 一部の時間のみ向く処理を入れる
#ToDo ハードのみ41~50間は偏差処理を入れつつ向く
tag @s add AV.Temp.This
execute if score @s AV.AnimationTick matches 1..16 if predicate api:global_vars/difficulty/max/normal as @p[tag=!PlayerShouldInvulnerable,distance=..100] run function asset:mob/0391.axia_first/ai/general/2.rotate
execute if score @s AV.AnimationTick matches 1..16 if predicate api:global_vars/difficulty/min/hard if entity @p[distance=..100] run function asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/predict/
execute if score @s AV.AnimationTick matches 31..33 as @p[tag=!PlayerShouldInvulnerable,distance=..100] run function asset:mob/0391.axia_first/ai/general/2.rotate
scoreboard players operation $AV.Temp AV.UUID = @s AV.UUID
execute if score @s AV.AnimationTick matches 1..16 if predicate api:global_vars/difficulty/max/normal as @a if score @s UserID = $AV.Temp AV.UUID run function asset:mob/0391.axia_first/ai/general/2.rotate
execute if score @s AV.AnimationTick matches 1..18 if predicate api:global_vars/difficulty/min/hard as @a if score @s UserID = $AV.Temp AV.UUID run function asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/rotate
execute if score @s AV.AnimationTick matches 31..33 as @a if score @s UserID = $AV.Temp AV.UUID run function asset:mob/0391.axia_first/ai/general/2.rotate
scoreboard players reset $AV.Temp AV.UUID
tag @s remove AV.Temp.This

# アニメーション再生
Expand All @@ -22,3 +26,6 @@
# 斬撃砲
execute positioned ^ ^1.25 ^ if score @s AV.AnimationTick matches 26 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start
execute positioned ^ ^1.25 ^ if score @s AV.AnimationTick matches 37 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start

# 予告線
execute if score @s AV.AnimationTick matches 1 run function asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/announce_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/announce_line
#
# 予告線 召喚
#
# @within function
# asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/

execute anchored eyes run summon item_display ^ ^ ^2 {interpolation_duration:0,teleport_duration:0,Tags:["AV.AnnounceInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0.383f,0.924f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,13.5f],scale:[0.1f,0.1f,25f]},item:{id:"air",Count:1b}}

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AV.AnnounceInit,distance=..0.1] run tp @s ^ ^ ^ ~ ~

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AV.AnnounceInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/announce_line/1.init.m {Num:-25}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
# デバッグ用 アニメーションループ
scoreboard players set @s AV.AnimationNum 70
scoreboard players set @s AV.AnimationTick 0

# デバッグ用
scoreboard players reset @s AV.UUID
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/rotate
#
# ハード用回転
#
# @within function asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/

# タグ付与
tag @s add AV.Temp.Target
# プレイヤーの方向を確実に向く
execute as @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] at @s facing entity @e[tag=AV.Temp.Target,distance=..66,limit=1] feet run tp @s ^ ^ ^ ~ 0
# 終了
tag @s remove AV.Temp.Target
tag @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64] remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/
#
# ワープ斬撃(隙ありアリー!) アニメーション
#
# @within function asset:mob/0391.axia_first/ai/animation/

# アニメーション再生
execute if score @s AV.AnimationTick matches 1 as @e[type=item_display,tag=AV.Root.This,distance=..100] run function animated_java:axia/animations/10_0_warp_start/play

# アニメーション再生
execute if score @s AV.AnimationTick matches 40 as @e[type=item_display,tag=AV.Root.This,distance=..100] run function animated_java:axia/animations/10_1_warp_slash_0/play

# アニメーション再生
execute if score @s AV.AnimationTick matches 71 as @e[type=item_display,tag=AV.Root.This,distance=..100] run function animated_java:axia/animations/10_2_warp_slash_1/play

# アニメーション再生
execute if score @s AV.AnimationTick matches 121 as @e[type=item_display,tag=AV.Root.This,distance=..100] run function animated_java:axia/animations/10_3_warp_slash_2/play

# アニメーション終了処理
execute if score @s AV.AnimationTick matches 187 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/end

# 斬撃エフェクト
execute if score @s AV.AnimationTick matches 44 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/1
execute if score @s AV.AnimationTick matches 59 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/2
execute if score @s AV.AnimationTick matches 84 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/3
execute if score @s AV.AnimationTick matches 110 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/4
execute if score @s AV.AnimationTick matches 136 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/5

# 斬撃エフェクト回転
execute if score @s AV.AnimationTick matches 137..143 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_rotate
execute if score @s AV.AnimationTick matches 144..151 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_rotate2

# ダメージ判定
execute if score @s AV.AnimationTick matches 44 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/1
execute if score @s AV.AnimationTick matches 59 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/1
execute if score @s AV.AnimationTick matches 84 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/1
execute if score @s AV.AnimationTick matches 110 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/1
execute if score @s AV.AnimationTick matches 136 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/2
execute if score @s AV.AnimationTick matches 147 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/2

# サウンド
execute if score @s AV.AnimationTick matches 1..29 run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/warp_sound
execute if score @s AV.AnimationTick matches 42 run function asset:mob/0391.axia_first/ai/general/5.slash_sound
execute if score @s AV.AnimationTick matches 57 run function asset:mob/0391.axia_first/ai/general/5.slash_sound
execute if score @s AV.AnimationTick matches 82 run function asset:mob/0391.axia_first/ai/general/5.slash_sound
execute if score @s AV.AnimationTick matches 108 run function asset:mob/0391.axia_first/ai/general/5.slash_sound
execute if score @s AV.AnimationTick matches 134 run function asset:mob/0391.axia_first/ai/general/5.slash_sound
execute if score @s AV.AnimationTick matches 145 run function asset:mob/0391.axia_first/ai/general/5.slash_sound

# ワープする
execute if score @s AV.AnimationTick matches 29 if predicate api:global_vars/difficulty/max/normal at @r[tag=!PlayerShouldInvulnerable,distance=..100] rotated ~ 0 positioned ^ ^ ^4 rotated ~180 ~ run tp @s ^ ^ ^ ~ 0
execute if score @s AV.AnimationTick matches 69 if predicate api:global_vars/difficulty/max/normal at @r[tag=!PlayerShouldInvulnerable,distance=..100] rotated ~ 0 positioned ^ ^ ^4 rotated ~180 ~ run tp @s ^ ^ ^ ~ 0
execute if score @s AV.AnimationTick matches 120 if predicate api:global_vars/difficulty/max/normal at @r[tag=!PlayerShouldInvulnerable,distance=..100] rotated ~ 0 positioned ^ ^ ^4 rotated ~180 ~ run tp @s ^ ^ ^ ~ 0
execute if score @s AV.AnimationTick matches 29 if predicate api:global_vars/difficulty/min/hard at @s run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/warp/
execute if score @s AV.AnimationTick matches 69 if predicate api:global_vars/difficulty/min/hard at @s run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/warp/
execute if score @s AV.AnimationTick matches 120 if predicate api:global_vars/difficulty/min/hard at @s run function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/warp/
execute if score @s AV.AnimationTick matches 29 run function asset:mob/0391.axia_first/ai/general/3.teleport_effect/
execute if score @s AV.AnimationTick matches 69 run function asset:mob/0391.axia_first/ai/general/3.teleport_effect/
execute if score @s AV.AnimationTick matches 120 run function asset:mob/0391.axia_first/ai/general/3.teleport_effect/
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/1
#
# 斬撃ダメージ判定1
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# ダメージ
# 引数の設定
# 与えるダメージ
data modify storage lib: Argument.Damage set value 42.0f
# 第一属性
data modify storage lib: Argument.AttackType set value "Physical"
# 第二属性
data modify storage lib: Argument.ElementType set value "Fire"
# デスログ
data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sによって無惨に切り裂かれた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]'
# 補正functionを実行
function lib:damage/modifier
# ダメージを与える
execute positioned ^ ^ ^1.5 as @a[tag=!PlayerShouldInvulnerable,distance=..3] at @s run function lib:damage/
# リセット
function lib:damage/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/damage/2
#
# 斬撃ダメージ判定2
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# ダメージ
# 引数の設定
# 与えるダメージ
data modify storage lib: Argument.Damage set value 50.0f
# 第一属性
data modify storage lib: Argument.AttackType set value "Physical"
# 第二属性
data modify storage lib: Argument.ElementType set value "Fire"
# デスログ
data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sによって無惨に切り裂かれた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]'
# 補正functionを実行
function lib:damage/modifier
# ダメージを与える
execute as @a[tag=!PlayerShouldInvulnerable,distance=..5] at @s run function lib:damage/
# リセット
function lib:damage/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/end
#
# 終了処理
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# デバッグ用 アニメーションループ
scoreboard players set @s AV.AnimationNum 80
scoreboard players set @s AV.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_rotate
#
# 斬撃エフェクトを回転させる
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# 幾何学を使用して回転させる
execute as @e[tag=AV.SlashEffect,distance=..5,sort=nearest,limit=1] at @s facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~205 0 positioned as @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] positioned ^ ^1.5 ^1.581 run tp @s ^ ^ ^ ~ ~

# Tempタグ消去
tag @s remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_rotate2
#
# 斬撃エフェクトを回転させる
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# 幾何学を使用して回転させる
execute as @e[tag=AV.SlashEffect,distance=..5,sort=nearest,limit=1] at @s facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~220 0 positioned as @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] positioned ^ ^1.5 ^1.581 run tp @s ^ ^ ^ ~ ~

# Tempタグ消去
tag @s remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/1
#
# 斬撃エフェクト召喚1
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# ディスプレイ召喚
summon item_display ^0 ^1.2 ^1 {interpolation_duration:0,Tags:["AV.SlashEffectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0.561f,-0.430f,0.5610f,0.430f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.1f]},item:{id:"air",Count:1b}}

# ディスプレイの位置調整
execute positioned ^0 ^1.2 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~180 0 run tp @s ^ ^ ^ ~ ~

# 斬撃エフェクト初期化
execute positioned ^0 ^1.2 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/slash_effect/1.init.m {Num:-8}

# Tempタグ消去
tag @s remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/2
#
# 斬撃エフェクト召喚2
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# ディスプレイ召喚
summon item_display ^-0.5 ^1 ^1 {interpolation_duration:0,Tags:["AV.SlashEffectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[-0.5f,-0.5f,-0.5f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.1f]},item:{id:"air",Count:1b}}

# ディスプレイの位置調整
execute positioned ^-0.5 ^1 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~180 0 run tp @s ^ ^ ^ ~ ~

# 斬撃エフェクト初期化
execute positioned ^-0.5 ^1 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/slash_effect/1.init.m {Num:-8}

# Tempタグ消去
tag @s remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/3
#
# 斬撃エフェクト召喚3
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# ディスプレイ召喚
summon item_display ^-0.5 ^0.85 ^1 {interpolation_duration:0,Tags:["AV.SlashEffectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[-0.5f,-0.5f,-0.5f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.1f]},item:{id:"air",Count:1b}}

# ディスプレイの位置調整
execute positioned ^-0.5 ^0.85 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~180 0 run tp @s ^ ^ ^ ~ ~

# 斬撃エフェクト初期化
execute positioned ^-0.5 ^0.85 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/slash_effect/1.init.m {Num:-8}

# Tempタグ消去
tag @s remove AV.Temp.This
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/slash_summon/4
#
# 斬撃エフェクト召喚4
#
# @within function asset:mob/0391.axia_first/ai/animation/8_0_warp_slash/

# Tempタグ付与
tag @s add AV.Temp.This

# ディスプレイ召喚
summon item_display ^0 ^1.6 ^1 {interpolation_duration:0,Tags:["AV.SlashEffectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0.561f,-0.430f,0.5610f,0.430f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.1f]},item:{id:"air",Count:1b}}

# ディスプレイの位置調整
execute positioned ^0 ^1.6 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] facing entity @e[type=wither_skeleton,tag=AV.Temp.This,distance=..64,sort=nearest,limit=1] feet rotated ~180 0 run tp @s ^ ^ ^ ~ ~

# 斬撃エフェクト初期化
execute positioned ^0 ^1.6 ^1 as @e[tag=AV.SlashEffectInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/slash_effect/1.init.m {Num:-8}

# Tempタグ消去
tag @s remove AV.Temp.This
Loading

0 comments on commit b10d58c

Please sign in to comment.