《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 Serial127 Chapters
Peculiar Soul
Not everyone gets a soul. The rise of industry and mechanization has sent the world's population booming upward, striving relentlessly for the fixed handful of souls that level armies and steer the fate of nations. The remnants of a crumbled empire fight in a grinding, bloody war against their ancient enemy. Not everyone gets a soul, but Michael must - for he is the scion of a lord, and the soulless cannot hold such a title. For five years he has tried to tempt one of the souls freed by its vessel's death. Five years of pain and failure, earning only his father's contempt. At last, one more opportunity to earn his soul has come. But not everyone gets a soul quite like his. Updates weekly on Wednesdays. Cover art by Harry Rowland.
8 618 - In Serial59 Chapters
Game Dungeon
A recently deceased man finds himself imprisoned in a prismatic gem, confused and missing pieces of his memory he wishes to play video games, but to his horror, he is stuck in a world of sword and magic. Hello! I am the writer of Game Dungeon thanks for your feedback! Although my intentions were not to insult the reader I can see how someone would think that way. I have no plans to change it as of now and it's better to put it out there as a warning that I use a lot of words with similar meanings but are used very irregularly. Honestly speaking my English teacher was weird and a lot of words I use are more complicated than they need to be, but again something I was drilled into was not reusing words apart from "I".
8 176 - In Serial19 Chapters
Tremors Of Time: Spirit Gauntlet
Alex Wiler the last son of twenty siblings, his father is the CEO of Wiler Real estate multi millionaire, his mother died in childbirth. He lives his life like a robot going through the motions meeting friends, going to college but he feels like he hasn't found a goal in life that his life is devoid of color. Until the CEO of Arron Kin created possibly the best game of the century, Choices Online is that good in the opinions of many. Alex Wiler starts the game and soon finds out that it is the game was more than it seemed that it could possibly hold trove criminal secrets. With the help of countless others and a lone investigator watch as Alex wiler becomes the Unraveler of secrets and the strongest Spirit. ENJOY
8 138 - In Serial7 Chapters
Athemasus
When He, alone stood on these plain of misery. I always watch and gritted my teeth as his everything is my entertainment and my joy. As I watch the boy turned to great existence for the saying is 'humble beginning towards greatness' is true what happen if I make 'Great beginning towards...Epicness'Shall we see where that will lead us in this journey
8 75 - In Serial171 Chapters
Overlap
A heartbreaking and uplifting tale of ultimate romance is brought into the light, slowly simmering to a boil, and put together by random events of fate and impossible fortune.In my brightest moment, and in my darkest turns, I recite all I am by memory. The other one completes me; my other half revives me. Two lives, two worlds, two perceptions. Our bodies are so far apart, but our heart and soul are still connected together by an impossible miracle of chance. Both our worlds are real, both our realities co-exist, overlapping through our senses until you become me - and I become you.After everything I have seen, after being shattered and put back together, I can still hold onto that intangible hope that others yearn for.
8 239 - In Serial31 Chapters
My Short Stories
A collection of short stories I will write everyday. The topics for each day would be based on the 30 days writing challenge I found on Pinterest.
8 435

