Why would they copy the code of the "base/core" ability, when they can just add an entry in some '.slk' files (abilitydata.slk?) and somehow link it to the "base/core" ability?
As an example, Feral Spirit and the Summon Water Elemental skill are not the same in the manner you suggested. Feral Spirit will kill/dispel previously summoned units when cast a second time, whereas Summon Water Elemental is a repeatable skill that leaves behind previously summoned elementals.
As Uncle mentioned, I would much prefer that these functionality differences were available to modders both to view the code and also to alter them from maps or mods. To that end, I have been building an open source game client to play a Warcraft 3 style experience but entirely from moddifiable code, so that modding would be easier.
This video might be an example why a programmer in 2003 might have just copy-pasted one of his files to make a modified version. It is simply a "pretty easy" thing to do.
Here you can see that my Summon Water Elemental implementation was indeed copied to make my Feral Spirit, but I added a kill function to previously summoned units on Feral Spirit:
Summon Water Elemental:
An emulation engine to improve Warcraft III modding - Retera/WarsmashModEngine
github.com
Summon Feral Spirit:
An emulation engine to improve Warcraft III modding - Retera/WarsmashModEngine
github.com
However, as a note, I am not Blizzard Entertainment and I do not have access to their original game code, nor have I spent time trying to gain access. So, for all I know, the idea that these are a "copy paste" job might only be a user assumption. What if they were not a copy paste, but rather two code files that shared behavior using the class hierarchy?
As an example, my Summon Owl Scout code did not need special behaviors, unlike Feral Spirit. So, rather than to copy Summon Water Elemental, I simply extended its class and modified the base order id. Who knows if Blizzard did this in 2002, but the point is that they
could have and we would not know.
Summon Owl Scout (super tiny file for above listed reason!):
An emulation engine to improve Warcraft III modding - Retera/WarsmashModEngine
github.com
Why would they copy the code of the "base/core" ability, when they can just add an entry in some '.slk' files (abilitydata.slk?) and somehow link it to the "base/core" ability?
Basically,
I think my Owl Scout example above answers this question. Let me know if that makes sense. For the internal Blizzard programmer, he can link the C++ classes using standard code sharing practices -- such as classes that extend other classes or simply calling shared utility functions/subroutines.
Edit: As another example, although this does not exactly match Warcraft 3 behaviors, I was too lazy to even make a code file for the Firebolt skill and instead in my table of possible "base" skills available to SLK, I put the Storm Bolt code file (currently named Thunder Bolt) as the one used for both AHtb but also for ANfb:
An emulation engine to improve Warcraft III modding - Retera/WarsmashModEngine
github.com
So, with that in mind, I do not even really know for certain if Warcraft 3 requires each base skill to have its own code file. Maybe some of them reuse files.