Skip to content

Commit

Permalink
シャイニングレイ実装
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 25, 2024
1 parent b035b13 commit 6624e2a
Show file tree
Hide file tree
Showing 23 changed files with 513 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# @within function asset:mob/0391.axia_first/ai/animation/10_0_kourai/

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 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,20f],scale:[0.1f,0.1f,40f]},item:{id:"air",Count:1b}}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @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 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,20f],scale:[0.1f,0.1f,40f]},item:{id:"air",Count:1b}}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
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
execute if score @s AV.AnimationTick matches 26 positioned ^ ^1.25 ^ run function asset:mob/0391.axia_first/ai/projectile/zangekihou/1.start
execute if score @s AV.AnimationTick matches 37 positioned ^ ^1.25 ^ 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
Expand Up @@ -6,7 +6,7 @@
# asset:mob/0391.axia_first/ai/animation/7_0_zangekihou/
# asset:mob/0391.axia_first/ai/animation/9_0_dimension_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 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,20f],scale:[0.1f,0.1f,40f]},item:{id:"air",Count:1b}}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
# 補正functionを実行
function lib:damage/modifier
# ダメージを与える
execute as @a[tag=AV.Temp.Target] at @s run function lib:damage/
execute as @a[tag=AV.Temp.Target,distance=..100] at @s run function lib:damage/
# リセット
function lib:damage/reset

# タグ外し
tag @a[tag=AV.Temp.Target] remove AV.Temp.Target
tag @a[tag=AV.Temp.Target,distance=..100] remove AV.Temp.Target
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#declare tag AW.ProjectileInit
#declare tag AW.WaterMagic
#declare tag AW.WaterMagicDisplay
#declare tag AW.AnnounceLine
#declare tag AW.Inbisible
#declare tag AW.AnnounceInit

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

# 魔導書召喚
execute if score @s AW.AnimationNum matches 40 run function asset:mob/0392.ecual_first/ai/animation/4_0_summon_book/

# シャイニングレイ
execute if score @s AW.AnimationNum matches 50 run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#> asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/
#
# シャイニングレイ
#
# @within function asset:mob/0392.ecual_first/ai/animation/

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

# 近くのプレイヤーの方を向く
tag @s add AW.Temp.This
scoreboard players operation $AW.Temp AW.UUID = @s AW.UUID
execute if predicate api:global_vars/difficulty/max/normal as @a if score @s UserID = $AW.Temp AW.UUID run function asset:mob/0392.ecual_first/ai/general/2.rotate
execute if predicate api:global_vars/difficulty/min/hard if score @s AW.AnimationTick matches 1..78 as @a if score @s UserID = $AW.Temp AW.UUID run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/rotate
execute if predicate api:global_vars/difficulty/min/hard if score @s AW.AnimationTick matches 83..98 as @a if score @s UserID = $AW.Temp AW.UUID run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/rotate
execute if predicate api:global_vars/difficulty/min/hard if score @s AW.AnimationTick matches 103..118 as @a if score @s UserID = $AW.Temp AW.UUID run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/rotate
scoreboard players reset $AW.Temp AW.UUID
tag @s remove AW.Temp.This

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

# アニメーション終了処理
execute if score @s AW.AnimationTick matches 161 run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/end

# 予告線表示
execute if score @s AW.AnimationTick matches 52 run function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/announce_line

# レーザー発射
execute if score @s AW.AnimationTick matches 82 positioned ^ ^1.25 ^ run function asset:mob/0392.ecual_first/ai/projectile/shining_ray/1.start
execute if score @s AW.AnimationTick matches 102 positioned ^ ^1.25 ^ run function asset:mob/0392.ecual_first/ai/projectile/shining_ray/1.start
execute if score @s AW.AnimationTick matches 122 positioned ^ ^1.25 ^ run function asset:mob/0392.ecual_first/ai/projectile/shining_ray/1.start
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/announce_line
#
# 予告線表示
#
# @within function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/

execute anchored eyes run summon item_display ^ ^ ^2 {interpolation_duration:0,teleport_duration:0,Tags:["AW.AnnounceInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0.383f,0.924f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,20f],scale:[0f,0f,40f]},item:{id:"minecraft:white_stained_glass",Count:1b}}

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

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AW.AnnounceInit,distance=..0.1] run function asset:mob/0392.ecual_first/ai/projectile/announce_line/1.init.m {Num:-30}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/end
#
# シャイニングレイ
#
# @within function asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 50
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/rotate
#
# プレイヤーの向きにピッタリ回転
#
# @within function
# asset:mob/0392.ecual_first/ai/animation/5_0_shining_ray/

# タグ付与
tag @s add AW.Temp.Target
# プレイヤーの方向を確実に向く
execute as @e[type=wither_skeleton,tag=AW.Temp.This,distance=..64,sort=nearest,limit=1] at @s facing entity @e[tag=AW.Temp.Target,distance=..66,limit=1] feet run tp @s ^ ^ ^ ~ 0
# 終了
tag @s remove AW.Temp.Target
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:mob/0392.ecual_first/ai/projectile/announce_line/1.init.m
#
# 予告線の初期化処理
#
# @input args
# Num : int
# @within function asset:mob/0392.ecual_first/**

# tag AV.AnnounceInitを持つDisplayに対して使用すること

# スコア初期化
$scoreboard players set @s AW.ProjectileTick $(Num)

# 初期化タグ消去
tag @s add AW.AnnounceLine
tag @s add AW.Inbisible
tag @s remove AW.AnnounceInit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#> asset:mob/0392.ecual_first/ai/projectile/announce_line/2.tick
#
# 予告線 Tick処理
#
# @within function asset:mob/0392.ecual_first/tick/

# スコアが正かつ透明状態なら可視化
execute if score @s AW.ProjectileTick matches 1.. if entity @s[tag=AW.Inbisible] run data merge entity @s {teleport_duration:1,transformation:{scale:[0.1f,0.1f,40f]}}
execute if score @s AW.ProjectileTick matches 1.. if entity @s[tag=AW.Inbisible] run tag @s remove AW.Inbisible

# スコア反転
execute if score @s AW.ProjectileTick matches ..-1 run scoreboard players operation @s AW.ProjectileTick *= $-1 Const

# 音
execute if score @s AW.ProjectileTick matches 1.. as @a[tag=!PlayerShouldInvulnerable,distance=..32] at @s run playsound entity.illusioner.prepare_mirror hostile @s ~ ~ ~ 1 2 0

# TP
execute positioned ^ ^1.2 ^ run tp @s ^ ^ ^ ~ ~

# スコアが1以下ならキル
execute if score @s AW.ProjectileTick matches 1 run kill @s

# スコア減少
scoreboard players remove @s AW.ProjectileTick 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:mob/0391.axia_first/ai/projectile/announce_line/debug
#
# デバッグ用
#
# @user
# @private

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

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

execute anchored eyes positioned ^ ^ ^2 as @e[tag=AW.AnnounceInit,distance=..0.1] run function asset:mob/0392.ecual_first/ai/projectile/announce_line/1.init.m {Num:-20}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0392.ecual_first/ai/projectile/shining_ray/1.start
#
# 斬撃砲発射
#
# @within function asset:mob/0392.ecual_first/**

# VFX
function asset:mob/0392.ecual_first/ai/projectile/shining_ray/2.vfx

# ダメージ判定
function asset:mob/0392.ecual_first/ai/projectile/shining_ray/3.damage

# サウンド
playsound entity.warden.sonic_boom hostile @a[distance=..32] ~ ~ ~ 1 1.5 0
playsound block.end_portal.spawn hostile @a[distance=..32] ~ ~ ~ 0.25 2 0.0
playsound block.respawn_anchor.deplete hostile @a[distance=..32] ~ ~ ~ 2 2 0.0
playsound block.respawn_anchor.deplete hostile @a[distance=..32] ~ ~ ~ 2 1.95 0.0
playsound ogg:block.amethyst.step6 hostile @a[distance=..32] ~ ~ ~ 2 2 0
playsound ogg:block.amethyst.step6 hostile @a[distance=..32] ~ ~ ~ 2 1.975 0
playsound ogg:block.amethyst.step6 hostile @a[distance=..32] ~ ~ ~ 2 1.95 0
playsound ogg:block.amethyst.step6 hostile @a[distance=..32] ~ ~ ~ 2 1.925 0
Loading

0 comments on commit 6624e2a

Please sign in to comment.