Page 1 of 1

AI incapacity to conquer fortresses

Posted: Sat Sep 26, 2020 2:51 pm
by Kossatx
I've finnished a complete 63 tuns game of my variation of POTZBLITZ MOD. The experience has been very good :D The only problem I will have to solve is the AI incapacity to conquer fortifications and key cities, with the exception of overwhelming superiority as Belgium invasion or other bonused situations. I have tried to fix this with this script in "ResolveCombat(attacker, defender)" function, in game_combat.lua file, but don't work. Any idea to make it work?

Code: Select all

if defender.hex.construction ~= nil then
	attackerLosses = attackerLosses * 3
	defenderLosses = defenderLosses * 3
end

Re: AI incapacity to conquer fortresses

Posted: Sun Sep 27, 2020 9:32 am
by Kossatx
Well, this option in function "ResolveCombat(attacker, defender)" works a better way:

Code: Select all

    -- Damage unit hp
if defender.hex.construction ~= nil then
	attacker:Damage(attackerLosses * 2)
    defender:Damage(defenderLosses * 2)
else
	attacker:Damage(attackerLosses)
    defender:Damage(defenderLosses)
end	
I would like the "X2 effect" appeared in prognosis, but I'm not sure how to do it :roll:

Re: AI incapacity to conquer fortresses

Posted: Sun Sep 27, 2020 1:28 pm
by Robotron
Well, that makes us two. I've no idea either.