DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦1ff47bb80⟧ TextFile

    Length: 378 (0x17a)
    Types: TextFile
    Names: »attack.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Empire/attack.c« 

TextFile

attack_(own1, own2, ih1, aggr)
	char	*own1, *own2;
	int	*ih1, *aggr;
{
	int	h1 = *ih1, h2, c1, c2, zero = 0;
	int	s1 = 1, s2 = 1;

	c1 = cost_(own1, &h1);
	c2 = cost_(own2, &zero);
	if (*own1 == 's')
		s1 = 3;
	if (*own2 == 'S')
		s2 = 3;
	h2 = chits_(own2);
	h1 = (h1 + s2 - 1) / s2;
	h2 = (h2 + s1 - 1) / s1;
	return ((((c2 * 100) * h1) / h2) - (c1 * 100) + (*aggr * 100));
}