/* Raid for Money   4-28-92 */
transmit 'Raid Palace For Moneyn1'
if en.8<1 then do;transmit 'c6'enemy' does not have any Money!';boom=1;end
you=em.16*5+em.9*.1+em.15+random(1,20)+em.32
him=en.12+en.16*5+en.9*.1+en.15+random(1,30)+en.32
if em.8<en.8 then you=you+you*.1
if em.8<en.8 then him=him+him*.1
if em.8>100000 then you=you-you*.1
mar=abs(you-him)
if you>him then do;if mar<100 then mar=mar*2;mar=int(min(mar*10,en.8*.2));transmit 'c2You raid 'enemy'''s palace for' mar 'dollars.';en.8=en.8-mar;em.8=em.8+mar;call saveenemy;mes='c7'date time' c6' name' raided your Palace for $'mar' dollars!';call logit(3,fn);mes=name' raided 'enemy'''s palace for $'mar' dollars.';call inform;mes='c2'date time' c6' mes;call logit(0,'News');end
if him>you then do;if mar<100 then mar=mar*2;mar=int(min(mar*10,em.9*.2));transmit 'c2Your raid fails with the death of' mar 'soldier'PLURAL(mar)'.';em.9=em.9-mar;mes='c7'date time' c6' name' attempted a raid of your Palace for money!n1c2You overcame this raid killing 'mar' of 'name's soldiers.';call logit(3,fn);mes=name' failed on an attempted raid on 'enemy'.';call inform;mes='c2'date time' c6' mes;call logit(0,'News');end
call saveenemy
