Skip to content

Commit

Permalink
ハイドロストーム 仮完成
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 28, 2024
1 parent d80abe2 commit 9e7362d
Show file tree
Hide file tree
Showing 36 changed files with 242 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#declare tag AW.QuietusRain
#declare tag AW.QuietusRainMagic
#declare tag AW.WaterWall
#declare tag AW.HydroStorm
#declare tag AW.HydroStormFirst

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

# ウォーターウォール
execute if score @s AW.AnimationNum matches 90 run function asset:mob/0392.ecual_first/ai/animation/9_0_water_wall/

# ハイドロストーム
execute if score @s AW.AnimationNum matches 100 run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#> asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/
#
# ハイドロストーム アニメーション
#
# @within function asset:mob/0392.ecual_first/ai/animation/

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

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

# 両手からハイドロ召喚
execute if score @s AW.AnimationTick matches 36 run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/1

# 最初のハイドロは一旦消す
execute if score @s AW.AnimationTick matches 61 as @e[type=item_display,tag=AW.HydroStormFirst,distance=..200] run function asset:mob/0392.ecual_first/ai/projectile/hydro/4.kill

# プレイヤー追従ハイドロ
execute if score @s AW.AnimationTick matches 61 at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
execute if score @s AW.AnimationTick matches 96 at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
execute if score @s AW.AnimationTick matches 121 at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
execute if score @s AW.AnimationTick matches 121 at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
execute if predicate api:global_vars/difficulty/min/hard if score @s AW.AnimationTick matches 121 at @e[type=marker,tag=AW.Marker.SummonPoint,distance=..100] run function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/end
#
# 終了処理
#
# @within function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 100
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/1
#
# 両手からハイドロ
#
# @within function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/

execute rotated ~90 0 positioned ^ ^1.5 ^1.5 run function asset:mob/0392.ecual_first/ai/projectile/hydro/0.summon
execute rotated ~-90 0 positioned ^ ^1.5 ^1.5 run function asset:mob/0392.ecual_first/ai/projectile/hydro/0.summon
tag @e[type=item_display,tag=AW.HydroStorm,distance=..8] add AW.HydroStormFirst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/summon/2
#
# プレイヤー 追従型
#
# @within function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/

# マーカーを呼ぶ
tp 0-0-0-0-0 ^ ^ ^ ~ 0

# ランダムな方向を向かせる
execute store result entity 0-0-0-0-0 Rotation[0] float 0.01 run random value 0..36000

# 0-0-0-0-0 の方向の先に召喚する
execute at 0-0-0-0-0 positioned ^ ^1.5 ^30 facing entity @a[tag=!PlayerShouldInvulnerable,distance=..100,sort=random,limit=1] eyes rotated ~ 0 run function asset:mob/0392.ecual_first/ai/projectile/hydro/0.summon

# マーカーを戻してあげる
execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/0.summon
#
# ハイドロストーム 召喚
#
# @within function asset:mob/0392.ecual_first/**

# 本体召喚
summon item_display ~ ~ ~ {Tags:["AW.HydroStorm","AW.ProjectileInit","AllowProcessingCommonTag","AutoKillWhenDiePassenger"],interpolation_duration:10,teleport_duration:1,brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0f,0f,0.01f]},item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{display:{color:600},CustomModelData:20364}},Passengers:[{id:"item_display",Tags:["AllowProcessingCommonTag","AutoKillWhenDiePassenger"],interpolation_duration:10,teleport_duration:1,brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.01f,0f],scale:[0f,0f,0.01f]},item:{id:"minecraft:leather_horse_armor",Count:1b,tag:{display:{color:600},CustomModelData:20365}},Passengers:[{id:"area_effect_cloud",Particle:"block air",Radius:0f,Duration:2}]}]}

# Init処理
execute as @e[type=item_display,tag=AW.HydroStorm,tag=AW.ProjectileInit,distance=..0.01] run function asset:mob/0392.ecual_first/ai/projectile/hydro/1.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/1.init
#
# 初期化処理
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/0.summon

# スコア初期化
scoreboard players set @s AW.ProjectileTick 0

# TP
tp @e[type=item_display,tag=AW.ProjectileInit,distance=..0.01] ~ ~ ~ ~ ~

# SnapShot により仕様変更されたので書き直す必要があるかも
execute as @e[type=item_display,tag=AW.ProjectileInit,distance=..0.01] on passengers run tp @s ~ ~ ~ ~ ~

# タグ外し
tag @s remove AW.ProjectileInit
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick
#
# 設置水魔法 Tick処理
#
# @within function asset:mob/0392.ecual_first/tick/

# スコア上昇
scoreboard players add @s AW.ProjectileTick 1

# 音
execute if score @s AW.ProjectileTick matches 1 run playsound entity.zombie_villager.converted hostile @a[distance=..32] ~ ~ ~ 1 1.5 0

# 回転 / 縮小
execute if score @s AW.ProjectileTick matches 2 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/1
execute if score @s AW.ProjectileTick matches 12 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/2
execute if score @s AW.ProjectileTick matches 22 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/3
execute if score @s AW.ProjectileTick matches 32 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/1
execute if score @s AW.ProjectileTick matches 42 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/2
execute if score @s AW.ProjectileTick matches 52 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/3
execute if score @s AW.ProjectileTick matches 62 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/1
execute if score @s AW.ProjectileTick matches 72 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/2
execute if score @s AW.ProjectileTick matches 82 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/3
execute if score @s AW.ProjectileTick matches 92 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/1
execute if score @s AW.ProjectileTick matches 102 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/2

# VFX
execute if score @s AW.ProjectileTick matches 1..110 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/vfx/tick

# サウンド
scoreboard players operation $AW.Temp Temporary = @s AW.ProjectileTick
scoreboard players operation $AW.Temp Temporary %= $2 Const
execute if score @s AW.ProjectileTick matches 6..110 if score $AW.Temp Temporary matches 0 run function asset:mob/0392.ecual_first/ai/projectile/hydro/direction/sound
scoreboard players reset $AW.Temp Temporary

# ダメージ処理(2tickごと)
scoreboard players operation $AW.Temp Temporary = @s AW.ProjectileTick
scoreboard players operation $AW.Temp Temporary %= $2 Const
execute if score @s AW.ProjectileTick matches 6..110 if score $AW.Temp Temporary matches 0 run function asset:mob/0392.ecual_first/ai/projectile/hydro/3.cast
scoreboard players reset $AW.Temp Temporary

# Age弄り
execute on passengers on passengers run data modify entity @s Age set value 0

# TP
execute at @s run tp @s ^ ^ ^1.25

# キル
execute if score @s AW.ProjectileTick matches 111.. run function asset:mob/0392.ecual_first/ai/projectile/hydro/4.kill
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0392.ecual_first/ai/projectile/water_magic/3.cast
#
# ダメージ処理
#
# @within function asset:mob/0392.ecual_first/ai/projectile/water_magic/2.tick

# 引数の設定
# 与えるダメージ
data modify storage lib: Argument.Damage set value 55.0f
# 第一属性
data modify storage lib: Argument.AttackType set value "Magic"
# 第二属性
data modify storage lib: Argument.ElementType set value "Water"
# デスログ
data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sが巻き起こしたハイドロストームに溺れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]'
# 補正functionを実行
execute as @e[type=wither_skeleton,tag=this,distance=..100] run function lib:damage/modifier
# ダメージを与える
execute positioned ~-1.5 ~-1.5 ~-1.5 as @a[gamemode=!creative,dx=2,dy=2,dz=2] at @s run function lib:damage/
# リセット
function lib:damage/reset
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/4.kill
#
# キルします
#
# @within function
# asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick
# asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/

execute on passengers on passengers run kill @s
execute on passengers run kill @s
kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/1
#
# 回転
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick

# 回転 / 10tick
data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,0.866f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.01f]}}
execute on passengers run data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,-0.866f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.01f,0f],scale:[6f,6f,0.01f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/2
#
# 回転
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick

# 回転 / 10tick
data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,-0.866f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.01f]}}
execute on passengers run data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,0.866f,0.5f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.01f,0f],scale:[6f,6f,0.01f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/direction/rotate/3
#
# 回転
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick

# 回転 / 10tick
data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[6f,6f,0.01f]}}
execute on passengers run data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.01f,0f],scale:[6f,6f,0.01f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/direction/sound
#
# サウンド
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick

# 音
playsound entity.player.swim hostile @a[distance=..16] ~ ~ ~ 1 1.2 0
playsound entity.player.swim hostile @a[distance=..16] ~ ~ ~ 1 1 0
playsound ogg:block.amethyst.step6 hostile @a[distance=..16] ~ ~ ~ 1 2 0
playsound entity.warden.sonic_boom hostile @a[distance=..16] ~ ~ ~ 1 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:mob/0392.ecual_first/ai/projectile/hydro/direction/vfx/tick
#
# VFX 表示
#
# @within function asset:mob/0392.ecual_first/ai/projectile/hydro/2.tick

particle flash ^ ^ ^ 0 0 0 0 1 force @a[distance=..32]
particle dust 0.045 0.035 0.55 2.5 ^ ^ ^-1 0.75 0.75 0.75 0 5 force @a[distance=..32]
particle scrape ^ ^ ^-1 1.25 1.25 1.25 0 5 force @a[distance=..32]
particle end_rod ^ ^ ^-1 1 1 1 0 3 force @a[distance=..32]

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.

Loading

0 comments on commit 9e7362d

Please sign in to comment.