From 81161bfb8c84d1416db52c0082c548e9e757605a Mon Sep 17 00:00:00 2001 From: EllaCoat Date: Sat, 28 Dec 2024 06:53:02 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=80=E6=97=A6=E5=9F=BA=E7=9B=A4?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0421.silver_turret/_index.d.mcfunction | 6 ++ .../mob/0421.silver_turret/attack/.mcfunction | 5 ++ .../0421.silver_turret/register.mcfunction | 65 +++++++++++++++++++ .../mob/0421.silver_turret/summon/.mcfunction | 8 +++ .../summon/debug.mcfunction | 10 +++ .../mob/0421.silver_turret/tick/.mcfunction | 5 ++ .../functions/mob/alias/421/attack.mcfunction | 8 +++ .../mob/alias/421/register.mcfunction | 8 +++ .../functions/mob/alias/421/summon.mcfunction | 8 +++ .../functions/mob/alias/421/tick.mcfunction | 8 +++ 10 files changed, 131 insertions(+) create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/421/attack.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/421/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/421/summon.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/421/tick.mcfunction diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction new file mode 100644 index 0000000000..c40a813b63 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction @@ -0,0 +1,6 @@ +#> asset:mob/0421.silver_turret/_index.d +# @private + +#> tag +# @within function asset:mob/0421.silver_turret/** + #declare \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction new file mode 100644 index 0000000000..c283c6bf21 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction @@ -0,0 +1,5 @@ +#> asset:mob/0421.silver_turret/attack/ +# +# Mobの攻撃時の処理 +# +# @within function asset:mob/alias/421/attack diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction new file mode 100644 index 0000000000..cff1568aa4 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction @@ -0,0 +1,65 @@ +#> asset:mob/0421.silver_turret/register +# +# Mobのデータを指定 +# +# @within function asset:mob/alias/421/register + +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:mob ExtendsSafe set value +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false +# ID (int) + data modify storage asset:mob ID set value 421 +# Type (string) Wikiを参照 + data modify storage asset:mob Type set value "Enemy" +# 干渉可能か否か (boolean) + data modify storage asset:mob Interferable set value true +# 名前 (TextComponentString) (オプション) + data modify storage asset:mob Name set value '[{"text":"シミシミタレット","color":"white"}]' +# Mobの説明文 (TextComponentString[]) (オプション) + # data modify storage asset:mob Lore set value +# 武器 + # メインハンド (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 + # 胴 (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 3900 +# 攻撃力 (double) (オプション) + # data modify storage asset:mob AttackDamage set value +# 防御力 (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 0.2 +# 索敵範囲 (double) (オプション) + data modify storage asset:mob FollowRange set value 32 +# ノックバック耐性 (double) (オプション) + data modify storage asset:mob KnockBackResist set value 0.5 +# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る + # 物理倍率 (float) (オプション) + data modify storage asset:mob Resist.Physical set value 0.5 + # 魔法倍率 (float) (オプション) + data modify storage asset:mob Resist.Magic set value 1 + # 火倍率 (float) (オプション) + data modify storage asset:mob Resist.Fire set value 0.75 + # 水倍率 (float) (オプション) + 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.myValue set value diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction new file mode 100644 index 0000000000..df6933007c --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0421.silver_turret/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:mob/alias/421/summon + +# 元となるEntityを召喚する + summon silverfish ~ ~ ~ {Tags:["MobInit","AntiBurn","AlwaysSlowFall"],Passengers:[{id:"minecraft:item_display",brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1f,1f,1f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20467}}}]} diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/summon/debug.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/summon/debug.mcfunction new file mode 100644 index 0000000000..43d8b811bb --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/0421.silver_turret/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 421 + function api:mob/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction new file mode 100644 index 0000000000..f5375d92d6 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction @@ -0,0 +1,5 @@ +#> asset:mob/0421.silver_turret/tick/ +# +# Mobのtick時の処理 +# +# @within asset:mob/alias/421/tick diff --git a/Asset/data/asset/functions/mob/alias/421/attack.mcfunction b/Asset/data/asset/functions/mob/alias/421/attack.mcfunction new file mode 100644 index 0000000000..6f6a2ad796 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/421/attack.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/421/attack +# +# Mobの攻撃時の処理のエイリアス +# +# @within asset_manager:mob/triggers/attack/attack.m + +# 本来の処理を呼び出す + function asset:mob/0421.silver_turret/attack/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/421/register.mcfunction b/Asset/data/asset/functions/mob/alias/421/register.mcfunction new file mode 100644 index 0000000000..4f6462246d --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/421/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/421/register +# +# Mobのデータ指定処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/register.m + +# 元の登録処理を呼び出す + function asset:mob/0421.silver_turret/register \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/421/summon.mcfunction b/Asset/data/asset/functions/mob/alias/421/summon.mcfunction new file mode 100644 index 0000000000..ea554484c1 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/421/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/421/summon +# +# Mob召喚処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/summon.m + +# 本来の処理を呼び出す + function asset:mob/0421.silver_turret/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/421/tick.mcfunction b/Asset/data/asset/functions/mob/alias/421/tick.mcfunction new file mode 100644 index 0000000000..fd4e26d88a --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/421/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/421/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:mob/triggers/tick/tick.m + +# 元のTick処理を呼び出す + function asset:mob/0421.silver_turret/tick/ \ No newline at end of file From d47bbe016f5c484e31ff36af564e64b8f3746e17 Mon Sep 17 00:00:00 2001 From: EllaCoat Date: Sat, 28 Dec 2024 07:49:55 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=82=B7=E3=83=9F=E3=82=B7=E3=83=9F?= =?UTF-8?q?=E3=82=BF=E3=83=AC=E3=83=83=E3=83=88=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0421.silver_turret/_index.d.mcfunction | 6 -- .../mob/0421.silver_turret/attack/.mcfunction | 23 +++++++ .../mob/0421.silver_turret/load.mcfunction | 9 +++ .../mob/0421.silver_turret/summon/.mcfunction | 2 +- .../mob/0421.silver_turret/tick/.mcfunction | 10 +++ .../0421.silver_turret/tick/fire.mcfunction | 26 ++++++++ .../mob/0422.silver_bullet/attack/.mcfunction | 28 ++++++++ .../0422.silver_bullet/register.mcfunction | 65 +++++++++++++++++++ .../mob/0422.silver_bullet/summon/.mcfunction | 8 +++ .../summon/debug.mcfunction | 10 +++ .../functions/mob/alias/422/attack.mcfunction | 8 +++ .../mob/alias/422/register.mcfunction | 8 +++ .../functions/mob/alias/422/summon.mcfunction | 8 +++ Asset/data/asset/tags/functions/mob/load.json | 3 +- 14 files changed, 206 insertions(+), 8 deletions(-) delete mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/load.mcfunction create mode 100644 Asset/data/asset/functions/mob/0421.silver_turret/tick/fire.mcfunction create mode 100644 Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0422.silver_bullet/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/0422.silver_bullet/summon/.mcfunction create mode 100644 Asset/data/asset/functions/mob/0422.silver_bullet/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/422/attack.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/422/register.mcfunction create mode 100644 Asset/data/asset/functions/mob/alias/422/summon.mcfunction diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction deleted file mode 100644 index c40a813b63..0000000000 --- a/Asset/data/asset/functions/mob/0421.silver_turret/_index.d.mcfunction +++ /dev/null @@ -1,6 +0,0 @@ -#> asset:mob/0421.silver_turret/_index.d -# @private - -#> tag -# @within function asset:mob/0421.silver_turret/** - #declare \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction index c283c6bf21..bbf738a98c 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction @@ -3,3 +3,26 @@ # Mobの攻撃時の処理 # # @within function asset:mob/alias/421/attack + +# バニラの攻撃じゃなかったら return + execute unless data storage asset:context Attack{IsVanilla:true} run return fail + +# 演出 + playsound entity.blaze.hurt hostile @a ~ ~ ~ 1 0.65 + +# ダメージ + # 引数の設定 + # 与えるダメージ + data modify storage lib: Argument.Damage set value 35.0f + # 第一属性 + data modify storage lib: Argument.AttackType set value "Physical" + # 第二属性 + data modify storage lib: Argument.ElementType set value "None" + # デスログ + data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がれて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' +# 補正functionを実行 + function lib:damage/modifier +# ダメージを与える + execute as @p[tag=Victim] at @s run function lib:damage/ +# リセット + function lib:damage/reset diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/load.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/load.mcfunction new file mode 100644 index 0000000000..1c6c442bc8 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/load.mcfunction @@ -0,0 +1,9 @@ +#> asset:mob/0421.silver_turret/load +# +# Mobに利用するスコアボード等の初期化処理 +# +# @within tag/function asset:mob/load + +#> 定義類はここに +# @within function asset:mob/0421.silver_turret/** + scoreboard objectives add BP.SummonCount dummy diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction index df6933007c..09d331711b 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/summon/.mcfunction @@ -5,4 +5,4 @@ # @within asset:mob/alias/421/summon # 元となるEntityを召喚する - summon silverfish ~ ~ ~ {Tags:["MobInit","AntiBurn","AlwaysSlowFall"],Passengers:[{id:"minecraft:item_display",brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1f,1f,1f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20467}}}]} + summon silverfish ~ ~ ~ {Tags:["MobInit","AntiBurn","AlwaysSlowFall"],Passengers:[{id:"minecraft:item_display",Tags:["AllowProcessingCommonTag","AutoKillWhenDieVehicle"],teleport_duration:1,brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0.3f,0f],scale:[1f,1f,1f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20467}}}]} diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction index f5375d92d6..7da6723f43 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction @@ -3,3 +3,13 @@ # Mobのtick時の処理 # # @within asset:mob/alias/421/tick + +# タレットの位置調整 + execute at @s on passengers run tp @s ^ ^ ^ ~ 0 + +# スコア上昇 + scoreboard players add @s General.Mob.Tick 1 + +# プレイヤーが近くにいる場合シミシミバレット発射! + execute if score @s General.Mob.Tick matches 150.. if score @s BP.SummonCount matches 20.. run scoreboard players set @s General.Mob.Tick 0 + execute if score @s General.Mob.Tick matches 150.. if entity @a[tag=!PlayerShouldInvulnerable,distance=..16] run function asset:mob/0421.silver_turret/tick/fire diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/tick/fire.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/tick/fire.mcfunction new file mode 100644 index 0000000000..8527ac4e55 --- /dev/null +++ b/Asset/data/asset/functions/mob/0421.silver_turret/tick/fire.mcfunction @@ -0,0 +1,26 @@ +#> asset:mob/0421.silver_turret/tick/fire +# +# 召喚 +# +# @within function asset:mob/0421.silver_turret/tick/ + +# 召喚 + data modify storage api: Argument.ID set value 422 + execute positioned ^ ^0.75 ^1 run function api:mob/summon + +# 演出 + playsound item.trident.return hostile @a ~ ~ ~ 1.0 1.75 + playsound block.soul_sand.place hostile @a ~ ~ ~ 1.0 0.8 + execute positioned ^ ^0.75 ^1 run particle smoke ~ ~ ~ 0.25 0.25 0.25 0.01 10 + +# 弾丸発射! + data modify storage lib: Argument.VectorMagnitude set value 1.5 + execute positioned ^ ^0.75 ^1 as @e[type=silverfish,scores={MobID=422},distance=..0.01] rotated ~ ~-10 run tp @s ^ ^ ^ ~ ~ + execute positioned ^ ^0.75 ^1 as @e[type=silverfish,scores={MobID=422},distance=..0.01] rotated ~ ~-10 run function lib:motion/ + +# 召喚数記録 + scoreboard players add @s BP.SummonCount 1 + +# リセット + data remove storage lib: Argument + scoreboard players set @s General.Mob.Tick 0 diff --git a/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction b/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction new file mode 100644 index 0000000000..2c64447f89 --- /dev/null +++ b/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction @@ -0,0 +1,28 @@ +#> asset:mob/0422.silver_bullet/attack/ +# +# Mobの攻撃時の処理 +# +# @within function asset:mob/alias/422/attack + +# バニラの攻撃じゃなかったら return + execute unless data storage asset:context Attack{IsVanilla:true} run return fail + +# 演出 + playsound entity.blaze.hurt hostile @a ~ ~ ~ 1 0.65 + +# ダメージ + # 引数の設定 + # 与えるダメージ + data modify storage lib: Argument.Damage set value 20.0f + # 第一属性 + data modify storage lib: Argument.AttackType set value "Physical" + # 第二属性 + data modify storage lib: Argument.ElementType set value "None" + # デスログ + data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がれて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' +# 補正functionを実行 + function lib:damage/modifier +# ダメージを与える + execute as @p[tag=Victim] at @s run function lib:damage/ +# リセット + function lib:damage/reset diff --git a/Asset/data/asset/functions/mob/0422.silver_bullet/register.mcfunction b/Asset/data/asset/functions/mob/0422.silver_bullet/register.mcfunction new file mode 100644 index 0000000000..5db08bf019 --- /dev/null +++ b/Asset/data/asset/functions/mob/0422.silver_bullet/register.mcfunction @@ -0,0 +1,65 @@ +#> asset:mob/0422.silver_bullet/register +# +# Mobのデータを指定 +# +# @within function asset:mob/alias/422/register + +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:mob ExtendsSafe set value +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false +# ID (int) + data modify storage asset:mob ID set value 422 +# Type (string) Wikiを参照 + data modify storage asset:mob Type set value "Enemy" +# 干渉可能か否か (boolean) + data modify storage asset:mob Interferable set value true +# 名前 (TextComponentString) (オプション) + data modify storage asset:mob Name set value '[{"text":"シミシミバレット","color":"white"}]' +# Mobの説明文 (TextComponentString[]) (オプション) + # data modify storage asset:mob Lore set value +# 武器 + # メインハンド (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 + # 胴 (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 1200 +# 攻撃力 (double) (オプション) + # data modify storage asset:mob AttackDamage set value +# 防御力 (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 0.2 +# 索敵範囲 (double) (オプション) + data modify storage asset:mob FollowRange set value 32 +# ノックバック耐性 (double) (オプション) + data modify storage asset:mob KnockBackResist set value 0.5 +# 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る + # 物理倍率 (float) (オプション) + data modify storage asset:mob Resist.Physical set value 0.5 + # 魔法倍率 (float) (オプション) + data modify storage asset:mob Resist.Magic set value 1 + # 火倍率 (float) (オプション) + data modify storage asset:mob Resist.Fire set value 0.75 + # 水倍率 (float) (オプション) + 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.myValue set value diff --git a/Asset/data/asset/functions/mob/0422.silver_bullet/summon/.mcfunction b/Asset/data/asset/functions/mob/0422.silver_bullet/summon/.mcfunction new file mode 100644 index 0000000000..448cd5f7fa --- /dev/null +++ b/Asset/data/asset/functions/mob/0422.silver_bullet/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0422.silver_bullet/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:mob/alias/422/summon + +# 元となるEntityを召喚する + summon silverfish ~ ~ ~ {Tags:["MobInit","AntiBurn","AlwaysSlowFall"]} diff --git a/Asset/data/asset/functions/mob/0422.silver_bullet/summon/debug.mcfunction b/Asset/data/asset/functions/mob/0422.silver_bullet/summon/debug.mcfunction new file mode 100644 index 0000000000..2f2f3ae8f0 --- /dev/null +++ b/Asset/data/asset/functions/mob/0422.silver_bullet/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/0422.silver_bullet/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 422 + function api:mob/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/422/attack.mcfunction b/Asset/data/asset/functions/mob/alias/422/attack.mcfunction new file mode 100644 index 0000000000..bfc33ec7ec --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/422/attack.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/422/attack +# +# Mobの攻撃時の処理のエイリアス +# +# @within asset_manager:mob/triggers/attack/attack.m + +# 本来の処理を呼び出す + function asset:mob/0422.silver_bullet/attack/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/422/register.mcfunction b/Asset/data/asset/functions/mob/alias/422/register.mcfunction new file mode 100644 index 0000000000..9ce2df1c20 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/422/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/422/register +# +# Mobのデータ指定処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/register.m + +# 元の登録処理を呼び出す + function asset:mob/0422.silver_bullet/register \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/422/summon.mcfunction b/Asset/data/asset/functions/mob/alias/422/summon.mcfunction new file mode 100644 index 0000000000..f5f76d06de --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/422/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/422/summon +# +# Mob召喚処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/summon.m + +# 本来の処理を呼び出す + function asset:mob/0422.silver_bullet/summon/ \ 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 7e30dd8967..5e8cc8d805 100644 --- a/Asset/data/asset/tags/functions/mob/load.json +++ b/Asset/data/asset/tags/functions/mob/load.json @@ -1,5 +1,6 @@ { "values": [ + "asset:mob/0421.silver_turret/load", "asset:mob/0311.blazing_inferno/load", "asset:mob/0376.convict_v2/load", "asset:mob/0378.red_knight_v3/load", @@ -72,4 +73,4 @@ "asset:mob/0081.snow_cloud/0.load", "asset:mob/0139.blast_eye/0.load" ] -} +} \ No newline at end of file From ceb7af174e4f5a7a9bc49e668f4105f21a3bd3c9 Mon Sep 17 00:00:00 2001 From: EllaCoat Date: Mon, 6 Jan 2025 07:46:33 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8C=87=E6=91=98=E7=AE=87=E6=89=80?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset/functions/mob/0421.silver_turret/attack/.mcfunction | 2 +- .../asset/functions/mob/0421.silver_turret/tick/.mcfunction | 4 +++- .../asset/functions/mob/0422.silver_bullet/attack/.mcfunction | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction index bbf738a98c..ed85de8458 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/attack/.mcfunction @@ -19,7 +19,7 @@ # 第二属性 data modify storage lib: Argument.ElementType set value "None" # デスログ - data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がれて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' + data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がられて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' # 補正functionを実行 function lib:damage/modifier # ダメージを与える diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction index 7da6723f43..d1304d4a3b 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/tick/.mcfunction @@ -7,9 +7,11 @@ # タレットの位置調整 execute at @s on passengers run tp @s ^ ^ ^ ~ 0 +# シミが一定以上ならreturn + execute if score @s BP.SummonCount matches 20.. run return fail + # スコア上昇 scoreboard players add @s General.Mob.Tick 1 # プレイヤーが近くにいる場合シミシミバレット発射! - execute if score @s General.Mob.Tick matches 150.. if score @s BP.SummonCount matches 20.. run scoreboard players set @s General.Mob.Tick 0 execute if score @s General.Mob.Tick matches 150.. if entity @a[tag=!PlayerShouldInvulnerable,distance=..16] run function asset:mob/0421.silver_turret/tick/fire diff --git a/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction b/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction index 2c64447f89..5c05c36cb3 100644 --- a/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction +++ b/Asset/data/asset/functions/mob/0422.silver_bullet/attack/.mcfunction @@ -19,7 +19,7 @@ # 第二属性 data modify storage lib: Argument.ElementType set value "None" # デスログ - data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がれて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' + data modify storage lib: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに群がられて倒れてしまった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' # 補正functionを実行 function lib:damage/modifier # ダメージを与える From 7e93922be48d98e64209baf9fdfef06919172a87 Mon Sep 17 00:00:00 2001 From: EllaCoat Date: Mon, 6 Jan 2025 10:27:20 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E8=80=90=E6=80=A7=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/mob/0421.silver_turret/register.mcfunction | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction b/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction index cff1568aa4..d4014d15a1 100644 --- a/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction +++ b/Asset/data/asset/functions/mob/0421.silver_turret/register.mcfunction @@ -52,11 +52,11 @@ data modify storage asset:mob KnockBackResist set value 0.5 # 属性倍率 // 1.0fで100% 最低でも25%は軽減されずに入る # 物理倍率 (float) (オプション) - data modify storage asset:mob Resist.Physical set value 0.5 + data modify storage asset:mob Resist.Physical set value 0.8 # 魔法倍率 (float) (オプション) - data modify storage asset:mob Resist.Magic set value 1 + data modify storage asset:mob Resist.Magic set value 1.4 # 火倍率 (float) (オプション) - data modify storage asset:mob Resist.Fire set value 0.75 + data modify storage asset:mob Resist.Fire set value 0.8 # 水倍率 (float) (オプション) data modify storage asset:mob Resist.Water set value 1 # 雷倍率 (float) (オプション)