Skip to content

Commit

Permalink
斬撃砲 アニメーション実装
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 10, 2024
1 parent b4a31fd commit 1ec0328
Show file tree
Hide file tree
Showing 8 changed files with 450 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#
# 斬撃飛ばしの偏差撃ち
#
# @within function asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/
# @within function
# asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/
# asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/

# 攻撃対象にTagを付与
tag @p[tag=!PlayerShouldInvulnerable,distance=..100] add AV.Temp.Target
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#> asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/
#
# 斬撃砲 アニメーション
#
# @within function asset:mob/0391.axia_first/ai/animation/

# 近くのプレイヤーの方を向く
# 一部の時間のみ向く処理を入れる
#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
tag @s remove AV.Temp.This

# アニメーション再生
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/9_0_zangekihou/play

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

# 斬撃砲
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/end
#
# 終了処理
#
# @within function asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/

# デバッグ用 アニメーションループ
scoreboard players set @s AV.AnimationNum 70
scoreboard players set @s AV.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start
#
# 斬撃砲発射
#
# @within function asset:mob/0391.axia_first/**

# 斬撃ソニックブーム
execute positioned ^ ^ ^3 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^6 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^9 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^12 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^15 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^18 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^21 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
execute positioned ^ ^ ^24 run function asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init

# VFX
function asset:mob/0391.axia_first/ai/projectile/zangekihou/3.vfx

# ダメージ判定
function asset:mob/0391.axia_first/ai/projectile/zangekihou/4.damage
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:mob/0391.axia_first/ai/projectile/zangekihou/2.effect_init
#
# 斬撃砲 ソニックブームエフェクト
#
# @within function asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start

summon item_display ^ ^ ^ {interpolation_duration:0,Tags:["AV.SlashEffectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.1f]},item:{id:"air",Count:1b}}

execute as @e[tag=AV.SlashEffectInit,distance=..0.1] run tp @s ^ ^ ^ ~ ~

execute as @e[tag=AV.SlashEffectInit,distance=..0.1] run function asset:mob/0391.axia_first/ai/projectile/sonic_boom/1.init

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#> asset:mob/0391.axia_first/ai/projectile/zangekihou/4.damage
#
# ダメージ判定
#
# @within function asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start

# 判定内にいるプレイヤーをタグ付け
execute positioned ^ ^ ^2 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target
execute positioned ^ ^ ^6 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target
execute positioned ^ ^ ^10 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target
execute positioned ^ ^ ^14 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target
execute positioned ^ ^ ^18 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target
execute positioned ^ ^ ^22 positioned ~-2 ~-2 ~-2 as @a[tag=!PlayerShouldInvulnerable,dx=3,dy=3,dz=3] run tag @s add AV.Temp.Target

# ダメージ
# 引数の設定
# 与えるダメージ
data modify storage lib: Argument.Damage set value 55.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=AV.Temp.Target] at @s run function lib:damage/
# リセット
function lib:damage/reset

# タグ外し
tag @a[tag=AV.Temp.Target] remove AV.Temp.Target
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# スコア初期化
scoreboard players set @s AV.AnimationTick 0
scoreboard players set @s AV.AnimationNum 62
scoreboard players set @s AV.AnimationNum 70
scoreboard players set @s AV.SkillSelect 0

# animated javaモデル召喚
Expand Down

0 comments on commit 1ec0328

Please sign in to comment.