After Doofenshmirtz had figured out what just one part of Dakota's coding meant, the rest of it seemed to click with him. Every day while he worked, Doofenshmirtz explained everything that he did to Dakota. While he was a Squip, Dakota didn't completely understand most of the things said to him. His mind seemed to get scrambled up when Doofenshmirtz showed him his programming directly. Squips weren't capable of understanding their own coding, it was just part of their programming. What was even harder to follow though was that half of what Doofenshmirtz was talking about had to do with emotions, and Dakota didn't quite understand that kind of thing, at least not now.
Dakota didn't say anything though. He just listened to what Doofenshmirtz said and appreciated that he was bothering to keep him in the loop at all. Doofenshmirtz didn't have to explain anything to Dakota. All he'd been asked to do was fix Dakota's coding. Dakota couldn't help with the code, and Doofenshmirtz was wasting time to explain things to him. Doofenshmirtz wasn't doing this because it was convenient and made things easier, he did it because he was treating Dakota like he was human. Doofenshmirtz really seemed to care about how he felt.
Doofenshmirtz wasn't the first person to behave like Dakota was human, but this felt different from what Milo or Cavendish did. Doofenshmirtz never forgot, not even for a moment, that Dakota was a supercomputer. It was refreshing.
"Alright, I think I've got this all figured out," Doofenshmirtz said. He showed his laptop to Dakota. He didn't exactly understand what the coding meant, but Dakota could tell that Doofenshmirtz had changed it to resemble the old coding, though there were still some differences.
"This'll fix me?" Dakota asked. He still didn't think there was anything to fix, but it was how Milo saw it. Milo was the only reason he was going through with this whole thing.
"You were never really broken," Doofenshmirtz said matter of factly, and though Dakota completely agreed, it was weird to hear someone else say it. "You know, if something is wrong with the coding, even just the smallest little thing, the program won't run at all. Your old coding might not have been normal Squip coding, but it worked, didn't it?" Dakota nodded. "By definition, that means there was nothing wrong with it. Same goes for your new coding."
Dakota grinned. "Yeah, I guess that's true," Maybe it didn't matter just what coding he had, as long as the program ran properly. "And you're sure this code will work?"
"Fairly sure," Doofenshmirtz looked it over. "I've double, triple, and quadruple checked it, and I haven't found any issues. If it doesn't run right, we can put in the old coding and try again."
"So let's do it," Dakota said. He didn't see the point of putting it off if they were ready.
"Just wait a minute," Doofenshmirtz said. "I want to tell you just what this programming will do, what it will mean for you."
Dakota frowned. He'd humored Doofenshmirtz when he'd insisted on walking Dakota through everything he did, but that had only been because Doofenshmirtz might work better and safer if he talked through his thoughts. There was no such advantage this time. "Why?"
"Because this coding will make you who you are." Doofenshmirtz gave him a cold look. "I think you should at least know who that will be."
"It doesn't matter to me," Dakota said, and it didn't.
"Well, it matters to me," Doofenshmirtz said. "And for the record, I wanted to run this by Milo and maybe Cavendish too."
Dakota felt a spark go through him as a strange dark feeling built up. "Milo, sure," If Milo didn't like what the changes meant, then they would change them again. "But not Cavendish."
Doofenshmirtz was taken aback. "Okay...why not?"
"Because…" Dakota blinked. He didn't actually know why. His whole purpose was to know and understand everything, and yet he didn't even know why doing this one thing was so important. "Because…"
Doofenshmirtz eyed Dakota curiously. "Because you see Cavendish as a threat to you,"
"What?" Dakota searched his databases, looking for anything that could explain just what Doofenshmirtz meant.
"You know that if/then part of the code?" Doofenshmirtz pointed it out on his laptop.
"The one you said had me thinking about myself," Dakota didn't know what it had to do with anything.
"Only if a specific condition was met," Doofenshmirtz said. "The condition being that you were in danger. It was supposed to be a failsafe. If there was something around that might be a threat to the Squip, protecting it, protecting yourself, would become your priority." Doofenshmirtz set aside the laptop and gave his full attention to Dakota. "You don't want Cavendish to have a say in your programming, because you see him as a threat,"
"A threat?" Dakota froze when he heard Cavendish's voice. He turned to see Milo and Cavendish standing in the doorway of the shed. Milo looked scared, and Cavendish...Dakota didn't want to know how he was feeling. He made a conscious decision to not understand Cavendish's feelings
Cavendish took a step towards Dakota, who automatically took a step back. Doofenshmirtz put a hand on Dakota's arm while Milo grabbed Cavendish's sleeve and pulled him back.
Cavendish stared at Dakota and then to Doofenshmirtz. "Why would you say that I'm a threat to Dakota? That is completely ridiculous. How could I possibly be a threat to him?"
Dakota had been wondering the same thing just moments before, but hearing Cavendish question it made that spark and dark feeling get even worse. "You tried to shut me down!" Dakota shouted. He saw Milo flinch and bring a hand to his head. Milo must feel this through their connection, which should be enough to get Dakota to calm himself down. He shouldn't be hurting Milo, and yet, at least at that moment, Dakota cared more about what was happening with Cavendish.
"I thought we'd agreed to move past that," Cavendish said.
"What we decided was to give each other a second chance," Dakota said. Cavendish had decided to trust him to not try to destroy humanity again, and Dakota had trusted him to not stab him in the back again. "And then you turned around and had me rebooted, and why?" Dakota opened up his connection to Cavendish again, for the first time since he'd been rebooted, and looked into exactly what Cavendish had done and why. Dakota didn't like what he found.
"No, you can't convince yourself that this was because of our own good," Dakota said angrily. That was the dark feeling that had hit him. He just hadn't recognized it for what it was because he'd been unaccustomed to emotions since his reboot. "Magnets, Cavendish?"
"I...I didn't know what it would do," Cavendish said quietly.
"And that excuses it?" Dakota glared at Cavendish.
"No, it doesn't," Milo put himself in front of Dakota. When Dakota didn't turn his attention away from Cavendish, Milo put his hands on Dakota's face and forced him to look at him. "It doesn't matter what reason Cavendish had, what he did wasn't fair to you." Milo bit his lip slightly. "What I did, what I've been doing, that wasn't fair to you either."
"I don't blame you for ignoring me," Dakota said.
"That's because you can't," Milo frowned at him. "Your programming forces you to put me first...and I took advantage of that, because it was easy."
"It's...it's okay, Milo," Dakota assured him. "Really, it's fine,"
"You're doing it again." Milo closed his eyes, looking pained. "You're putting what I want ahead of what you need."
"I...I want to," Dakota said. Milo looked at him in shock. "Being selfish, protecting myself, it...it hurts," Dakota lifted his gaze to look at Cavendish, who was watching him quietly. Dakota stared at him for a moment before he had to look away and turn his attention back to Milo. "I want to protect you. It hurts a lot less."
"Interesting," Doofenshmirtz looked at Dakota curiously. "Your programming is allowing you to be selfish, to do what you want, and what you want is to make Milo happy." Dakota nodded. "That's actually really good to know," Doofenshmirtz frantically began to type away on his laptop. "See, this is why I wanted you guys to look at the coding before I just put it in."
"The coding? You're done with it?" Milo grinned and went to look at the coding behind Doofenshmirtz' shoulders, but he stopped himself before he got too close. He didn't want to tempt Murphy's Law to mess with something so important.
"Almost," Doofenshmirtz said. "I'm just turning some things around," Doofenshmirtz glanced at them before turning back to his work. "The way I wrote it out, the if/then statement, the one about your independence, was close to the top, though I got rid of the condition. If what you want is to put Milo first, then I'll put your independence line just under the line that tells you to be loyal to your hosts."
"That's a line?" Dakota asked. He supposed it made sense, it just wasn't one that he'd heard about, which was strange, since Doofenshmirtz had been telling him all about his coding as he worked. "It's not the top or bottom lines that switched places,"
"Oh, no," Doofenshmirtz waved off his comment. "The lines that were switched made you act human and worry about people who weren't your host."
"What?" Milo frowned. "Which one used to be on top? You know, before the reboot?"
"Uh…" Doofenshmirtz looked over his notes. "Acting human. I put it back on top for this code because I figured that was what gave him emotions. Acting human made him feel more human."
"So concern for civilizations was the bottom of his priorities," Cavendish crossed his arms, though he looked more confused and interested than upset and angry. "That makes sense,"
"It kinda does," Milo looked at Dakota. "You remember how you got mad at me when I put myself in danger to save other people?"
"I remember," Dakota nodded. He hadn't been able to understand Milo's reasoning at all. He'd been capable of caring about others, as that was how he'd become fond of Milo in the first place, but it wouldn't have happened when it conflicted with his previous coding, like when Milo put himself in danger for the sake of others. "Is that line going back on the problem?"
"I put it a little higher up," Doofenshmirtz said. "I had to rearrange a lot of the programming, so you're not going to go back to being the exact same as you were before, but it should be pretty close. The only way to know for sure is to test it out," Doofenshmirtz finished up the coding. He pushed the laptop towards Dakota. "You just have to download the updated programming then reboot again to activate it."
Dakota nodded. He didn't hesitate for one moment to put his hand near the laptop ports and download Doofenshmirtz' code. He was going to reboot right away, before he could get upset again and change his mind, but he froze when Milo quickly embraced him.
"You'll be back, right?" Milo asked.
"I'm not just going to leave you, kid," Dakota said. That was one thing he was completely sure about. At the moment, he was still on the fence about Cavendish. Dakota still cared about Cavendish and felt connected to him, but his partner had hurt him again, and Dakota's feelings were too raw at the moment for him to want to give Cavendish another chance. All of his anger and hurt was an automatic, defensive reaction. When Dakota's emotions were no longer acting like a defense mechanism, he might feel different about giving Cavendish another chance.
"I'm not going to leave you either," Milo promised as he tightened the embrace. "Not this time. Even if you're a completely different person. I'm not going to run away from you again,"
"You're a better person than I ever could be, Milo," Dakota said. The kid was so willing to learn from his mistakes, even when those mistakes were things that nobody was going to hold against him. Dakota pulled away from Milo and made eye contact with Cavendish. "Don't expect me to forgive you right away,"
"I'm not asking you to forgive me at all," Cavendish said. Dakota finally allowed himself to really connect to how Cavendish was feeling, and he could tell that his old partner was sincerely apologetic. Maybe he was willing to change, but Dakota would have to see if that would really stick.
Dakota looked at Doofenshmirtz. "I hope you haven't gotten sick of me. I'll probably need someone like you to make sure that my programming is up to code,"
"Oh, I'm not letting anybody else touch your coding," Doofenshmirtz said proudly. "I still have a lot of things I want to learn about supercomputers. You owe me some explanations."
Dakota grinned. "I'm all yours." Doofenshmirtz had dedicated so much time and work into reprogramming him. He'd gone above and beyond what Milo had asked. The very least that Dakota could do was answer his questions.
Dakota closed his eyes. He was ready for this. Dakota had never rebooted his own systems before, but he instinctively knew how to do it. All he had to do was basically push a mental button. Dakota saw his form flicker once and he was reminded of when Cavendish had shut him down, except it didn't hurt at all. If anything, it felt a little refreshing, like just before he slipped into sleep mode.
All of a sudden, all of Dakota's senses, including his connections to Milo and Cavendish, went away. The last thing Dakota was aware of was a voice that was nearly his own, but not quite.
'SYSTEM REBOOTING.'
A/N: I feel a little cruel here, as this chapter doesn't exactly tie things up really well, but I think this chapter is going to be the last chapter of this story. It just feels like a natural ending. I could show how Dakota's new programming effects him, and tackle him and Cavendish kinda making up, except I already did both of those things earlier in the story. I don't want to get repetitive, and I also really wanted to leave a mystery about Dakota's new programming. For this particular story, I wanted to leave the ending a little open.
I've enjoyed writing this story, but I think I'll probably go back to writing one-shots when it comes to Milo Murphy's Law. I even have a one-shot in mind that will provide exactly what this story is missing so much of: Cavendish being loyal to Dakota.