Kalani ( super tactical droid ) Kalani was a super tactical droid and general in service to the Confederacy of Independent Systems during the Clone Wars . During the Onderonian Civil War , he was sent by Count Dooku to aid King Sanjay Rash of Onderon in defeating the resistance movement against the Separatist occupation . However , after continued resistance , Kalani and Dooku came to the conclusion that the fighting on Onderon was not worth the time and resources required , and as such , Dooku ordered the Confederacy to abandon the planet and relocate to Agamar . With the retreat in motion , Kalani executed Rash before departing . Long after the Clone Wars , the " Ghost " crew with Captain Rex arrived on Agamar in search of proton bomb s , only to be captured by Kalani , who wanted to end the Clone Wars on his terms . Biography . Clone Wars . Onderon . When the pro - Separatist king Sanjay Rash of Onderon reported to Count Dooku on the rebels ' attacks , Dooku decided to send General Kalani to deal with the situation , along with reinforcements . Following the capture of rebel leader , Saw Gerrera , Kalani interrogated him alongside Royal Militia General Tandin . However , Tandin objected to torturing Gerrera for information . Kalani saw that Tandin pitied him . Later , Rash ordered the former king of Onderon Ramsis Dendup to be executed , in the hopes of stopping the rebel attacks in the kingdom . Against his wishes , the rebels attempted to rescue the king , but were stopped by the droid reinforcements . With all the major rebels captured , Rash continued the former king ' s execution but were stopped by the Royal Militia and General Tandin , who took Rash as hostage . As the others made their escape , Kalani ordered the battle droids gun down Tandin as soon as he released Rash . However , before he could do that , the Jedi Padawan Ahsoka Tano jumped out of the crowd and used the Force to push down the droids for their escape . The public realized the Separatists were their true enemy , which started mass riots in the kingdom . With the rebels having their leader back and them gaining a new base of operations in the distant mountains , Rash was growing desperate . Kalani soon ordered his droid army to push on the rebel base , which were supported by a few HMP droid gunship s . Their massive firepower and ability to deploy droids into the battlefield proved highly effective against the rebels . Despite the heavy support and massive droid numbers , they were all destroyed due to underestimating the rebels ' tactical prowess . With the battle lost and the public against the Separatist occupation , Count Dooku decided that it was not worth the time to reestablish themselves on the planet , which Kalani agreed with . Dooku ordered Kalani to retreat with what was left of his droid army to the planet Agamar . As Rash attempted to protest Dooku ' s actions , Kalani pointed a blaster at Rash and shot him , before proceeding with his orders . What was left of his army retreated to the Agamar system , where they would remain for almost 20 years . End of the Clone Wars . Eventually the Clone Wars ended with Order 66 and the Jedi Purge . After executing the entire Separatist Council on Mustafar , Darth Vader issued a shut - down order that deactivated most of the droid forces scattered across the galaxy ; bringing the war to a rapid conclusion . These events coincided with the transformation of the Galactic Republic into the Galactic Empire . Kalani however , accurately deduced that the shut - down order was a Republic trick , and overrode the command signal for the battle droids under his command . Kalani and his garrison therefore survived the end of the Clone Wars and were indeed unaware that they had ended . They were left marooned at their base on Agamar , where they waited for their supposed " retrieval " during the next seventeen years . Kalani ' s remaining garrison consisted mostly of B1 battle droid s and a few droideka s . The base was heavily damaged , and it lacked heavy weaponry . Nonetheless the munitions depot they were protecting at the base kept Kalani and his droids well - provisioned enough to still remain reasonably functional for almost two decades without resupply . Age of the Empire . Making peace with adversaries . About two years before the Battle of Yavin , the Agamar base was visited by several members of the Phoenix Cell including the former Clone Captain Rex , the Jedi Kanan Jarrus , his apprentice Ezra Bridger , and the Lasat Garazeb Orrelios . Upon being discovered by B1 - 268 , Kalani had him capture the rebels alive for a " war game " that would end on " his " terms . After learning about the end of the Clone Wars , Kalani was upset that the Separatist Droid Army lost . Based on his calculations , he had estimated that the Separatists ' chance of defeat was only 23 . 6 % had the " shut - down " order not been sent . Rex , for that matter , also felt let down at how the war suddenly ended instead of the clone trooper s finishing their mission on the battlefield like they were trained to do . Nonetheless , Rex and Kanan insisted that the war was over and refused to participate in Kalani ' s war game . When Zeb objected , Kalani agreed with the Lasat , since his species had not participated in the Clone Wars . Instead , he designated Zeb as the hostage that Rex and the Jedi would have to rescue . In the end , Rex and Kanan agreed to Kalani ' s terms at the insistence of Ezra ; who convinced Kalani to free Zeb and to allow them to take the proton bomb s if they won . Kalani accepted Ezra ' s terms and ordered his droids to prepare for battle . Kalani ' s simulation involved the Jedi and Rex fighting their way through Separatist droid forces back to the command center in order to free Zeb . Kalani deployed battle droids , which the rebels quickly scattered since many of the droids were old and were in need of repair . The rebels then made their way into the hangar . However , Kalani had anticipated their moves after spending years studying past battles against the Jedi and Clone troopers . Kalani deployed droidekas against them but Ezra used the Force to collapse a catwalk on top of them . In addition , the rebels ' astromech droid Chopper also sent a distress signal that was intercepted by Imperial Governor Arihnda Pryce , who dispatched Imperial forces to Agamar . After defeating Kalani ' s droidekas , the rebels made their way into the super tactical droid ' s command center . When Rex argued that he had won , Kalani countered that he had won the " simulation " of which side would have truly won the Clone Wars had the shut - down order not gone out . Kalani added that the droid army " at the time " would not have malfunctioned . Ezra then intervened and pointed out that this was all irrelevant because " both " sides had lost ; the Galactic Empire was the only true winner since Palpatine had played the two sides against each other . According to Ezra ' s reasoning , the shut - down order was " always " meant to go out , the droids were always meant to lose , and the Clone Troopers were never meant to beat the droids but their own Jedi commanders . Rex and Kalani were grieved by this but the droid general could not deny Ezra ' s logic . Ezra asked Kalani why he fought in the war at all and the tactical droid stated that the Separatists were fighting against what they perceived as the tyranny of the Republic . Ezra pointed out that the Republic had become the Empire , which was now openly tyrannical , and that the rebels had always been fighting against tyranny . He could not deny the boy ' s logic and agreed that they now shared a common enemy . Their base was then assaulted by Imperial forces who had been dispatched by Governor Pryce . After B1 - 268 and several battle droids were disintegrated when they tried to greet the Imperials , Kalani and the remaining droids joined forces with the rebels to fight the Imperials and to escape in three Neimoidian escort shuttles , which had been repaired by Chopper . He informed the rebels that because of his depleted forces and that they were fighting insurmountable odds , he was unsure of what to do . When informed of the rebels ' plan to escape , he was worried that it would not work , but agreed to carry it out . He ordered his droids to roll the proton bombs towards the AT - AT walkers , while another group of droids fired at Ezra and Kanan to reflect their shots towards the bombs , one of which exploded and damaged an AT - AT walker . With the Imperials momentarily distracted , Kalani , the battle droids , and the rebels escaped in the Neimoidian escort shuttles . One of the shuttles carrying battle droids was shot down , but Kalani and his remaining droids along with the rebels managed to flee into space . Once in space , Ezra said that their escape was a victory . While Kalani initially disagreed , he accepted Rex ' s reasoning that the youth had " ended " the Clone Wars . He was later offered to join the nascent Rebellion , though he denied their offer , stating that from their escape , they had a 1 % chance of overthrowing the Empire . He later departed with his remaining droids to an unknown location . Characteristics . Kalani was a cold and logical super tactical droid who was programmed by the Separatists to be a military commander . He was a competent battle tactician who had single - minded obsession in securing victory and producing results . Kalani believed in using overwhelming force to defeat his opponents . Kalani was willing to torture the Onderonian rebel leader Saw Gerrera for information and was programmed to lack empathy . Kalani recognized that General Tandi was the leader of the Onderonian resistance and was willing to kill him . After the Onderonians rose up in revolt against the Separatists , Kalani accepted Dooku ' s reasoning that it was not worth holding on to the planet . When King Rash protested , Kalani executed him without hesitance . As a super tactical droid , Kalani was familiar with Separatist military strategies , tactics , and protocol . When the shutdown order was issued , Kalani suspected that it was Republic trick and countermanded the order . During the Age of the Empire , Kalani led a Separatist holdout on the planet Agamar . He was ignorant of the fact that the Clone Wars had ended and became obsessed with ending the conflict as a Separatist victory ; not knowing that the former Separatist Alliance had ceased to exist . He spent years studying countless battles with Jedi forces and Clone troopers in order to devise a battle plan . Despite the depleted status of his battle droid forces , Kalani believed that he could triumph over the former Clone Captain Rex and the Jedi Kanan Jarrus and Ezra Bridger . While obsessed with achieving victory , Kalani was pragmatic enough to consent to Ezra ' s offer that the rebels get to keep the proton torpedoes if they won . Though Kalani ' s forces outnumbered and outgunned the three rebels , he underestimated the decrepit status of his forces and the ability of his rebel opponents to develop counter - tactics . Kalani ' s logical mindset led him to disbelieve the fact that the rebels had won . Kalani however buried his antagonism towards the rebels when the Empire arrived on Agamar . After realizing that the Empire ' s intentions towards his battle droids were hostile , he developed an improvised escape strategy with the help of Ezra and Rex . Ezra managed to win over Kalani by pointing out that the Empire was the successor to the Old Republic . During their escape , he stated that he had never tried such a desperate strategy before . When Rex claimed that desperate strategies were the source of the Republic ' s victories , Kalani defensively claimed they didn ' t always work . Kalani initially did not regard the retreat from Agamar as a victory until Ezra and Rex pointed out otherwise . He was grateful to Ezra for convincing him to end hostilities with Rex , who represented the Republic . Due to his programming , he refused to join the Rebellion as he believed that they would not be able to overthrow the Empire . Behind the scenes . Kalani first appeared in of the animated television series " " in October 2012 . Following a cameo appearance in " Front Runners " , Kalani appeared as the main antagonist in the episodes " The Soft War " and " Tipping Points " . He was voiced by Gregg Berger , who later reprised his role in the " Star Wars Rebels " episode " The Last Battle " ; which premiered on Disney XD on October 22 , 2016 . In the " Rebels Recon " featurette for " The Last Battle " , Henry Gilroy said that he thought in the near future Kalani would hire out his services as a military advisor to various groups such as the Hutt Clan because he believed that the nascent Rebellion did not have a realistic chance of defeating the Empire . Gilroy went on to say however that he thinks that the destruction of the Death Star at the Battle of Yavin ( about two years after Kalani leaves Agamar ) will change his mind , proving that the Empire isn ' t invincible and that the rebellion has a real chance of winning .