Skip to content

Commit

Permalink
Merge branch 'master' into rework/haiiro_artifact-trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Nov 17, 2024
2 parents c3793c5 + 4c7360f commit d8139c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

## ライセンスについて
このリポジトリでは、以下のディレクトリを除いて[CC0-1.0 License](LICENSE)が適用されます。
* [Asset](Asset)ディレクトリ ([MIT License](Asset/LICENSE))
* [NaturalMergeSort](NaturalMergeSort)ディレクトリ ([MIT License](NaturalMergeSort/LICENSE) / Copyright by 赤石愛)
* [OhMyDat](OhMyDat)ディレクトリ ([MIT License](OhMyDat/LICENSE) / Copyright by 赤石愛)
* [ScoreToHealth](ScoreToHealth)ディレクトリ ([Apache-2.0 License](ScoreToHealth/LICENSE) / Copyright by 赤石愛)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
#declare score_holder $LCD
#declare score_holder $TCD

# スコアに移す (TCD は null の可能性があるためデフォルト値として -1 を入れる)
# スコアに移す (TCD は null の可能性があるためデフォルト値として -16 を入れる)
scoreboard players set $TCD Temporary -16
execute store result score $LCD Temporary run data get storage asset:artifact LCD.Value
execute store result score $TCD Temporary run data get storage asset:artifact TCD.Value
execute if data storage asset:artifact TCD store result score $TCD Temporary run data get storage asset:artifact TCD.Value
# 比較して追加
execute if score $LCD Temporary > $TCD Temporary run data modify storage asset:artifact CD set from storage asset:artifact LCD
execute if score $LCD Temporary <= $TCD Temporary run data modify storage asset:artifact CD set from storage asset:artifact TCD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
data modify storage asset:artifact CooldownType.Type set from storage asset:artifact CopiedEquipmentCooldownTypes[-1]
function asset_manager:artifact/cooldown/common/find_type_cooldown with storage asset:artifact CooldownType

# TCD が存在する場合、LCD と TCD のうちクールダウン最大値が大きい方を CDs に入れる
execute if data storage asset:artifact TCD run function asset_manager:artifact/cooldown/common/compare_cooldown
execute if data storage asset:artifact TCD run data modify storage asset:artifact CDs append from storage asset:artifact CD
# TCD が null の場合、問答無用で LCD を入れる
execute unless data storage asset:artifact TCD run data modify storage asset:artifact CDs append from storage asset:artifact LCD
# LCD と TCD のうちクールダウン最大値が大きい方を CDs に入れる
function asset_manager:artifact/cooldown/common/compare_cooldown
data modify storage asset:artifact CDs append from storage asset:artifact CD

# 末尾削除
data remove storage asset:artifact CopiedEquipmentCooldownTypes[-1]
Expand Down

0 comments on commit d8139c3

Please sign in to comment.