From e7c7cd31c4c44e4d8882335e8fc65db51f94ff1d Mon Sep 17 00:00:00 2001 From: kuroma6666 Date: Sun, 15 Sep 2024 15:45:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E7=A0=B4=E5=A3=8A=E6=99=82=E3=80=81=E3=80=8C=E3=83=9E=E3=83=8A?= =?UTF-8?q?=E5=88=87=E3=82=8C=E3=80=8D=E3=81=8B=E3=81=A9=E3=81=86=E3=81=8B?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unchama/seichiassist/util/BreakUtil.scala | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) 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 29edc3a824..7ce6fe6cbc 100644 --- a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala +++ b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala @@ -16,6 +16,7 @@ import com.github.unchama.seichiassist.seichiskill.SeichiSkillUsageMode.{Active, import com.github.unchama.seichiassist.subsystems.breakcount.domain.CardinalDirection import com.github.unchama.seichiassist.subsystems.breakcount.domain.level.SeichiExpAmount import com.github.unchama.seichiassist.subsystems.breakskilltargetconfig.domain.BreakSkillTargetConfigKey +import com.github.unchama.seichiassist.subsystems.breakskilltriggerconfig.domain.BreakSkillTriggerConfigKey import com.github.unchama.targetedeffect.player.ActionBarMessageEffect import com.github.unchama.util.bukkit.ItemStackUtil import com.github.unchama.util.external.{ExternalPlugins, WorldGuardWrapper} @@ -174,6 +175,27 @@ object BreakUtil { canBreakBlockMadeFromQuartz } + /** + * ブロック破壊時、「マナ切れ」かどうか判定する。 + * @param player マナ切れブロック破壊停止設定を取得するプレイヤー + */ + def isBreakBlockManaFullyConsumed( + player: Player, + ): Boolean = { + + val isBreakBlockManaFullyConsumed = SeichiAssist + .instance + .breakSkillTriggerConfigSystem + .api + .breakSkillTriggerConfig(player, BreakSkillTriggerConfigKey.ManaFullyConsumed) + .unsafeRunSync() + + if(isBreakBlockManaFullyConsumed){ + ActionBarMessageEffect(s"${RED}マナ切れでブロック破壊を止めるスキルは有効化されています").run(player).unsafeRunSync() + } + isBreakBlockManaFullyConsumed + } + private def equalsIgnoreNameCaseWorld(name: String): Boolean = { val world = ManagedWorld.fromName(name).getOrElse(return false)