diff --git a/src/main/kotlin/cc/maxmc/blastingcrisis/game/GamePlaceBreakRule.kt b/src/main/kotlin/cc/maxmc/blastingcrisis/game/GamePlaceBreakRule.kt index 2c0a716..0f65697 100644 --- a/src/main/kotlin/cc/maxmc/blastingcrisis/game/GamePlaceBreakRule.kt +++ b/src/main/kotlin/cc/maxmc/blastingcrisis/game/GamePlaceBreakRule.kt @@ -39,15 +39,17 @@ class GamePlaceBreakRule(val game: Game) { game.map.teams.flatMap { it.sides + it.mine }.map { - it.containsBlock(loc).also { result -> debug("area $it contains $loc is $result") } + it.containsBlock(loc) }.reduce { a, b -> a || b } } // allow enemy wall - addRule("allow_enemy_wall") { player, type, loc -> + addRule("allow_wall_conditional") { player, type, loc -> val team = player.team ?: return@addRule false val isWall = game.teams - .map { team.teamInfo.wall.containsBlock(loc) } + .map { + it.teamInfo.wall.containsBlock(loc).also { result -> debug("area ${it.teamInfo.wall} contains $loc is $result") } + } .reduce { a, b -> a || b } if (!isWall) return@addRule false val isHome = team.teamInfo.wall.containsBlock(loc)