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 59] ジャック・オ・ランタンの隙間避けで吸い込みを実装 & text_displayをObjectAssetへ移行 #1062

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@
#declare tag 1N.HealthLess40Per
#declare tag 1N.AlreadySpecial
#declare tag 1N.DisableParticle
#declare tag 1N.TextDisplay
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
# カボチャが召喚するオブジェクトも抹消する
kill @e[type=item_display,scores={ObjectID=2031..2036},distance=..50]

# TextDisplayをkill
kill @e[type=text_display,tag=1N.TextDisplay]

# スポーンマーカーをkill
kill @e[type=marker,tag=1N.SpawnMarker]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@
# スポーンマーカーをkill
kill @e[type=marker,tag=1N.SpawnMarker]

# TextDisplayをkill
kill @e[type=text_display,tag=1N.TextDisplay]

# "確実に"偽物を消し去る
execute as @e[type=zombie,scores={MobID=224},distance=..128] run function api:mob/remove
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
# 最初のTickでのみ実行
execute if entity @s[scores={General.Mob.Tick=0}] run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/first_tick

# ハード以上での回転
# 回転
execute if entity @s[scores={General.Mob.Tick=..280}] run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/rotate

# 14x4x14より外のプレイヤーを吸い込む
execute as @a[gamemode=!spectator,distance=..20] positioned ~-7 ~ ~-7 unless entity @s[dx=13,dy=3,dz=13] at @s facing entity @e[type=marker,tag=1N.SpawnMarker] eyes run tp @s ^ ^ ^0.5

# スポーンマーカーを中心として巨大カボチャを召喚

# 網目状にカボチャを転がす
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/1
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/1
#
# 1直線に並べて転がす.1
#
# @within function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/*

execute positioned ^7.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^4.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^1.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-1.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-4.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-7.5 ^0 ^-9 rotated 0 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/2
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/2
#
# 1直線に並べて転がす.2
#
# @within function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/*

execute positioned ^9 ^0 ^7.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^9 ^0 ^4.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^9 ^0 ^1.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^9 ^0 ^-1.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^9 ^0 ^-4.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^9 ^0 ^-7.5 rotated 90 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/3
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/3
#
# 1直線に並べて転がす.3
#
# @within function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/*

execute positioned ^7.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^4.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^1.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-1.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-4.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-7.5 ^0 ^9 rotated 180 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/4
#> asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/4
#
# 1直線に並べて転がす.4
#
# @within function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/*

execute positioned ^-9 ^0 ^7.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-9 ^0 ^4.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-9 ^0 ^1.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-9 ^0 ^-1.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-9 ^0 ^-4.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral

execute positioned ^-9 ^0 ^-7.5 rotated 270 0 run function asset:mob/0059.jack_o_lantern/tick/skill/common/giant_pumpkin/neutral
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
execute if score $Random Temporary matches 3 if predicate api:global_vars/difficulty/max/normal run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/3/4

# ハード以上
execute if score $Random Temporary matches 0 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/1
execute if score $Random Temporary matches 1 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/2
execute if score $Random Temporary matches 2 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/3
execute if score $Random Temporary matches 3 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/6/4
execute if score $Random Temporary matches 0 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/1
execute if score $Random Temporary matches 1 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/2
execute if score $Random Temporary matches 2 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/3
execute if score $Random Temporary matches 3 if predicate api:global_vars/difficulty/min/hard run function asset:mob/0059.jack_o_lantern/tick/skill/giant_pumpkin2/pos_type/line/4/4

# リセット
scoreboard players reset $Random Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

# 煽りメッセージ
execute if entity @s[scores={General.Mob.Tick=50}] run playsound minecraft:block.bell.use hostile @a ~ ~ ~ 1 1.5
execute if entity @s[scores={General.Mob.Tick=50}] run summon text_display ~ ~3 ~ {Tags:["1N.TextDisplay"],billboard:"center",shadow:1b,text:'[{"text":"探してみな!"},{"text":"\\n↓","color":"white"}]',background:16711680,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]}}
execute if entity @s[scores={General.Mob.Tick=70}] positioned ~ ~3 ~ run kill @e[type=text_display,tag=1N.TextDisplay,distance=..0.01,sort=nearest,limit=1]
execute if entity @s[scores={General.Mob.Tick=50}] run data modify storage api: Argument.ID set value 2033
execute if entity @s[scores={General.Mob.Tick=50}] positioned ~ ~3 ~ run function api:object/summon

# 回転途中で頭を取り換える
execute if entity @s[scores={General.Mob.Tick=35}] run particle explosion ~ ~1.8 ~ 0 0 0 0 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#> asset:object/2033.pumpkin_text_display/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/2033/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のObjectに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# Tickするかどうか(boolean) (オプション)
# data modify storage asset:object IsTicking set value

# ID (int)
data modify storage asset:object ID set value 2033
# フィールド(オプション)
# data modify storage asset:object Field.myValue set value
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/2033.pumpkin_text_display/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/2033/summon

# 元となるEntityを召喚する
summon text_display ~ ~ ~ {Tags:["ObjectInit"],billboard:"center",shadow:1b,text:'[{"text":"探してみな!"},{"text":"\\n↓","color":"white"}]',background:16711680,transformation:{left_rotation:[0.0f,0.0f,0.0f,1.0f],right_rotation:[0.0f,0.0f,0.0f,1.0f],translation:[0.0f,0.0f,0.0f],scale:[2.0f,2.0f,2.0f]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:object/2033.pumpkin_text_display/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

# 召喚
data modify storage api: Argument.ID set value 2033
function api:object/summon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#> asset:object/2033.pumpkin_text_display/tick/
#
# Objectのtick時の処理
#
# @within asset:object/alias/2033/tick

# Tick加算
scoreboard players add @s General.Object.Tick 1

# 消滅処理
kill @s[scores={General.Object.Tick=20..}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/2033/register
#
# Objectのデータ指定処理のエイリアス
#
# @within asset_manager:object/summon/register.m

# 元の登録処理を呼び出す
function asset:object/2033.pumpkin_text_display/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/2033/summon
#
# Object召喚処理のエイリアス
#
# @within asset_manager:object/summon/summon.m

# 元の召喚処理を呼び出す
function asset:object/2033.pumpkin_text_display/summon/
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/object/alias/2033/tick.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:object/alias/2033/tick
#
# Tick時処理のエイリアス
#
# @within asset_manager:object/tick/tick.m

# 元のTick処理を呼び出す
function asset:object/2033.pumpkin_text_display/tick/