Favor/disfavor RECOVER_WOUNDED based on ALTRUISM (fixes #1106)

develop
Kelly Kinkade 2017-07-29 19:54:51 -05:00
parent c5c80d5dc0
commit 04733827a0
1 changed files with 12 additions and 0 deletions

@ -67,6 +67,7 @@
#include <df/ui.h>
#include <df/training_assignment.h>
#include <df/general_ref_contains_itemst.h>
#include <df/personality_facet_type.h>
#include "labormanager.h"
#include "joblabormapper.h"
@ -1485,6 +1486,17 @@ private:
score += 5000;
}
// Favor/disfavor RECOVER_WOUNDED based on ALTRUISM personality facet
if (labor == df::unit_labor::RECOVER_WOUNDED)
{
int altruism = d->dwarf->status.current_soul->personality.traits[df::personality_facet_type::ALTRUISM];
if (altruism >= 61)
score += 5000;
else if (altruism <= 24)
score -= 50000;
}
score -= Units::computeMovementSpeed(d->dwarf);
return score;