diff options
author | Playtester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-04-25 10:40:40 +0000 |
---|---|---|
committer | Playtester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-04-25 10:40:40 +0000 |
commit | 5328e63b9fb979e175f888e0b17f4c88ef9bb890 (patch) | |
tree | 712b11cd5dd8c6c6c06cf7934d3923a0d3a259a2 /src/map/skill.c | |
parent | d68700b564d67f64ed4f75ca5d812f51855c6656 (diff) | |
download | hercules-5328e63b9fb979e175f888e0b17f4c88ef9bb890.tar.gz hercules-5328e63b9fb979e175f888e0b17f4c88ef9bb890.tar.bz2 hercules-5328e63b9fb979e175f888e0b17f4c88ef9bb890.tar.xz hercules-5328e63b9fb979e175f888e0b17f4c88ef9bb890.zip |
* First attempt to fix up the strip skills, please make sure these fixes work (bugreport:3011)
- the minimum rate of strip skills is now 5% for all levels
- duration of strip skills depends on the dex difference between target and caster and can be reduced to 0
- strip skills can now affect bosses (if duration doesn't get reduced to 0 due to their high dex)
- strip skills do a fixed -25% ATK, -15% DEF, -40% VIT or -40% INT independant of skill level
- autocasting Full Strip has a duration now (if dex is high enough)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13701 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index c9d449bdf..0e1889ef6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4328,9 +4328,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case ST_FULLSTRIP: { unsigned short location = 0; - i = 5+2*skilllv; - if (sstatus->dex > tstatus->dex) - i += (sstatus->dex - tstatus->dex)/5; + int d = 0; + + //Rate in percent + i = 5 + 2*skilllv + (sstatus->dex - tstatus->dex)/5; + if (i < 5) i = 5; //Minimum rate 5% + + //Duration in ms + d = skill_get_time(skillid,skilllv) + (sstatus->dex - tstatus->dex)*500; + if (d < 0) d = 0; //Minimum duration 0ms switch (skillid) { case RG_STRIPWEAPON: @@ -4349,11 +4355,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in location = EQP_WEAPON|EQP_SHIELD|EQP_ARMOR|EQP_HELM; break; } - //Note that Full Strip autospell doesn't use a duration - if (!clif_skill_nodamage(src,bl,skillid,skilllv, - skill_strip_equip(bl, location, i, skilllv, - sd&&skillid==ST_FULLSTRIP&&!pc_checkskill(sd, skillid)?0:skill_get_time(skillid,skilllv))) - && sd) + //Attempts to strip at rate i and duration d + if (!clif_skill_nodamage(src,bl,skillid,skilllv,skill_strip_equip(bl, location, i, skilllv, d)) && sd) clif_skill_fail(sd,skillid,0,0); //Nothing stripped. } break; |