From b2ba44dbde8121721cd2e61d0bb95e5909bc9179 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 18 Jan 2026 11:10:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E3=83=AA?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mob/0235.orange_thrower/load.mcfunction | 9 --------- .../mob/0235.orange_thrower/register.mcfunction | 1 + .../mob/0235.orange_thrower/tick/.mcfunction | 12 ++++-------- .../mob/0235.orange_thrower/tick/attack.mcfunction | 8 ++++---- .../mob/0235.orange_thrower/tick/reset.mcfunction | 3 --- .../tick/set_orange_count.mcfunction | 9 +++++++++ .../mob/0235.orange_thrower/tick/summon.mcfunction | 5 ++++- Asset/data/asset/tags/functions/mob/load.json | 1 - 8 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 Asset/data/asset/functions/mob/0235.orange_thrower/load.mcfunction create mode 100644 Asset/data/asset/functions/mob/0235.orange_thrower/tick/set_orange_count.mcfunction diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/load.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/load.mcfunction deleted file mode 100644 index 87e5233830..0000000000 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/load.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:mob/0235.orange_thrower/load -# -# Mobに利用するスコアボード等の初期化処理 -# -# @within tag/function asset:mob/load - -#> 定義類はここに -# @within function asset:mob/0235.orange_thrower/** - scoreboard objectives add 6J.ResetTick dummy diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction index aac7e7b6c8..623c48aa22 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction @@ -57,3 +57,4 @@ # フィールド data modify storage asset:mob Field.Damage set value 18f + data modify storage asset:mob Field.OrangeCount set value 0 diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/.mcfunction index 4b89a09277..6173ff84ea 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/.mcfunction @@ -11,17 +11,13 @@ # スコアが0以上なら強制的に増やす # Tickの処理順の関係で0以上の方を先に書く execute if entity @s[scores={General.Mob.Tick=0..}] run scoreboard players add @s General.Mob.Tick 1 - execute if entity @s[scores={General.Mob.Tick=..0}] if entity @p[distance=..10] run scoreboard players add @s General.Mob.Tick 1 + execute if entity @s[scores={General.Mob.Tick=..0}] if entity @p[gamemode=!spectator,distance=..10] run scoreboard players add @s General.Mob.Tick 1 # スコアが0の時、周囲にプレイヤーがいなければスコアを戻す - execute if entity @s[scores={General.Mob.Tick=0}] unless entity @p[distance=..10] run scoreboard players set @s General.Mob.Tick -60 + execute if entity @s[scores={General.Mob.Tick=0}] unless entity @p[gamemode=!spectator,distance=..10] run scoreboard players set @s General.Mob.Tick -60 -# 何回みかんを召喚するかを難易度値で決める -# (2 * 難易度値 - 1)個召喚する -# 2(10 * (難易度値 - 1))Tick後にリセットするのでリセットするスコアを決めておく - execute if entity @s[scores={General.Mob.Tick=0}] run function api:global_vars/get_difficulty - execute if entity @s[scores={General.Mob.Tick=0}] store result score @s 6J.ResetTick run data get storage api: Return.Difficulty 20 - execute if entity @s[scores={General.Mob.Tick=0}] run scoreboard players remove @s 6J.ResetTick 20 +# 何回みかんを召喚するかをで決める + execute if entity @s[scores={General.Mob.Tick=0}] run function asset:mob/0235.orange_thrower/tick/set_orange_count # みかん召喚 execute if entity @s[scores={General.Mob.Tick=0..}] run function asset:mob/0235.orange_thrower/tick/attack diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/attack.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/attack.mcfunction index da54c63fd9..0e0c57b14f 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/attack.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/attack.mcfunction @@ -8,11 +8,11 @@ # @private #declare score_holder $Temp -# 10tick間隔で蜜柑を召喚 +# 10tick間隔でみかんを召喚 scoreboard players operation $Temp Temporary = @s General.Mob.Tick scoreboard players operation $Temp Temporary %= $10 Const - execute if score $Temp Temporary matches 0 run function asset:mob/0235.orange_thrower/tick/summon + execute if score $Temp Temporary matches 0 at @p[gamemode=!spectator,distance=..10] positioned ~ ~2.5 ~ run function asset:mob/0235.orange_thrower/tick/summon scoreboard players reset $Temp Temporary -# リセット - execute if score @s General.Mob.Tick >= @s 6J.ResetTick run function asset:mob/0235.orange_thrower/tick/reset +# 残り個数が0ならリセット + execute if data storage asset:context this{OrangeCount:0} run function asset:mob/0235.orange_thrower/tick/reset diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/reset.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/reset.mcfunction index f4104f2ccf..b6be99ba3e 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/reset.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/reset.mcfunction @@ -4,8 +4,5 @@ # # @within function asset:mob/0235.orange_thrower/tick/attack -# スコアをリセット - scoreboard players reset @s 6J.ResetTick - # 次の攻撃タイミングをランダムにする execute store result score @s General.Mob.Tick run random value -80..-50 diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/set_orange_count.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/set_orange_count.mcfunction new file mode 100644 index 0000000000..6407461a13 --- /dev/null +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/set_orange_count.mcfunction @@ -0,0 +1,9 @@ +#> asset:mob/0235.orange_thrower/tick/set_orange_count +# +# +# +# @within function asset:mob/0235.orange_thrower/tick/ + +# みかんを(難易度値*2 - 1)個召喚する + function api:global_vars/get_difficulty + execute store result storage asset:context this.OrangeCount int 0.9999999999 run data get storage api: Return.Difficulty 2 diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction index 8710c4b277..32f81b1285 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction @@ -4,8 +4,11 @@ # # @within function asset:mob/0235.orange_thrower/tick/attack +# みかんの数のデクリメント + execute store result storage asset:context this.OrangeCount int 0.9999999999 run data get storage asset:context this.OrangeCount + # みかんを召喚 data modify storage api: Argument.ID set value 2079 data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID - execute at @p[distance=..10] positioned ~ ~2.5 ~ run function api:object/summon + function api:object/summon diff --git a/Asset/data/asset/tags/functions/mob/load.json b/Asset/data/asset/tags/functions/mob/load.json index c7c1c9d582..ad6aae9bd1 100644 --- a/Asset/data/asset/tags/functions/mob/load.json +++ b/Asset/data/asset/tags/functions/mob/load.json @@ -21,7 +21,6 @@ "asset:mob/0376.convict_v2/load", "asset:mob/0378.red_knight_v3/load", "asset:mob/0369.prominence_spellbook/load", - "asset:mob/0235.orange_thrower/load", "asset:mob/0321.mini_guardian/load", "asset:mob/0311.blazing_inferno/load", "asset:mob/0059.jack_o_lantern/load", From 4894c817dbb6f95060a08e36a50c0f132a9cf006 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 18 Jan 2026 11:12:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=92=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E3=81=A7?= =?UTF-8?q?=E5=AE=9A=E7=BE=A9=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset/functions/mob/0235.orange_thrower/attack/.mcfunction | 2 +- .../asset/functions/mob/0235.orange_thrower/register.mcfunction | 2 +- .../functions/mob/0235.orange_thrower/tick/summon.mcfunction | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/attack/.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/attack/.mcfunction index be390682db..609cd15075 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/attack/.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/attack/.mcfunction @@ -13,7 +13,7 @@ execute at @p[tag=Victim,distance=..6] run playsound entity.generic.explode hostile @a ~ ~ ~ 0.3 1 0 # ダメージ - data modify storage api: Argument.Damage set value 21f + data modify storage api: Argument.Damage set from storage asset:context this.Damage.Vanilla data modify storage api: Argument.AttackType set value "Physical" data modify storage api: Argument.ElementType set value "Water" data modify storage api: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sによって橙色になった","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction index 623c48aa22..dae0035b4c 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/register.mcfunction @@ -56,5 +56,5 @@ data modify storage asset:mob Resist.Thunder set value 1.2 # フィールド - data modify storage asset:mob Field.Damage set value 18f + data modify storage asset:mob Field.Damage set value {Vanilla:21f,Orange:18f} data modify storage asset:mob Field.OrangeCount set value 0 diff --git a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction index 32f81b1285..a37d3488b6 100644 --- a/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction +++ b/Asset/data/asset/functions/mob/0235.orange_thrower/tick/summon.mcfunction @@ -9,6 +9,6 @@ # みかんを召喚 data modify storage api: Argument.ID set value 2079 - data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage + data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage.Orange execute store result storage api: Argument.FieldOverride.MobUUID int 1 run scoreboard players get @s MobUUID function api:object/summon