diff --git a/data/effect/function/burn/apply.mcfunction b/data/effect/function/burn/apply.mcfunction index 498a7c978..9ed8522a0 100644 --- a/data/effect/function/burn/apply.mcfunction +++ b/data/effect/function/burn/apply.mcfunction @@ -1,6 +1,10 @@ #> effect:burn/apply ### 火だるま +# 効果付与の中断条件 +execute if predicate effect:fire_resistance run return fail +execute if block ~ ~ ~ water run return fail + execute unless score @s BurnCount matches 0.. run function makeup:effect/burn/apply execute store result score _ _ run data get entity @s active_effects[{id:"minecraft:invisibility",amplifier:3b}].duration 0.05 diff --git a/data/effect/function/confuse/apply.mcfunction b/data/effect/function/confuse/apply.mcfunction index 7b1258485..e86536b9b 100644 --- a/data/effect/function/confuse/apply.mcfunction +++ b/data/effect/function/confuse/apply.mcfunction @@ -1,5 +1,8 @@ #> effect:confuse/apply ### 混乱 +# 効果中なら中断 +execute if score @s ConfuseCount matches 0.. run return fail + scoreboard players set @s ConfuseCount 10 function makeup:effect/confuse/apply diff --git a/data/effect/function/curse/apply.mcfunction b/data/effect/function/curse/apply.mcfunction index 70d9d3980..b82a805b3 100644 --- a/data/effect/function/curse/apply.mcfunction +++ b/data/effect/function/curse/apply.mcfunction @@ -1,5 +1,9 @@ #> effect:curse/apply ### 呪詛 + +# 効果中なら中断 +execute if entity @s[tag=Curse] run return fail + tag @s add Curse effect give @s bad_omen infinite 0 false function makeup:effect/curse/apply diff --git a/data/effect/function/doom/apply.mcfunction b/data/effect/function/doom/apply.mcfunction index cade5bcc4..901db0051 100644 --- a/data/effect/function/doom/apply.mcfunction +++ b/data/effect/function/doom/apply.mcfunction @@ -1,5 +1,8 @@ #> effect:doom/apply ### 死の宣告 +# 効果中なら中断 +execute if score @s DoomCount matches 1..31 run return fail + scoreboard players set @s DoomCount 31 -execute if entity @s run function makeup:effect/doom/apply +function makeup:effect/doom/apply diff --git a/data/effect/function/doom/apply_super.mcfunction b/data/effect/function/doom/apply_super.mcfunction index dacb24a98..b21bc3e72 100644 --- a/data/effect/function/doom/apply_super.mcfunction +++ b/data/effect/function/doom/apply_super.mcfunction @@ -2,6 +2,9 @@ # 死の宣告(3カウント) +# 効果中なら中断 +execute if score @s DoomCount matches 1..13 run return fail + function effect:doom/apply scoreboard players set _ _ 10 scoreboard players operation @s DoomCount < _ _ diff --git a/data/effect/function/freeze/apply0.mcfunction b/data/effect/function/freeze/apply0.mcfunction index bb7c76851..d5955473d 100644 --- a/data/effect/function/freeze/apply0.mcfunction +++ b/data/effect/function/freeze/apply0.mcfunction @@ -1,6 +1,9 @@ #> effect:freeze/apply0 ### 凍結 +# 効果中なら中断 +execute if entity @s[tag=Freeze] run return fail + tag @s[nbt={Fire:-20s}] add Freeze tag @s[scores={BurnCount=0..}] remove Freeze diff --git a/data/effect/function/pale/apply.mcfunction b/data/effect/function/pale/apply.mcfunction index be49384b8..de330c09f 100644 --- a/data/effect/function/pale/apply.mcfunction +++ b/data/effect/function/pale/apply.mcfunction @@ -1,6 +1,10 @@ #> effect:pale/apply ###ペイル(最大HP割合減少) +# 効果付与の中断条件 +execute if score @s PaleLevel matches ..-1 run return fail +execute if score @s PaleLevel matches 9.. run return fail + # 減少させる scoreboard players add @s PaleLevel 1 function effect:pale/health_down diff --git a/data/effect/function/palsy/apply.mcfunction b/data/effect/function/palsy/apply.mcfunction index 13048709f..7f8ec0b90 100644 --- a/data/effect/function/palsy/apply.mcfunction +++ b/data/effect/function/palsy/apply.mcfunction @@ -1,5 +1,9 @@ #> effect:palsy/apply ### 麻痺 + +# 効果中なら中断 +execute if score @s PalsyLevel matches 0.. run return fail + scoreboard players set _ _ 40 scoreboard players operation @s PalsyLevel > _ _ diff --git a/data/effect/function/tnt/apply.mcfunction b/data/effect/function/tnt/apply.mcfunction index 3bdc0075d..d67834fbf 100644 --- a/data/effect/function/tnt/apply.mcfunction +++ b/data/effect/function/tnt/apply.mcfunction @@ -1,6 +1,9 @@ #> effect:tnt/apply ### トント +# 効果中なら中断 +execute if score @s TntCount matches 0.. run return fail + scoreboard players set @s TntCount 48 function makeup:effect/tnt/apply diff --git a/data/effect/function/too_bad_effect.mcfunction b/data/effect/function/too_bad_effect.mcfunction index 6f3c593f5..570710989 100644 --- a/data/effect/function/too_bad_effect.mcfunction +++ b/data/effect/function/too_bad_effect.mcfunction @@ -7,18 +7,16 @@ execute unless score @s ResistLock matches 1 unless score _ ResistEffects < @s R execute unless score @s ResistLock matches 1 if score _ ResistEffects < @s ResistEffects run function makeup:effect/too_bad_effect execute if score _ ResistEffects < @s ResistEffects run advancement revoke @s only effect:invisible -execute if entity @s[advancements={effect:invisible={doom=true}}] unless score @s DoomCount matches 1..31 run function effect:doom/apply -execute if entity @s[advancements={effect:invisible={super_doom=true}}] unless score @s DoomCount matches 1..13 run function effect:doom/apply_super -execute if entity @s[advancements={effect:invisible={super_doom=true}}] unless score @s DoomCount matches 1..13 run scoreboard players set _ _ 10 -execute if entity @s[advancements={effect:invisible={super_doom=true}}] unless score @s DoomCount matches 1..13 run scoreboard players operation @s DoomCount < _ _ -execute if entity @s[advancements={effect:invisible={burn=true}},predicate=!effect:fire_resistance] unless block ~ ~ ~ water run function effect:burn/apply -execute if entity @s[advancements={effect:invisible={freeze=true}}] unless entity @s[tag=Freeze] run function effect:freeze/apply0 -execute if entity @s[advancements={effect:invisible={palsy=true}}] unless score @s PalsyLevel matches 0.. run function effect:palsy/apply -execute if entity @s[advancements={effect:invisible={confuse=true}}] unless score @s ConfuseCount matches 0.. run function effect:confuse/apply -execute if entity @s[advancements={effect:invisible={curse=true}}] unless entity @s[tag=Curse] run function effect:curse/apply -execute if entity @s[advancements={effect:invisible={virus=true}}] unless score @s VirusCount matches 0.. run function effect:virus/apply -execute if entity @s[advancements={effect:invisible={tnt=true}}] unless score @s TntCount matches 0.. run function effect:tnt/apply -execute if entity @s[advancements={effect:invisible={pale=true}}] unless score @s PaleLevel matches ..-1 unless score @s PaleLevel matches 9.. run function effect:pale/apply +execute if entity @s[advancements={effect:invisible={doom=true}}] run function effect:doom/apply +execute if entity @s[advancements={effect:invisible={super_doom=true}}] run function effect:doom/apply_super +execute if entity @s[advancements={effect:invisible={burn=true}}] run function effect:burn/apply +execute if entity @s[advancements={effect:invisible={freeze=true}}] run function effect:freeze/apply0 +execute if entity @s[advancements={effect:invisible={palsy=true}}] run function effect:palsy/apply +execute if entity @s[advancements={effect:invisible={confuse=true}}] run function effect:confuse/apply +execute if entity @s[advancements={effect:invisible={curse=true}}] run function effect:curse/apply +execute if entity @s[advancements={effect:invisible={virus=true}}] run function effect:virus/apply +execute if entity @s[advancements={effect:invisible={tnt=true}}] run function effect:tnt/apply +execute if entity @s[advancements={effect:invisible={pale=true}}] run function effect:pale/apply execute if entity @s[advancements={effect:invisible={debility=true}}] run function effect:debility/apply execute if entity @a[distance=..32,scores={Burst=0..,Job=4}] run function skill:act/white_mage/clear/cure/level4 diff --git a/data/effect/function/virus/apply.mcfunction b/data/effect/function/virus/apply.mcfunction index ae8074ba8..2dbafe360 100644 --- a/data/effect/function/virus/apply.mcfunction +++ b/data/effect/function/virus/apply.mcfunction @@ -1,5 +1,8 @@ #> effect:virus/apply ### 病気 +# 効果中なら中断 +execute if score @s VirusCount matches 0.. run return fail + scoreboard players set @s VirusCount 90 function makeup:effect/virus/apply