Skip to content

Commit

Permalink
#5 $Healthを現在のScoreToHealthと同じにする処理を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed May 20, 2023
1 parent 42df05f commit a1c4a1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/score_damage/functions/core/get_status.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

# HP
execute store result score $Health ScoreDamageCore run data get entity @s Health 10000
# ScoreToHealthがある場合それがHP
execute if score @s ScoreToHealth matches -2147483648.. run scoreboard players operation $Health ScoreDamageCore = @s ScoreToHealth
execute if score @s ScoreToHealth matches -2147483648.. run scoreboard players operation $Health ScoreDamageCore *= $100 ScoreDamageCore
# 防御力
execute if data storage score_damage: Argument{BypassArmor:0b} store result score $DefensePoints ScoreDamageCore run attribute @s generic.armor get 100
execute if data storage score_damage: Argument{BypassArmor:1b} run scoreboard players set $DefensePoints ScoreDamageCore 0
Expand Down

0 comments on commit a1c4a1b

Please sign in to comment.