AW Arcaeca
Deus Vult
I'm thinking of expanding the UA for my Swiss civ. Anyone who's aware of it should know it's fairly bland at the moment.
So I was thinking something along the lines of
When another major civilization declares war on you, receive 1 melee or gunpowder unit based on your current technologies in all cities.
I may have to reword it a little, but basically that means 1 warrior per city if you're in the ancient era when someone declares war on you, 1 spearman in the classical until you can get swordsmen (will still require iron), then pikemen once they're available, then longswordsmen, then musketman... and continuing down the melee > gunpowder upgrade path
Except I don't know how to detect when you've been declared war on. This is what I have so far:
(*Meant to have the Events.WarStateChange hook, in case you're wondering about the parameters)
And then I hit a figurative brick wall of lua.
Of course the player would have to have the appropriate technologies, and I'm trying to decide whether or not the militia should be taken away after the war ends, and whether or not to give them combat penalties to nerf it a little.
Any suggestions on how to code it?
Or on how to buff or nerf this UA addition?
So I was thinking something along the lines of
When another major civilization declares war on you, receive 1 melee or gunpowder unit based on your current technologies in all cities.
I may have to reword it a little, but basically that means 1 warrior per city if you're in the ancient era when someone declares war on you, 1 spearman in the classical until you can get swordsmen (will still require iron), then pikemen once they're available, then longswordsmen, then musketman... and continuing down the melee > gunpowder upgrade path
Except I don't know how to detect when you've been declared war on. This is what I have so far:
Code:
function Swiss_WarMilitia(pTeam, mTeam, true)
local pPlayer = Players[playerID]
local pTeam = pPlayer:GetTeam()
if (pPlayer:IsAlive()) then
if (pPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_SWITZERLAND) then
for i, mTeam in pairs(Teams) do
if (mTeam ~= pTeam) then
And then I hit a figurative brick wall of lua.
Of course the player would have to have the appropriate technologies, and I'm trying to decide whether or not the militia should be taken away after the war ends, and whether or not to give them combat penalties to nerf it a little.
Any suggestions on how to code it?
Or on how to buff or nerf this UA addition?