Skip to content
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#> asset:mob/0274.death_saw_jiki/init/
# @within asset:mob/alias/274/init

scoreboard players set @s 7M.CoolTime 20
# IsBabyの1.5倍を打ち消す
execute store result entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base double 0.006667 run attribute @s generic.movement_speed base get 100

# 最寄りのプレイヤーのほうを向く
execute facing entity @p[gamemode=!spectator,distance=..32] feet rotated ~ 0 run tp @s ~ ~ ~ ~ ~
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> asset:mob/0274.death_saw_jiki/move/
#
# 継承先などから実行される処理
#
# @within asset:mob/alias/274/move

# 壁貫通のないように移動
data modify storage lib: Argument.SlideMove.Speed set from storage asset:context this.Speed
function lib:slide_move/
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#> asset:mob/0274.death_saw_jiki/register
# @within asset:mob/alias/274/register

# 継承(オプション)
data modify storage asset:mob Extends append value 2004
function asset:mob/extends
# 継承されることを前提とした、抽象的なモブであるかどうか(boolean)
data modify storage asset:mob IsAbstract set value false

# ID (int)
data modify storage asset:mob ID set value 274
# Type (string) Wikiを参照
Expand Down Expand Up @@ -54,3 +60,10 @@
data modify storage asset:mob Resist.Water set value 1.2
# 雷倍率 (float) (オプション)
data modify storage asset:mob Resist.Thunder set value 0.8

# ダメージ
data modify storage asset:mob Field.Damage set value 36f

# 攻撃のクールダウン (出現してすぐはダメージを与えない)
data modify storage asset:mob Field.AttackCT._ set value 20
data modify storage asset:mob Field.AttackCT.Max set value 20
26 changes: 14 additions & 12 deletions Asset/data/asset/functions/mob/0274.death_saw_jiki/tick/.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@
# @within function asset:mob/alias/274/tick

# 足元が空気なら少し落下
execute if block ~ ~-0.5 ~ #lib:no_collision run tp @s ~ ~-0.5 ~
execute if block ~ ~-0.5 ~ #lib:no_collision/ run tp @s ~ ~-0.5 ~

# 前方が階段状なら上にTPする
execute unless block ^ ^ ^1 #lib:no_collision if block ^ ^1 ^1 #lib:no_collision at @s run tp ~ ~1 ~
execute unless block ^ ^ ^1 #lib:no_collision/ if block ^ ^1 ^1 #lib:no_collision/ at @s run tp ~ ~1 ~
# 前方が壁なら方向転換
execute unless block ^ ^ ^1 #lib:no_collision unless block ^ ^1 ^1 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~
execute unless block ^ ^ ^1 #lib:no_collision/ unless block ^ ^1 ^1 #lib:no_collision/ at @s run tp @s ~ ~ ~ ~45 ~
# 前方が2m穴なら適当に方向転換
execute unless block ~ ~-1 ~ #lib:no_collision if block ^ ^ ^1 #lib:no_collision if block ^ ^-1 ^1 #lib:no_collision if block ^ ^-2 ^1 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~
execute unless block ~ ~-1 ~ #lib:no_collision/ if block ^ ^ ^1 #lib:no_collision/ if block ^ ^-1 ^1 #lib:no_collision/ if block ^ ^-2 ^1 #lib:no_collision/ at @s run tp @s ~ ~ ~ ~45 ~

# プレイヤーが近くにいないなら前進する
execute unless entity @a[distance=..10] at @s rotated ~ 0 run tp ^ ^ ^0.2
# プレイヤーが近くにいるなら追尾する
execute if entity @p[distance=5..10] at @s facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-400 facing entity @s eyes positioned as @s rotated ~ 0 run tp @s ^ ^ ^0.2 ~ ~
execute if entity @p[distance=..5] at @s facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-100 facing entity @s eyes positioned as @s rotated ~ 0 run tp @s ^ ^ ^0.2 ~ ~
execute at @s unless entity @p[gamemode=!spectator,distance=..5] facing entity @p[gamemode=!spectator,distance=..10] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-400 facing entity @s eyes positioned as @s rotated ~ 0 run tp @s ~ ~ ~ ~ ~
execute at @s facing entity @p[gamemode=!spectator,distance=..5] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-100 facing entity @s eyes positioned as @s rotated ~ 0 run tp @s ~ ~ ~ ~ ~

# 前進
function asset:mob/call.m {method:"get_speed"}
execute at @s run function asset:mob/call.m {method:"move"}

# 演出
playsound entity.sheep.shear hostile @a ~ ~ ~ 0.4 2

# クールダウン
scoreboard players remove @s[scores={7M.CoolTime=1..}] 7M.CoolTime 1
# ダメージ(スペクテイターでも発動するけどしゃーなし)
execute unless score @s 7M.CoolTime matches 1.. if entity @e[type=#lib:living,tag=Friend,distance=..0.75] run function asset:mob/0274.death_saw_jiki/tick/3.damage
# 攻撃のクールダウン
execute store result storage asset:context this.AttackCT._ int 0.9999999999 run data get storage asset:context this.AttackCT._
# プレイヤーに接触したら攻撃
execute if data storage asset:context this.AttackCT{_:0} positioned ~-0.5 ~-0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] at @s run function asset:mob/0274.death_saw_jiki/tick/damage

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> asset:mob/0274.death_saw_jiki/tick/damage
#
#
#
# @within function asset:mob/0274.death_saw_jiki/tick/

# 演出
particle dust 1.000 0.741 0.141 1.3 ~ ~1.2 ~ 0.5 0.4 0.5 0 20 normal
playsound minecraft:entity.firework_rocket.twinkle hostile @a ~ ~ ~ 0.7 1.5 0
playsound minecraft:entity.firework_rocket.twinkle hostile @a ~ ~ ~ 0.7 2.0 0

# ダメージ
data modify storage api: Argument.Damage set from storage asset:context this.Damage
data modify storage api: Argument.AttackType set value "Physical"
data modify storage api: Argument.ElementType set value "Thunder"
function api:damage/modifier
execute positioned ~-0.5 ~-0.5 ~-0.5 as @a[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/
function api:damage/reset

# クールタイムを与える
data modify storage asset:context this.AttackCT._ set from storage asset:context this.AttackCT.Max
8 changes: 8 additions & 0 deletions Asset/data/asset/functions/mob/alias/274/move.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset:mob/alias/274/move
#
# メソッド処理のエイリアス
#
# @within asset_manager:mob/triggers/call_method/run_method.m

# 本来の処理を呼び出す
function asset:mob/0274.death_saw_jiki/move/
1 change: 0 additions & 1 deletion Asset/data/asset/tags/functions/mob/load.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"asset:mob/0292.trample_bot/0.load",
"asset:mob/0287.burning_stomper/0.load",
"asset:mob/0234.walleye/0.load",
"asset:mob/0274.death_saw_jiki/0.load",
"asset:mob/0245.fire_creeper/load",
"asset:mob/0021.demon_eye/load",
"asset:mob/0175.queen_bee/load",
Expand Down
Loading