The actress and comedian talks with THR about lovable queen of the one-liner Gina, her love of emojis and her upcoming summer stand-up comedy tour.

[Warning: This story contains spoilers from Brooklyn Nine-Nine's season finale.]

Fox's Brooklyn Nine-Nine delivered a major twist during Tuesday's season finale.

The freshman cop comedy from Parks and Recreation's Mike Schur and Dan Goor used Detective Jake Peralta's (Andy Samberg) investigation into one of the department's superiors to explore his growing feelings for friend and colleague Amy Santiago (Melissa Fumero).

The episode's biggest reveal came not when Jake professed his feelings for Amy, but when Detective Charles Boyle (Joe Lo Truglio), reeling from being dumped by his fiance, Vivian (Marilu Henner), wound up in bed with the precinct's eccentric and self-absorbed civilian office manager Gina (Chelsea Peretti). The development comes after a season in which Gina has continued to give Boyle a hard time about almost everything, and during an episode when she insisted he just needed to get laid to get over Vivian. All signs were pointing to badass Detective Rosa Diaz (Stephanie Beatriz), cutting through her tough exterior and making a play for the lovable guy who literally took a bullet in the butt to save her life.

The Hollywood Reporter caught up with Peretti to talk about the big reveal, her love of emojis and her upcoming stand-up comedy tour.

PHOTOS: Broadcast TV's Returning Shows 2014-15

When did you find out what the writers had planned for Gina and Boyle?

I was in the makeup trailer and Stephanie was asking if I'd read the episode yet. People just kept asking me, and I hadn't read it yet. Finally, I got the sense that something weird happens with my character, so that's how I found out. No one sent me an email in advance or anything. We recorded it a bunch of different ways. When we shot it, we did some Home Alone-type screaming takes. It was fun.

How did you respond once you found out?

I was surprised. I didn't know that that was going to happen. I vaguely remember [exec producer] Mike [Schur] saying that was their plan all along. But I was definitely surprised, and it wasn't something I anticipated.

The writing had been on the wall the entire episode, when Gina kept telling Boyle that he needed to get laid to get over Vivian. Was this a drunken mistake or might she have seen what Rosa saw -- that Boyle is really one of the good guys?

It was a drunken mistake! [Laughs.] I don't think it was a decision Gina would logically come to. Gina's and Boyle's relationship is so antagonistic. Who knows what the writers have planned [for season two], but I think they both got drunk and something happened.

How much do you know about where season two will pick up?

I don't know what's in store. There are so many good things set up at this point that season two is going to be really strong.

It was such a fun setup to Gina and Boyle, as most were expecting Rosa and Boyle to hook up or Jake and Amy. What kind of reactions did your co-stars have to the finale script?

They were telling me, "Have you read the script?" with these crazy faces. [Laughs.] It was an unpredictable element that keeps you on your toes and keeps things exciting. Comedy is really all about surprises, and this will give people a surprise.

What was it like filming that scene with Joe? He's so great with physical comedy, too.

We had fun with it. You can't really tell, but I was in a bra and it had a kind of closed-set feeling to it, which is funny in and of itself. We thought it was so weird -- it didn't quite feel real. Hope springs eternal for Boyle, who came to Gina for advice and a friendly ear, and she always shoots him down. So it felt so unnatural and strange to be laying in bed half-naked together. I was more stressed about making sure I held a sheet over myself; that was my primary focus.

What would you like to see Gina do in season two?

It would be fun to see her as Jake's landlord. That's something that was set up ,and there is some funny comedy to be had from that scenario. I'd love to see Gina dating someone and being inappropriate in the office with a boyfriend. I love her paternal relationship with Capt. Holt (Andre Braugher). It's been fun being paired up with different actors over different episodes, and being able to be in stories with Rosa and Terry. It's such a fun show, and I look forward to bonding with different characters. I also hope there are more animal obsessions. (Laughs.) I personally hope I go back to wolves because I'm not as into angry unicorns as wolves!

How do you think Boyle will respond to their tryst?

I think it's hilarious that this happened. Maybe they won't tell anyone, and then they have all this weird eye contact; or maybe people can tell that they've hooked up, but they don't know it's with each other. "You seem happy ..." It'll be interesting to see if it's something that is a secret between them or if they share it with everyone in the office. But it definitely seems like something for endless ribbing and weird situations. I personally don't see it evolving into a relationship, but you never know.

PHOTOS: Faces of Pilot Season 2014

Gina spoke a lot in emojis during the finale. What emoji would best describe your reaction to the season finale?

There actually was an emoji in the script after Gina and Charles wake up together. There was a line where I say, "Skull emoji!" as a reaction, but they opted for a more natural reaction. When we were shooting the scene where we're all presenting our case for Jake, we did a whole long run with different emojis. It was so amazing because I really am obsessed with emojis, and the idea that this was going to be on TV was so exciting. It's like scratching an itch for a wide swath of smartphone users (laughs). I don't think we've seen something like that on TV before.

STORY: 'Brooklyn Nine-Nine' Renewed for Second Season

How would you describe each of your Brooklyn co-stars using emojis?

Jake: I wish there were a leather-coat emoji because that would be perfect for him and Rosa. I could knock them both out with one emoji! But Jake would be the shirt-and-tie emoji because of his whole battle with that. Amy Santiago would be a smile with its tongue out, like that puppy dog happy face. Rosa could be the one with the flat mouth and flat eyes. Terry (Terry Crews) would be a palm tree, then a broadly smiling face, and then another palm tree, then the sunglasses guy and another palm tree. Sometimes you have to do a series; you just can't commit to one emoji (laughs). Boyle could be the smiling cop with the cop hat on. Holt would be wide eyes with a flat mouth. Hitchcock (Dirk Blocker) and Scully (Joel McKinnon Miller) could be two turtle emojis (laughs).

You're headed out on tour this month. What can people expect from your American Treasure Tour?

I started with stand-up and the tour is going to be really funny. I've been working on a bunch of stuff around town in L.A. and feel like I've taken a nice little break from shooting our show. It'll be an hour of stand-up talking about different types of people and spots about love and technology. It'll have a lot of silliness in it. Most comedy is reductive, so it'll be a reductive take on a lot of aspects. There's a lot of talk about technology, speaking of emojis. I've gone full force into the Internet, and there are some musings on that as well as dynamics of confident people versus people with low self-esteem. I'm a new dog owner, so there's a lot of stuff about dogs. It'll be a good hour, and I'll have a great opening comedian. It's going to be a lot of fun.

You're taping it for a special. Will you be self-releasing it a la Louis C.K.?

I'm from the Bay Area in Oakland, and we're probably going to shoot in San Francisco before we firm up a couple dates and figure out the venue in L.A. I'm definitely leaning toward self-releasing it, but I'm still figuring out different options.

We've seen your love of emojis and wolves seep into the show. How much of Gina's dialogue is scripted vs. ad-libbed?

They write really funny lines for Gina. There are lines you'd think seem like something you couldn't even script, but they do write very perfectly Gina lines, so a lot of it is scripted. Once we do the scripted version a number of times, they let us improvise. Sometimes, if I have a great line, I'll ask if they can swap it in for a couple takes. I don't get to see any versions of the show in advance, so usually I'm watching right along with viewers, and I'll find out on Twitter what made it when they're watching it on the East Coast.

What did you think of the Brooklyn Nine-Nine twist? Hit the comments below with your thoughts. For more on Peretti's comedy tour, head to her website.

Email: Lesley.Goldberg@THR.com

Twitter: @Snoodit