From 7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 3 Sep 2007 20:00:33 +0000 Subject: - Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of bHPLossRate/bSPLossRate, making you gain x Hp/Sp every y ms. - Added bonus bIgnoreMdefRate, used to ignore a % of the target's mdef when using magic attacks (bonus2 will ignore part of the mdef of all targets, bonus3 receives a race argument) - You can now use bonus2 bCastRate to adjust the cast rate of a single skill. - Cleaned the code for bleeding (hp-loss) and extended it to handle regen as well. - Some small cleanups in the pc_bonus functions - Removed bonus3 bHpLossRate since it was doing nothing and is not used. - Corrected bGetZeny bonus to be like in Aegis. The amount received is from 1 to the given amount, you can use negative zeny values to use an amount dependant on mob's level (amount*lv). - Updated doc/item_bonus.txt with all these changes - Anti-Magic/Stone-Skin now increase/decrease def/mdef only and in an absolute mode (+20*lv rather than +20%*lv). Also the duration is greatly decreased (x/15) when used on players. - Now when a player uses a strip skill without having it in the skill tree (auto-casted) the duration will be 0, the equipment will be stripped without causing the status change that blocks reequipping. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11112 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index 01679708b..1802500cc 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2033,9 +2033,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } } - // process script-granted zeny bonus (get_zeny_num per level +/-10%) [Skotlex] + // process script-granted zeny bonus (get_zeny_num) [Skotlex] if(sd->get_zeny_num && rand()%100 < sd->get_zeny_rate) - pc_getzeny(sd,md->level*sd->get_zeny_num*(90+rand()%21)/100); + { + i = sd->get_zeny_num > 0?sd->get_zeny_num:-md->level*sd->get_zeny_num; + if (!i) i = 1; + pc_getzeny(sd, 1+rand()%i); + } } // process items looted by the mob -- cgit v1.2.3-60-g2f50