Originally posted by [b]Brainstorm[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=568
The % for each target is wrong.
CODE
case HVAN_CHAOTIC: //[orn]
{
static const int per[10][2]={{20,50},{50,60},{25,75},{60,64},{34,67},
{34,67},{34,67},{34,67},{34,67},{34,67}};
int rnd = rand()%100;
if(rnd<per[skilllv-1][0]) //Self
bl = src;
else if(rnd<per[skilllv-1][1]) //Master
bl = battle_get_master(src);
else //Enemy
bl = map_id2bl(battle_gettarget(src));
if (!bl) bl = src;
i = skill_calc_heal( src, bl, 1+rand()%skilllv);
if (sd && (rnd = pc_skillheal_bonus(sd, skillid)) > 0)
i += i * rnd / 100;
//Eh? why double skill packet?
clif_skill_nodamage(src,bl,AL_HEAL,i,1);
clif_skill_nodamage(src,bl,skillid,i,1);
status_heal(bl, i, 0, 0);
if (hd)
skill_blockmerc_start(hd, skillid, skill_get_time2(skillid,skilllv));
}
break;
First that the skill has 10 lvs, which is uneeded since the skill only can be obtained until lv5, so its a waste of memory.
QUOTE
static const int per[10][2]={{20,50},{50,60},{25,75},{60,64},{34,67},
{34,67},{34,67},{34,67},{34,67},{34,67}};
if roll < X target homun
if roll < Y target owner
if anything else target enemy (higher than X and Y)
EDIT
Nevermind, i understood it now >_<
The value [1] is a plus with the difference from value [0]
So the only "wrong" thing is the extra skill lvs that doesnt exist.
This post has been edited by Brainstorm: Dec 8 2007, 02:47 PM