XaiJu
jimdattilo
jimdattilo

patreon


Zombie Exodus: Safe Haven Content Sneak Peak

The last few days I have been working on a path involving a character that you meet at the college campus. In this specific path, you can choose to rob Alexey, who has turned the library into his safe haven.

I thought you may be interested in seeing the code that handles the fight scene you have with Alexey. In this specific scene, you attempt to pull out a weapon, while Alexey tries to disarm your character.

The code below shows what happens for each class of firearm, a bow, pepper spray, or Taser. I also wrote paths for each type of melee weapon and style of hand-to-hand combat. But you can see how much code goes into this fight scene. Each type of weapon or attack has a successful and unsuccessful outcome, which depends on your skill.

The entire scene is 3,050 words (though I am only showing you part of it).

I thought this may be interesting to those who may want to write your own game or to see the inner workings of the story.

---

"You're not going to hurt anyone. You're going to hand over what you have, and then I'll go on my way."

Alexey takes a step forward, his voice low and stern. "I've worked hard for what I have. Scavenged, bargained, fought tooth and nail. And you just expect me to hand it over? Just like that?"

You straighten up, your smile fading. "I expect you to do what's best for everyone. To make the smart choice."

"The smart choice? No, what you're asking…it's not smart. It's selfish." Alexey shakes his head, a look of disgust on his face. "It's the kind of thinking that tears groups apart, that turns us against each other. You think you can bully others into submission." He takes a step closer, his voice rising. "But let me make one thing clear. This is my library. My sanctuary. And I won't let anyone, not even you, threaten that."

"Alexey, I'm not going to ask again—"

He springs forwards,

*if curr_type = "ranged"

*if (curr_class = "shotgun") or ((curr_class = "rifle") or (curr_class = "burst"))

his hands reaching for the barrel of your weapon.

if m_hth >= (55 + (curr_size 10))

But you've anticipated this move. Hours of training, of honing your reflexes, kick in like muscle memory. You sidestep smoothly, letting Alexey's momentum carry him past you. In the same breath, you turn, your leg snapping out in a powerful push kick.

Your foot connects with Alexey's chest, sending him stumbling backwards. You level the ${curr_weapon} at him, the barrel unwavering. "Nice try," you say, a hint of triumph in your voice. "But not good enough. Get on your knees, hands on your head."

*goto AlexeyRestrain

*else

You try to react, your finger tightening on the trigger. But Alexey is too fast, too skilled. He grips the barrel, twisting it viciously. The shotgun is ripped from your hands before you can fire, the suddenness of the move leaving you stunned.

In a heartbeat, Alexey spins the weapon around, the barrel now pointing directly at your chest. His smile rises as he says, "Too slow. Now get out of my library."

*goto FailAttackAlexey

*elseif (curr_weapon = "compound bow") or (curr_weapon = "recurve bow")

his hands reaching for your bow.

*if m_hth >= 85

You sidestep smoothly, letting Alexey's momentum carry him past you. In the same fluid motion, you draw back the bowstring, the arrow now pointed directly at Alexey's chest.

"Don't make me kill you," you say.

Alexey raises his hands to the side. "Please, do not do this."

*goto AlexeyRestrain

*else

Before you can react, he's closed the distance, his fingers wrapping around your bow. With a sharp twist, he rips the weapon from your grasp, sending it clattering to the floor. You try to counter, but Alexey is already moving. His hand dips to his belt, drawing a thin, wicked-looking blade. In a heartbeat, the cold steel is pressed against your throat, the edge kissing your skin.

"Too slow. Now get out of my library."

*goto FailAttackAlexey

*else

his hands reaching for your pistol.

if m_hth >= (55 + (curr_size 10))

But you've seen this coming. Hours of training, of drilling, have honed your reflexes to a razor's edge. You sidestep neatly, letting Alexey's momentum carry him past you. In the same motion, you give him a sharp shove, sending him stumbling forward.

Before he can recover, you level the ${current_weapon}'s barrel at the back of his head, your finger resting lightly on the trigger. "Don't make me kill you."

Alexey raises his hands to the side. "Please, do not do this."

*goto AlexeyRestrain

*else

*set p_health %-(round((100-sta)/5))

Before you can react, he's inside your guard, his palm slamming up against the underside of your pistol. The barrel jerks towards the ceiling, your finger wrenched away from the trigger.

In the next heartbeat, Alexey turns, his other hand seizing your wrist. He drops low, his hips twisting. You feel your feet leave the ground as Alexey executes a perfect hip throw, sending you hurtling through the air.

You hit the ground hard, the breath driven from your lungs. Your pistol is ripped from your grasp, and you find yourself staring up at the barrel of your own gun.

Alexey stands over you, a smile playing on his lips. "Get out of my library."

*goto FailAttackAlexey

*elseif curr_class = "spray"

*if m_ccw >= 75

his hands reaching for the canister. You sidestep smoothly, letting Alexey's momentum carry him past you.

In a flash, you raise the canister and depress the trigger. A stream of potent irritant hits Alexey square in the face. He reels back, his hands coming up instinctively to shield his eyes. Despite the burning pain, Alexey lashes out blindly with a kick, catching you in the midsection. The impact sends you stumbling back, gasping for breath.

By the time you regain your balance, Alexey has disappeared, darting around the edge of a nearby bookshelf.

*goto AlexeyPepperSpray

*else

*set p_health %-(round((100-sta)/5))

closing the distance in a heartbeat. His hand clamps around your wrist like a vice, twisting sharply. The canister's aim goes wide as you reflexively pull the trigger, sending a stream of irritant hissing into the air.

Alexey's other hand finds your elbow. He terms, using your own arm as a lever. Suddenly, your feet leave the ground as Alexey executes a textbook hip throw. You hit the ground hard, the breath driven from your lungs. The canister skitters away across the floor, kicked from your grasp.

Before you can recover, you feel the cold kiss of steel against your throat. Alexey looms over you, a thin blade in his hand, its edge resting lightly against your skin.

"Get up and get out of my library."

*goto FailAttackAlexey

*elseif curr_class = "taser"

if m_hth >= (55 + (curr_size 10))

hands outstretched, reaching for the Taser. But this is a dance you know well. You turn smoothly, sidestepping the charge, letting Alexey's momentum carry him past.

In the same motion, you bring up the Taser, squeezing the trigger. The electrodes shoot out, twin darts on thin wires, and bury themselves in Alexey's back. He goes rigid as the electrical current surges through his body, his muscles contracting involuntarily. He drops to the ground, twitching, a grunt of pain escaping through clenched teeth.

*goto AlexeyRestrain

*else

*set p_health %-(round((100-sta)/5))

a blur of speed and power. His hand clamps around your wrist, twisting sharply, forcing the Taser off target. Your finger tightens on the trigger reflexively, sending the electrodes shooting harmlessly into the air.

Before you can react, Alexey's other hand finds your elbow. He pivots, drops his weight, and suddenly you're airborne, victim of a perfectly executed hip throw.

You hit the ground hard, the breath driven from your lungs, the Taser skittering away across the floor. In the next heartbeat, Alexey is on you, a thin blade appearing in his hand as if by magic. The cold steel kisses your throat.

*goto FailAttackAlexey


More Creators