[SDK] new Combat Rules

keldath

LivE LonG AnD PrOsPeR
Joined
Dec 20, 2005
Messages
7,362
Location
israel
hey folks,

im looking to perform some combat ruule changes:
if anyone could give some pointers where to implement it , it would help.

- attacker chance to fully heal after an attack
- if defender is not dead, add a chance to kill it any ways
- after attacker move - chance to gain a secondary attack move (setmadeattack = true)
but second attack will do less damage,no collateral and such

i guess i should add these to void CvUnit::resolveCombat?
suggestions where?

also -
i want to pop out a declare war message when units move into a plot with enemy units, same as entering borders,
suggestions where should i place it? movinto function?
which part?

for future tests,
been thinking about making some stack limitations -
maybe a max plot attack round per turn from a player?
maybe vice versa - max attacks from plot to plot?
for example - a stack of 10 units attacks a stack of 6 units - limit of the attacker plot is 8,
so 8 units will attack, the other 2 will get a cant moveinto.
the can move to other plots, fortify and etc.

what are your thoughts?
i hope someone can direct me where and what functions to use for it.
thanks,
keldath.
 
Hi Louis,

im on fanatics for 15 years and counting...
believe me, when i say, i know almost every mod and mod part that came out :)

Dale is not the answer for me, it was great at the time, but AI code i think was lacking in many aspects, as well as multiplayer stability (revdcm).

anyway,
thank you.
 
[...] i guess i should add these to void CvUnit::resolveCombat? suggestions where?
Somewhere near the code that assigns combat XP I guess.
for future tests,
been thinking about making some stack limitations -
maybe a max plot attack round per turn from a player?
maybe vice versa - max attacks from plot to plot?
for example - a stack of 10 units attacks a stack of 6 units - limit of the attacker plot is 8,
so 8 units will attack, the other 2 will get a cant moveinto.
the can move to other plots, fortify and etc.
@devolution has (tentatively) implemented that last year: github.com/ErikSandbraaten/AdvCiv/commit/...
He even chose 8 as the limit, just as in your example. Here are some brief comments I wrote about his idea.
also -
i want to pop out a declare war message when units move into a plot with enemy units, same as entering borders,
suggestions where should i place it? movinto function?
which part?
That's already how it works in BtS. K-Mod 1.06 changed it:
K-Mod changelog said:
Right clicking on a unit in neutral territory will no longer open a declare-war popup. (This makes it more consistent with other right-click behaviour.)
The K-Mod change should be either in CvUnit::getDeclareWarMove or in CvGame::selectionListGameNetMessage. (Fwiw, I prefer the K-Mod behavior – I don't want a DoW popup whenever I move into the same tile as an AI scout while exploring the map in the early game.)
 
@devolution has (tentatively) implemented that last year: github.com/ErikSandbraaten/AdvCiv/commit/...
He even chose 8 as the limit, just as in your example. Here are some brief comments I wrote about his idea.
huh,
8 is a lucky number :)
strange...
i looked for the posts, but couldnt remember who wrote and when.
anyway, ill postpone this. i have to do some ranged attack implementation now...

The K-Mod change should be either in CvUnit::getDeclareWarMove or in CvGame::selectionListGameNetMessage. (Fwiw, I prefer the K-Mod behavior – I don't want a DoW popup whenever I move into the same tile as an AI scout while exploring the map in the early game.)
on my mp game, my friend could not decare war on my, aside from stepping unto my territory,
the diplo screen have no war declaration, so we used alt hot key on the score board , so that was funky...
i just want a more viable way to attack units out of the open of another human, not withing cultural boarders.
 
Top Bottom