GS_MAGICALBULLET implementation: declaring variables after case: without defining a block of {}, using something weird called atn_rand(something) instead of just rand. Fixed.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5563 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
blackhole89 2006-03-10 16:54:18 +00:00
parent 82fec3e7e0
commit f92652ee92

View File

@ -1924,12 +1924,14 @@ static struct Damage battle_calc_weapon_attack(
ATK_ADD(10*pc_checkskill(sd, TK_RUN));
break;
case GS_MAGICALBULLET:
{
int matk1=status_get_matk1(src),matk2=status_get_matk2(src);
if(matk1>matk2)
ATK_ADD(matk2+atn_rand()%(matk1-matk2+1));
else
ATK_ADD(matk2);
{
ATK_ADD(matk2+rand()%(matk1-matk2+1));
} else ATK_ADD(matk2);
break;
}
}
}
//Here comes a second pass for skills that stack to the previously defined % damage. [Skotlex]