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,14 +1924,16 @@ static struct Damage battle_calc_weapon_attack(
ATK_ADD(10*pc_checkskill(sd, TK_RUN)); ATK_ADD(10*pc_checkskill(sd, TK_RUN));
break; break;
case GS_MAGICALBULLET: case GS_MAGICALBULLET:
{
int matk1=status_get_matk1(src),matk2=status_get_matk2(src); int matk1=status_get_matk1(src),matk2=status_get_matk2(src);
if(matk1>matk2) if(matk1>matk2)
ATK_ADD(matk2+atn_rand()%(matk1-matk2+1)); {
else ATK_ADD(matk2+rand()%(matk1-matk2+1));
ATK_ADD(matk2); } else ATK_ADD(matk2);
break; break;
} }
} }
}
//Here comes a second pass for skills that stack to the previously defined % damage. [Skotlex] //Here comes a second pass for skills that stack to the previously defined % damage. [Skotlex]
skillratio = 100; skillratio = 100;
//Skill damage modifiers that affect linearly stacked damage. //Skill damage modifiers that affect linearly stacked damage.