diff --git a/SCU01EA.INI b/SCU01EA.INI index a822f81..03cefd1 100644 --- a/SCU01EA.INI +++ b/SCU01EA.INI @@ -432,6 +432,7 @@ Height=66 13=Greece,2TNK,256,6320,0,Area Guard,None 14=Greece,2TNK,256,6449,0,Area Guard,None + [INFANTRY] 0=Greece,C1,256,5821,4,Area Guard,0,None 1=Greece,C2,256,5692,0,Guard,0,None @@ -541,10 +542,10 @@ Player=USSR Count=0 [OverlayPack] -1=bQAAIIH//osZ/4EL/ncA/4EOAAL+egD/cPaBCv75AP+BDP99AIsagQwRhIEJ/nwA/4EMAA -2=L+gwD//3oAiByEC/8LDP9+AIgcgQsCBP94AIwZIAGECf8KDP99AA0ehQsMCv8L/3wACRwA -3=fAII/m4A/4BZAAAggf9wAYkKCv8K/wn/DAv+eAD/hAoJCwsABYIKCf58AP+BCSAB/nkA/4 -4=EJIIH+egD/AHz/gACSARB//3kAFgL/fAAVAsiJAf5+AP//gAARA/+CABED/uka/4A= +1=bQAAIIH//osZ/4EK/ncA/4EOAAL+egD/gQtgCoEM/vkA/4MM/wn+ewD/gQkQfnGH/nMA/4 +2=EK/30Ahxv/gwCDGoQJ/wwL/34AiByBCwD9/30Aix2BDACD/30AjBqBCgB/gQz/fAAJHAYA +3=gQr/cAAMHYBWAAAggf9wAYMKCv8gAoEJ/ngA/4IJCgB8gwoLDP95ABMAIIUgAf55AP+BCS +4=CB/noA/wB8/4AAkgEQf/96ABMA/30AlABiA/5+AP//gAARA/+CABED/uka/4A= [Briefing] 1=A pitiful excuse for resistance has blockaded itself in this village. @@ -553,5 +554,5 @@ Count=0 4=lesson. [Digest] -1=jiauD6TJir2zlXrSMfXgYYUtq7g= +1=9QVKWgKK7MJHlaf+Cp3h7V2cWSk= diff --git a/code/redalert/mapscript.cpp b/code/redalert/mapscript.cpp index 6608868..150e5ae 100644 --- a/code/redalert/mapscript.cpp +++ b/code/redalert/mapscript.cpp @@ -5431,8 +5431,19 @@ static int Script_CreateVehicle(lua_State* L) { int objectIndex = lua_tointeger(L, 1); int houseType = lua_tointeger(L, 2); - int in_x = lua_tointeger(L, 3); - int in_y = lua_tointeger(L, 4); + int in_x = 0; + int in_y = 0; + + COORDINATE coord; + if (lua_gettop(L) == 3) { + CELL cell = lua_tointeger(L, 3); + coord = Cell_Coord(cell); + } + else { + in_x = lua_tointeger(L, 3); + in_y = lua_tointeger(L, 4); + coord = Cell_Coord(XY_Cell(in_x, in_y)); + } HouseClass* this_house = Houses.Ptr(houseType); @@ -5444,7 +5455,7 @@ static int Script_CreateVehicle(lua_State* L) { bool new_unit_placed = false; - if (new_unit->Unlimbo(Cell_Coord(XY_Cell(in_x, in_y)))) { + if (new_unit->Unlimbo(coord)) { new_unit_placed = true; } @@ -5454,7 +5465,7 @@ static int Script_CreateVehicle(lua_State* L) { ** placement at the given location. */ if (!new_unit_placed) { - CELL cell = Map.Nearby_Location(Cell_Coord(XY_Cell(in_x, in_y)), new_unit->Class->Speed); + CELL cell = Map.Nearby_Location(coord, new_unit->Class->Speed); if (new_unit->Unlimbo(::Cell_Coord(cell))) { new_unit_placed = true; } @@ -5508,8 +5519,19 @@ static int Script_CreateInfantry(lua_State* L) { int objectIndex = lua_tointeger(L, 1); int houseType = lua_tointeger(L, 2); - int in_x = lua_tointeger(L, 3); - int in_y = lua_tointeger(L, 4); + int in_x = 0; + int in_y = 0; + + COORDINATE coord; + if (lua_gettop(L) == 3) { + CELL cell = lua_tointeger(L, 3); + coord = Cell_Coord(cell); + } + else { + in_x = lua_tointeger(L, 3); + in_y = lua_tointeger(L, 4); + coord = Cell_Coord(XY_Cell(in_x, in_y)); + } HouseClass* this_house = Houses.Ptr(houseType); @@ -5521,7 +5543,7 @@ static int Script_CreateInfantry(lua_State* L) { bool new_unit_placed = false; - if (new_unit->Unlimbo(Cell_Coord(XY_Cell(in_x, in_y)), DIR_S)) { + if (new_unit->Unlimbo(coord, DIR_S)) { new_unit_placed = true; } @@ -5531,7 +5553,7 @@ static int Script_CreateInfantry(lua_State* L) { ** placement at the given location. */ if (!new_unit_placed) { - CELL cell = Map.Nearby_Location(Cell_Coord(XY_Cell(in_x, in_y)), new_unit->Class->Speed); + CELL cell = Map.Nearby_Location(coord, new_unit->Class->Speed); if (new_unit->Unlimbo(::Cell_Coord(cell), DIR_S)) { new_unit_placed = true; } diff --git a/scripts/SCU01EA.INI.script b/scripts/SCU01EA.INI.script new file mode 100644 index 0000000..edac68c --- /dev/null +++ b/scripts/SCU01EA.INI.script @@ -0,0 +1,31 @@ +require("_Global") + +function map_briefing() + SetBriefingText("Welcome Comrade General! Here in Alaska we will be begin our glorous conquest!") +end + +function map_start() + +end + +function map_frame() + local numTeslaTanks = 0 + local numRadarDomes = 0 + + numRadarDomes = CountBuildings(BuildingTypes.DOME) + if numRadarDomes == 0 then + Lose(Houses.USSR) + end + + if numRadarDomes == 2 then + Win(Houses.USSR) + end + + numTaslaTanks = CountUnits(VehicleTypes.TESLATANK) + if numTaslaTanks == 0 then + PlaySpeech(11) -- Reinforcements have arrived + CreateVehicle(VehicleTypes.TESLATANK,Houses.USSR,5833) + CreateVehicle(VehicleTypes.TESLATANK,Houses.USSR,5577) + CreateVehicle(VehicleTypes.TESLATANK,Houses.USSR,5706) + end +end \ No newline at end of file diff --git a/scripts/_Global.script b/scripts/_Global.script index 6b4a09b..e18f4e2 100644 --- a/scripts/_Global.script +++ b/scripts/_Global.script @@ -144,7 +144,13 @@ -- Counterstrike only: ANT1=14, -- First ant type ANT2=15, -- Second ant type - ANT3=16 -- Third ant type + ANT3=16, -- Third ant type + + -- Aftermath + CHRONOTANK=17, -- Chrono shifting tank + TESLATANK=18, -- Tesla Tank + MAD=19, + DEMOTRUNK } -- *********************************************************