Skip to content
Snippets Groups Projects
Commit 2c94ee30 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'display-morale-enemy' into 'pregmod-master'

Restore display of enemy morale modifier

See merge request !11669
parents ff7d4faa 01b635b7
No related branches found
No related tags found
1 merge request!11669Restore display of enemy morale modifier
Pipeline #75545 passed
...@@ -732,6 +732,21 @@ App.Events.conflictHandler = function() { ...@@ -732,6 +732,21 @@ App.Events.conflictHandler = function() {
node, node,
`Morale: ${num(Math.round(enemyMorale))}.`, `Morale: ${num(Math.round(enemyMorale))}.`,
); );
if (inBattle) {
App.UI.DOM.appendNewElement(
'div',
node,
// Allowing displaying 'Rebels' is just future-proofing. Currently that branch will never be taken.
`${inBattle ? 'Enemy' : 'Rebels'} morale modifier: +${morale.enemy}%`,
['indent'],
);
App.UI.DOM.appendNewElement(
'div',
node,
`${inBattle ? 'Enemy' : 'Rebels'} morale extra modifier due to troop numbers: +${Math.round((enemyMoraleTroopMod-1) * 100)}%`,
['indent'],
);
}
} }
let i = 0; // simulates the combat by pitting attk against def let i = 0; // simulates the combat by pitting attk against def
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment