Today on the Pub20 Test Center I've collected a lot of sample data for animate dead. Looking it over I could see the general algorithm but there were some cases which didn't match up. After a bit more testing, it turned out to be quite simple. Here's how it works:
As noted on the Necromancer spell details page, there are 5 different 'groups' of animates which are based on corpse type. Each animate has a 'requirement' level, which I'll explain after the list.
<pre>Group 1 (default):
18000: Lich Lord
10000: Flesh Golem
5000: Lich
3000: Skeletal Knight, Bone Knight
2000: Mummy
1000: Skeletal Mage, Bone Mage
0: Patchwork Skeleton
Group 2 (dragons):
18000: Skeletal Dragon
10000: Flesh Golem
5000: Lich
3000: Skeletal Knight, Bone Knight
2000: Mummy
1000: Skeletal Mage, Bone Mage
0: Patchwork Skeleton
Group 3 (insects, terathans -are- included):
0: Mound of Maggots (always)
Group 4 (elementals):
5000: Wailing Banshee
0: Wraith
Group 5 (horses, nightmares, firesteeds, ki-rins, unicorns):
10000: Hellsteed
0: Skeletal Steed</pre>
The value next to each animate determines if it's chosen. Let's see how it works:
First, a value which I'll call 'casterAbility' is calculated:
<pre>casterAbility = ((30% of necroSkill) + (70% of spiritSkill)) * 180</pre>
For example, let's plug in some numbers:
<pre>Necro Spirit Ability
120.0 120.0 21,600
100.0 100.0 18,000
60.0 60.0 10,800
40.0 0.0 2,430</pre>
As you might have guessed, this number is then referenced into the lists above. There is, however, one more step. This 'casterAbility' value may never exceed the dead creatures fame. Put another way, you cannot animate higher than the corpse is powerful.
<pre>if ( casterAbility > corpseFame )
casterAbility = corpseFame;</pre>
An example of this:
A necromancer at 100 necromancy and 100 spirit speak (casterAbility = 18,000) raises a Wisp corpse. Wisps have 4,000 fame, so casterAbility becomes 4,000. That value is then referenced into the animates table and we see it'll turn into a skeletal knight.
Often it's easier to understand by example, so let's see what would happen when a 100nec, 80ss necromancer tried to animate a balron corpse:
Step 1: Compute caster ability:
<pre>casterAbility = ((30% of 100.0) + (70% of 80.0)) * 180
casterAbility = ((30) + (56)) * 180
casterAbility = (86) * 180 = 15,480</pre>
Step 2: Make sure casterAbility does not exceed corpseFame.
<pre>casterAbility = 15,480
corpseFame = 24,000
Is casterAbility > corpseFame? No, so continue on to step 3</pre>
Step 3: Look up casterAbility in the animates table:
<pre>casterAbility = 15,480
Is casterAbility >= 18,000? No. Skip Lich Lord, check next
Is casterAbility >= 10,000? Yes. Pick Flesh Golem</pre>
That's all there is to it. Also, a complete and accurate list of creature fame values can be found here:
http://guide.uo.com/bestiary.html
How long do animates last?
It depends on the animate. Every 1.65 seconds the animate loses a single hit point. When it reaches 0 it dies. As such, the stronger the animate is (more HP) the longer it will last. A byproduct of this is that when two equal creatures--one animated and one not--are fighting, the one that's not animated will win.
Here's a table of the approximate min and max durations for each animate:
<pre>Animate Name Min Max
Skeletal Dragon 18:34 19:55
Lich Lord 8:19 10:04
Mummy 6:55 7:23
Hellsteed 6:41 7:19
Bone Knight 3:55 4:59
Flesh Golem 3:31 3:59
Lich 3:25 3:59
Wailing Banshee 2:31 2:59
Mound of Maggots 2:01 2:19
Patchwork Skeleton 1:55 2:23
Bone Mage 1:31 1:59
Wraith 1:31 1:59
Skeletal Steed 1:21 1:39</pre>