Skip to content

Commit

Permalink
GH-605 Modify 特殊デバフ付与の中断条件を各apply内に移動
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed Jan 17, 2025
1 parent 797fa07 commit 8c25184
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 13 deletions.
4 changes: 4 additions & 0 deletions data/effect/function/burn/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions data/effect/function/confuse/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions data/effect/function/curse/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion data/effect/function/doom/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions data/effect/function/doom/apply_super.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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 < _ _
3 changes: 3 additions & 0 deletions data/effect/function/freeze/apply0.mcfunction
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 4 additions & 0 deletions data/effect/function/pale/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions data/effect/function/palsy/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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 > _ _

Expand Down
3 changes: 3 additions & 0 deletions data/effect/function/tnt/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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

Expand Down
22 changes: 10 additions & 12 deletions data/effect/function/too_bad_effect.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions data/effect/function/virus/apply.mcfunction
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8c25184

Please sign in to comment.