diff warfare.pl @ 263:83e3ce37779d

refined army scheme
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 22 Nov 2008 03:33:38 +0800
parents 2488d31240b7
children 53827cc442b6
line wrap: on
line diff
--- a/warfare.pl	Thu Nov 20 00:30:21 2008 +0800
+++ b/warfare.pl	Sat Nov 22 03:33:38 2008 +0800
@@ -64,7 +64,8 @@
 
 sub is_army_available {
     my ($self, $city) = @_;
-    return ($city->{army}->{Swordsman} >= 2 ) ? 1 : 0;
+    # 方陣撞不死
+    return ($city->{army}->{Swordsman} >= 2 && $city->{army}->{Phalanx} >= 1) ? 1 : 0;
 }
 
 sub locateVictim {