From 9eecee83e3edca4992acfae973c9adc032bcc9b9 Mon Sep 17 00:00:00 2001 From: Lucky Date: Thu, 8 Jul 2021 14:19:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Add]=2021=E5=84=84=E4=BC=81=E7=94=BB?= =?UTF-8?q?=E5=BD=93=E6=97=A5=E3=81=AF=E7=AC=AC1=E6=95=B4=E5=9C=B0?= =?UTF-8?q?=E3=81=AE=E6=95=B4=E5=9C=B0=E9=87=8F=E3=82=AB=E3=82=A6=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E5=A2=97=E3=82=84=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../github/unchama/seichiassist/util/BreakUtil.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala index e57f779159..cd037f9261 100644 --- a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala +++ b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala @@ -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 @@ -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))) 1.5 + else 0.8 + } + else 1.0 seichiWorldFactor * sw01Penalty } From 21dfc277be48681a2dbf62eb946e8505406bd4c1 Mon Sep 17 00:00:00 2001 From: Lucky Date: Thu, 8 Jul 2021 20:08:19 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20=E5=80=8D=E6=95=B0=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scala/com/github/unchama/seichiassist/util/BreakUtil.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala index cd037f9261..16ce16ba9e 100644 --- a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala +++ b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala @@ -284,7 +284,7 @@ object BreakUtil { if (managedWorld.contains(ManagedWorld.WORLD_SW)) { // 5周年記念企画のうち21億チャレンジ用の条件分岐 // TODO: 終わったら消去する - if (LocalDate.now().isEqual(LocalDate.of(2021, 7, 22))) 1.5 + if (LocalDate.now().isEqual(LocalDate.of(2021, 7, 22))) 2.5 else 0.8 } else 1.0