Update scoring function.

Weight HP, EXP and terrain; Update village scoring; Fix bugs.