The Bandit Attack
In which our protagonist demonstrates that logic is, in fact, a weapon, and Orven becomes a believer.
The bandits came on the eighth day out of the trading post.
There were nine of them. Eight men and a woman, all armed, all wearing mismatched leather armor, all with the desperate look of people who had chosen this line of work because there were no other options. They blocked the road at a narrow pass, swords out, and the lead bandit, a big man with a scar across his face, called for the caravan to surrender its goods.
The guards, who were outnumbered, looked at Orven. Orven looked at Kenji.
"You said you could make fireballs," Orven said.
"I said I'd figure it out."
"You had a week."
"I figured it out."
Kenji climbed down from the wagon, walked to the front of the caravan, and stood about halfway between the bandits and the merchants. The bandits looked at him, confused. He was a scrawny guy in a borrowed coat, with a small glowing dragonfly orbiting his head. He did not look like a threat.
He did not feel like a threat. But he had spent the last week quietly, methodically, defining a function.
"Function create(name='flare', inputs={size=small, duration=short}, outputs={bright_light, mild_heat}, cost=low, stability=very_high)!"
He cast it. A small sphere of pure white light appeared above his palm, three times brighter than a torch. The bandits flinched. He dismissed it. He cast it again. They flinched again.
"Stop that," the lead bandit said.
"Stop what?" Kenji asked, innocently, and cast it a third time.
"Stop it!"
"Or what?"
The lead bandit lunged. Kenji stepped back, fast, and the bandit stumbled on a rock that definitely had not been there a moment ago. He fell. The other bandits moved, and Kenji raised his hand, and the flare above his palm became three flares, then six, then twelve, surrounding him in a halo of white light.
The bandits froze.
"This is if," Kenji said conversationally, as if lecturing a junior developer. "If you move forward, things will be uncomfortable. If you step back, we can all go home and pretend this didn't happen. The condition is your choice. The action is mine."
The bandits, who were not paid enough to fight a mage, stepped back. Slowly. Carefully. Hands raised.
Then one of them, the woman, was smarter than the rest. She did not look at Kenji. She looked past him, at the merchants in the back, at the soft targets, and her hand went to her belt.
Pip screamed.
The scream was not a sound. It was a mana pulse, sharp, urgent, broadcasting alarm on the spectrum that only Kenji could feel. Kenji did not turn. He did not need to. He had already written the function for this.
"Function trap(name='snare', condition={hostile_approach}, action={bind_feet, duration=long}, cost=low, persistence=true)!"
It was not a real spell. He had invented it on the spot, while being attacked, which was a terrible idea, but the Compiler was helpful and Pip was screaming and his hands were already weaving the intent.
The ground where the woman was standing turned soft. Not mud, exactly. More like the earth had become a memory of mud, soft enough that her boots sank, hard enough that she could not pull them out. She yelped, stumbled, and fell.
The other bandits, seeing their leader down and their smart one stuck, made a decision. They ran.
Kenji let them.
When it was over, Orven walked up to him, looked at the small soft patch of ground where the woman bandit was still stuck, and said: "What was that?"
"A snare. I made it up just now. Probably not reusable. The mana cost is high, and the effect is unstable. Don't ask me to do it again."
"You made it up just now."
"Yes."
"In the middle of a fight."
"Yes."
Orven was quiet for a long moment. Then he laughed, a single, short bark of disbelief, and clapped Kenji on the shoulder. "I have been a caravan master for thirty years. I have never had a guard who could make the ground swallow a bandit. You, my strange, strange friend, are worth ten swords."
"I'm not a guard."
"You are now. The pay is bad and the hours are worse, but you get to ride in the wagon."
Kenji, who had not been paid for anything in this world yet, agreed.
But Orven was not done. After the caravan had moved on, after the bandits had been left tied to trees for the local patrol to find, after the merchants had stopped telling the story of the ground that ate a bandit, Orven pulled Kenji aside again.
"That snare," Orven said, in a low voice. "The way you made it. That was not the magic of the academies. That was not the magic of the churches. That was something else."
"I know."
"What is it?"
Kenji thought about it. He thought about how to explain, in a world without computers, what structured magic actually was. He thought about the Compiler, and the way it translated his intent into spells, and the way those spells felt less like magic and more like software running on a strange but ultimately familiar architecture.
"I don't know what to call it," he said, finally. "It's a different way of thinking about magic. Most mages, in my experience, cast spells. I... write them. I define the inputs, the outputs, the conditions, and then I let the system figure out the implementation. It's slower, but it's more flexible."
"And that flare, those lights around your hand. That was not one spell. That was twelve."
"Twelve instances of the same spell, yes. Parallel execution."
Orven did not understand half the words. He understood enough.
"Be careful," he said again. "There are those who hunt for unusual talents. You have just made yourself very noticeable."
"I know."
"Do you?"
Kenji thought about the bandits. They had been desperate, but they had been organized. They had known the caravan route. They had known the narrow pass. They had been waiting, which meant someone had told them when to wait. And that someone was not a bandit, because bandits did not have that kind of information.
He thought about the woman. The smart one. The one who had gone for the merchants instead of him. She had been fast, focused, and had known exactly where the soft targets were.
He thought about the horn from the prologue, the one he had not been able to place, and he thought: "What if the horn was a signal? What if the bandits were waiting for a signal? What if the signal was, 'the caravan is on the road, take the narrow pass'?"
He did not say any of this to Orven. He just nodded.
"I know," he said.
Orven looked at him for a long moment. Then he nodded, and walked away.
Pip pulsed, very softly.
Kenji sent back: "Yeah. I noticed too."
# WORLD.md (updated)
## Combat
- Magic can be defensive, not just offensive
- If-else logic is castable
- The enemy of a clear condition is sloppy code
- Parallel execution works. Twelve flares at once is a lot of flares.
## Spells
- flare: bright light, mild heat, low cost, very stable
- snare: trap, low cost, unstable, do not reuse
- spark: small flame, low cost, perfect for warming hands
- spark_fireball: projectile, medium cost, ten meter range
## Reputation
- Orven now thinks I'm worth ten swords
- I am not worth ten swords
- I am worth maybe one and a half swords
- Do not tell him this
- The caravan will talk. I just made myself noticeable in three towns.
## Concerns
- The bandits were organized. Someone told them when and where to attack.
- The horn from the prologue is still unaccounted for.
- The woman bandit was smart. Smarter than bandits usually are.
- Orven keeps warning me. He sees something I have not yet seen.