Mission to Agamar ( 2 BBY ) In 2 BBY , Captain Rex and the Spectres undertook a mission to the planet Agamar to obtain proton bomb s from a Separatist transport ship . However , they were captured by a platoon of still - functioning battle droids led by the super tactical droid Kalani . The droid general wished to end the Clone Wars on his own terms , and challenged the rebels to a battle that would decide the victors , taking Garazeb Orrelios hostage . Led by Rex , Ezra Bridger and Kanan Jarrus eventually managed to overpower the droids and confront Kalani , but Imperial forces suddenly arrived and attacked the Separatist ship . The rebels and Separatists came to the conclusion that the Empire was the real victor of the Clone Wars , and decided to unite to get a victory of their own . They used the droids to distract the Imperial stormtroopers and walkers in order to cripple them with proton bombs , which allowed them to escape in several Separatist " Sheathipede " - class transport shuttles . The Spectres kept their shuttle as a replacement for their lost shuttle , the " Phantom " . Prelude . After the Separatist leaders were slaughtered by Darth Vader in the aftermath of the Clone Wars , all Separatist battle droid s were to be shut down . However , the super tactical droid Kalani assumed that the shutdown of the droids and extermination of the Jedi was just a Galactic Republic trick , and avoided the shutdown along with the droids under his control . In 2 BBY , the " Ghost " crew received information about a destroyed Separatist supply ship on Agamar from Rex , and they traveled there in order to gain the ammunition left behind , especially proton bomb s . Kanan Jarrus , Ezra Bridger , Garazeb Orrelios and Chopper accompanied Rex , while Hera Syndulla and Sabine Wren departed to handle other business . The last battle . Blast from the past . The rebels entered the transport ship and uncovered a large supply of proton bombs in the hangar , but as they were about to collect them , they were entrapped by a ray shield . They were then surrounded by Separatist battle droids , who mistook the rebels for Republic troops and prepared to shoot them . However , they immediately received orders to stun and capture the rebels instead , and they did so . Chopper , who had deviated from his allies ' path , remained free and unnoticed in the hangar . Rex , Ezra , Kanan , and Zeb awoke in the command center , where they came face to face with the Separatist super tactical droid Kalani . Kalani revealed to the rebels how he and his troops were still functioning , and told them about his desire to end the Clone Wars with a Separatist victory , despite the rebels telling him that the Clone Wars had ended . The droid general threatened to terminate them if they refused to participate . Zeb , upon refusing to participate in the battle , was informed by Kalani that he would be playing the hostage in the battle situation , as his species , the Lasat , had not participated in the Clone Wars . Kanan and Rex refused to fight the droids , but Ezra agreed , on the conditions that Zeb would be released and they would gain possession of all the proton bombs if they won , which Kalani agreed to . Kanan and Rex begrudgingly agreed to participate , and the battle preparations began . Meanwhile , Chopper found a " Sheathipede " - class transport shuttle in the hangar and sent a distress signal to the " Ghost " . However , the " Ghost " was being pursued by Governor Arihnda Pryce and Agent Alexsandr Kallus in several Star Destroyers , fleeing with a quantity of stolen fuel , and the Imperial fleet intercepted the signal . Chopper ' s signal was encrypted , but Pryce recognized it as a rebel distress call and had forces sent to Agamar . Reenacting the Clone Wars . On Agamar , Rex , Kanan , and Ezra returned outside as Kalani laid out the conditions for the battle : the three rebels would have to fight their way to his command center in order to rescue Zeb . If the rebels captured the command center , they would win . Kanan chose Rex to lead them into battle due to his combat experience , and Rex told them that since they were heavily outnumbered , they would have to attack the hangar aggressively . As the battle droids approached , the rebels adopted a sword and shield formation , where Kanan and Ezra blocked the droids ' blaster bolts with their lightsaber s in order to give Rex cover to throw detonators at the droids . The rebels managed to push through the droids as they took refuge in the hangar , and they seemed to face no opposition after that . However , this was all part of Kalani ' s tactics , and when the rebels went out into the open , Kalani sent droideka s onto the crosswalks above the hangar to fire at them . Overwhelmed by the droidekas , Ezra got the idea to attack them with a nearby crane while Rex and Kanan drew their fire away . They split up , and Rex and Kanan resumed their attack on the droidekas , though Rex was wounded in the right shoulder . Meanwhile , Ezra ran into Chopper , who told him about the Separatist shuttle . Ezra then used the Force to ram the crane into the bridges , causing the droidekas to fall and break . Ezra reunited with Kanan and Rex , but Rex was angry at Ezra for not executing their plan efficiently . The rebels exited the hangar into the halls of the ship , where they were surrounded by two droidekas . Kanan managed to Force push one of them , causing it to malfunction and destroy itself . The other one managed to graze Ezra , but Rex threw his helmet at it , causing its shields to fall and allowing the clone to destroy it with a blaster shot . The rebels reflected that the droids were not as durable as they used to be due to their age . The real Clone Wars victors . The rebels entered the command center and prepared to claim victory , but Kalani was not about to honor it as he claimed that his droids would have won if they were in peak condition . Rex prepared to shoot the droid , but Ezra stopped him , having realized that neither the Republic nor the Separatists really won the Clone Wars . As Imperial forces arrived on Agamar , Ezra realized that the two sides had been decimated by the true victors : the Empire . Some of Kalani ' s battle droids greeted arriving stormtrooper s at the front of the ship , but were easily dispatched . Ezra proposed an alliance between the two sides to fight against the Imperial platoon , convincing Kalani ' s programming that the Empire , as an extension of the Republic , was his enemy as well , and the two sides agreed . Ezra created a plan to escape on the " Sheathipede " - class shuttles that Chopper had found , but the problem was that the remaining battle droids were too depleted to battle the Empire , and the shuttles had no weapons . However , the rebels had the idea to attack the Imperial All Terrain Armored Transport walkers with the proton bombs they came for . Due to the battle droids ' aim not being accurate enough to set off the bombs , they would instead fire at Kanan and Ezra , who would redirect the blaster shots toward the bombs . The rebels and the Separatists moved to the hangar , and Zeb led the battle droids in direct combat against the All Terrain Defense Pod walkers , which the droidekas managed to heavily damage . While this happened , the B1 battle droid s rolled the proton bombs at the AT - ATs , and Kanan and Ezra redirected the shots they had fired at them , successfully setting off the bombs and destroying one of the AT - ATs . In the midst of the chaos , the rebels boarded one shuttle while Kalani and the remaining battle droids boarded the other two , although the shuttle occupied entirely by battle droids was shot down . The remaining two shuttles managed to fly through the Imperial platoon and successfully escape into space . Aftermath . The two ships entered space , where the " Ghost " had just arrived to pick up the rebels . Due to calculating a low chance of success of defeating the Empire , Kalani and his forces parted ways with the rebels . Kanan contacted Hera , who was shocked to hear that they had not gained any proton bombs , but Kanan told her that instead they had gotten a new " Phantom " : the shuttle they were currently piloting .