Prev
Ch. 59 / 28421%
Next

Chapter 59: Transformation Spell

~8 min read 1,491 words

Allen looked solemnly at the light screen in the mirror; he believed that the empty values for these two key-value pairs were definitely due to some oversight when he cast the spell himself.

He carefully recalled every detail of when he cast the spell in the abandoned girls' restroom.

Soon he thought of something: just now, what he had hoped to see in his heart was the light screen that appeared when he cast the Petrification Spell for the first time while transforming a Thunderbird's eye; at that time, he seemed to have turned a matchstick into a needle.

So only the first key-value pair on the light screen had a value, and the value of that first key-value pair was a description of the transformation result...

Allen suddenly had some realization in his heart, and he immediately adjusted what he longed to see in his mind.

This time he longed to see the light screen of the Petrification Spell from the Thunderbird's eye in November; at that time, he had mastered a new usage of the Petrification Spell, and the effect of his spell then was to make a handkerchief fold itself twice in a row.

As he adjusted his mind, the light screen in the mirror also changed.

This time, the value of the first key-value pair became empty, while the value of the second key-value pair was not empty, and the value of the third key-value pair remained empty.

Allen could not wait to observe the value of the second key-value pair; the value of the second key-value pair was also composed of ancient runes. He could sporadically distinguish the meanings of a few familiar runes, but he could not figure out what they were used for.

Moreover, he also found that the format of this value was very unfamiliar. He tried his hardest to connect the format of this value with the various data structures he was familiar with before, but in the end, he found it all futile.

He began to recall Professor McGonagall's words when applying this: "endow the transformation target with action logic."

Allen fell into deep thought again; action logic is for the transformation target to execute...

Execute?!!

Allen suddenly understood: if the Petrification Spell is viewed as a computer function, then those three key-value pairs are the three input parameters of this function. Input parameters are generally some basic data types; for example, the dictionary mentioned earlier is a basic data type. However, in most high-level programming languages, an input parameter can pass a closure. A closure can be understood as a function defined inside another function.

Simply put, it is passing a piece of code into the function so that the function can execute that piece of code.

To use the Petrification Spell as an example: the behavior the caster prepares in their mind for the transformation target will be transcribed into something resembling a program. For instance, start folding from the left side of the handkerchief, determine how long a length of the handkerchief should be folded on one side, and only after the first fold is complete can the second fold proceed; how the second fold should be carried out...

This program-like thing is the value of the second key-value pair of the Petrification Spell. This parameter determines what action the transformation target should take. The more detailed this program is written, the more precise the action of the transformation target will be.

And this program-like information will also be sent to the Will of the World. Then, when the Will of the World materializes the effect of the Petrification Spell, it will endow the transformation target with the action logic contained in this program-like thing.

This discovery instantly sparked Allen's interest. He did not expect that the world's magic could be analyzed to this extent using the ideas of programming. So, what exactly is the thing he calls the "Will of the World"? This is a question he has been thinking about but has had no clue about.

However, this question was simply too grand. In the end, Allen quickly drove this question out of his mind.

He returned his gaze to the value of the second key-value pair of the Petrification Spell. This program-like thing is written in ancient runes. Does that mean ancient runes are also a programming language that can be used for programming?

Allen, who was a programmer in his past life, was very interested in this idea. He did not expect that his old trade could still come in handy in this Fantasy World. He even felt a bit eager to start programming with ancient runes.

But he also knew that the conditions were not yet ripe. The ancient runes he currently mastered were still too few. Furthermore, programming with ancient runes requires understanding its syntax. Most importantly, he still did not know where to find a compiler for ancient rune programming.

Allen could only sigh deeply and continue to observe the third key-value pair of the Petrification Spell; the value of this key-value pair was also empty now.

This time, Allen was much more experienced.

He instantly recalled Professor McGonagall's mention of the new application of Transfiguration: establishing a link with the transformation target, and then being able to control the transformation target's actions in real time.

Obviously, the third key-value pair is for controlling whether or not to establish a link with the transformation target.

Professor McGonagall started teaching the new applications of the Petrification Spell in early November. By December, Allen had actually mastered these two new applications. So when he transformed the Thunderbird's eye in December, he actually cast a Petrification Spell that established a link with the transformation target.

He quickly found the memory of the light screen that appeared during that transformation. That time, he established a link with the handkerchief and also endowed the handkerchief with action logic. The link established with the handkerchief enabled Allen to control the handkerchief in real time and make real-time corrections to the handkerchief's actions, making its folding movements more precise.

Then, following the previous method, he made the light screen appear in the Mirror of Erised.

Sure enough, this time, the first key-value pair was empty, while the values of the second and third key-value pairs had values.

The value of the third key was particularly short, and the ancient rune in it happened to be one Allen recognized; it meant "YES."

So Allen deduced that the key of the third key-value pair meant "whether to establish a link."

He wanted to quickly write down this key, but he found he had no paper or pen with him. He could only look at it a few more times, trying to imprint this key in his mind.

The result was that the more he looked, the more he felt he had seen the ancient rune of this key somewhere before. Finally, he remembered.

There was also a key in the key-value pair of the "Serpensortia" spell whose ancient rune was very similar to this one, and the caster could also establish a link with the snake summoned by the "Serpensortia" spell. It seemed that the mechanism for establishing a link was the same for both spells.

Just as Allen was staring intently at the mirror, Harry and Ron broke free from the constraints of Allen's Petrification Spell, and Allen knew nothing about it...

Harry and Ron looked at the entranced Allen, exchanged a knowing glance, and then both pounced on Allen together.

"Allen, you are too despicable, casting a spell on a good brother! Ron, let's give him a good beating together!" Harry's suggestion received a warm response from Ron.

Allen immediately wanted to draw out his wand, but Ron controlled his arm. Facing the two's attack, Allen wisely gave up resistance and was tackled to the ground...

"Alright, alright! I was wrong! I won't look at the mirror anymore; I'll let you all look." Allen pleaded softly.

"Don't change the subject; let's talk properly about your sneak attack!" Ron was not fooled at all. Lying on the ground for a while had made him very clear-headed now, and he was not so concerned about what he saw in the mirror anymore. At this moment, he actually started tickling Allen.

Allen immediately could not hold on; he was most afraid of being tickled.

Suddenly, a sound rang out in the corridor outside, ending their dispute. They did not realize how loud their voices had been just now.

"Quick!"

As soon as Ron draped the Invisibility Cloak over the three of them, Lady Filch's sparkling eyes turned into the doorway. The three stood motionless, thinking the same thought: Does the Invisibility Cloak work on cats? After about a century, Lady Filch finally turned and left.

"It's still not safe—it might go to find Filch. I'm sure it heard our voices. Let's go."

Ron pulled Harry and Allen out of the room.

◈

End of Chapter

Prev
Ch. 59 / 28421%
Next
Prev
Ch. 59 / 28421%
Next