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 all 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,7 @@
#> asset:effect/0618.soaked/_/end
#
# Effectの効果の終了時に実行されるfunction
#
# @within tag/function asset:effect/end

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/end/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/given
#
# Effectが付与された時に実行されるfunction
#
# @within tag/function asset:effect/given

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/re-given
#
# Effectが上書きされた時に実行されるfunction
#
# @within tag/function asset:effect/re-given

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/re-given/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/register
#
#
#
# @within tag/function asset:effect/register

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/register
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/remove
#
# Effectが神器や牛乳によって削除された時に実行されるfunction
#
# @within tag/function asset:effect/remove

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/remove/
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/_/tick
#
# Effectが発動している間毎tick実行されるfunction
#
# @within tag/function asset:effect/tick

execute if data storage asset:context {id:618} run function asset:effect/0618.soaked/tick/
7 changes: 7 additions & 0 deletions Asset/data/asset/functions/effect/0618.soaked/end/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/end/
#
# Effectの効果が切れた時の処理
#
# @within function asset:effect/0618.soaked/_/end

function asset:effect/0618.soaked/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/given/
#
# Effectが付与された時の処理
#
# @within function asset:effect/0618.soaked/_/given

function asset:effect/0618.soaked/modifier/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset:effect/0618.soaked/modifier/add
#
# 補正を追加する
#
# @within function
# asset:effect/0618.soaked/given/
# asset:effect/0618.soaked/re-given/

# 移動速度-20%を付与
attribute @s generic.movement_speed modifier add 00000001-0000-0003-0000-026a00000000 "618.Speed" -0.2 multiply

# (-25 × Stack)%分の水耐性弱化を付与
data modify storage api: Argument.UUID set value [I;1,3,618,0]
execute store result storage api: Argument.Amount double -0.25 run data get storage asset:context Stack
data modify storage api: Argument.Operation set value "multiply"
function api:modifier/defense/water/add
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#> asset:effect/0618.soaked/modifier/remove
#
# 補正を削除する
#
# @within function
# asset:effect/0618.soaked/end/
# asset:effect/0618.soaked/re-given/
# asset:effect/0618.soaked/remove/

# 移動速度低下を削除
attribute @s generic.movement_speed modifier remove 00000001-0000-0003-0000-026a00000000

# 補正を削除する
data modify storage api: Argument.UUID set value [I;1,3,618,0]
function api:modifier/defense/water/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0618.soaked/re-given/
#
# Effectが上書きされた時の処理
#
# @within function asset:effect/0618.soaked/_/re-given

function asset:effect/0618.soaked/modifier/remove
function asset:effect/0618.soaked/modifier/add
35 changes: 35 additions & 0 deletions Asset/data/asset/functions/effect/0618.soaked/register.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#> asset:effect/0618.soaked/register
#
# Effectのデータを指定
#
# @within function asset:effect/0618.soaked/_/register

# ExtendsSafe (boolean) (default = false)
# data modify storage asset:effect ExtendsSafe set value true
# ID (int)
data modify storage asset:effect ID set value 618
# 名前 (TextComponentString)
data modify storage asset:effect Name set value '{"text":"ずぶ濡れ"}'
# 説明文 (TextComponentString[])
data modify storage asset:effect Description set value '{"text":"水耐性が大きく減少し、移動速度が低下する"}'
# 効果時間 (int) (default = API || error)
data modify storage asset:effect Duration set value 200
# スタック (int) (default = API || 1)
# data modify storage asset:effect Stack set value
# 効果時間の操作方法 (default = API || "replace")
data modify storage asset:effect DurationOperation set value "forceReplace"
# スタックの操作方法 (default = API || "replace")
data modify storage asset:effect StackOperation set value "add"
# 最大効果時間 (int) (default = 2147483647)
data modify storage asset:effect MaxDuration set value 200
# 最大スタック (int) (default = 2147483647)
data modify storage asset:effect MaxStack set value 2
# 悪い効果か否か (boolean)
data modify storage asset:effect IsBadEffect set value true
# 死亡時のエフェクトの処理 (default = "remove")
# data modify storage asset:effect ProcessOnDied set value
# 消すのに必要なレベル (int) (default = 1)
data modify storage asset:effect RequireClearLv set value 2

# フィールド
# data modify storage asset:effect Field set value {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> asset:effect/0618.soaked/remove/
#
# Effectが削除された時の処理
#
# @within function asset:effect/0618.soaked/_/remove

function asset:effect/0618.soaked/modifier/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:effect/0618.soaked/tick/
#
# Effectのtick処理
#
# @within function asset:effect/0618.soaked/_/tick

# 演出
particle fishing ~ ~1 ~ 0.25 0.5 0.25 0.05 1 normal
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 api: Argument.Damage set value 45.0f
# 第一属性
data modify storage api: Argument.AttackType set value "Physical"
# 第二属性
data modify storage api: Argument.ElementType set value "Thunder"
# デスログ
data modify storage api: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sの斬撃によってサイコロステーキになってしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"api:","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 api:damage/
# リセット
function api:damage/reset

# タグ外し
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