Index: changelog
===================================================================
--- changelog	(revision 54096)
+++ changelog	(working copy)
@@ -12,6 +12,9 @@
  * Add-ons server:
    * Reject add-ons with names or titles that begin with a WML text format
      markup character (any of *, `, ~, {, ^, }, |, @, #, <, &)
+ * AI:
+   * Ai spread poison around and consider probabilities to poison a unit who will survive to the attack
  * Campaigns:
    * Added a note to all final scenarios, stating which one is the last scenario
    * Dead Water:

Index: src/ai/default/attack.cpp
===================================================================
--- src/ai/default/attack.cpp	(revision 53940)
+++ src/ai/default/attack.cpp	(working copy)
@@ -166,6 +167,9 @@
 		// add half of cost for poisoned unit so it might get chance to heal
 		avg_losses += cost * up->get_state(unit::STATE_POISONED) /2;
 
+		if (!bc->get_defender_stats().is_poisoned)
+			avg_damage_inflicted += game_config::poison_amount * 2 * bc->get_defender_combatant().poisoned * (1 - prob_killed);
+
 		// Double reward to emphasize getting onto villages if they survive.
 		if (on_village) {
 			avg_damage_taken -= game_config::poison_amount*2 * prob_survived;
@@ -235,12 +239,14 @@
 		// It's likely to advance: only if we can kill with first blow.
 		chance_to_kill = first_chance_kill;
 		// Negative average damage (it will advance).
-		avg_damage_inflicted = defend_it->hitpoints() - defend_it->max_hitpoints();
+		avg_damage_inflicted += defend_it->hitpoints() - defend_it->max_hitpoints();
 	} else {
 		chance_to_kill = prev_def->hp_dist[0];
-		avg_damage_inflicted = defend_it->hitpoints() - prev_def->average_hp(map.gives_healing(defend_it->get_location()));
+		avg_damage_inflicted += defend_it->hitpoints() - prev_def->average_hp(map.gives_healing(defend_it->get_location()));
 	}
 
+
+
 	delete prev_bc;
 	terrain_quality /= resources_used;
 
