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
Original file line number Diff line number Diff line change
Expand Up @@ -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}]}]'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
execute at @p[distance=..10] positioned ~ ~2.5 ~ run function api:object/summon
function api:object/summon
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 @@ -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",
Expand Down