Skip to content

Commit

Permalink
Merge pull request #1080 from Lucky3028/feature/21_million_sw01
Browse files Browse the repository at this point in the history
21億企画当日は第1整地の整地量カウントを増やす
  • Loading branch information
kory33 authored Jul 20, 2021
2 parents 9b1e89d + 21dfc27 commit 0e0881a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.bukkit.entity.{Entity, EntityType, Player}
import org.bukkit.inventory.ItemStack
import org.bukkit.material.Dye

import java.time.LocalDate
import java.util.Random
import java.util.stream.IntStream

Expand Down Expand Up @@ -279,7 +280,14 @@ object BreakUtil {
def blockCountWeight(world: World): Double = {
val managedWorld = ManagedWorld.fromBukkitWorld(world)
val seichiWorldFactor = if (managedWorld.exists(_.isSeichi)) 1.0 else 0.0
val sw01Penalty = if (managedWorld.contains(ManagedWorld.WORLD_SW)) 0.8 else 1.0
val sw01Penalty =
if (managedWorld.contains(ManagedWorld.WORLD_SW)) {
// 5周年記念企画のうち21億チャレンジ用の条件分岐
// TODO: 終わったら消去する
if (LocalDate.now().isEqual(LocalDate.of(2021, 7, 22))) 2.5
else 0.8
}
else 1.0

seichiWorldFactor * sw01Penalty
}
Expand Down

0 comments on commit 0e0881a

Please sign in to comment.