my %episodes_btas; %episodes_btas{"On Leather Wings"} = ["Man-Bat", "She-Bat", "Two-Face*"]; #Harvey Dent appears as district attorney %episodes_btas{"Christmas with the Joker"} = ["Joker", "Two-Face*"]; #Harvey Dent as cardboard audience member %episodes_btas{"Nothing to Fear"} = ["Scarecrow"]; %episodes_btas{"The Last Laugh"} = ["Joker"]; %episodes_btas{"Pretty Poison"} = ["Poison Ivy", "Two-Face"]; %episodes_btas{"The Underdwellers"} = ["Sewer King"]; %episodes_btas{"P.O.V."} = ["The Drug Lord"]; %episodes_btas{"The Forgotten"} = ["Boss Biggis", "Joker*"]; #Joker appears as hallucination %episodes_btas{"Be a Clown"} = ["Joker"]; %episodes_btas{"Two-Face: Part 1"} = ["Rupert Thorne", "Two-Face"]; %episodes_btas{"Two-Face: Part 2"} = ["Rupert Thorne", "Two-Face"]; %episodes_btas{"It's Never Too Late"} = ["Rupert Thorne", "Arnold Stromwell"]; %episodes_btas{"I've Got Batman in My Basement"} = ["Penguin", "Joker*"]; #Joker appears on poster in the basement %episodes_btas{"Heart of Ice"} = ["Mr. Freeze", "Two-Face*"]; #Harvey Dent appears in newspaper on Batcomputer, really hard to tell it's him %episodes_btas{"The Cat and the Claw: Part 1"} = ["Catwoman", "Red Claw"]; %episodes_btas{"The Cat and the Claw: Part 2"} = ["Catwoman", "Red Claw"]; %episodes_btas{"See No Evil"} = ["Lloyd Ventrix"]; %episodes_btas{"Beware the Gray Ghost"} = ["The Mad Bomber"]; #Matt Hagen's name on poster, but no likeness %episodes_btas{"Prophecy of Doom"} = ["Nostromos"]; %episodes_btas{"Feat of Clay: Part 1"} = ["Roland Daggett", "Clayface"]; %episodes_btas{"Feat of Clay: Part 2"} = ["Roland Daggett", "Clayface"]; %episodes_btas{"Joker's Favor"} = ["Joker", "Harley Quinn"]; %episodes_btas{"Vendetta"} = ["Killer Croc"]; %episodes_btas{"Fear of Victory"} = ["Scarecrow", "Joker*", "Poison Ivy*", "Two-Face*"]; #Cameos in Arkham Asylum %episodes_btas{"The Clock King"} = ["Clock King"]; %episodes_btas{"Appointment in Crime Alley"} = ["Roland Daggett"]; %episodes_btas{"Mad as a Hatter"} = ["Mad Hatter"]; %episodes_btas{"Dreams in Darkness"} = ["Scarecrow", "Joker*", "Penguin*", "Two-Face*", "Poison Ivy*"]; #Other villains appear as hallucinations %episodes_btas{"Eternal Youth"} = ["Poison Ivy"]; %episodes_btas{"Perchance to Dream"} = ["Mad Hatter", "Catwoman"]; #Selina Kyle appears in two dream scenes %episodes_btas{"The Cape and Cowl Conspiracy"} = ["Josiah Wormwood"]; %episodes_btas{"Robin's Reckoning: Part 1"} = ["Tony Zucco", "Arnold Stromwell"]; #Relatively small Stromwell appearance %episodes_btas{"Robin's Reckoning: Part 2"} = ["Tony Zucco"]; %episodes_btas{"The Laughing Fish"} = ["Joker", "Harley Quinn"]; %episodes_btas{"Night of the Ninja"} = ["Kyodai Ken"]; %episodes_btas{"Cat Scratch Fever"} = ["Catwoman", "Roland Daggett", "Professor Milo"]; %episodes_btas{"The Strange Secret of Bruce Wayne"} = ["Hugo Strange", "Joker", "Two-Face", "Penguin"]; %episodes_btas{"Heart of Steel: Part 1"} = ["HARDAC"]; %episodes_btas{"Heart of Steel: Part 2"} = ["HARDAC"]; %episodes_btas{"If You're So Smart, Why Aren't You Rich?"} = ["Riddler"]; %episodes_btas{"Joker's Wild"} = ["Joker", "Poison Ivy", "Scarecrow*", "Mad Hatter*", "Harley Quinn*"]; #Poison Ivy appears in Arkham at beginning and end with Mad Hatter and Scarecrow. Various fake Harleys %episodes_btas{"Tyger, Tyger"} = ["Emile Dorian", "Tygrus", "Catwoman", "Man-Bat*"]; #Kirk Langstrom consulted %episodes_btas{"Moon of the Wolf"} = ["Professor Milo", "Anthony Romulus"]; %episodes_btas{"Day of the Samurai"} = ["Kyodai Ken"]; %episodes_btas{"Terror in the Sky"} = ["Man-Bat", "She-Bat"]; %episodes_btas{"Almost Got 'im"} = ["Joker", "Harley Quinn", "Two-Face", "Poison Ivy", "Killer Croc", "Penguin", "Catwoman"]; %episodes_btas{"Birds of a Feather"} = ["Penguin"]; %episodes_btas{"What is Reality?"} = ["Riddler"]; %episodes_btas{"I am the Night"} = ["The Jazzman", "Penguin*"]; %episodes_btas{"Off Balance"} = ["Count Vertigo", "Talia al Ghul", "Ra's al Ghul*"]; #Ra's al Ghul in one scene at the end of the episode %episodes_btas{"The Man Who Killed Batman"} = ["Joker", "Harley Quinn", "Rupert Thorne"]; %episodes_btas{"Mudslide"} = ["Clayface"]; %episodes_btas{"Paging the Crime Doctor"} = ["Rupert Thorne"]; %episodes_btas{"Zatanna"} = ["Montague Kane"]; #Joker-ish head appears on a Joker card %episodes_btas{"The Mechanic"} = ["Penguin"]; %episodes_btas{"Harley and Ivy"} = ["Harley Quinn", "Poison Ivy", "Joker"]; %episodes_btas{"Shadow of the Bat: Part 1"} = ["Two-Face", "Rupert Thorne"]; #Rupert Thorne has very small part running from Batman %episodes_btas{"Shadow of the Bat: Part 2"} = ["Two-Face"]; %episodes_btas{"Blind as a Bat"} = ["Penguin"]; %episodes_btas{"The Demon's Quest: Part 1"} = ["Ra's al Ghul", "Talia al Ghul"]; %episodes_btas{"The Demon's Quest: Part 2"} = ["Ra's al Ghul", "Talia al Ghul"]; %episodes_btas{"His Silicon Soul"} = ["HARDAC"]; %episodes_btas{"Fire from Olympus"} = ["Maxie Zeus", "Poison Ivy*", "Two-Face*", "Joker*"]; #Villains in cells at Arkham %episodes_btas{"Read My Lips"} = ["Ventriloquist/Scarface"]; %episodes_btas{"The Worry Men"} = ["Mad Hatter", "Joker*", "Two-Face*", "Riddler*", "Penguin*", "Scarecrow*", "Harley Quinn*", "Clayface*", "Catwoman*", "Mr. Freeze*"]; #Villains appear on Batcomputer, as robots, or as background dummies %episodes_btas{"Sideshow"} = ["Killer Croc"]; %episodes_btas{"A Bullet for Bullock"} = ["Vincent Starkey"]; %episodes_btas{"Trial"} = ["Joker", "Harley Quinn", "Killer Croc", "Mad Hatter", "Poison Ivy", "Riddler*", "Scarecrow", "Two-Face", "Ventriloquist/Scarface"]; #Riddler sits in jury box. Scarecrow uncredited but appears in several scenes, pushes Batman, swings scythe %episodes_btas{"Avatar"} = ["Ra's al Ghul"]; %episodes_btas{"House & Garden"} = ["Poison Ivy", "Two-Face", "Harley Quinn*"]; #Photos of Harley and Harvey Dent %episodes_btas{"The Terrible Trio"} = ["The Terrible Trio"]; %episodes_btas{"Harlequinade"} = ["Joker", "Harley Quinn"]; %episodes_btas{"Time Out of Joint"} = ["Clock King"]; %episodes_btas{"Catwalk"} = ["Catwoman", "Ventriloquist/Scarface"]; %episodes_btas{"Bane"} = ["Bane", "Killer Croc", "Rupert Thorne"]; %episodes_btas{"Baby-Doll"} = ["Baby-Doll"]; %episodes_btas{"The Lion and the Unicorn"} = ["Red Claw"]; %episodes_btas{"Showdown"} = ["Ra's al Ghul"]; %episodes_btas{"Riddler's Reform"} = ["Riddler", "Penguin*", "Joker*", "Two-Face*"]; #Penguin on TV. Joker and Two-Face in Arkham %episodes_btas{"Second Chance"} = ["Two-Face", "Penguin", "Rupert Thorne"]; #Questionable whether Penguin and Rupert Thorne here are cameos or not. One long scene each %episodes_btas{"Harley's Holiday"} = ["Harley Quinn", "Scarecrow*", "Poison Ivy*"]; #Scarecrow and Poison Ivy in Arkham %episodes_btas{"Lock-Up"} = ["Lock-Up", "Scarecrow", "Harley Quinn*", "Poison Ivy*", "Ventriloquist/Scarface*"]; #Villains testify against Lyle Bolton. Scarecrow testifies and dropped off by Batman, Poison Ivy on TV %episodes_btas{"Make 'Em Laugh"} = ["Joker", "Mad Hatter*"]; #Mad Hatter creates technology behind episode, but only appears unconscious in one scene in Arkham. %episodes_btas{"Deep Freeze"} = ["Mr. Freeze"]; %episodes_btas{"Batgril Returns"} = ["Penguin*", "Joker*", "Two-Face*", "Catwoman", "Roland Daggett"]; #Villains at beginning in daydream my %episodes_movies; %episodes_movies{"Batman: Mask of the Phantasm"} = ["Joker", "The Phantasm"]; %episodes_movies{"Batman & Mr. Freeze: SubZero"} = ["Mr. Freeze"]; %episodes_movies{"Batman: Mystery of the Batwoman"} = ["Penguin", "Bane", "Rupert Thorne", "Batwoman"]; %episodes_movies{"Chase Me"} = ["Catwoman"]; my %episodes_tnba; %episodes_tnba{"Holiday Knights"} = ["Joker", "Harley Quinn", "Clayface", "Poison Ivy"]; %episodes_tnba{"Sins of the Father"} = ["Two-Face"]; %episodes_tnba{"Cold Comfort"} = ["Mr. Freeze"]; %episodes_tnba{"Double Talk"} = ["Ventriloquist/Scarface"]; %episodes_tnba{"You Scratch My Back"} = ["Catwoman"]; %episodes_tnba{"Never Fear"} = ["Scarecrow"]; %episodes_tnba{"Joker's Millions"} = ["Joker", "Harley Quinn", "Penguin", "Poison Ivy"]; %episodes_tnba{"Growing Pains"} = ["Clayface"]; %episodes_tnba{"Love is a Croc"} = ["Killer Croc", "Baby-Doll"]; %episodes_tnba{"Torch Song"} = ["Firefly"]; %episodes_tnba{"The Ultimate Thrill"} = ["Roxy Rocket", "Penguin"]; %episodes_tnba{"Over the Edge"} = ["Scarecrow", "Bane", "Harley Quinn*", "Riddler*", "Ventriloquist/Scarface*", "Mad Hatter*"]; #Scarecrow's appearance here very similar to Rupert Thorne's in Shadow of the Bat, others air grievances on TV %episodes_tnba{"Mean Seasons"} = ["Calendar Girl"]; %episodes_tnba{"Critters"} = ["Farmer Brown"]; %episodes_tnba{"Cult of the Cat"} = ["Catwoman", "Thomas Blake"]; %episodes_tnba{"Animal Act"} = ["Mad Hatter"]; %episodes_tnba{"Old Wounds"} = ["Joker"]; %episodes_tnba{"The Demon Within"} = ["Klarion the Witch Boy"]; %episodes_tnba{"Legends of the Dark Knight"} = ["Joker", "Firefly"]; %episodes_tnba{"Girl's Night Out"} = ["Poison Ivy", "Harley Quinn", "Livewire", "Penguin"]; %episodes_tnba{"Mad Love"} = ["Joker", "Harley Quinn", "Poison Ivy*"]; #Poison Ivy in Arkham %episodes_tnba{"Chemistry"} = ["Poison Ivy", "Man-Bat*", "She-Bat*"]; #Kirk and Francine Langstrom at wedding %episodes_tnba{"Beware the Creeper"} = ["Joker", "Harley Quinn"]; %episodes_tnba{"Judgment Day"} = ["Two-Face", "Killer Croc", "Riddler*", "Penguin"]; #Riddler gets captured by the judge in one scene my @fluxx = ["Joker", "Penguin", "Catwoman", "Two-Face", "Riddler", "Harley Quinn", "Bane", "Mr. Freeze", "Poison Ivy"]; my @fluxx_promo = ["Scarecrow", "Killer Croc", "Clayface"]; sub createTable(@all_eps) { my %appearances; my %non_cameos; for @all_eps -> %eps { for %eps.values -> @characters { for @characters -> $name { my Str $character = $name; my Bool $cameo = False; if ($name.ends-with("*")) { $character = $name.chop(1); $cameo = True; } my Int $i = 0; if (%appearances{$character}:exists) { $i = %appearances{$character}; } $i++; %appearances{$character} = $i; unless ($cameo) { $i = 0; if (%non_cameos{$character}:exists) { $i = %non_cameos{$character}; } $i++; %non_cameos{$character} = $i; } } } } for [@fluxx, @fluxx_promo] -> @list { for @list -> $name { unless (%appearances{$name}:exists) { %appearances{$name} = 0; } unless (%non_cameos{$name}:exists) { %non_cameos{$name} = 0; } } } sub writeTable(%charAppearances) { my Str $s = "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; my @characters = %charAppearances.keys; @characters = @characters.sort; @characters = @characters.sort: {%charAppearances{$^b} cmp %charAppearances{$^a}}; for @characters -> $name { my Bool $fluxxCard = @fluxx.contains($name); my Bool $fluxxPromo = @fluxx_promo.contains($name); if (%charAppearances{$name} > 1 || $fluxxCard || $fluxxPromo) { $s ~= "" ~ $name ~ "\n"; $s ~= "\n"; $s ~= "\n"; $s ~= "\n"; } } $s ~= "\n"; $s ~= "
VillainAppearancesBatman Fluxx?
" ~ %charAppearances{$name} ~ ""; if ($fluxxCard) { $s ~= "Yes"; } elsif ($fluxxPromo) { $s ~= "Promo"; } $s ~= "
\n\n"; spurt "table.txt", $s, :append; } writeTable(%appearances); writeTable(%non_cameos); } #end createTable createTable([%episodes_btas, %episodes_movies, %episodes_tnba]); createTable([%episodes_tnba]);