[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Raahul Kumar <raahul_da_man@xxxxxxxxx> wrote:
> > - m = get_virtual_defense_power(i, n, x, y);
>
> You're removing those lines. Explanation why they are not needed?
>
Sorry. I just spotted where you have moved them.
> > - m *= unit_types[n].hp * unit_types[n].firepower;
> > - if (vet) m *= 1.5;
> > - m /= 30;
> > - m *= m;
> > - d = m;
> > + vuln = get_virtual_defense_power(unit_type, victim_unit_type, x, y);
> > + vuln *= unit_types[victim_unit_type].hp *
> > + unit_types[victim_unit_type].firepower;
This should probably be a function. I can't help wondering if there is already
something in combat.c that does this. It all look so goddamn eerily familiar.
> > + if (veteran) vuln *= 1.5;
> > + vuln /= 30;
> > + vuln *= vuln;
> > +
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com
|
|