From d47563aec219ce4df53f753528ac911cb6ae8514 Mon Sep 17 00:00:00 2001 From: misterjoper007 <88659985+misterjoper007@users.noreply.github.com> Date: Thu, 16 Jun 2022 20:16:14 +0500 Subject: [PATCH 1/2] Hitlog nerf, spotter nerf 1. Hitlog is no longer applicable to enemies you don't see 2. Spotters don't mark you when you hit then. --- src/Battlescape/ProjectileFlyBState.cpp | 1 - src/Battlescape/TileEngine.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Battlescape/ProjectileFlyBState.cpp b/src/Battlescape/ProjectileFlyBState.cpp index cb1c5d7873..89827d16aa 100644 --- a/src/Battlescape/ProjectileFlyBState.cpp +++ b/src/Battlescape/ProjectileFlyBState.cpp @@ -985,7 +985,6 @@ void ProjectileFlyBState::projectileHitUnit(Position pos) { ai->setWasHitBy(_unit); _unit->setTurnsSinceSpotted(0); - _unit->setTurnsLeftSpottedForSnipers(std::max(victim->getSpotterDuration(), _unit->getTurnsLeftSpottedForSnipers())); } } } diff --git a/src/Battlescape/TileEngine.cpp b/src/Battlescape/TileEngine.cpp index c66612d3f7..13cbc58eca 100644 --- a/src/Battlescape/TileEngine.cpp +++ b/src/Battlescape/TileEngine.cpp @@ -2532,7 +2532,7 @@ bool TileEngine::hitUnit(BattleActionAttack attack, BattleUnit *target, const Po const int stunDamage = target->getStunlevel() - stunLevelOrig; // hit log - if (attack.attacker) + if (attack.attacker && target->getVisible()) { if (healthDamage > 0 || stunDamage > 0) { From 6ce218ca85001bf49d5b9304c8703004f4d1bc95 Mon Sep 17 00:00:00 2001 From: misterjoper007 <88659985+misterjoper007@users.noreply.github.com> Date: Mon, 20 Jun 2022 05:20:26 +0500 Subject: [PATCH 2/2] stealh overwatch crash when alret happens --- src/Battlescape/AIModule.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Battlescape/AIModule.cpp b/src/Battlescape/AIModule.cpp index d6bc5ff373..b9d5a7fb75 100644 --- a/src/Battlescape/AIModule.cpp +++ b/src/Battlescape/AIModule.cpp @@ -428,6 +428,13 @@ void AIModule::think(BattleAction *action) action->target = _patrolAction.target; break; case AI_COMBAT: + if (_save->isStealthMission() && _save->getAlarmLevel() == 0 && _save->getGeoscapeSave()->getDifficulty() < 3) + { + action->type = _attackAction.type = BA_NONE; + action->finalAction = true; + } + else + { action->type = _attackAction.type; action->target = _attackAction.target; // this may have changed to a grenade. @@ -455,6 +462,7 @@ void AIModule::think(BattleAction *action) { action->kneel = _unit->getArmor()->allowsKneeling(false); } + } break; case AI_AMBUSH: _unit->setCharging(0);