Thursday, September 01, 2011

Ultimate Spells?

I finally returned to the world of Final Fantasy II and plowed through the Ultima Tower. Supposedly this dungeon is hard but it has awesome spells at the top to make it all worthwhile. I found the dungeon to be reasonable trivial and the awesome spells at the top seem terrible. I needed to get Ultima to progress the plot so it still made sense to go get it, but it doesn't seem worth casting. Flare was also up at the top of the tower and is supposed to be the best black magic spell in the game. Unfortunately it starts at level 1, so by default it is bad. But maybe if I level it up a bunch it will become good? How exactly do spells work?

Damage spells, like flare, hit a variable number of times. You make an attack roll for each level of the spell (using magic accuracy which for flare starts at 0% but which gets an extra 1% for every int you have) and the defender makes a magic defense roll for each level of magic defense they have (just like how melee attacks and dodges work). Subtract the defender's successes from the attacker's successes to determine a number of hits, rounding up to 0 I think. Then add the level of the spell on to this number. So, basically, you hit somewhere between L and 2L times with the spell.

Then you work out the power of the spell. Flare's power is 20. The other black magic spells have a power of 10. To that number you add on a quarter of your int.

Finally, for each hit you obtained in the first step roll a number between P and 2P where P is the spell power from the second step. Add up all these numbers to see the damage done.

Ignoring enemy magic defense for a moment your expected number of hits, based on your intelligence I, is:

(L+IL) {assuming I stays less than 100% anyway}

which means the expected damage for a normal spell is:

(15+75/2*I)*(L+IL) = 15L+105/2IL+75/2IIL

and for flare is:

(30+75/2*I)*(L+IL) = 30L + 135/2IL+75/2IIL

So flare should just do more damage. And against a generic monster it will, but the tricky part is monsters tend to be vulnerable to some element of magic and flare is non-elemental. What happens when you shoot a monster which is vulnerable to fire with the fire spell?

Two things, both of which are awesome. The first is that the spell simply can't miss. Instead of getting a number of hits somewhere between L and 2L (with some 'dodged') you just get a full 2L. The second is that every hit does double damage. So the damage for a vulnerable spell is:

2*(15+75/2*I)*(2L) = 60L+150IL

Comparing flare to a same level vulnerable spell isn't useful since it's guaranteed to be worse. (All flare has going for it is double the base power. The vulnerable spell has that same doubling, but it also doubles the int factor and removes misses. The question I have is how many levels do we need to give flare before it beats out a vulnerable spell? Call the level of flare F.

30F+135/2IF+75/2IIF = 60L+150IL
F=L*(60+150I)/(30+135/2I+75/2II)

My caster has 52 int right now, so lets use that as a starting point and then also look at a couple bigger points for I.

F(I=.52)=1.81*L
F(I=.75)=1.70*L
F(I=.99)=1.56*L

These numbers are even high since flare can miss! Even if I managed to cap my int and get flare to max level (16) all I would need is the elemental spells at 11 and a vulnerable enemy. But here's the thing... There may be something even better...

I have a black mage now and the spell she's got the most levels in isn't an attack spell at all. It's berserk. So far it's seemed really ridiculously good but I'm wondering if that's just because my fighter has a high axe skill and it would even out if I power leveled a damage spell or not. So, how does berserk work compared to a damage spell?

The first difference right off the hop is you don't get the free hits. You need to actually roll your hits on your friend in order to land berserk. Fortunately you don't roll magic resistance checks on buff spells! Berserk also has a base +50% to accuracy instead of the base 0% which means that my mage with 52 int can't actually miss a cast of berserk. The base power for berserk is only 5. What berserk does is it 'attacks' once per level of the spell, and for every hit it adds the base power of the spell to the target's attack stat.

So in order to really work out what it does we'd need to go into all the details about melee attacks, and hits, and crit strikes, and such. I'm just going to wave hands and abstract a bit. My fighter gets 10 swings a round with pretty much perfect accuracy. But the monsters do dodge, probably around 2 a round. Crits are rare so I don't care. There's also enemy armor, but I'm going to assert that my base attack beats the enemy armor and therefore the bonus damage from berserk is all used. (I don't know that this is true against some bosses necessarily, but it's probably close.) So I'm probably getting 8 swings a round and the damage added to each swing is going to be a random number between X and 2X where X is the added attack power.

Assume berserk goes off before the attack this round. How much damage is added?

8*3/2*(L*(5+I*25)) = 60L+300LI

With all spells at level 6 and 52 int, flare will do 451 damage. Vulnerable fire will do 828 damage. Berserk will do 1296 damage.

With all spells at level 16 and 99 int, flare will do 2137 damage. Vulnerable fire will do 3336 damage. Berserk will do 5712 damage.

At any fixed int a level 6 berserk actually does more damage than a level 16 flare!


And all this ignores the most salient point for berserk... It carries over between rounds. Flare is going to do 451 damage once. Berserk is going to do 1296 damage every round! It even stacks, so I can cast berserk again on the same person so they do 2592 extra damage the second round. Of course, the downside is this damage only hits one mob at a time... Darn!

There is also a haste spell, but it doesn't stack up round after round and I don't have a second black mage. Though next time I play the game I may well set up my 3 fixed characters as two guys who cast berserk and one that casts haste and just have jobber mcbag in the 4th slot be an absolute monster!

1 comment:

Sthenno said...

I seem to remember how that game worked was Berserk -> Berserk -> Steal Magic Points Back.