《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 Serial28 Chapters
Core Chronicles
Core Chronicles is a series of interrelated stories, including in-depth major story arcs and shorter side stories about Cores and those affected by them through direct and indirect means. The first arc is planned to be Dungeon Core with City Building elements in an Urban Fantasy setting. It will mainly follow one main character's point of view, but on occasion, the POV may shift to side characters to give more information about what is happening in the wider world. The stories will also examine how the world changes with the introduction of magic and its various purposes. The System will be between soft and crunchy, with discrete levels and stats for characteristics and skills. But, for example, the health statistic will be a less clear indicator rather than a distinct stat.
8 204 - In Serial27 Chapters
A Nerd's Wet Dream Come True (Tossing an OC into Marvel) V2.
Andrew William. A perfectly average boring name for a perfectly average and boring boy. He wasn't particularly smart nor gifted. Not in academics nor in sports. He wasn't even as good as the other losers and "nerds" in his school. He could not remember the expansive lore of Star Wars, he could not recite the dialogue of Startek nor pull off any cool one-liners and quotes, and he couldn't beat the final level in most games without resorting to cheating or mods. All he had was half-assed knowledge of pop culture and comics, but the one thing he was good at, his one and only pride and calling in life? Making Youtube videos. No, it wasn't sad! He was actually quite popular, honest! He made videos of adventure and nature, although it was mostly of the creepy variety. Abandoned hospitals, old mines, long tunnels, and undiscovered caverns. And as ironic as it was predictable, it would, of course, turn out to be the reason that he died. Well, at least he could take comfort in dying doing what he loved, not many people these days could say the same, you know? The concept comforted him at least, but it turns out death is not always as permanent as people liked to think, because Andrew somehow found himself in New York City of all places after falling to his certain death in the Devil's hole, Death Valley Nevada., only thing was it certainly wasn't the New York that he knew of. The Fantastic Four? Stark Industry? Captain America's biography? Oh boy, and did he mention he's no longer human? His Asian friends had introduced him to the wonders of Isekai novels and mangas, but isn't the order a little messed up? Where's his meeting with the sexy and nice Goddess? Where was his intro or tutorial?? Explanation plz I'm a noob at cross-dimensional travel! Help? Setting? Menu? Status? May I please get to pick my own cheat power? No? I'm stuck as a virus? Well, At least the Prototype Virus was pretty darn cool and OP. Just not as op as being able to casually break the sound barrier in my sneakers or bench pressing the earth, but I'll just have to make do. Please don't be some fucked up Marvel continuity where Nazis and Hydra won or some shit. Toto, I don't think we're in Kansas anymore
8 335 - In Serial30 Chapters
The Gatekeeper
Quick Synopsis:This is the story of Reylor, a god-like existence who lost a great portion of his strength when accidentally sent from his “home” to another world. Making friends and learning to harness to power of magic, he maintains his commitment to his prior duty and proceeds to fight against corruption, both on a political front and against what is known as the shade.(Note, this story focuses on action and adventure, so politics are not in depth) This has been my first novel, which was primarilly inteded as a learning experience, and so it may be a bit rough in regards, but it should definitely be readable and it is a full story. I may make some adjustments to it later on, but there's no guarantee... anyhow, it's free to read, so give it a go! Also, feel free to check out my new website: aretornovels.wordpress.com
8 227 - In Serial104 Chapters
The Lost Characters [Vanilla Dark Fantasy]
Let's say that our relationship is too complex to explain in a few words, but if you are interested in snooping into other people's lives, then I would be happy to tell you about my life. Nice to meet you, my name is Adam and this is my story. +)My name is Adam and this is my story. -) His name is Adam and this is his story. +)If his name was Adam, this would be his story. How irrelevant, right? They are all Adam and in all cases this is their story. +) The original novel is in Spanish, so keep in mind that the translation is amateur
8 133 - In Serial31 Chapters
A Ghost in the House of Iron
A faerie tale for fans of Holly Black & Naomi Novik. A dragon, fallen from the sun. An ancient grudge. A royal spy. The Ironborn wizards of Ylvemore thought they had won the war against the fae folk generations ago. They were wrong. *TEASER* He sighs, running a hand through his hair. The hand that just a moment ago was holding a small ball of fire. A couple stray embers flicker through the strands, but somehow they don't get singed. He catches me staring and I end up gazing speechlessly into his blue eyes for a moment. I clear my throat, blinking. "Your... The fire. I'm just not used to seeing that, still," I say. "I always expect you to... to burn." "I am burning," he says softly. . Updated weekly on Mondays. Also available on Wattpad! Early access to additional chapters at https://www.patreon.com/ilanawilson.
8 207 - In Serial9 Chapters
Seed sower
A place where everyone have skills and skill boards. In this world everything decide by skills acquired by a person. In this world skills get by age ceremony at the age of 8. Our protagonist named Ram get an unique skill called Seed Accumulation, how will his life turn out from this point onwards.
8 190

