//embassy established
HandleEvent(EstablishEmbassyUnit) 'TEmbassyOrder' post {
if(IsHumanPlayer(unit[0].owner)) {
player[0] = unit[0].owner;
player[1] = city[0].owner;
Message(player[0],'TMEmbassy');
DisableTrigger('TEmbassyOrder');
} elseif (IsHumanPlayer(city[0].owner)) {
player[0] = city[0].owner;
player[1] = unit[0].owner;
Message(player[0],'TMEmbassy');
}
}
//make sure player has some PW
HandleEvent(BeginTurn) 'TSetPW' post {
if(IsHumanPlayer(player[0]) && CITIES_BUILDING) {
Message(player[0], 'TMIncreasePW');
DisableTrigger('TSetPW');
}
}
//when they have enough PW to build, then build
HandleEvent(BeginTurn) 'TUsePW' post {
if(IsHumanPlayer(player[0]) && player[0].publicworkslevel > 200) {
Message(g.player, 'TMUsePW');
DisableTrigger('TUsePW');
}
}
HandleEvent(BeginTurn) 'TPWTooHigh' post {
if(IsHumanPlayer(player[0]) && player[0].publicworkstax > 70) {
Message(g.player, 'TAPWTooHigh');
DisableTrigger('TPWTooHigh');
}
}
//general warnings n' info about **** that happens in the game
//there's a lot of them; I don't ****ing care enough to comment each one
HandleEvent(BioInfectCity) 'TBioInfectCity' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMBioInfectCity');
DisableTrigger('TBioInfectCity');
}
}
HandleEvent(BuyFront) 'TRushBuy' pre {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMRushBuy');
DisableTrigger('TRushBuy');
}
}
HandleEvent(CityRiot) 'TCityRiot' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMCityRiot');
DisableTrigger('TCityRiot');
}
}
HandleEvent(ConvertCityUnit) 'TConvertCity' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMConvertCity');
DisableTrigger('TConvertCity');
}
}
HandleEvent(CreateImprovement) 'TTileImprovement' post {
if(IsHumanPlayer(player[0])) {
FIRST_TILE_IMP = value[0];
Message(g.player, 'TMTileImprovement');
DisableTrigger('TTileImprovement');
}
}
HandleEvent(CreatePark) 'TCreatePark' pre {
player[1] = city[0].owner;
if(IsHumanPlayer(player[1])) {
Message(g.player, 'TMCreatePark');
DisableTrigger('TCreatePark');
}
}
HandleEvent(DetrenchOrder) 'TDetrenched' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMDetrenched');
DisableTrigger('TDetrenched');
}
}
HandleEvent(DisbandArmyOrder) 'TDisbandArmyOrder' pre {
unit_t tmpUnit;
int_t i;
for(i = 0; i < army[0].size; i = i + 1) {
GetUnitFromArmy(army[0], i, tmpUnit);
if(IsHumanPlayer(tmpUnit.owner)) {
player[0] = tmpUnit.owner;
Message(player[0], 'TMDisbandArmyOrder');
DisableTrigger('TDisbandArmyOrder');
return CONTINUE;
}
}
}
HandleEvent(DisbandCity) 'TDisbandCity' pre {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0]) && city[0].population <= 3) {
Message(g.player, 'TMDisbandCity');
DisableTrigger('TDisbandCity');
} elseif (IsHumanPlayer(player[0]) && city[0].population > 3) {
BIG_CITY = city[0].population*1000;
Message(g.player, 'TMCantDisbandBigCity');
}
}
HandleEvent(EnslaveSettler) 'TSettlerEnslaved' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(player[0], 'TMSettlerEnslaved');
DisableTrigger('TSettlerEnslaved');
}
}
HandleEvent(GiveMap) 'TGetMap' post {
if(IsHumanPlayer(player[1])) {
Message(g.player, 'TMGetMap');
DisableTrigger('TGetMap');
}
}
HandleEvent(ImprovementComplete) 'TTileImpComplete' post {
if(IsHumanPlayer(player[0])) {
FIRST_TILE_IMP = value[0];
Message(g.player, 'TMTileImpComplete');
DisableTrigger('TTileImpComplete');
}
}
HandleEvent(InciteRevolutionUnit) 'TSpyInciteRevolution' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMSpyInciteRevolution');
DisableTrigger('TSpyInciteRevolution');
}
}
HandleEvent(InciteUprisingUnit) 'TAbolitionistInciteUprising' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMAbolitionistInciteUprising');
DisableTrigger('TAbolitionistInciteUprising');
}
}
HandleEvent(IndulgenceSaleMade) 'TClericIndulgenceSale' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMClericIndulgenceSale');
DisableTrigger('TClericIndulgenceSale');
}
}
HandleEvent(InjoinUnit) 'TLawyerInjoinCity' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMLawyerInjoinCity');
DisableTrigger('TLawyerInjoinCity');
}
}
HandleEvent(MakeFranchise) 'TCorporateFranchise' post {
player[1] = city[0].owner;
if(IsHumanPlayer(player[1])) {
Message(player[1], 'TMCorporateFranchise');
DisableTrigger('TCorporateFranchise');
}
}
//HandleEvent(BoardTransportOrder) 'TMoveIntoTransport' pre {
//player[0] = army[0].owner;
// if(IsHumanPlayer(player[0])) {
// Message(g.player, 'TMMoveIntoTransport');
// DisableTrigger('TMoveIntoTransport');
// }
//}
HandleEvent(MoveOrder) 'TMovePathOrder' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMMovePathOrder');
DisableTrigger('TMovePathOrder');
}
}
HandleEvent(MoveUnloadOrder) 'TMoveUnloadOrder' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
if(!CheckForPlanes(army[0])) {
Message(g.player, 'TMMoveUnloadOrder');
DisableTrigger('TMoveUnloadOrder');
} else {
return CONTINUE;
}
}
}
HandleEvent(NanoInfectCity) 'TEcoTerroristNanoInfectCity' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMEcoTerroristNanoInfectCity');
DisableTrigger('TEcoTerroristNanoInfectCity');
}
}
HandleEvent(NukeCity) 'TCityNuked' post {
player[1] = city[0].owner;
if(IsHumanPlayer(player[1])) {
Message(player[1], 'TMCityNuked');
DisableTrigger('TCityNuked');
}
}
HandleEvent(PillageOrder) 'TPillageOrder' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMPillageOrder');
DisableTrigger('TPillageOrder');
}
}
HandleEvent(PirateOrder) 'TPirateOrder' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMPirateOrder');
DisableTrigger('TPirateOrder');
}
}
HandleEvent(PlagueCity) 'TInfectorPlagueCity' post {
player[1] = city[0].owner;
if(IsHumanPlayer(player[1])) {
Message(player[1], 'TMInfectorPlagueCity');
DisableTrigger('TInfectorPlagueCity');
}
}
HandleEvent(ReformCityUnit) 'TReformCityOrder' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMReformCityOrder');
DisableTrigger('TReformCityOrder');
}
}
HandleEvent(Reject) 'TDipRejection' post {
if(IsHumanPlayer(player[1])) {
Message(player[1], 'TMDipRejection');
DisableTrigger('TDipRejection');
}
}
HandleEvent(Reject) 'TDipRejectionPlayer' post {
if(IsHumanPlayer(player[0])) {
Message(player[0], 'TMDipRejectionPlayer');
DisableTrigger('TDipRejectionPlayer');
}
}
HandleEvent(RemoveFranchise) 'TLawyerSueFranchise' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMLawyerSueFranchise');
DisableTrigger('TLawyerSueFranchise');
}
}
HandleEvent(SellBuilding) 'TBuildingSold' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
improvement[0] = value[0];
Message(g.player, 'TMBuildingSold');
DisableTrigger('TBuildingSold');
}
}
HandleEvent(SetTarget) 'TNukeTargeted' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMNukeTargeted');
DisableTrigger('TNukeTargeted');
}
}
HandleEvent(SlaveRaidCity) 'TSlaverRaidCity' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMSlaverRaidCity');
DisableTrigger('TSlaverRaidCity');
}
}
HandleEvent(SleepOrder) 'TSleepOrder' post {
player[0] = army[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMSleepOrder');
DisableTrigger('TSleepOrder');
}
}
HandleEvent(UndergroundRailwayUnit) 'TAbolitionistFreeSlaves' post {
player[0] = city[0].owner;
if(IsHumanPlayer(player[0])) {
Message(g.player, 'TMAbolitionistFreeSlaves');
DisableTrigger('TAbolitionistFreeSlaves');
}
}
//HandleEvent(UnloadOrder) 'TUnloadCargoOrder' post {
//player[0] = army[0].owner;
// if(IsHumanPlayer(player[0]) && army[0]) {
// Message(g.player, 'TMUnloadCargo');
// DisableTrigger('TUnloadCargoOrder');
// }
//}
//City Mgmt one timers
trigger 'TCMQueueTab' on "CityWindow.Tabs.QueueTab.TabButton" when (1) {
Message(g.player, 'TMCMQueueTab');
DisableTrigger('TCMQueueTab');
}
trigger 'TCMInventoryTab' on "CityWindow.Tabs.InventoryTab.TabButton" when (1) {
Message(g.player, 'TMCMInventoryTab');
DisableTrigger('TCMInventoryTab');
}
trigger 'TCMSpecialists' on "CityWindow.Tabs.Specialists.TabButton" when (1) {
Message(g.player, 'TMCMSpecialists');
DisableTrigger('TCMSpecialists');
}
trigger 'TCMStatistics' on "CityWindow.Tabs.Statistics.TabButton" when (1) {
Message(g.player, 'TMCMStatistics');
DisableTrigger('TCMStatistics');
}
trigger 'TCMUnits' on "CityWindow.Tabs.Units.TabButton" when (1) {
Message(g.player, 'TMCMUnits');
DisableTrigger('TCMUnits');
}
//Shortcut Pad one-timers
trigger 'TSPCivMgmt' on "ControlPanelWindow.ControlPanel.ShortcutPad.Civili zationManagementButton" when (1) {
Message(g.player, 'TMSPCivMgmt');
DisableTrigger('TSPCivMgmt');
}
trigger 'TSPUnitMgmt' on "ControlPanelWindow.ControlPanel.ShortcutPad.UnitMa nagementButton" when (1) {
Message(g.player, 'TMSPUnitMgmt');
DisableTrigger('TSPUnitMgmt');
}
trigger 'TSPDiplomacy' on "ControlPanelWindow.ControlPanel.ShortcutPad.Diplom acyButton" when (1) {
Message(g.player, 'TMSPDiplomacy');
DisableTrigger('TSPDiplomacy');
}
trigger 'TSPScience' on "ControlPanelWindow.ControlPanel.ShortcutPad.Scienc eButton" when (1) {
Message(g.player, 'TMSPScience');
DisableTrigger('TSPScience');
}
trigger 'TSPGreatLibrary' on "ControlPanelWindow.ControlPanel.ShortcutPad.GreatL ibraryButton" when (1) {
Message(g.player, 'TMSPGreatLibrary');
DisableTrigger('TSPGreatLibrary');
}
trigger 'TSPTrade' on "ControlPanelWindow.ControlPanel.ShortcutPad.TradeB utton" when (1) {
Message(g.player, 'TMSPTrade');
DisableTrigger('TSPTrade');
}
trigger 'TSPNatlMgmt' on "ControlPanelWindow.ControlPanel.ShortcutPad.Nation alManagementButton" when (1) {
Message(g.player, 'TMSPNatlMgmt');
DisableTrigger('TSPNatlMgmt');
}
//this is at the end of the file because something is broken in SetString()
#include "tut2_msg.slc" //plain ol' messageboxes in here