Originally posted by Pedrunn
Unless it is the god of death and destruction
Note: god with small letter like the ancient ones.
Unless it is the god of death and destruction
Note: god with small letter like the ancient ones.
HandleEvent(BeginTurn) 'kill_the_settlers' pre { if(player[0] == 0){ int_t i; unit_t tmpUnit; for(i=0; i < player[0].units; i = i + 1){ GetUnitByIndex(0, i, tmpUnit); int_t j; location_t tmpLoc; for(j = 0; j < 9; j = j + 1){ GetNeighbor(tmpUnit.location, j, tmpLoc); if(UnitsInCell(tmpLoc) == 1){ unit_t tmpTarget; army_t tmpArmy; GetUnitFromCell(tmploc, tmpTarget); if(IsCivilian(tmpTarget)){ GetArmyFromUnit(tmpUnit, tmpArmy) Event:Battle(tmpArmy, tmpLoc); } } } } } }
/////////////////////////////////// // Capture City event /////////////////////////////////// HandleEvent(CaptureCity) 'MM2_DestroyBuildsOnCapture' pre { city_t tmpcity; int_t tmpbuilding; int_t i; int_t randnum; tmpcity = city[0]; if(CityIsValid(tmpcity)) { for(i = 0; i < 64; i = i + 1) { randnum = random(100); if(randnum < 50) { DestroyBuilding(tmpcity, i); } } } }
Comment