Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Mob 390~393】ボスウサギ実装 #478

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:mob/0390.triple_rabbits/_index.d
# @private

#> tag
# @within function asset:mob/0390.triple_rabbits/**
#declare tag AU.Target
#declare tag AU.AxiaDeath
#declare tag AU.EcualDeath
#declare tag AU.LabyriaDeath

#> score_holder
# @within function asset:mob/0390.triple_rabbits/**
#declare score_holder $AU.Temp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0390.triple_rabbits/ai/general/axia_to_ecual
#
# アキシャからエクアルへ移行
#
# @within function asset:mob/0390.triple_rabbits/tick/

#> function
# @private
#declare function asset_manager:mob/bossbar/init

# ボスは重複しないはずだが一応UUIDを設定しておく
scoreboard players operation $AU.Temp AU.Dummy.UUID = @s AU.Dummy.UUID

# まずはアキシャを召喚する
data modify storage api: Argument.ID set value 392
function api:mob/summon
execute as @e[type=wither_skeleton,scores={MobID=392},distance=..0.001,sort=nearest,limit=1] run tag @s add AU.Target
execute as @e[type=wither_skeleton,scores={MobID=392},distance=..0.001,sort=nearest,limit=1] run scoreboard players operation @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID

# リセット
scoreboard players reset $AU.Temp AU.Dummy.UUID
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:mob/0390.triple_rabbits/ai/general/break_block
#
# ブロックを破壊する
#
# @within function asset:mob/0390.triple_rabbits/tick/

# ブロックを破壊する
fill ~-15 ~ ~-15 ~15 ~3 ~15 air destroy
Comment on lines +7 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if predicate api:area/is_breakable つけよう 今は必要なくても将来的に必要になりうる

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0390.triple_rabbits/ai/general/ecual_to_labyria
#
# エクアルからラビリアへ移行
#
# @within function asset:mob/0390.triple_rabbits/tick/

#> function
# @private
#declare function asset_manager:mob/bossbar/init

# ボスは重複しないはずだが一応UUIDを設定しておく
scoreboard players operation $AU.Temp AU.Dummy.UUID = @s AU.Dummy.UUID

# まずはアキシャを召喚する
data modify storage api: Argument.ID set value 393
function api:mob/summon
execute as @e[type=wither_skeleton,scores={MobID=393},distance=..0.001,sort=nearest,limit=1] run tag @s add AU.Target
execute as @e[type=wither_skeleton,scores={MobID=393},distance=..0.001,sort=nearest,limit=1] run scoreboard players operation @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID

# リセット
scoreboard players reset $AU.Temp AU.Dummy.UUID
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:mob/0390.triple_rabbits/ai/general/share_health
#
# 体力を共有する
#
# @within function asset:mob/0390.triple_rabbits/tick/

# まずは対象の体力を取得
scoreboard players operation $AU.Temp AU.Dummy.UUID = @s AU.Dummy.UUID
execute as @e[type=wither_skeleton,tag=AU.Target,distance=..100] if score @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID run scoreboard players operation $AU.Temp MobHealth = @s MobHealth

# 体力を変更する
scoreboard players operation @s MobHealth = $AU.Temp MobHealth
scoreboard players operation @s MobHealth > $1 Const

# リセット
scoreboard players reset $AU.Temp AU.Dummy.UUID
scoreboard players reset $AU.Temp MobHealth
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> asset:mob/0390.triple_rabbits/ai/general/summon_bullet
#
# ペナルティバレッドを召喚
#
# @within function asset:mob/0390.triple_rabbits/tick/

# オーバーライドを設定
execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID

# 召喚
data modify storage api: Argument.ID set value 2064
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset:mob/0390.triple_rabbits/death/
#
# Mobの死亡時の処理
#
# @within function asset:mob/alias/390/death

#> function
# @private
#declare function animated_java:axia/remove/all
#declare function animated_java:ecual/remove/all
#declare function animated_java:labyria/remove/all

# モデル削除(削除されていないときのために)
function animated_java:axia/remove/all
function animated_java:ecual/remove/all
function animated_java:labyria/remove/all

# 継承元の処理
function asset:mob/super.death
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#> asset:mob/0390.triple_rabbits/init/
#
# Mobのinit時の処理
#
# @within asset:mob/alias/390/init

#> function
# @private
#declare function asset_manager:mob/bossbar/init

# ボスは重複しないはずだが一応UUIDを設定しておく
execute store result score @s AU.Dummy.UUID run random value 0..2147483646
scoreboard players operation $AU.Temp AU.Dummy.UUID = @s AU.Dummy.UUID

# まずはアキシャを召喚する
data modify storage api: Argument.ID set value 391
function api:mob/summon
execute as @e[type=wither_skeleton,scores={MobID=391},distance=..0.001,sort=nearest,limit=1] run tag @s add AU.Target
execute as @e[type=wither_skeleton,scores={MobID=391},distance=..0.001,sort=nearest,limit=1] run scoreboard players operation @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID

# リセット
scoreboard players reset $AU.Temp AU.Dummy.UUID
13 changes: 13 additions & 0 deletions Asset/data/asset/functions/mob/0390.triple_rabbits/load.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> asset:mob/0390.triple_rabbits/load
#
# Mobに利用するスコアボード等の初期化処理
#
# @within tag/function asset:mob/load

#> 定義類はここに
# @within function
# asset:mob/0390.triple_rabbits/**
# asset:mob/0391.axia_first/**
# asset:mob/0392.ecual_first/**
# asset:mob/0393.labyria_first/**
scoreboard objectives add AU.Dummy.UUID dummy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#> asset:mob/0390.triple_rabbits/register
#
# Mobのデータを指定
#
# @within function asset:mob/alias/390/register

# 継承(オプション)
data modify storage asset:mob Extends append value 2000
function asset:mob/extends
# 他のモブに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:mob ExtendsSafe set value
# 継承されることを前提とした、抽象的なモブであるかどうか(boolean)
data modify storage asset:mob IsAbstract set value false
# ID (int)
data modify storage asset:mob ID set value 390
# Type (string) Wikiを参照
data modify storage asset:mob Type set value "Enemy.Boss"
# 干渉可能か否か (boolean)
data modify storage asset:mob Interferable set value false
# 名前 (TextComponentString) (オプション)
data modify storage asset:mob Name set value '[{"text":"異界のウサギ共","color":"#FFFFFF","bold":true}]'
# 体力 (double) (オプション)
data modify storage asset:mob Health set value 100
# フィールド
# data modify storage asset:mob Field.myValue set value
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#> asset:mob/0390.triple_rabbits/remove/
#
# 天使が居なくなる際に実行される処理
#
# @within asset:mob/alias/390/remove

#> function
# @private
#declare function animated_java:axia/remove/all
#declare function animated_java:ecual/remove/all
#declare function animated_java:labyria/remove/all

# モデル削除(削除されていないときのために)
function animated_java:axia/remove/all
function animated_java:ecual/remove/all
function animated_java:labyria/remove/all

# キルする
scoreboard players operation $AU.Temp AU.Dummy.UUID = @s AU.Dummy.UUID
execute as @e[type=wither_skeleton,tag=AU.Target,distance=..100] if score @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID run data modify entity @s DeathLootTable set value "empty"
execute as @e[type=wither_skeleton,tag=AU.Target,distance=..100] if score @s AU.Dummy.UUID = $AU.Temp AU.Dummy.UUID run function api:mob/kill

# リセット
scoreboard players reset $AU.Temp AU.Dummy.UUID

# 継承元の処理
function asset:mob/super.remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:mob/0390.triple_rabbits/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:mob/alias/390/summon

# 元となるEntityを召喚する
summon slime ~ ~ ~ {Tags:["MobInit","AlwaysInvisible","Immovable"],Silent:1b,NoAI:1b,NoGravity:1b,Invulnerable:1b,DeathLootTable:"empty"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:mob/0390.triple_rabbits/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# 召喚
data modify storage api: Argument.ID set value 390
function api:mob/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#> asset:mob/0390.triple_rabbits/tick/
#
# Mobのtick時の処理
#
# @within asset:mob/alias/390/tick

#> private
# @private
#declare score_holder $IntervalTime

# タイマー加算
scoreboard players add @s General.Mob.Tick 1

# アキシャ to エクアル
execute if score @s General.Mob.Tick matches 150 if entity @s[tag=AU.AxiaDeath] run function asset:mob/0390.triple_rabbits/ai/general/axia_to_ecual

# エクアル to ラビリア
execute if score @s General.Mob.Tick matches 350 if entity @s[tag=AU.EcualDeath] run function asset:mob/0390.triple_rabbits/ai/general/ecual_to_labyria

# ラビリア to Death
execute if score @s General.Mob.Tick matches 510 if entity @s[tag=AU.LabyriaDeath] run function api:mob/kill

# ズル対策
scoreboard players operation $IntervalTime Temporary = @s General.Mob.Tick
scoreboard players operation $IntervalTime Temporary %= $40 Const
execute if score $IntervalTime Temporary matches 0 run function asset:mob/0390.triple_rabbits/ai/general/break_block
execute if score $IntervalTime Temporary matches 0 positioned ~-15 ~3.2 ~-15 at @a[dx=29,dy=25,dz=29] positioned ~ ~1 ~ run function asset:mob/0390.triple_rabbits/ai/general/summon_bullet
scoreboard players reset $IntervalTime Temporary

# 戦闘中プレイヤーを引き寄せる
tag @s add AU.Target
execute at @s as @a[distance=25..30] at @s facing entity @e[type=slime,tag=AU.Target,distance=..100,limit=1] eyes run tp @s ^ ^ ^0.4
execute at @s as @a[distance=30..40] at @s facing entity @e[type=slime,tag=AU.Target,distance=..100,limit=1] eyes run tp @s ^ ^ ^1.0
execute at @s as @a[distance=40..55] at @s facing entity @e[type=slime,tag=AU.Target,distance=..100,limit=1] eyes run tp @s ^ ^ ^1.5
execute at @s as @a[distance=55..100] at @s facing entity @e[type=slime,tag=AU.Target,distance=..100,limit=1] eyes positioned as @e[type=slime,tag=AU.Target,distance=..100,limit=1] rotated ~ 0 run tp @s ^ ^ ^
execute at @s positioned ~-100 ~-100 ~-100 as @a[dx=199,dy=98,dz=199] at @s facing entity @e[type=slime,tag=AU.Target,distance=..100,limit=1] eyes run tp @s ^ ^ ^2
tag @s remove AU.Target
61 changes: 61 additions & 0 deletions Asset/data/asset/functions/mob/0391.axia_first/_index.d.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#> asset:mob/0391.axia_first/_index.d
# @private

#> tag
# @within function asset:mob/0391.axia_first/**
#declare tag AV.Marker.SummonPoint
#declare tag AV.Marker.Movement
#declare tag AV.ModelRoot
#declare tag AV.Root.This
#declare tag AV.Temp.Target
#declare tag AV.Landing
#declare tag AV.Predict
#declare tag AV.AnnounceInit
#declare tag AV.AnnounceLine
#declare tag AV.Invisible
#declare tag AV.SuperiorSkill
#declare tag AV.Death
#declare tag 2001.CustomEffect
#declare tag 2013.SonicBoomSlash
#declare tag 2014.DimSword
#declare tag 2016.Critical
#declare tag 2016.Opening

#> val
# @within function asset:mob/0391.axia_first/**
#declare score_holder $AV.Temp
#declare score_holder $AV.Loop

#> AJ
# @within function asset:mob/0391.axia_first/**
#declare function animated_java:axia/summon
#declare function animated_java:axia/remove/all
#declare function animated_java:axia/animations/pause_all
#declare function animated_java:axia/animations/1_0_idle/play
#declare function animated_java:axia/animations/1_1_idle_rare/play
#declare function animated_java:axia/animations/2_0_normal_slash/play
#declare function animated_java:axia/animations/3_0_triple_slash/play
#declare function animated_java:axia/animations/4_0_naginagi/play
#declare function animated_java:axia/animations/6_0_moving_forward/play
#declare function animated_java:axia/animations/7_0_moving_iai/play
#declare function animated_java:axia/animations/8_0_moving_spin/play
#declare function animated_java:axia/animations/9_0_zangekihou/play
#declare function animated_java:axia/animations/10_0_warp_start/play
#declare function animated_java:axia/animations/10_1_warp_slash_0/play
#declare function animated_java:axia/animations/10_2_warp_slash_1/play
#declare function animated_java:axia/animations/10_3_warp_slash_2/play
#declare function animated_java:axia/animations/11_0_dimension_slash/play
#declare function animated_java:axia/animations/12_0_kourai/play
#declare function animated_java:axia/animations/13_0_damage_1/play
#declare function animated_java:axia/animations/13_1_damage_2/play
#declare function animated_java:axia/animations/14_0_opening_attack/play
#declare function animated_java:axia/animations/14_0_opening_attack/pause
#declare function animated_java:axia/animations/14_0_opening_attack/resume
#declare function animated_java:axia/animations/15_0_former_ending/play
#declare function animated_java:axia/variants/default/apply
#declare function animated_java:axia/variants/jitome/apply
#declare function animated_java:axia/variants/mabataki/apply
#declare function animated_java:axia/variants/mazime/apply
#declare function animated_java:axia/variants/normal/apply
#declare function animated_java:axia/variants/wink/apply
#declare function animated_java:axia/variants/yarare/apply
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#> asset:mob/0391.axia_first/ai/animation/
#
# アニメーション分岐
#
# @within function asset:mob/0391.axia_first/tick/

# 待機 通常
execute if score @s AV.AnimationNum matches 10 run function asset:mob/0391.axia_first/ai/animation/1_0_idle/

# 待機 レア
execute if score @s AV.AnimationNum matches 11 run function asset:mob/0391.axia_first/ai/animation/1_1_idle_rare/

# 通常斬撃
execute if score @s AV.AnimationNum matches 20 run function asset:mob/0391.axia_first/ai/animation/2_0_normal_slash/

# 三連斬撃
execute if score @s AV.AnimationNum matches 30 run function asset:mob/0391.axia_first/ai/animation/3_0_triple_slash/

# なぎなぎ教授
execute if score @s AV.AnimationNum matches 40 run function asset:mob/0391.axia_first/ai/animation/4_0_naginagi/

# 通常移動
execute if score @s AV.AnimationNum matches 60 run function asset:mob/0391.axia_first/ai/animation/6_0_moving_forward/

# 居合い切り移動
execute if score @s AV.AnimationNum matches 62 run function asset:mob/0391.axia_first/ai/animation/6_2_moving_iai/

# スピン移動
execute if score @s AV.AnimationNum matches 63 run function asset:mob/0391.axia_first/ai/animation/6_3_moving_spin/

# 斬撃砲
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/

# ディメンションソード
execute if score @s AV.AnimationNum matches 90 run function asset:mob/0391.axia_first/ai/animation/9_0_dimension_slash/

# 紅雷
execute if score @s AV.AnimationNum matches 100 run function asset:mob/0391.axia_first/ai/animation/10_0_kourai/

# 被弾アニメーション1
execute if score @s AV.AnimationNum matches 990 run function asset:mob/0391.axia_first/ai/animation/99_0_damaged_1/

# 被弾アニメーション2
execute if score @s AV.AnimationNum matches 991 run function asset:mob/0391.axia_first/ai/animation/99_1_damaged_2/

# オープニングアタック
execute if score @s AV.AnimationNum matches 1000 run function asset:mob/0391.axia_first/ai/animation/100_0_opening/
Loading
Loading