From ee2026924351f26bc5e36fa667e58a92ff02812c Mon Sep 17 00:00:00 2001 From: CTD Date: Thu, 14 Aug 2014 23:53:32 +0200 Subject: [PATCH] Kleiner Fix bei den Regionen Es gibt Zeiten da sollte man einfach nicht Programmieren. So ist es richtig. --- src/kernel/move.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/kernel/move.c b/src/kernel/move.c index 9912ad4a6..c2a17f9c6 100644 --- a/src/kernel/move.c +++ b/src/kernel/move.c @@ -891,17 +891,17 @@ static unit *bewegung_blockiert_von(unit * reisender, region * r) } if (guard) { prob += base_prob; /* 30% base chance */ - prob = +guard_count*guard_number_prob; - if (r->terrain = newterrain(T_GLACIER)) - prob = +region_type_prob*2; - if (r->terrain = newterrain(T_SWAMP)) - prob = +region_type_prob*2; - if (r->terrain = newterrain(T_MOUNTAIN)) - prob = +region_type_prob; - if (r->terrain = newterrain(T_VOLCANO)) - prob = +region_type_prob; - if (r->terrain = newterrain(T_VOLCANO_SMOKING)) - prob = +region_type_prob; + prob += guard_count*guard_number_prob; + if (r->terrain == newterrain(T_GLACIER)) + prob += region_type_prob * 2; + if (r->terrain == newterrain(T_SWAMP)) + prob += region_type_prob * 2; + if (r->terrain == newterrain(T_MOUNTAIN)) + prob += region_type_prob; + if (r->terrain == newterrain(T_VOLCANO)) + prob += region_type_prob; + if (r->terrain == newterrain(T_VOLCANO_SMOKING)) + prob += region_type_prob; if (prob > 0 && chance(prob)) { return guard;