From 04733827a011c2e6a56bd28c8d6e9cabe5aac9e4 Mon Sep 17 00:00:00 2001 From: Kelly Kinkade Date: Sat, 29 Jul 2017 19:54:51 -0500 Subject: [PATCH] Favor/disfavor RECOVER_WOUNDED based on ALTRUISM (fixes #1106) --- plugins/labormanager/labormanager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index 5fb8dc60e..a2c8a6fd7 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -67,6 +67,7 @@ #include #include #include +#include #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;