《Programmable Magic》Chapter 11: Fireball debugging
Advertisement
Chapter 11: Fireball debugging
I press the Analyze option, and sure enough, the same programming window appears like before, but this time it isn’t blank. There is something written and it really does look like a programming language, just one that I don’t recognize:
click the spoiler to open the code if you’re interested, I based it on Java, feel free to point out any errors 😊
[Yellow] Fireball:
import Magic_Class.Projectile;
import Magic_Class.Effect;
import User;
public class Fireball extends ManaActivity {
@Override
protected void onActivation() {
boolean active = true;
while(active) {
if (User.Brain.Thought_detection == "Shoot") {
Projectile fireball = new Projectile;
// fireball initiation
fireball.shape = "SPHERE";
fireball.volume = 0.06; // in m³
fireball.velocity = 100; // in m/s = Kinetic energy
fireball.acceleration = 0; // in m/s²
fireball.power = 600; // in KiloJoule = Potential energy
fireball.element = "FIRE";
fireball.starting_point = User.limbs.hand.palm;
fireball.trajectory = "Y = V0y*t - 1/2*g*t²";
// shoot the actual fireball
fireball.launch();
private boolean fired = true;
long start = System.currentTimeMillis();
long end = start + 5*1000;
while(fired && System.currentTimeMillis()
if(CollisionDetected(fireball)){
fired = false;
ApplyBurnEffect(fireball);
}
}
fireball.detonate; //unleashes explosive force of the fireball
}
if (User.Brain.Thought_detection == "Deactivate") {
active = false;
}
}
};
// Modifier 1: Collision detection
public boolean CollisionDetected(Projectile fireball){
if(fireball.velocity = 0){ // fireball stops when it hits anything
return true;
}
else{
return false;
}
};
// Modifier 2: Burn effect
public void ApplyBurnEffect(projectile fireball){
Effect burn = new Effect;
// Effect initiation
burn.shape = "SPHERE";
burn.effective_radius = 0.065; // in m³
burn.target = "ORGANISMS" && "SURFACES";
burn.center_point = fireball.center_point;
burn.duration = 6; // in seconds
// Start the effect
Advertisement
burn.apply();
};
};
Okay, this is a lot to take in at once… I can’t quite make sense of it yet, but it doesn’t look overly complicated either. For now, I’ll just write it all down on a piece of paper.
This confirms it, I’m the one with a special power… Why though?
Is it because I woke up in the middle of the abduction? Wait… did I talk to the aliens before I fell back asleep? What did I say to them… “Aaawh, fuck!”
Goddam! It feels like my head is about to explode… It seems like every time I try to think about the abduction, I get a severe headache…
Maybe I’ll get some answers from the government after I become a high ranking Machia…
I put the code I copied in my backpack and head back to Lance and Fudo after ejecting his fireball-cartridge.
“Okay Lance I’m finished.”
I sit down next to him and secretly hand him the cartridge behind our backs.
“Did you really make his assignment for him Reo? Not fair!”
“Y-Yeah Fudo, he didn’t understand any of it, it was just a lot faster this way. Looks like you’re not the only muscle-brain here Ha-Ha- AUWTCH”
I feel Lance pinching me in the back. Fudo looks confused, well, not like that’s unusual or anything.
“Don’t worry Fudo, I think a mosquito just stung me or something…”
After some more joking around and playing with Sakura, I finally head back to my dorm.
…
“Honey I’m home~ !”
“Shut up! I’m trying to concentrate!”
Alas, such beaty is truly wasted on a rude girl like her.
I study the code some more in my bedroom before going to sleep. I discovered that the main code uses 2 different modifiers, one modifier to burn the target on contact with the fireball and another modifier to detect that contact…
Advertisement
I need to quickly come up with a magic I could program on my yellow cartridge based on the fireball-code, I only have 2 days left until the dual… Let’s just go to sleep for now though.
…
I wake up late for my first couple of classes, looks like Sara already left. I thought about it some more in my sleep and decided I needed a cheap yet powerful magic that’s faster than a regular fireball, since my opponent will likely also use a fireball cartridge… It’s a very common cartridge after all…
Let’s go to Mr. Ito’s class, maybe he’ll give me some ideas?
…
“Alright class now that even our wood [I] student ‘Van Dijk’ graces us with his presence, can anyone tell me the number one factor that determines a Machia’s strength?”
Lance raises his hand:
“It’s mana sir, without mana a Machia is nothing…”
“Great answer Lance, without mana a Machia can’t execute any top-level magic. However, a lot of people also overlook the magics themselves. The cartridges in the market today are mostly of the common and uncommon rarity- *SIGH* Yes Reo?“
I raised my hand after hearing ‘common and uncommon rarity’.
“What is this rarity you speak off? Aren’t cartridges divided based on color?”
*SIGH* “You don’t even know something as simple as this? Fuck my job man… Right, very good question Reo. Cartridges of the same color are further categorized based on rarity, an arbitrary measure of the amount of revealed cartridges with a particular magic, it goes from common – uncommon – rare – legendary to unique. Unique basically being the only one of its kind.”
Fuck, I guess all my programmed cartridges are going to be unique then, hope that doesn’t attract too much attention…
“Eeuurr thanks, Mister Ito…”
“No problem. Now, like I was saying, you won’t become a powerful Machia with just uncommon and common cartridges, these are predictable and usually less powerful then rare or legendary ones. That’s why I think money is also vital for becoming a powerful Machia, whether it’s buying unrevealed cartridges directly from the market-place or buying access to a guild-owned dungeon, you’ll need money on your way to the top, a lot of it.”
After his speech, Mister Ito rambled on about what factors determine the kinds of magic you can discover from unrevealed cartridges. It basically boiled down to your affinity, your talent and your luck. He didn’t really explain what talent meant though and I was too late to ask him about it.
In the end he didn’t really give me any ideas for a magic I could program.
I should at least be able to fire my magic twice, even if I only have a mana-pool of 100. It should be powerful enough to rival fireball, and it should be a lot faster…
I got it!
Advertisement
- In Serial9 Chapters
Demon Dungeon
It's a story about a demon that owns a dungeon. The dungeon has a core. The demon is a low-ranking member of an army. Expect a fun story, way too long chapters, and a mildly emotional demon.
8 132 - In Serial15 Chapters
A World Away
Th world, and humanity along with it, has been taken, swallowed up by a larger universe. With no other choice humanity will have grow quickly, take what help they can get and master the use of the strange System that governs this reality. But not all of humanity were lucky enough to stay together. Some, were stranded, lost and alone at the other end of a dimension wider than they can comprehend. And they will never stop trying to get back.
8 72 - In Serial6 Chapters
Orbital Station 47c
Senior Medical Officer Valerie Helvetica Carlisle is having a very bad day. First, the military base she was assigned to as a civilian medical practitioner got bombed to hell by rebels no one really cared about. Then, she awoke super confused, on the other side of the galaxy, with her body in pieces in a cryogentic pod, on a station that had been abandoned centuries ago due to a suspected plague. Homelessness is a bitch, especially when it's your body that you got kicked out of. She has to find a way to get back into her body, get answers from the purple dude in the cryopod next to hers, and find a way either home or at least forward. She has no idea which, really.
8 52 - In Serial28 Chapters
Defy the Heavens?
Hey there, Dear comrades, I am just a common guy from a common background. How should I say this.. I died on earth, old age of an old illness. something that could have been prevented. How did I reincarnate? No idea. For almost ten years, I assumed I was just like any other kid. Maybe blessed by the heavens but I was a commoner all the same. However, stuff happens and here I am trying to meek out an existences for myself. You know how it is. Killing enemies with epic sword skills, purifying the souls of barbarians with fire, walking in mid air like I am superman. Haha, just being a typical american in not so typical fantasy world. What's the worse that can happen, right? What's so hard about defying the heavens? Didn't we used to defy our stomachs by ordering taco bell? Or how about defying our presidents by voting for their rivals next election date? Ha, these are soo much more complicated process than simply killing off the annoying people. Cutting down heavens when they stand in our way, and enjoying life to the fullest? I mean, this is the american dream!
8 141 - In Serial41 Chapters
Tome of the Soul
SPOILER WARNING: This is Book #3 of a series. If you haven't read the first two, you will be very lost. You can read both completely free with the links below.Book 1Book 2 Samuel Bragg has won himself a noble title, earned prestige as a mage, and made many powerful friends. But what happens when the very country he's sworn allegiance to comes under attack by a foreign power? With an army on the march and distant figures plotting his demise, can Samuel keep up with the pace of the world around him? Months after the death of his father, Tobito Tokugawa struggles to fill the empty role in Issho-Ni. Will he be able to assume his father's position and lead the group of elite fighters to greatness? With doubt cast at him from all angles, Tobi will need the help of his oldest friends to further establish the influence of his divine father and continue to protect the innocents of the world. Deep in a brothel of Milagre, Bora Bora Ciayol, Champion of Bahamut, is called to war. He rallies the support of his fellow followers, ready to fight on behalf of his Patron. This is their final push to eliminate the Tyrant Queen Tiamat, and put an official end to Bahamut's greatest risk. Leading a small army all his own, Bora Bora begins the path to becoming a legend. Read Tome of the Soul to learn what happens when the greatest legends in a nation rise to defend their land. A thrilling tale of war, magic, and devotion awaits you. Will you answer the call to reaffirm the record shared here? The Mother awaits the birth of her most legendary heroes. Chapters are uploaded at 10:00 EDT on Monday, Wednesday, and Friday. This story is also available on ScribbleHub
8 152 - In Serial5 Chapters
Life's love //Old
Hanahaki, the deadly illness of unrequited love blooming flowers inside the lungs of the infect slowly suffocating them to their death, such a fate is known to only to befall wizards of the life domain.Mitchell Mythhunter a young life wizard has fallen for all three of his friends, aware of the fact that all three are straight he was caught in the web of the disease. As flowers bloom, he kept his mouth shut.Oh what danger could this bring
8 97

