int_t mine_TYPE[]; // Array to hold air unit DB values //thanks to dale for the is airunit command HandleEvent(BeginTurn) 'Mc_mineGameStart' pre { mine_TYPE[0] = UnitDB(UNIT_BOMBER); mine_TYPE[1] = UnitDB(UNIT_CARGO_HELICOPTER); DisableTrigger('Mc_mineGameStart'); } /////////////////////////////////// // Check if air unit /////////////////////////////////// int_f MM2_Isminesweeper(int_t theType) { int_t i; int_t typeOfUnit; typeOfUnit = theType; for (i = 0; i < mine_TYPE.#; i = i + 1) { // for (i = 0; i < 8; i = i + 1) { if (typeOfUnit == mine_TYPE[i]) { return 1; } } return 0; } HandleEvent(MoveUnits) 'blowthemhehellup' post { unit_t tmpunit; int_t u; int_t tmprand; int_T x; if(TileHasImprovement(location[1], TerrainImprovementDB(TILEIMP_exmines))) { for(u = 0; u < army[0].size; u = u + 1) {//479 GetUnitFromArmy(army[0], u, tmpunit); if(MM2_Isminesweeper(tmpUnit.type)) { Event:CutImprovements(location[1]); u = army[0].size; } if(MM2_IsAir(tmpUnit.type)) { u = u; }else{ x = random(100); tmprand=random(tmpunit.hp ); DamageUnit(tmpunit, tmprand); if(x >= 90) { Event:CutImprovements(location[1]);//673 } } } } } HandleEvent(PillageOrder) 'stopthepillegofmines' pre { if(TileHasImprovement(army[0].location, TerrainImprovementDB(TILEIMP_exmines))) { return STOP; } } #include "SS_msg.slc"