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

【Object 2002~2025,2038,2064】ボスウサギのオブジェクト #474

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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,6 @@
#> asset:object/2002.lighting_fast/_index.d
# @private

#> tag
# @within function asset:object/2002.lighting_fast/**
#declare tag 2002.Landing
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:object/2002.lighting_fast/init/
#
# Objectのinit時の処理
#
# @within asset:object/alias/2002/init

# ランダムな方向を向かせる(Y軸は固定)
execute store result entity @s Rotation[0] float 0.01 run random value 0..36000
execute at @s run tp @s ~ ~ ~ ~ 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> asset:object/2002.lighting_fast/register
#
# Objectのデータを指定
#
# @within function asset:object/alias/2002/register

# 継承(オプション)
# data modify storage asset:object Extends append value
# function asset:object/extends
# 他のモブに継承されることを許可するか (boolean) (オプション)
# data modify storage asset:object ExtendsSafe set value
# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean)
data modify storage asset:object IsAbstract set value false
# ID (int)
data modify storage asset:object ID set value 2002
# フィールド
# 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/2002.lighting_fast/summon/
#
# Object召喚処理の呼び出し時に実行されるfunction
#
# @within asset:object/alias/2002/summon

# 元となるEntityを召喚する
summon item_display ~ ~ ~ {Tags:["ObjectInit"],interpolation_duration:0,teleport_duration:0,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,0f]},item:{id:"orange_stained_glass",Count:1b}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> asset:mob/2002.lighting_fast/summon/debug
#
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
#
# @user
# @private

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

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

# 2Tick目に見た目を表示
execute if score @s General.Object.Tick matches 2 run data modify entity @s transformation.scale set value [3f,0.1f,60f]
execute if score @s General.Object.Tick matches 2 run data modify entity @s teleport_duration set value 1

# 近くのプレイヤーにゆっくりと近づく
execute if score @s General.Object.Tick matches 2.. facing entity @p[tag=!PlayerShouldInvulnerable,distance=..30] feet positioned ^ ^ ^0.1 rotated as @s run tp @s ~ ~ ~ ~ ~
execute if predicate api:global_vars/difficulty/min/hard if score @s General.Object.Tick matches 2.. facing entity @p[tag=!PlayerShouldInvulnerable,distance=..30] feet positioned ^ ^ ^0.1 rotated as @s run tp @s ~ ~ ~ ~ ~

# 発動処理
execute if score @s General.Object.Tick matches 30.. run function asset:object/2002.lighting_fast/tick/cast
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#> asset:object/2002.lighting_fast/tick/cast
#
# 発動処理
#
# @within function asset:object/2002.lighting_fast/tick/

# 判定内にいるプレイヤーをタグ付け
execute positioned ^ ^ ^0 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^3 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^6 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^9 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^12 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^15 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^18 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^21 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^24 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^27 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-3 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-6 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-9 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-12 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-15 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-18 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-21 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-24 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing
execute positioned ^ ^ ^-27 positioned ~-1.5 ~-1.5 ~-1.5 as @a[tag=!PlayerShouldInvulnerable,dx=2,dy=2,dz=2] run tag @s add 2002.Landing

# ダメージ
# 引数の設定
# 与えるダメージ
data modify storage lib: Argument.Damage set value 45.0f
# 第一属性
data modify storage lib: Argument.AttackType set value "Physical"
# 第二属性
data modify storage lib: Argument.ElementType set value "Thunder"
# デスログ
data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sの斬撃によってサイコロステーキになってしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]'
# 補正functionを実行
data modify storage api: Argument.MobUUID set from storage asset:context this.MobUUID
function api:damage/modifier_manual
# ダメージを与える
execute as @a[tag=2002.Landing,distance=..100] at @s run function lib:damage/
# リセット
function lib:damage/reset
Copy link
Contributor

Choose a reason for hiding this comment

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

DamageLibとDamageAPIが混ざってる

Copy link
Contributor Author

Choose a reason for hiding this comment

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

これは別に支障ないと思うよ

Copy link
Member

Choose a reason for hiding this comment

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

あります
apiにしろ!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

後で一括置換するんでしょ?

Copy link
Member

Choose a reason for hiding this comment

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

挙動上の問題保証できないとこと(ちぇんちゃ)

Copy link
Member

Choose a reason for hiding this comment

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

直せ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

どう直すか述べよ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

私は直す方法を知りません

Copy link
Member

Choose a reason for hiding this comment

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

lib: Argument.hogeをapi: Argument.hogeに
lib:damage/hogeをapi:damage/hoge

Copy link
Member

Choose a reason for hiding this comment

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

ダメージAPI以外のlib: Argumentを巻き込まないように注意ね


# タグ外し
tag @a[tag=2002.Landing,distance=..100] remove 2002.Landing

# パーティクル処理
execute positioned ^ ^1.5 ^ run function asset:object/2002.lighting_fast/tick/vfx

# キル
kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:object/2002.lighting_fast/tick/sound
#
# 音を鳴らす
#
# @within function asset:object/2002.lighting_fast/tick/vfx

# サウンド
playsound entity.warden.sonic_boom hostile @a[distance=..32] ~ ~ ~ 2 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 item.trident.throw hostile @a[distance=..32] ~ ~ ~ 2 0 0
playsound entity.glow_squid.squirt hostile @a[distance=..32] ~ ~ ~ 2 2 0
playsound item.trident.return hostile @a[distance=..32] ~ ~ ~ 2 0 0
playsound item.trident.riptide_1 hostile @a[distance=..32] ~ ~ ~ 2 2 0
Loading
Loading