[Freeciv-Dev] Re: (PR#2581) Layers Patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> Just trying to re-start the discussion on this.
>
> > This is the layers patch. It implements layered combat, which is
> > controlled by the option in game.ruleset. The option layered_combat is
>binary.
> >
> > Layered combat means two things: Killstack effect, and killing of all
> > units of the same layer type as the defending unit that got killed. (Layer
>is Sea, Air, Ground).
> >
> > All attacking units have a layer effect. They belong to a layer, Air
> > Sea Land, and when attacking a stack destroy first units of the same layer
> >as themselves.
> >
> > When a defending unit loses, all units of the same layer die.
> >
> > Example:
> >
> > Fighter unit attacks stack of mech inf and bombers. Current Freeciv
> > method is to pick best defender, and all units in the tile die when the
> >defender dies.
> >
> > Layer method:
> >
> > Fighter attacks stack of mech inf and bomber. Bomber defends first!
> > Air units must defend against other air unit attackers if they are present.
> > Ground unit vs ground attacker, sea vs sea etc. The best defender is not
> > necessarily picked.
>
> For that you need to change get_defender too, which is not done, AFAICS
One of us is hallucinating, Greg. I could have sworn
diff -ruN -Xdiff_ignore Cvs_Freeciv/common/combat.c Freeciv/common/combat.c
--- Cvs_Freeciv/common/combat.c Fri Dec 6 20:47:47 2002
+++ Freeciv/common/combat.c Fri Dec 6 21:38:48 2002
@@ -489,7 +489,9 @@
} else if (build_cost == best_cost) {
if (rating_of_best < defense_rating) {
change = TRUE;
- }
+ } else if (is_same_layer(attacker, defender)) {
+ change = TRUE; /* Units of the the attackers layer type */
+ }
}
}
was there. Which version of my layer patch are you looking at? Do not apply my
old patch! I will update to current CVS and send in a new one. Tell me if you
don't like my implementation. If you can do a detailed review, I'll be happy.
Note: Doesn't have to be Greg doing the review. Any of the usual suspects will
do.
> > If the bomber dies, only the air units in the tile dies. The mech inf
> > lives to fight again.
> >
> > Note: Layer effect currently only applies to units outside
> > city/fortress or airbase. If preferred, I can modify the layers patch to
> > affect cities as well.
Aloha,
RK.
Knee-jerk liberals and all the certified saints of sanctified humanism are
quick to condemn this great and much-maligned Transylvanian statesman. -William
F. Buckley, Jr. "The Wit and Wisdom of Vlad the Impaler"
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
- [Freeciv-Dev] Re: (PR#2581) Layers Patch,
Raahul Kumar <=
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Gregory Berkolaiko, 2003/05/10
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Per I. Mathisen, 2003/05/20
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Gregory Berkolaiko, 2003/05/21
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Per I. Mathisen, 2003/05/21
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Raahul Kumar, 2003/05/22
- [Freeciv-Dev] Re: (PR#2581) Layers Patch, Juhani Heino, 2003/05/22
|
|