public PreCombatDialog(FreeColClient freeColClient, GUI gui,
                           FreeColGameObject attacker,
                           FreeColGameObject defender) {
        super(freeColClient, gui);

        CombatModel combatModel = attacker.getGame().getCombatModel();
        Set<Modifier> offence = sortModifiers(combatModel
                .getOffensiveModifiers(attacker, defender));
        Set<Modifier> defence = sortModifiers(combatModel
                .getDefensiveModifiers(attacker, defender));

        setLayout(new MigLayout("wrap 6", "[sg label]20[sg value, right]1px[sg percent]40"
                                + "[sg label]20[sg value, right]1px[sg percent]", ""));

        // left hand side: attacker
        // right hand side: defender
        String attackerName;
        JLabel attackerLabel;
        String defenderName;
        JLabel defenderLabel;
        if (combatModel.combatIsAttack(attacker, defender)) {
            Unit attackerUnit = (Unit) attacker;
            Unit defenderUnit = (Unit) defender;
            attackerName = Messages.message(StringTemplate.template("model.unit.nationUnit")
                    .addStringTemplate("%nation%", attackerUnit.getOwner().getNationName())
                    .addStringTemplate("%unit%", attackerUnit.getLabel()));
            attackerLabel = new UnitLabel(getFreeColClient(), attackerUnit, getGUI(), false, true);
            defenderName = Messages.message(StringTemplate.template("model.unit.nationUnit")
                    .addStringTemplate("%nation%", defenderUnit.getOwner().getNationName())
                    .addStringTemplate("%unit%", defenderUnit.getLabel()));
            defenderLabel = new UnitLabel(getFreeColClient(), defenderUnit, getGUI(), false, true);
        } else if (combatModel.combatIsSettlementAttack(attacker, defender)) {
            Unit attackerUnit = (Unit) attacker;
            Settlement settlement = (Settlement) defender;
            attackerName = Messages.message(StringTemplate.template("model.unit.nationUnit")
                    .addStringTemplate("%nation%", attackerUnit.getOwner().getNationName())
                    .addStringTemplate("%unit%", attackerUnit.getLabel()));
            attackerLabel = new UnitLabel(getFreeColClient(), attackerUnit, getGUI(), false, true);
            defenderName = settlement.getName();
            defenderLabel = new JLabel(gui.getImageIcon(settlement, false));
        } else {
            throw new IllegalStateException("Bogus attack");
        }

        add(new JLabel(attackerName), "span 3, align center");
        add(new JLabel(defenderName), "span 3, align center");
        add(attackerLabel, "span 3, align center");
        add(defenderLabel, "span 3, align center");
        add(new JSeparator(JSeparator.HORIZONTAL), "newline, span 3, growx");
        add(new JSeparator(JSeparator.HORIZONTAL), "span 3, growx");

        Iterator<Modifier> offenceModifiers = offence.iterator();
        Iterator<Modifier> defenceModifiers = defence.iterator();

        while (offenceModifiers.hasNext() || defenceModifiers.hasNext()) {
            int skip = 0;
            boolean hasOffence = offenceModifiers.hasNext();
            if (hasOffence) {
                if (!addModifier(offenceModifiers.next(), true, 0)) {
                    skip = 1;
                }
            } else {
                skip = 3;
            }
            if (defenceModifiers.hasNext()) {
                addModifier(defenceModifiers.next(), !hasOffence, skip);
            }
        }

        Font bigFont = getFont().deriveFont(Font.BOLD, 20f);

        float offenceResult = FeatureContainer.applyModifierSet(0, attacker.getGame().getTurn(), offence);
        JLabel finalOffenceLabel = new JLabel(Messages.message("model.source.finalResult.name"));
        finalOffenceLabel.setFont(bigFont);

        add(new JSeparator(JSeparator.HORIZONTAL), "newline, span 3, growx");
        add(new JSeparator(JSeparator.HORIZONTAL), "span 3, growx");
        add(finalOffenceLabel);
        JLabel finalOffenceResult = new JLabel(getModifierFormat().format(offenceResult));
        finalOffenceResult.setFont(bigFont);
        add(finalOffenceResult);

        float defenceResult = FeatureContainer.applyModifierSet(0, attacker.getGame().getTurn(), defence);
        JLabel finalDefenceLabel = new JLabel(Messages.message("model.source.finalResult.name"));
        finalDefenceLabel.setFont(bigFont);
        add(finalDefenceLabel, "skip");
        JLabel finalDefenceResult = (defenceResult == Modifier.UNKNOWN)
            ? new JLabel("???")
            : new JLabel(getModifierFormat().format(defenceResult));
        finalDefenceResult.setFont(bigFont);
        add(finalDefenceResult);

        add(okButton, "newline 20, span, split 2, tag ok");
        add(cancelButton, "tag cancel");

        setSize(getPreferredSize());
    }