AW Arcaeca
Deus Vult
Isn't the Himeji castle's bonus universal though?
See, I was assuming something like this pseudocode:
But if no binary haxxing, fine. Where do we cap it? 10 promotions would be a measly 50%.
...although to be fair... I'm not sure it's actually possible to get 10 trade routes in game...
See, I was assuming something like this pseudocode:
Spoiler :
Code:
local numPromotions = 10 -- I guess
GameEvents.UnitSetXY.Add(
function(iPlayer, iUnit, iX, iY)
local pPlayer = Players[iPlayer]
local pUnit:GetUnitByID(iUnit)
local iNumTradeRoutes = ###!!!!WIZARDRY.### -- not a real function
-- Magic:
for k,v in pairs(bts(2^numPromotions)) do
-- note: bts(int NumberToConvert) is a number-to-bits function in a utility file I made
pUnit:SetHasPromotion(GameInfoTypes["PROMOTION_WHATSTHISPROMOTIONCALLED_"..tostring(v*5)], false)
-- I assume this promotion, like that of the catapult, gives only a vs. city bonus
end
-- bunch of code to find if the unit is ours
-- and if it's next to an enemy city
-- moarMagic(tm):
for k,v in pairs(bts(iNumTradeRoutes)) do
pUnit:SetHasPromotion(GameInfoTypes["PROMOTION_WHATSTHISPROMOTIONCALLED_"..tostring(v*5)], true)
end
-- yay we're done
end)
...although to be fair... I'm not sure it's actually possible to get 10 trade routes in game...