Skip to content

Commit

Permalink
ウサギ二体目完成
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat committed Aug 29, 2024
1 parent da5bbb9 commit 3028b69
Show file tree
Hide file tree
Showing 22 changed files with 168 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/100_0_opening/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 1000
scoreboard players set @s AW.AnimationTick 0
function asset:mob/0392.ecual_first/ai/general/7.idle_motion_change

# 干渉可能となる
data modify entity @s Invulnerable set value 0b
tag @s remove Uninterferable
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/10_0_hydro_storm/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 100
# 上位スキル発動トリガー 外し
tag @s remove AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@
# asset:mob/0392.ecual_first/ai/animation/1_0_idle/
# asset:mob/0392.ecual_first/ai/animation/1_1_idle_rare/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 10
# スコアをリセットする
scoreboard players reset @s AW.AnimationNum
scoreboard players set @s AW.AnimationTick 0

# ストレージを用意する
data modify storage asset:temp AW.SKill set value []

# 上位スキル分岐
execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..25] run data modify storage asset:temp AW.SKill append value 20
data modify storage asset:temp AW.SKill append value 30
data modify storage asset:temp AW.SKill append value 40
execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..25] run data modify storage asset:temp AW.SKill append value 50
execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..25] run data modify storage asset:temp AW.SKill append value 51

# データシャッフル
function lib:array/session/open
data modify storage lib: Array set from storage asset:temp AW.SKill
function lib:array/shuffle

# 1番目のデータをスコアに代入
execute store result score @s AW.AnimationNum run data get storage lib: Array[0]

# セッション閉じる
function lib:array/session/close

# リセット
data remove storage asset:temp AW
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/1_2_idle_long/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 12
# 移動アニメーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/2_0_chill_rain/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 20
# 上位スキル発動トリガー
tag @s add AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/3_0_crystal_turret/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 30
# 上位スキル発動トリガー 外し
tag @s add AW.SuperiorSkill

# 待機(長)モーション移行
scoreboard players set @s AW.AnimationNum 12
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/4_0_summon_book/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 40
# 上位スキル発動トリガー 外し
tag @s add AW.SuperiorSkill

# 待機(長)モーション移行
scoreboard players set @s AW.AnimationNum 12
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#> 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
# 上位スキル発動トリガー
tag @s add AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#> asset:mob/0392.ecual_first/ai/animation/5_1_water_bullet/end
#
#
# 終了処理
#
# @within function asset:mob/0392.ecual_first/ai/animation/5_1_water_bullet/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 51
# 上位スキル発動トリガー
tag @s add AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/6_0_moving/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 60
# スコアをリセットする
scoreboard players reset @s AW.AnimationNum
scoreboard players set @s AW.AnimationTick 0

# 上位スキルタグがない場合は待機
execute unless entity @s[tag=AW.SuperiorSkill] run function asset:mob/0392.ecual_first/ai/general/7.idle_motion_change
execute unless entity @s[tag=AW.SuperiorSkill] run return 0

# ストレージを用意する
data modify storage asset:temp AW.SKill set value []

# 上位スキル分岐
execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..25] run data modify storage asset:temp AW.SKill append value 70
data modify storage asset:temp AW.SKill append value 80
execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..25] run data modify storage asset:temp AW.SKill append value 90
data modify storage asset:temp AW.SKill append value 100

# データシャッフル
function lib:array/session/open
data modify storage lib: Array set from storage asset:temp AW.SKill
function lib:array/shuffle

# 1番目のデータをスコアに代入
execute store result score @s AW.AnimationNum run data get storage lib: Array[0]

# セッション閉じる
function lib:array/session/close

# リセット
data remove storage asset:temp AW
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/7_0_holy_ray/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 70
# 上位スキル発動トリガー 外し
tag @s remove AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/8_0_quietus_rain/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 80
scoreboard players set @s AW.AnimationTick -250
# 上位スキル発動トリガー 外し
tag @s remove AW.SuperiorSkill

# 待機(長)モーション移行
scoreboard players set @s AW.AnimationNum 12
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
# @within function asset:mob/0392.ecual_first/ai/animation/9_0_water_wall/

# デバッグ用 アニメーションループ
scoreboard players set @s AW.AnimationNum 90
# 上位スキル発動トリガー 外し
tag @s remove AW.SuperiorSkill

# 移動モーション移行
scoreboard players set @s AW.AnimationNum 60
scoreboard players set @s AW.AnimationTick 0
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
scoreboard players set @s AW.AnimationTick 0

# 怯み回数を増やす
# scoreboard players add @s AW.FalterCount 1
scoreboard players add @s AW.FalterCount 1
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@

# 登場演出時は干渉付加
# デバッグ時は無効化
# data modify entity @s Invulnerable set value 1b
# tag @s add Uninterferable
data modify entity @s Invulnerable set value 1b
tag @s add Uninterferable
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 干渉可能か否か (boolean)
data modify storage asset:mob Interferable set value true
# 名前 (TextComponentString) (オプション)
data modify storage asset:mob Name set value '{"text":"爆発の魔導書","color":"#370040"}'
data modify storage asset:mob Name set value '{"text":"虚空の魔導書","color":"#370040"}'
# Mobの説明文 (TextComponentString[]) (オプション)
# data modify storage asset:mob Lore set value
# 武器
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45

# 範囲内ならホーミングじみた移動
execute facing entity @p feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ^ ^ ^0.2 ~ ~
execute facing entity @p feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ^ ^ ^0.025 ~ ~

# Timeを取る
execute store result score $B3.Temp Temporary run time query gametime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 干渉可能か否か (boolean)
data modify storage asset:mob Interferable set value true
# 名前 (TextComponentString) (オプション)
data modify storage asset:mob Name set value '{"text":"爆発の魔導書","color":"#000350"}'
data modify storage asset:mob Name set value '{"text":"暗闇の魔導書","color":"#000350"}'
# Mobの説明文 (TextComponentString[]) (オプション)
# data modify storage asset:mob Lore set value
# 武器
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@
scoreboard players operation $B5.Temp B5.UUID = @s MobUUID
execute as @e[type=item_display,tag=B5.Bullet,distance=..100] if score @s B5.UUID = $B5.Temp B5.UUID at @s run function asset:mob/0401.darkness_spellbook/ai/bullet/2.tick

# ランダムテレポート
execute store result score $B5.Temp B5.Tick run random value 1..150
execute if score $B5.Temp B5.Tick matches 1 run function asset:mob/0401.darkness_spellbook/tick/teleport

# リセット
scoreboard players reset $B5.Temp B5.UUID
scoreboard players reset $B5.Temp B5.Tick
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0401.darkness_spellbook/tick/teleport
#
# テレポート
#
# @within function asset:mob/0401.darkness_spellbook/tick/

# 演出
playsound entity.enderman.teleport hostile @a ~ ~ ~ 1 1

# マーカーを持ってくる
tp 0-0-0-0-0 ^ ^ ^ ~ ~

# ランダムテレポート
data modify storage lib: Argument.Bounds set value [[5d,5d],[0d,2d],[5d,5d]]
execute as 0-0-0-0-0 at @s run function lib:spread_entity/

# マーカーの位置にブロックがなかったらテレポートする
execute at 0-0-0-0-0 if block ~ ~ ~ #lib:no_collision run tp @s ~ ~ ~

# Makerを戻してあげる
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
Expand Up @@ -28,5 +28,10 @@
scoreboard players operation $B6.Temp B6.UUID = @s MobUUID
execute as @e[type=item_display,tag=B6.Bullet,distance=..100] if score @s B6.UUID = $B6.Temp B6.UUID at @s run function asset:mob/0402.drown_spellbook/ai/bullet/2.tick

# ランダムテレポート
execute store result score $B6.Temp B6.Tick run random value 1..150
execute if score $B6.Temp B6.Tick matches 1 run function asset:mob/0402.drown_spellbook/tick/teleport

# リセット
scoreboard players reset $B6.Temp B6.UUID
scoreboard players reset $B6.Temp B6.Tick
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0402.drown_spellbook/tick/teleport
#
# テレポート
#
# @within function asset:mob/0402.drown_spellbook/tick/

# 演出
playsound entity.enderman.teleport hostile @a ~ ~ ~ 1 1

# マーカーを持ってくる
tp 0-0-0-0-0 ^ ^ ^ ~ ~

# ランダムテレポート
data modify storage lib: Argument.Bounds set value [[5d,5d],[0d,2d],[5d,5d]]
execute as 0-0-0-0-0 at @s run function lib:spread_entity/

# マーカーの位置にブロックがなかったらテレポートする
execute at 0-0-0-0-0 if block ~ ~ ~ #lib:no_collision run tp @s ~ ~ ~

# Makerを戻してあげる
execute in overworld run tp 0-0-0-0-0 0.0 0.0 0.0

0 comments on commit 3028b69

Please sign in to comment.