diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/attack/.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/attack/.mcfunction new file mode 100644 index 0000000000..280afbbf2c --- /dev/null +++ b/Asset/data/asset/functions/mob/0176.killer_bee/attack/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0176.killer_bee/attack/ +# +# Mobの攻撃時の処理 +# +# @within function asset:mob/alias/176/attack + +# super.attack + function asset:mob/super.attack + +# 死 + function api:mob/kill diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/hurt/.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/hurt/.mcfunction deleted file mode 100644 index e3ed289daa..0000000000 --- a/Asset/data/asset/functions/mob/0176.killer_bee/hurt/.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:mob/0176.killer_bee/hurt/ -# -# Mobの被ダメージ時の処理 -# -# @within function asset:mob/alias/176/hurt - -# 演出 - playsound entity.bee.hurt hostile @a ~ ~ ~ 1 1 - -# HurtTimeをスコア化 - scoreboard players set @s 4W.HurtTime 20 - data modify entity @s[scores={4W.MoveTime=..49}] NoAI set value 0b diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/load.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/load.mcfunction deleted file mode 100644 index f625966bb7..0000000000 --- a/Asset/data/asset/functions/mob/0176.killer_bee/load.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:mob/0176.killer_bee/load -# -# MOBに利用するスコアボード等の初期化処理 -# -# @within tag/function asset:mob/load - -#> 定義類はここに -# @within function asset:mob/0176.killer_bee/** - scoreboard objectives add 4W.HurtTime dummy - scoreboard objectives add 4W.MoveTime dummy - scoreboard objectives add 4W.AttackCT dummy diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/register.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/register.mcfunction index 32260feb50..c88aeffb7e 100644 --- a/Asset/data/asset/functions/mob/0176.killer_bee/register.mcfunction +++ b/Asset/data/asset/functions/mob/0176.killer_bee/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0176.killer_bee/register # @within asset:mob/alias/176/register +# 継承 (int) (オプション) + data modify storage asset:mob Extends append value 186 + function asset:mob/extends + +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:mob ExtendsSafe set value # ID (int) data modify storage asset:mob ID set value 176 # Type (string) Wikiを参照 @@ -11,38 +17,10 @@ data modify storage asset:mob Name set value '{"text":"キラービー"}' # Mobの説明文 (TextComponentString[]) (オプション) data modify storage asset:mob Lore set value ['{"text":"殺人蜂。","color":"white"}','{"text":"一応ミツバチなので針を刺すたびに致命傷を負う。","color":"white"}'] -# 武器 - # メインハンド (Compound(Item)) (オプション) - # data modify storage asset:mob Weapon.Mainhand set value - # オフハンド (Compound(Item)) (オプション) - # data modify storage asset:mob Weapon.Offhand set value -# 武器ドロップ率 ([float, float]) (オプション) - # data modify storage asset:mob WeaponDropChances set value -# 防具 - # 頭 (Compound(Item)) (オプション) - data modify storage asset:mob Armor.Head set value {id:"minecraft:stone",Count:1b,tag:{CustomModelData:20054}} - # 胴 (Compound(Item)) (オプション) - # data modify storage asset:mob Armor.Chest set value - # 脚 (Compound(Item)) (オプション) - # data modify storage asset:mob Armor.Legs set value - # 足 (Compound(Item)) (オプション) - # data modify storage asset:mob Armor.Feet set value -# 防具ドロップ率 ([float, float]) (オプション) - # data modify storage asset:mob ArmorDropChances set value # 体力 (double) (オプション) data modify storage asset:mob Health set value 1000 -# 攻撃力 (double) (オプション) - # data modify storage asset:mob AttackDamage set value 1 -# 防御力 (double) (オプション) // 被ダメージがある程度大きい場合1ptにつき0.8%カット、小さい場合1ptにつき約4%カット 20pt以上は頭打ち - # data modify storage asset:mob Defense set value -# 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす - # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) # data modify storage asset:mob Speed set value -# 索敵範囲 (double) (オプション) - # data modify storage asset:mob FollowRange set value -# ノックバック耐性 (double) (オプション) - # data modify storage asset:mob KnockBackResist set value # 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る # 物理倍率 (float) (オプション) data modify storage asset:mob Resist.Physical set value 1 @@ -54,3 +32,12 @@ data modify storage asset:mob Lore set value ['{"text":"殺人蜂。","color":"w data modify storage asset:mob Resist.Water set value 1 # 雷倍率 (float) (オプション) data modify storage asset:mob Resist.Thunder set value 1 + +# フィールド + data modify storage asset:mob Field.Damage set value 25f + +# 旋回時間 + data modify storage asset:mob Field.TurnTick set value 50 + +# 毒のID + data modify storage asset:mob Field.PoisonID set value 79 diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/summon/.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/summon/.mcfunction deleted file mode 100644 index ebf3dad026..0000000000 --- a/Asset/data/asset/functions/mob/0176.killer_bee/summon/.mcfunction +++ /dev/null @@ -1,4 +0,0 @@ -#> asset:mob/0176.killer_bee/summon/ -# @within asset:mob/alias/176/summon - -summon zombie ~ ~ ~ {Tags:["MobInit","ProcessCommonTag","AlwaysInvisible"],NoGravity:1b,NoAI:1b,Silent:1b,IsBaby:1b,DeathLootTable:"empty"} diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/tick/.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/tick/.mcfunction deleted file mode 100644 index f3a205ce42..0000000000 --- a/Asset/data/asset/functions/mob/0176.killer_bee/tick/.mcfunction +++ /dev/null @@ -1,39 +0,0 @@ -#> asset:mob/0176.killer_bee/tick/ -# -# Mobのtick時の処理 -# -# @within function asset:mob/alias/176/tick - -# スコア関連 - scoreboard players add @s 4W.MoveTime 1 - scoreboard players remove @s[scores={4W.HurtTime=0..}] 4W.HurtTime 1 - -# スコアによって速度が変わる -# スコアが50の時にプレイヤーが近くにいなければスコアをリセット -# 50..69の時に、近くのプレイヤーに軸合わせする -# 70以上で突進する - execute if entity @s[scores={4W.MoveTime=..49}] unless score @s 4W.HurtTime matches 0.. facing entity @p feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.3 ~ ~ - execute if entity @s[scores={4W.MoveTime=50}] unless entity @p[gamemode=!spectator,distance=..20] run scoreboard players reset @s 4W.MoveTime - execute if entity @s[scores={4W.MoveTime=50..69}] anchored eyes run tp @s ~ ~ ~ facing entity @p eyes - execute if entity @s[scores={4W.MoveTime=70..}] run tp @s ^ ^ ^1 ~ ~ - -# スコアリセット - scoreboard players reset @s[scores={4W.MoveTime=80..}] 4W.MoveTime - -# のけぞりから復帰 - data modify entity @s[scores={4W.HurtTime=..0}] NoAI set value 1b - -# 演出 - execute if entity @s[scores={4W.MoveTime=70}] run playsound entity.bee.hurt hostile @a ~ ~ ~ 1 1 - execute if entity @s[scores={4W.MoveTime=70..}] run particle cloud ~ ~1.25 ~ 0.25 0.25 0.25 0 0 - -# クールタイムを減らす 0以下にはならない - scoreboard players remove @s[scores={4W.AttackCT=1..}] 4W.AttackCT 1 - -# クールタイム中じゃないなら突進時に攻撃 - execute if entity @s[scores={4W.MoveTime=70..}] unless entity @s[scores={4W.AttackCT=1..}] positioned ~-0.5 ~0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] run function asset:mob/0176.killer_bee/tick/damage - -# カベにぶつかった際の処理はない。壁は貫通するもの - -# デスポーン処理 - execute unless entity @p[distance=..40] run function api:mob/remove diff --git a/Asset/data/asset/functions/mob/0176.killer_bee/tick/damage.mcfunction b/Asset/data/asset/functions/mob/0176.killer_bee/tick/damage.mcfunction deleted file mode 100644 index 17602298fd..0000000000 --- a/Asset/data/asset/functions/mob/0176.killer_bee/tick/damage.mcfunction +++ /dev/null @@ -1,27 +0,0 @@ -#> asset:mob/0176.killer_bee/tick/damage -# -# -# -# @within function asset:mob/0176.killer_bee/tick/ - -# 演出 - playsound entity.bee.sting hostile @a ~ ~ ~ 1 1 - -# 攻撃のCT設定 - scoreboard players set @s 4W.AttackCT 20 - -# ダメージ - data modify storage api: Argument.Damage set value 25 - data modify storage api: Argument.AttackType set value "Physical" - data modify storage api: Argument.ElementType set value "None" - function api:damage/modifier - execute as @p[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/ - function api:damage/reset - -# 自爆ダメージ - data modify storage api: Argument.Damage set value 200 - data modify storage api: Argument.AttackType set value "Physical" - data modify storage api: Argument.FixedDamage set value true - execute as @p[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/modifier - function api:damage/ - function api:damage/reset diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/attack/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/attack/.mcfunction new file mode 100644 index 0000000000..6b11efc09c --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/attack/.mcfunction @@ -0,0 +1,27 @@ +#> asset:mob/0186.ferocious_bee/attack/ +# +# Mobの攻撃時の処理 +# +# @within function asset:mob/alias/186/attack + +#> Private +# @private + #declare score_holder $Difficulty + +# Metadataがなければ return + execute unless data storage asset:context Attack{Metadata:"186.Attack"} run return fail + +# 難易度値取得 + function api:global_vars/get_difficulty + execute store result score $Difficulty Temporary run data get storage api: Return.Difficulty + +# 毒を付与 +# Stack = (Difficulty * 2), Duration = 80(Difficulty + 1) + data modify storage api: Argument.ID set from storage asset:context this.PoisonID + execute store result storage api: Argument.Stack int 2 run data get storage api: Return.Difficulty + execute store result storage api: Argument.Duration int 80 run scoreboard players add $Difficulty Temporary 1 + execute as @a[tag=Victim,distance=..32] run function api:entity/mob/effect/give + function api:entity/mob/effect/reset + +# リセット + scoreboard players reset $Difficulty Temporary diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/hurt/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/hurt/.mcfunction index 5b3fcec717..db120467cf 100644 --- a/Asset/data/asset/functions/mob/0186.ferocious_bee/hurt/.mcfunction +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/hurt/.mcfunction @@ -7,6 +7,15 @@ # 演出 playsound entity.bee.hurt hostile @a ~ ~ ~ 1 1 -# HurtTimeをスコア化 - scoreboard players set @s 56.HurtTime 20 - data modify entity @s[scores={56.MoveTime=..179}] NoAI set value 0b +# 以下の処理はDoTの場合は適用されない + execute if data storage asset:context Hurt{IsDoT:true} run return fail + +# 以下の処理はプレイヤーからの攻撃でないと適用されない + execute if data storage asset:context Hurt{} + +# HurtTimeをフィールドで疑似的に管理 + data modify storage asset:context this.HurtTime._ set from storage asset:context this.HurtTime.Max + +# のけぞり用にNoAIを無効化 + data modify entity @s NoAI set value 0b + data modify storage asset:context this.NoAI set value true diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/init/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/init/.mcfunction new file mode 100644 index 0000000000..4b58f40a65 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/init/.mcfunction @@ -0,0 +1,15 @@ +#> asset:mob/0186.ferocious_bee/init/ +# +# Mobのinit時の処理 +# +# @within asset:mob/alias/186/init + +# IsBabyの速度補正を打ち消すため、旋回中と突進中の速度をそれぞれ0.66667倍する + execute store result storage asset:context this.MoveSpeed.Turn double 0.0066667 run data get storage asset:context this.MoveSpeed.Turn 100 + execute store result storage asset:context this.MoveSpeed.Charge double 0.0066667 run data get storage asset:context this.MoveSpeed.Charge 100 + +# 速度を初期化しておく + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Turn + +# スコアも初期化しておく + execute store result score @s General.Mob.Tick run data get storage asset:context this.TurnTick -1 diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/load.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/load.mcfunction deleted file mode 100644 index bf13a741a9..0000000000 --- a/Asset/data/asset/functions/mob/0186.ferocious_bee/load.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:mob/0186.ferocious_bee/load -# -# MOBに利用するスコアボード等の初期化処理 -# -# @within tag/function asset:mob/load - -#> 定義類はここに -# @within function asset:mob/0186.ferocious_bee/** - scoreboard objectives add 56.HurtTime dummy - scoreboard objectives add 56.MoveTime dummy - scoreboard objectives add 56.AttackCT dummy diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/register.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/register.mcfunction index 773eaeefbd..9211428f6b 100644 --- a/Asset/data/asset/functions/mob/0186.ferocious_bee/register.mcfunction +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/register.mcfunction @@ -1,6 +1,15 @@ #> asset:mob/0186.ferocious_bee/register # @within asset:mob/alias/186/register +# 継承 (int) (オプション) + data modify storage asset:mob Extends append value 2002 + data modify storage asset:mob Extends append value 2004 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + +# 他のモブに継承されることを許可するか (boolean) (オプション) + data modify storage asset:mob ExtendsSafe set value true # ID (int) data modify storage asset:mob ID set value 186 # Type (string) Wikiを参照 @@ -10,7 +19,7 @@ # 名前 (TextComponentString) (オプション) data modify storage asset:mob Name set value '{"text":"凶暴なハチ","color":"yellow"}' # Mobの説明文 (TextComponentString[]) (オプション) - data modify storage asset:mob Lore set value ['{"text":"ブーーーーン!","color":"white"}','{"text":"毒は持ってない。","color":"white"}'] + data modify storage asset:mob Lore set value ['{"text":"ブーーーーン!","color":"white"}','{"text":"毒を持ってるので刺されない用に注意。","color":"white"}'] # 武器 # メインハンド (Compound(Item)) (オプション) # data modify storage asset:mob Weapon.Mainhand set value @@ -38,7 +47,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) data modify storage asset:mob FollowRange set value 50 # ノックバック耐性 (double) (オプション) @@ -54,3 +63,19 @@ data modify storage asset:mob Resist.Water set value 0.9 # 雷倍率 (float) (オプション) data modify storage asset:mob Resist.Thunder set value 1 + +# ダメージ + data modify storage asset:mob Field.Damage set value 11f + +# 毒のID + data modify storage asset:mob Field.PoisonID set value 29 + +# 旋回時間 + data modify storage asset:mob Field.TurnTick set value 180 + +# 速度 + data modify storage asset:mob Field.MoveSpeed set value {Turn:0.2,Charge:1.0} + +# 疑似HurtTime + data modify storage asset:mob Field.HurtTime._ set value 0 + data modify storage asset:mob Field.HurtTime.Max set value 20 diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/.mcfunction index ff5f8d08ac..73c5ffeb60 100644 --- a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/.mcfunction @@ -4,36 +4,29 @@ # # @within function asset:mob/alias/186/tick -# スコア関連 - scoreboard players add @s 56.MoveTime 1 - scoreboard players remove @s[scores={56.HurtTime=0..}] 56.HurtTime 1 - -# スコアによって速度が変わる -# スコアが180の時にプレイヤーが近くにいなければスコアをリセット -# 180..189の時に、近くのプレイヤーに軸合わせする -# 190以上で突進する - execute if entity @s[scores={56.MoveTime=..179}] unless score @s 56.HurtTime matches 0.. facing entity @p feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ - execute if entity @s[scores={56.MoveTime=180}] unless entity @p[gamemode=!spectator,distance=..20] run scoreboard players reset @s 56.MoveTime - execute if entity @s[scores={56.MoveTime=180..189}] anchored eyes run tp @s ~ ~ ~ facing entity @p eyes - execute if entity @s[scores={56.MoveTime=190..}] run tp @s ^ ^ ^1 ~ ~ - -# スコアリセット - scoreboard players reset @s[scores={56.MoveTime=200..}] 56.MoveTime +# Tickスコア + scoreboard players add @s General.Mob.Tick 1 + +# HurtTimeのデクリメント + execute store result storage asset:context this.HurtTime._ int 0.999999999 run data get storage asset:context this.HurtTime._ + +# スコアが-1以下 && HurtTime中でない ならプレイヤーを追尾する + execute if score @s General.Mob.Tick matches ..-1 if data storage asset:context this.HurtTime{_:0} run function asset:mob/0186.ferocious_bee/tick/move/turning +# プレイヤーが近くにいなければスコアをリセット + execute if score @s General.Mob.Tick matches 0 unless entity @p[gamemode=!spectator,distance=..40] run function asset:mob/0186.ferocious_bee/tick/reset +# 軸合わせする + execute if score @s General.Mob.Tick matches 0..19 anchored eyes run tp @s ~ ~ ~ facing entity @p[gamemode=!spectator,distance=..40] eyes +# 突進直前の諸々 + execute if score @s General.Mob.Tick matches 20 run function asset:mob/0186.ferocious_bee/tick/before_charge +# 突進 + execute if score @s General.Mob.Tick matches 20.. run function asset:mob/0186.ferocious_bee/tick/move/charge +# 突進終了 + execute if score @s General.Mob.Tick matches 30.. run function asset:mob/0186.ferocious_bee/tick/reset # のけぞりから復帰 - data modify entity @s[scores={56.HurtTime=..0}] NoAI set value 1b - -# 演出 - execute if entity @s[scores={56.MoveTime=190}] run playsound entity.bee.hurt hostile @a ~ ~ ~ 1 1 - execute if entity @s[scores={56.MoveTime=190..}] run particle cloud ~ ~1.25 ~ 0.25 0.25 0.25 0 0 - -# クールタイムを減らす 0以下にはならない - scoreboard players remove @s[scores={56.AttackCT=1..}] 56.AttackCT 1 - -# クールタイム中じゃないなら突進時に攻撃 - execute if entity @s[scores={56.MoveTime=190..}] unless score @s 56.AttackCT matches 1.. positioned ~-0.5 ~0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] run function asset:mob/0186.ferocious_bee/tick/damage + execute if data storage asset:context this.HurtTime{_:0,NoAI:false} run function asset:mob/0186.ferocious_bee/tick/end_hurt_time # カベにぶつかった際の処理はない。壁は貫通するもの # デスポーン処理 - execute unless entity @p[distance=..40] run function api:mob/remove + execute unless entity @p[gamemode=!spectator,distance=..40] run function api:mob/remove diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/before_charge.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/before_charge.mcfunction new file mode 100644 index 0000000000..5c8268223e --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/before_charge.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0186.ferocious_bee/tick/before_charge +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/ + +# 演出 + playsound entity.bee.hurt hostile @a ~ ~ ~ 1 1 + +# 速度設定 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Charge diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage.mcfunction deleted file mode 100644 index 8d5f0e14ba..0000000000 --- a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage.mcfunction +++ /dev/null @@ -1,19 +0,0 @@ -#> asset:mob/0186.ferocious_bee/tick/damage -# -# -# -# @within function asset:mob/0186.ferocious_bee/tick/ - -# 演出 - playsound entity.bee.sting hostile @a ~ ~ ~ 1 1 - -# 攻撃のCT設定 - scoreboard players set @s 56.AttackCT 20 - -# ダメージ - data modify storage api: Argument.Damage set value 11.0f - data modify storage api: Argument.AttackType set value "Physical" - data modify storage api: Argument.ElementType set value "None" - function api:damage/modifier - execute as @p[tag=!PlayerShouldInvulnerable,dx=0] run function api:damage/ - function api:damage/reset diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/.mcfunction new file mode 100644 index 0000000000..eefaec2fc4 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0186.ferocious_bee/tick/damage/ +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/move/charge + +# ダメージ + data modify storage api: Argument.Damage set from storage asset:context this.Damage + data modify storage api: Argument.Metadata set value "186.Attack" + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "None" + function api:damage/modifier + execute as @a[tag=!PlayerShouldInvulnerable,dx=0] run function asset:mob/0186.ferocious_bee/tick/damage/check_duplicate + function api:damage/reset diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/check_duplicate.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/check_duplicate.mcfunction new file mode 100644 index 0000000000..d5c8224e0a --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/damage/check_duplicate.mcfunction @@ -0,0 +1,12 @@ +#> asset:mob/0186.ferocious_bee/tick/damage/check_duplicate +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/damage/ + +# ダメージ + function asset:mob/call.m {method:"check_duplicate"} + execute if predicate asset:mob/2002.duplicate_hit_protection_mixin/is_first_hit run function api:damage/ + +# 演出 + execute if predicate asset:mob/2002.duplicate_hit_protection_mixin/is_first_hit run playsound entity.bee.sting hostile @s ~ ~ ~ 1 1 diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/end_hurt_time.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/end_hurt_time.mcfunction new file mode 100644 index 0000000000..2a08823a1c --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/end_hurt_time.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0186.ferocious_bee/tick/end_hurt_time +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/ + +# + data modify storage asset:context this.NoAI set value true + +# NoAIを有効化 + data modify entity @s NoAI set value true diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/.mcfunction new file mode 100644 index 0000000000..a0f2c2be31 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0186.ferocious_bee/tick/move/ +# +# +# +# @within function +# asset:mob/0186.ferocious_bee/tick/move/charge +# asset:mob/0186.ferocious_bee/tick/move/turning + +# 移動 + function asset:mob/call.m {method:"get_speed"} + execute at @s run function asset:mob/call.m {method:"move"} diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/charge.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/charge.mcfunction new file mode 100644 index 0000000000..369b61cfc5 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/charge.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0186.ferocious_bee/tick/move/charge +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/ + +# 演出 + particle cloud ^ ^0.7 ^-0.8 0.25 0.25 0.25 0 0 + +# 攻撃 + execute positioned ~-0.5 ~0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] run function asset:mob/0186.ferocious_bee/tick/damage/ + +# 移動 + function asset:mob/0186.ferocious_bee/tick/move/ diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/turning.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/turning.mcfunction new file mode 100644 index 0000000000..d4cbaaec53 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/move/turning.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0186.ferocious_bee/tick/move/turning +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/ + +# 追尾 + execute facing entity @p[gamemode=!spectator,distance=..64] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ~ ~ ~ ~ ~ + +# 移動 + function asset:mob/0186.ferocious_bee/tick/move/ diff --git a/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/reset.mcfunction b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/reset.mcfunction new file mode 100644 index 0000000000..55ad8285d1 --- /dev/null +++ b/Asset/data/asset/functions/mob/0186.ferocious_bee/tick/reset.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0186.ferocious_bee/tick/reset +# +# +# +# @within function asset:mob/0186.ferocious_bee/tick/ + +# tick初期化 + execute store result score @s General.Mob.Tick run data get storage asset:context this.TurnTick -1 + +# 速度初期化 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Turn + +# 多重ヒット防止のデータをリセット + function asset:mob/call.m {method:"reset_duplicate_protection"} diff --git a/Asset/data/asset/functions/mob/alias/176/attack.mcfunction b/Asset/data/asset/functions/mob/alias/176/attack.mcfunction new file mode 100644 index 0000000000..8140124ae1 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/176/attack.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/176/attack +# +# Mobの攻撃時の処理のエイリアス +# +# @within asset_manager:mob/triggers/attack/attack.m + +# 本来の処理を呼び出す + function asset:mob/0176.killer_bee/attack/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/176/hurt.mcfunction b/Asset/data/asset/functions/mob/alias/176/hurt.mcfunction deleted file mode 100644 index 61c53a7cd1..0000000000 --- a/Asset/data/asset/functions/mob/alias/176/hurt.mcfunction +++ /dev/null @@ -1,4 +0,0 @@ -#> asset:mob/alias/176/hurt -# @within asset_manager:mob/hurt/hurt.m - -function asset:mob/0176.killer_bee/hurt/ diff --git a/Asset/data/asset/functions/mob/alias/176/summon.mcfunction b/Asset/data/asset/functions/mob/alias/176/summon.mcfunction deleted file mode 100644 index 22db1ee58d..0000000000 --- a/Asset/data/asset/functions/mob/alias/176/summon.mcfunction +++ /dev/null @@ -1,4 +0,0 @@ -#> asset:mob/alias/176/summon -# @within asset_manager:mob/summon/summon.m - -function asset:mob/0176.killer_bee/summon/ diff --git a/Asset/data/asset/functions/mob/alias/176/tick.mcfunction b/Asset/data/asset/functions/mob/alias/176/tick.mcfunction deleted file mode 100644 index eaa20c1082..0000000000 --- a/Asset/data/asset/functions/mob/alias/176/tick.mcfunction +++ /dev/null @@ -1,4 +0,0 @@ -#> asset:mob/alias/176/tick -# @within asset_manager:mob/tick/tick.m - -function asset:mob/0176.killer_bee/tick/ diff --git a/Asset/data/asset/functions/mob/alias/186/attack.mcfunction b/Asset/data/asset/functions/mob/alias/186/attack.mcfunction new file mode 100644 index 0000000000..3e0935c445 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/186/attack.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/186/attack +# +# Mobの攻撃時の処理のエイリアス +# +# @within asset_manager:mob/triggers/attack/attack.m + +# 本来の処理を呼び出す + function asset:mob/0186.ferocious_bee/attack/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/186/init.mcfunction b/Asset/data/asset/functions/mob/alias/186/init.mcfunction new file mode 100644 index 0000000000..f62c61baae --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/186/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/186/init +# +# Init処理のエイリアス +# +# @within asset_manager:mob/triggers/init/init.m + +# 元のInit処理を呼び出す + function asset:mob/0186.ferocious_bee/init/ \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/mob/load.json b/Asset/data/asset/tags/functions/mob/load.json index 3c05053eb5..3d388cf93f 100644 --- a/Asset/data/asset/tags/functions/mob/load.json +++ b/Asset/data/asset/tags/functions/mob/load.json @@ -35,8 +35,6 @@ "asset:mob/0055.hetukedah/load", "asset:mob/0046.clock_of_despair/load", "asset:mob/0331.aurora_sorcerer/load", - "asset:mob/0176.killer_bee/load", - "asset:mob/0186.ferocious_bee/load", "asset:mob/0275.destroyed_block/0.load", "asset:mob/0273.hell_blade/0.load", "asset:mob/0204.infernal_watcher/load",