summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 20:00:33 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-03 20:00:33 +0000
commit7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4 (patch)
tree38fc970c9b971dae33515eaff4fea45192a8d44e /src/map/mob.c
parent7bb91031c6b244781f6637dc87dafa5835326888 (diff)
downloadhercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.gz
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.bz2
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.tar.xz
hercules-7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4.zip
- 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
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 6 insertions, 2 deletions
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