if (playerWinsAdjusted) { // Win rewards (armor-adjusted outcome) final heatDec = (combat.winRewards['heatDecrease'] as num?)?.toDouble() ?? 20.0; final repGain = (combat.winRewards['repGain'] as num?)?.toInt() ?? 50; final moneyGain = (combat.winRewards['money'] as num?)?.toDouble() ?? 0; final claimTerritory = combat.winRewards['territory'] == true; final isBoss = combat.type == CombatType.bossChallenge; Set newTerritories = Set.from(newPlayer.territories); if (claimTerritory) newTerritories.add(player.currentCityId); // Update gangTerritories status to controlled Map newGangTerritories = Map.from(newPlayer.gangTerritories); if (claimTerritory && newGangTerritories.containsKey(player.currentCityId)) { final current = newGangTerritories[player.currentCityId]!; newGangTerritories[player.currentCityId] = current.copyWith( status: TerritoryStatus.controlled, ); } // Generate boss-worthy loot final lootItems = isBoss ? LootPools.generateBossLoot(player.currentCityId, combat.enemyStrength) : [LootPools.generateBossLoot(player.currentCityId, combat.enemyStrength).first]; double totalLootValue = 0; for (final loot in lootItems) { totalLootValue += loot.cashValue; final colorHex = '#${loot.rarity.colorValue.toRadixString(16).substring(2)}'; newLog.insert(0, '${loot.rarity.emoji} ${loot.rarity.label}: ${loot.name} (${_fmt(loot.cashValue)})'); } // Boss bonus: extra cash and rep final bonusCash = isBoss ? combat.enemyStrength * 1000.0 : 0; final bonusRep = isBoss ? combat.enemyStrength * 10 : 0; newPlayer = newPlayer.copyWith( heat: (newPlayer.heat - heatDec).clamp(0, 100), repPoints: newPlayer.repPoints + repGain + bonusRep, money: newPlayer.money + moneyGain + totalLootValue + bonusCash, combatWins: newPlayer.combatWins + 1, territories: newTerritories, gangTerritories: newGangTerritories, bossesFought: isBoss ? newPlayer.bossesFought + 1 : newPlayer.bossesFought, eventsSurvived: newPlayer.eventsSurvived + 1, ammo: newAmmo, armorDurability: newArmorDurability, ); if (isBoss) { newLog.insert(0, '👑 BOSS DEFEATED! Bonus: +${_fmt(bonusCash)} cash, +$bonusRep rep'); } if (claimTerritory) { newLog.insert(0, '🏴 YOU NOW CONTROL ${player.currentCityId.toUpperCase()}! Passive income unlocked!'); } newLog.insert(0, '💪 FIGHT WON vs ${combat.enemyName}! Rep +${repGain + bonusRep}, Heat -${heatDec.round()}');