《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 Serial150 Chapters
Weaponsmith : [A crafting litRPG]
[I accidentally got engaged to the evil owl-goddess who is obsessed with the number-three and now I have to make weapons for our new adventuring guild] In an era in which ancient gods live in the world’s cities together with their mortal followers, forming tight-knit guilds and powerful temples, the disfigured ash-caster and blacksmith Hineni has lived his entire life as a reclusive outcast. Hidden away behind layers of clothing and just as many walls and doors, he only ever leaves the house in the dead of night, so that neither the gods or anyone else can ever see him. However, on one of these night-tide outings, he finds that has gained the unwanted attention of what is seemingly a perfectly normal owl and through his unwitting efforts at simply filling his nights with acts of personal meaning, he ends up promising himself to a creature that is perhaps even less versed in human ways than he himself is; a mysterious, odd owl-goddess that nobody seems to have ever heard of, Obscura. Hineni, having had no greater purpose in life until now, finds himself willing to accept this turn of events and dedicates himself to creating a brand new adventuring guild, under the watchful eyes of the ancient entity Obscura, who has only one, clear, proclaimed goal - - To hunt the BIG FROG! BIG FROG! BIG! [litRPG] [Soft romance] [Crafting] [Base/Guild-building] [Pact with a diety] [Slice of life] (Updates every Wednesday / Saturday)
8 833 - In Serial15 Chapters
Bottomless earth
Bottomless earth a new Vrmmo that's taken the world by storm with its complicated AI and large amounts of skills to mix and match to the players preference. Its slogan is “A world with endless possibility to explore.” This story follows Shin and his wild adventure to live freely as he chooses. This game to him like many others is an escape from reality to somewhere he dreamed of a place where he can be anything he wants with no judgment. He meets many new friends along the way and experiences many new trials. -Author notes- I write these stories for fun as well as the other stories I write. I'm open to feedback so please if you have any let me know. I hope when you guys read it you like it just as much as me i tried writing the best i can. I am a Amateur writer so there are many mistakes in my storys just bear with me for now all eventually get better. Thanks I hope you guys like it.
8 165 - In Serial6 Chapters
Five Times P. T. Barnum Took One For the Team, and One Time He Didn't Have To
In which, Barnum doesn't know how much his circus loves him. 1.] Protesters2.] Fever3.] Broken Ribs4.] Dangerous5.] Gun Violence6.] Finishing the Job
8 127 - In Serial118 Chapters
Baby of the family
The story of Decs life(or my version of it)
8 120 - In Serial6 Chapters
New feelings? | miles x will|
Hi uhm Ik it's weird and all but I just think will needs to be with someone better than mike Yk? So yeah in this au will goes with Kate to the house to babysit/teach? Flora and will had to go with Kate because after all the Mind flayer shit his mom decided to send him with her friends daughter to the house and and That's how will is here In this situation With miles talking (if y'all want to translate this Wattpad or just make one like this pls give credits or ask:)
8 174 - In Serial42 Chapters
Unearth The Shadows
Fantasy novel | gay romance sub-plot| poc main character. An heir to a monarchy threatened by a popular revolution forges an alliance with an amnesiac man with forgotten links to the rebellion. • • •Heron, Monarch-in-Prospect of Ceres, lost his mother to an icy storm. Two years later he still battles with the grief. The storm is back. And Heron finds a man trapped unconscious in the middle of the cold winds. His vital signs are odd and the only thing he remembers is his name : Davir.Heron provides Davir with medical care and finds in the stranger the opportunity to have a pawn in the royal guard. An alibi to buy himself liberty from the control of the ruling council of the capital. An indebted man is a man easy to persuade, and Davir acts as intended. As a popular rebellion against the Monarchy festers in the capital, Heron's new-found liberty soon leads him to cross paths with the rebels. An unsettling discovery comes to the surface: he'd been lied to about the death of his mother by the ruling council. Suspicious that he's, too, a pawn trapped in a tangle of political interests he cares little for, Heron is determined to get to the bottom of the secrets kept from him. Davir's military abilities could be of great help. Davir, too, needs Heron's ressources to discover his forgotten identity. An alliance between the two is then formed. But the clues leading to Davir's past point toward where they shouldn't : the rebellion and dark, sinful, supernatural arts of soul eaters.____________________________________©Copyright A. Gonçalo. All rights reserved.
8 102

