

elseif(TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_ANCIENT_CITY_ONE)) || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_MEDIEVAL_CITY_ONE))) { GrantAdvance(owner, AdvanceDB(ADVANCE_SUBNEURAL_ADS)); Event:CreateImprovement(owner,tmpLoc, TerrainImprovementDB(TILEIMP_ANCIENT_CITY_DEAD),0); RemoveAdvance(owner, AdvanceDB(ADVANCE_SUBNEURAL_ADS)); }
HandleEvent(CreateImprovement) 'DontLetPlaceImpsOverCities' pre { // Does not work :( if(ExpansionPlacement == 0) { // Looks like CreateImprovement function if(TileHasWonder(location[0]) == 1 // only works for slic placements || TileHasCity (location[0]) == 1) { return STOP; } } else{ ExpansionPlacement = 0; } }
int_f IWW_WhatType(int_t tileimp) { int_t ans; if(tileimp < IWW_NumNormalTimps){ ans = 1; // normal timp } elseif (tileimp < IWW_NumNormalTimps + IWW_NumGoodTimps){ ans = 2; // Martin's goods } elseif (tileimp < IWW_NumWonders + IWW_NumNormalTimps + IWW_NumGoodTimps){ ans = 3; // WONDERS } elseif (tileimp >= IWW_NumWonders + IWW_NumNormalTimps + IWW_NumGoodTimps){ ans = 4; // City Expansions } return ans; }
int_f TileHasWonder(location_t tmpLoc){ return 0; }
HandleEvent(CreateUnit) 'settler built' post { // Doesnt Work :( city_t tmpCity; unit_t tmpUnit; city[0] = tmpCity; unit[0] = tmpUnit; if(CityIsValid(city[0])) { if ((unit[0].type == UnitDB(UNIT_SETTLER)) // if a unit is one of those listed here ||(unit[0].type == UnitDB(UNIT_URBAN_PLANNER)) // ... ||(unit[0].type == UnitDB(UNIT_SEA_ENGINEER))) { //... ReduceCity(city[0], city[0].owner); } } }
HandleEvent(CreateUnit) 'settler built' post { // Doesnt Work :( city_t tmpCity; unit_t tmpUnit; tmpCity = city[0]; tmpUnit = unit[0]; if(CityIsValid(tmpCity)) { if ((tmpUnit.type == UnitDB(UNIT_SETTLER)) // if a unit is one of those listed here ||(tmpUnit.type == UnitDB(UNIT_URBAN_PLANNER)) // ... ||(tmpUnit.type == UnitDB(UNIT_SEA_ENGINEER))) { //... ReduceCity(tmpCity, tmpCity.owner); } } }
... || TType == TerrainDB(TERRAIN_JUNGLE) || TType == TerrainDB(TERRAIN_MOUNTAIN) || TType == TerrainDB(TERRAIN_BROWN_MOUNTAIN) || TType == TerrainDB(TERRAIN_WHITE_MOUNTAIN) || TType == TerrainDB(TERRAIN_SWAMP)){ Event:CreateImprovement(owner, tmpLoc, newType, 0); FinishImprovements(tmpLoc); return 1; } } ...
elseif(TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_ANCIENT_CITY_ONE)) || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_MEDIEVAL_CITY_ONE))) { GrantAdvance(owner, AdvanceDB(ADVANCE_SUBNEURAL_ADS)); Event:CreateImprovement(owner,tmpLoc, TerrainImprovementDB(TILEIMP_ANCIENT_CITY_DEAD),0); RemoveAdvance(owner, AdvanceDB(ADVANCE_SUBNEURAL_ADS)); }
HandleEvent(CreateImprovement) 'DontLetPlaceImpsOverCities' pre { // Does not work :( if(ExpansionPlacement == 0) { // Looks like CreateImprovement function if(TileHasWonder(location[0]) == 1 // only works for slic placements || TileHasCity (location[0]) == 1) { return STOP; } } else{ ExpansionPlacement = 0; } }
int_f HasWonder(location_t tmpLoc){ return 0; }
HandleEvent(CreateImprovement) 'RemoveSubNeralAds' post { if (HasAdvance(player[0], ID_ADVANCE_SUBNEURAL_ADS)) { RemoveAdvance(player[0], AdvanceDB(ADVANCE_SUBNEURAL_ADS)); } }
HandleEvent(CreateImprovement) 'RemoveSubNeralAds' pre { if (HasAdvance(player[0], ID_ADVANCE_SUBNEURAL_ADS)) { RemoveAdvance(player[0], AdvanceDB(ADVANCE_SUBNEURAL_ADS)); return STOP; } }
Leave a comment: