diff --git a/config/terrain_movement.yaml b/config/terrain_movement.yaml index b4e0db2..2ba79ab 100644 --- a/config/terrain_movement.yaml +++ b/config/terrain_movement.yaml @@ -7,8 +7,8 @@ mountain_rock_height_km: 2.3 # Height in km >= 2.3 is rocky mountain snow_height_km: 3.1 # Altitude in km >= 3.1 is high peak snow polar_snow_line_enabled: true # Whether latitude reduces snowline altitude polar_snow_line_base_km: 2.5 # Base snowline at temperate latitudes -polar_snow_factor_start: 0.40 # Latitude distFromCenter where polar cooling starts -polar_snow_factor_end: 0.85 # Latitude distFromCenter where sea-level snowline is reached +polar_snow_factor_start: 0.88 # Latitude distFromCenter where polar cooling starts (polar caps only) +polar_snow_factor_end: 0.98 # Latitude distFromCenter where sea-level snowline is reached # Slope and elevation movement penalties # Elevation difference (deltaH in km) between hex centers diff --git a/qscenerenderer.cpp b/qscenerenderer.cpp index 6074f82..25d104f 100644 --- a/qscenerenderer.cpp +++ b/qscenerenderer.cpp @@ -1546,9 +1546,14 @@ void QSceneRenderer::mousePressEvent(QMouseEvent *event) update(); return; } else if (event->button() == Qt::RightButton) { - // Right click: Move selected unit directly to hex! + // Right click: Attack enemy unit or move selected unit directly to hex! if (selected) { - GameManager::instance().commandMoveSelected(hitX, hitY, m_point, m_numPoints05); + Unit *enemy = GameManager::instance().getUnitAt(hitX, hitY); + if (enemy && enemy->playerId != selected->playerId) { + GameManager::instance().commandAttack(enemy); + } else { + GameManager::instance().commandMoveSelected(hitX, hitY, m_point, m_numPoints05); + } update(); return; } diff --git a/terrainmovementmanager.cpp b/terrainmovementmanager.cpp index 508ab0c..94323fa 100644 --- a/terrainmovementmanager.cpp +++ b/terrainmovementmanager.cpp @@ -12,8 +12,8 @@ TerrainMovementConfig::TerrainMovementConfig() snowHeightKm(3.1f), polarSnowLineEnabled(true), polarSnowLineBaseKm(2.5f), - polarSnowFactorStart(0.40f), - polarSnowFactorEnd(0.85f), + polarSnowFactorStart(0.88f), + polarSnowFactorEnd(0.98f), uphillSlopeMultiplier(4.0f), downhillSlopeBonusMultiplier(2.0f), minStepCost(0.25f), @@ -143,7 +143,7 @@ QString TerrainMovementManager::getTerrainType(int tx, int ty, Matrix2D= m_config.snowHeightKm) {