《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 Serial6 Chapters
Creativity Can Fix Things
Meet Alex.Alex is like anyone, really, he just didn't know.He is an artist, a musician, tried to paint, every one of his friends knows him for his drawings. Meet truck.Truck is like every other truck, and everyone knows what a good truck does. It sends people to a new fantasy world.That or the author is just imagining this whole story and creating things out of his butt. Point being, trucks send people to alternate dimensions. The caveat is that Alex is creative, didn't fit into society like everyone else, but, as he would say, he is 'defective'.When he finally figured it out and was ready to fix his shit he had the most gruesome encounter with Mr. Truck. And now we are here, enjoy it. --- Looking for an editor!!! I'm writing this in an attempt to put a comedic feeling into something many people go trough: finding their place, fitting into society, adjusting to responsibilities and facing their problems. It's not really "WOW, HE MADE SOMETHING NEW!", but is more like "Heh, look at dumb ass doing shit... Oh... Hey, I do that too!" So feel free to read at your own risk. Don't know if it will be sporadic, regular or what. For now, it's a creative spur that needed a valve to release and. Here. We. Are.
8 65 - In Serial15 Chapters
GUARDIAN
Grae lives on a normal happy family life He has a thing on taming animals thus Our MC chooses to become one Will he continue his normal contented life or will fate leads him to something different?
8 194 - In Serial29 Chapters
I Still Belong To You - Taekook Love Story
Jungkook runs through the crowd with tears in his eyes. Tae is closely behind him. How could this happen??Taehyung: "Kookie please stop. You are misunderstanding. It's not like that. Baby please let me explain."Just as Jungkook reaches the door, he hears his name again.Taehyung: "JEON JUNGKOOK!!"Jungkook freezes with his hand on the door handle. He know Tae is serious when he says his full name like that.Taehyung: "If you walk out of that door now, we are done."Jungkook gulps and stays there for a moment. But the image of what he saw upstairs keeps on flashing before his eyes. With one final sob, jungkook opens the door and lets himself out. A/N - story line is all mine. Apologies if any resemblance to another story. Photo credit to rightful owners. This will have a happy ending cause we have sooo much sad stuff in the real world. Atleast fictions should be happy.
8 79 - In Serial20 Chapters
Inverted (COMPLETE)
Ashley Everson had cheated death, but not on his own. After a miraculous recovery, he discovers he's not alone in his body anymore. Something lurks, whispering in his ear a language he can't understand, inviting a chasm of reality he didn't even know existed, inverting his life as he knows it.Is it responsible for his survival? Or is it just using him to hide from something much worse? What does the entity even want? What does it mean to his own mortality? Where did the entity even come from? Ash decides to find out before something much worse hunts down whatever is hiding inside of him.**Awarded 1st place in the Paranormal category for the Cleaved Awards 2019.****Highest Ranked. Number 3 in Mystery. Number 2 in Thriller.**#bookiestars #EliteAwards2019 #diademawards #tea2020
8 66 - In Serial78 Chapters
Harriet Potter and the avengers
This is a female Harry Potter soulmate au story. It is also an avengers crossover. It takes a while for the story to develop as its a long standing story. There may be smut scenes in the future. There will be mature language. Also this is my first story so please don't judge to harshly.Quick preview" Are you kidding my actual ******* Potter luck. Welp I guess I'm famous all over the globe now. At least they don't know who I am. Wait? **** this was aired in Britain too... I'm screwed." Started: 01/01/2022Finished: ?Most recent update: 20/11/2022Obviously I do not own Harry Potter or Avengers and anything to do with those belong to original owners. I only own my storyline.
8 184 - In Serial35 Chapters
The Bad Boy, Cupid & Me
Reece smirked, "Trust me Chloe, the good girl always falls for the bad boy."Chloe Armel is a good girl.She never gets in trouble, gets excellent grades and is loved by everyone.Enter Reece.Wild, badass and has an ego that honestly couldn't get any bigger.He gets into fights, breaks every single rule and couldn't care less about the consequences that come with it.When Chloe's parents leave to treat sick children in Cambodia for two weeks, she is forced to stay at her neighbour's house. Her neighbour has a son, and it's Reece Carter.Sneaking out. Parties. Drinks. Hash Brownies. Flirting. Breaking the law...and road trips.Add a few shots of Cupid's arrows and what have we got?No clue.All we know is, it'll be unforgettable.
8 67

