《Programmable Magic》Chapter 12: Fireball 2.0
Advertisement
After Mr. Ito’s class I rush back to my dorm, luckily Sara isn’t home yet so I have some peace and quiet to work on my magic.
My idea is to program a smaller, faster fireball, hopefully the smaller size will result in a reduced mana-cost.
I guess I’ll just modify the size and speed of the fireball-code I got from Lance…
I type the new code into the unknown yellow cartridge and hit save…
ERROR Syntax error
Dammit… ah I see, I forgot to add a semicolon at the end. This reminds me of my old mobile-game coding days…
After fixing the syntax error, I hit save again and get this pop up:
Statistics
Mana Price: 41 Mana/Use
Explosion Efficiency: 36%
Save
Edit
What’s this efficiency stat? Well let’s just ‘trial and error’ a bunch I guess.
I changed the speed and size back to the original code I got from Lance, the Explosion Efficiency is now 100% and the Mana Price went back up to 100 Mana/Use… If my guess is correct, this ‘Explosion Efficiency’ measures the amount of potential energy from the fireball that’s actually converted into the heat and kinetic energy of the explosion it creates when it comes into contact with something.
Or in normal people speech: a higher efficiency means a bigger boom.
It appears that a smaller fireball can’t convert a lot of potential energy into the explosion which would make it a lot less powerful… Looks like the mana count is based on a combination of speed, size and power.
Wouldn’t it be possible to alter the size of the fireball when it hits something in order to create a bigger explosion?
Alright, let’s program a smaller faster fireball that’ll expand when it hits a target, this should increase the ‘Explosion Efficiency’ since the fireball is big when it explodes. But It should also consume less mana since it still has a small volume when I fire it.
Advertisement
I tried adding another modifier at the end of my code to expand the fireball, but I got an error, this time a ‘Modifier overflow’ error. Looks like I can only add two modifiers to my magic right now.
This means that I can’t apply the burn effect from the original fireball though, since I need an open modifier spot, but maybe by removing the burn effect I can lower the total mana cost even more…
After a lot of testing and syntax errors I finally got some statistics I liked:
Statistics
Mana Price: 50 Mana/Use
Explosion Efficiency: 100%
Save
Edit
It should have a fair bit more power than a regular fireball and it’s also a lot faster, however, it doesn’t have a burn effect like a regular fireball would have. That did make it a lot cheaper though.
I hit the Save option and I get another window telling me to name my new code.
“What about… Explosion!”
I enter the name ‘Explosion’ and hit enter.
[Yellow] Explosion:
import Magic_Class.Projectile;
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.0000001; // in m³
fireball.velocity = 180; // in m/s = Kinetic energy
fireball.acceleration = 0; // in m/s²
fireball.power = 900; // 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();
boolean fired = true;
long start = System.currentTimeMillis();
long end = start + 5*1000;
while(fired && System.currentTimeMillis()
if(CollisionDetected(fireball)){
fired = false;
ExpandProjectile(fireball);
}
}
fireball.detonate; //unleashes explosive force of the fireball
Advertisement
}
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: Expansion
public void ExpandProjectile(projectile fireball){
fireball.volume = 0.09; // in m³
};
};
The cartridge starts to glow and sizzle but stops after a while, I insert the cartridge and get the prompt:
Yellow Revealed Cartridge: Explosion
Store
Eject
Analyze
Nice! This could work! I can actually become a powerful Machia like this, fuck gift-cartridges, fuck mana-count, I’ll just do this my way!
Let’s start with winning the dual tomorrow, I’m curious about which lackey Kaori will send my way though. I hope someone from wood [I] or [II].
I can only hope to one-shot my opponent with explosion, they shouldn’t see it coming since the projectile is only visible on impact. Now that I think about it, I really created something superior to a regular fireball. Not only is it faster, it’s also near undetectable and more powerful.
Or well… it should be at least… I’m confident in my coding abilities, but I couldn’t actually test the magic itself out. It also looks like I can’t reprogram an already revealed cartridge, this is totally a nightmare for any debugger…
Also, I don’t think I’ll get a lot of time to practice my explosion magic before the match...
*SMACK*
I hear the front door swing open, presumably Sara returned home.
*KNOCK* *KNOCK*
“I know you’re in there pervert, let’s eat together, I bought too much sushi.”
What a shock, is she finally opening up to me? L-Lets not make any bold assumptions, it’s Sara we’re talking about after all…
“Sure, give me like 5 minutes!”
Advertisement
- In Serial18 Chapters
The Remembrancer (Dropped)
It's the Golden Age of the Virtual Reality world. The different genres are a dime a dozen and each new game brings a new twist into the fold adding to the ever changing flavor of virtual reality. Corellec Inc. stands at the top of this enfolding world, looking for new ways to push the outer boundaries. Enter Elijiah Pierce, a broken man trying to hold together what little of his life remains. Deciding to take a new turn at life, he makes a new heading on his way to personal peace, towards the virtual reality world. Little did he know that it would change him in the most unthinkable ways…
8 245 - In Serial37 Chapters
Error 69
𝐁𝐎𝐎𝐊 𝟏 𝐈𝐍 𝐓𝐇𝐄 𝐎𝐌𝐄𝐑𝐓𝐀 𝐒𝐄𝐑𝐈𝐄𝐒 | Error 69𝙏𝙝𝙚 𝘼𝙨𝙨𝙖𝙨𝙨𝙞𝙣 & 𝙏𝙝𝙚 𝙃𝙖𝙘𝙠𝙚𝙧/ˈɛrə/nouna mistake; an accidental wrong action or a false statement.----------❝ While your at it, keep it low. Wouldn't want anyone hearing my name escaping those lips. ❞❝ What makes you think I'll do that? ❞❝ Could be the fact that your pressing your thighs together or the way you're crossing your arms over your chest because you don't want me to see your hard nipples. ❞----------Thirteen slow years have passed since the traumatic event took place, becoming a hacker was all Athena had worked for. After endless and sleepless nights behind a computer screen, Athena Castillo was true to her word and became 'Error 69', a hacker that has no trace nor information. Yet, after hacking a unknown source and receiving the information she wanted, she found herself kidnapped, none other than the Italian Mafia but falling for sinfully attractive yet insufferable Valentino Romero wasn't part of the plan.Without knowing who to trust, Athena starts to learn how the not known to eye business works but when her hidden past and family dark secrets start to arise and unfold, Athena discovers who she truly is, and most importantly, she realizes everything is not what it seems. With life or death situations around the corner, will her partnership with the mafia be enough to dodge them?✤Bc: @DevilishWritings----------
8 160 - In Serial16 Chapters
The Reborn: Book One
[participant in the Royal Road Writathon challenge]What would you do with your second chance? Chance was living the high life: He had his dream job, an amazing wife, and generally was happy. All of that changed when Chance was killed in a “freak accident.” Without having any memories, Chance must learn how to survive this new world. Follow Chance and his new partner, Sage, as they advance in this new world. With the realms hanging in the balance, they must work together to stop the forces behind the corruption. The Reborn is a series that borrows from RPGs. Characters have classes, abilities, and more.
8 128 - In Serial13 Chapters
Under the Mask
Elira Bell used to be a hero. Now she works with the villains...and she's quite good at her job.
8 84 - In Serial8 Chapters
My Wife Always Thought I Did Not Love Him
Author(s): Jiang Xin XiaozhouStatus: 70 Chapters ( Completed )Gener: Romance, Comedy, Slice Of Life, School lifeA car accident made Xia Yao return to his third year of high school, he finally has the opportunity to make up for everything he regrets. The mistakes that have been made can now be mended. So when Xia Yao once again meets Zhou Du, the target of his unrequited love, he decides to choose a completely different route.If you don't love me, then I'm willing to set you free.However, things seem to turn out completely different than what Xia Yao expected.Before rebirth-Xia Yao: I like you.Zhou Du: What did you say?After rebirth-Zhou Du: I like you.Xia Yao: I only see you as a classmate.Zhou Du: ......【But that's not what your diary said!】Translation: OngoingPlease visit my website as well for more updates_https://lazynovels.com/
8 147 - In Serial43 Chapters
Harrisons - The Last Chapter
Charlie gives birth to a beautiful baby girl.Maria is marrying Silas, again.Elizabeth is still trying to move on after the incident this time hand in hand with Leo.Owen is happy to see his children finally finding their happiness but everything can't go smooth for the Harrisons, can it?Charlie and Marcus's relationship stumbles as Elna reaches out to Marcus - asking for help. Charlie's insecurities come upfront.Sean is also back with a determination of winning Maria back. Silas is worried about his family as well as Sean's obsession for Maria grows. Leo visits New York with a friend, Jennifer, for Maria's wedding - Jennifer also turns out to Fred's (Elizabeth's ex and Elizabeth's neighbor when she was working in Chicago) ex-fiancee. Elizabeth feels the forgotten sparks between her and Leo.Catch it all in the finale of the Harrison Series.
8 147

