diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-03 20:00:33 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-09-03 20:00:33 +0000 |
commit | 7689b26c216bb9de59d7ddfcbe9c45c18cfb7cc4 (patch) | |
tree | 38fc970c9b971dae33515eaff4fea45192a8d44e /src/map/skill.c | |
parent | 7bb91031c6b244781f6637dc87dafa5835326888 (diff) | |
download | hercules-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/skill.c')
-rw-r--r-- | src/map/skill.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 4efd8413b..02d41c671 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4604,8 +4604,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in type = EQP_WEAPON|EQP_SHIELD|EQP_ARMOR|EQP_HELM; break; } + //Note that autospells don't use a duration if (!clif_skill_nodamage(src,bl,skillid,skilllv, - skill_strip_equip(bl, type, i, skilllv, skill_get_time(skillid,skilllv))) + skill_strip_equip(bl, type, i, skilllv, + sd&&!pc_checkskill(sd, skillid)?0:skill_get_time(skillid,skilllv))) && sd) clif_skill_fail(sd,skillid,0,0); //Nothing stripped. break; @@ -8789,10 +8791,20 @@ int skill_castfix (struct block_list *bl, int skill_id, int skill_lv) } // calculate cast time reduced by item/card bonuses - if (!(skill_get_castnodex(skill_id, skill_lv)&4)) - if (sd && sd->castrate != 100) + if (!(skill_get_castnodex(skill_id, skill_lv)&4) && sd) + { + int i; + if (sd->castrate != 100) time = time * sd->castrate / 100; - + for(i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++) + { + if (sd->skillcast[i].id == skill_id) + { + time+= time * sd->skillcast[i].val / 100; + break; + } + } + } // config cast time multiplier if (battle_config.cast_rate != 100) time = time * battle_config.cast_rate / 100; |