flag.define("SirenKilled",false)
flag.define("CharybdisKilled",false)
flag.define("MinotaurKilled",false)
-- Siren
discreteEvents.onUnitKilled(function(loser,winner,aggressor,victim,loserLocation,winnerVetStatus,loserVetStatus)
if loser.type == unitAliases.Siren and winner.type == unitAliases.Hero or winner.type == unitAliases.HeroBoat then
flag.setTrue("SirenKilled")
end
end)
local SirenKilledImage = civ.ui.loadImage("Images/sirens.bmp")
discreteEvents.onCityProcessingComplete(function (turn,tribe)
if flag.value("SirenKilled") and tribe:hasTech(techAliases.EpicPoetry) then
if tribe.isHuman then
local dialog = civ.ui.createDialog()
local dialog = civ.ui.createDialog()
dialog.title = "An Epic Tale of Sirens"
dialog.width = 500
dialog:addImage(SirenKilledImage)
local multiLineText = "With the proliferation of epic poetry, stories of the feats of a great hero from our realm's past have become popular.\n^\n^A particular story of interest has been the hero's resistance against the alluring song of sirens."
text.addMultiLineTextToDialog(multiLineText,dialog)
dialog:addOption("A tale for the ages, indeed. We should spread this story to the edges of the world!/n^(reputation reset with other civs)", 1)
dialog:addOption("Our talented poets and their stunning tales hold secrets to life itself./n^(fills current research progress; tech next turn)", 2)
dialog:addOption("There is truth to some of these stories; may our finest explorers find the hero's treasures plundered from these sirens./n^(+2000 gold)",3)
choice = dialog:show()
else
choice = math.random(1,3)
end
if choice == 1 then
local atLeastZeroVar = 100
atLeastZeroVar = math.max(0,atLeastZeroVar - 200)
tribe.attitude[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
tribe.reputation[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
elseif choice == 2 then
tribe.researchProgress = tribe.researchProgress +2000
elseif choice == 3 then
tribe.money = tribe.money +1000
end
end
end)
-- Charybdis
discreteEvents.onUnitKilled(function(loser,winner,aggressor,victim,loserLocation,winnerVetStatus,loserVetStatus)
if loser.type == unitAliases.Charybdis and winner.type == unitAliases.Hero or winner.type == unitAliases.HeroBoat then
flag.setTrue("CharybdisKilled")
end
end)
local intrepidNavy = getRandomOceanTile()
local CharybdisKilledImage = civ.ui.loadImage("Images/charybdis.bmp")
discreteEvents.onCityProcessingComplete(function (turn,tribe)
if flag.value("CharybdisKilled") and tribe:hasTech(techAliases.EpicPoetry) then
if tribe.isHuman then
local dialog = civ.ui.createDialog()
local dialog = civ.ui.createDialog()
dialog.title = "An Epic Tale of a Sea Monster"
dialog.width = 500
dialog:addImage(CharybdisKilledImage)
local multiLineText = "With the proliferation of epic poetry, stories of the feats of a great hero from our realm's past have become popular.\n^\n^A particular story of interest has been the hero's dramatic escape from a sea monster."
text.addMultiLineTextToDialog(multiLineText,dialog)
dialog:addOption("A tale for the ages, indeed. We should spread this story to the edges of the world!/n^(reputation reset with other civs)", 1)
dialog:addOption("Our talented poets and their stunning tales hold secrets to life itself./n^(fills current research progress; tech next turn)", 2)
dialog:addOption("This story merits further exploration of our seas! Let us commission intrepid sailors and captains./n^(+new navy)",3)
choice = dialog:show()
else
choice = math.random(1,3)
end
if choice == 1 then
local atLeastZeroVar = 100
atLeastZeroVar = math.max(0,atLeastZeroVar - 200)
tribe.attitude[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
tribe.reputation[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
elseif choice == 2 then
tribe.researchProgress = tribe.researchProgress +2000
elseif choice == 3 then
gen.createUnit(unitAliases.Quadrireme,civ.getCurrentTribe(),intrepidNavy,{count = 3, randomize = true, scatter = true, inCapital = false, veteran = true, homeCity = nil, overrideCanEnter = false, overrideDomain = false, overrideDefender = false})
gen.createUnit(unitAliases.Trireme,civ.getCurrentTribe(),intrepidNavy,{count = 3, randomize = true, scatter = true, inCapital = false, veteran = true, homeCity = nil, overrideCanEnter = false, overrideDomain = false, overrideDefender = false})
gen.createUnit(unitAliases.SiegeShip,civ.getCurrentTribe(),intrepidNavy,{count = 1, randomize = true, scatter = true, inCapital = false, veteran = true, homeCity = nil, overrideCanEnter = false, overrideDomain = false, overrideDefender = false})
gen.createUnit(unitAliases.Liburna,civ.getCurrentTribe(),intrepidNavy,{count = 2, randomize = true, scatter = true, inCapital = false, veteran = true, homeCity = nil, overrideCanEnter = false, overrideDomain = false, overrideDefender = false})
end
end
end)
-- Minotaur
discreteEvents.onUnitKilled(function(loser,winner,aggressor,victim,loserLocation,winnerVetStatus,loserVetStatus)
if loser.type == unitAliases.Minotaur and winner.type == unitAliases.Hero or winner.type == unitAliases.HeroBoat then
flag.setTrue("MinotaurKilled")
end
end)
local MinotaurKilledImage = civ.ui.loadImage("Images/minotaur.bmp")
discreteEvents.onCityProcessingComplete(function (turn,tribe)
if flag.value("MinotaurKilled") and tribe:hasTech(techAliases.EpicPoetry) then
if tribe.isHuman then
local dialog = civ.ui.createDialog()
local dialog = civ.ui.createDialog()
dialog.title = "An Epic Tale of a Labyrinth"
dialog.width = 500
dialog:addImage(MinotaurKilledImage)
local multiLineText = "With the proliferation of epic poetry, stories of the feats of a great hero from our realm's past have become popular.\n^\n^A particular story of interest has been the hero's struggle against a half-man, half-bull monstrosity."
text.addMultiLineTextToDialog(multiLineText,dialog)
dialog:addOption("A tale for the ages, indeed. We should spread this story to the edges of the world!/n^(reputation reset with other civs)", 1)
dialog:addOption("Our talented poets and their stunning tales hold secrets to life itself./n^(fills current research progress; tech next turn)", 2)
dialog:addOption("May this story inspire a new generation of adventurous warriors for ages to come!/n^(+elite infantry)",3)
choice = dialog:show()
else
choice = math.random(1,3)
end
if choice == 1 then
local atLeastZeroVar = 100
atLeastZeroVar = math.max(0,atLeastZeroVar - 200)
tribe.attitude[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
tribe.reputation[civ.getTribe(victimID)] = math.max(0,atLeastZeroVar - 200)
elseif choice == 2 then
tribe.researchProgress = tribe.researchProgress +2000
elseif choice == 3 then
gen.createUnit(unitAliases.EliteInfantry,civ.getCurrentTribe(),{0,0},{count = 5, randomize = false, scatter = false, inCapital = true, veteran = true, homeCity = nil, overrideCanEnter = false, overrideDomain = false, overrideDefender = false})
end
end
end)