diff options
author | Fate <fate-tmw@googlemail.com> | 2009-09-27 16:21:11 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-09-27 16:21:11 +0000 |
commit | b6054caba250ed1af333604fb483d51d28a7aa90 (patch) | |
tree | 5be33ef0587f47508c12fa6e1636d39f4d5a223a | |
parent | d3c9e1876d2e2ea049360f9fd9d3cbbcbe80c28f (diff) | |
download | tmwa-b6054caba250ed1af333604fb483d51d28a7aa90.tar.gz tmwa-b6054caba250ed1af333604fb483d51d28a7aa90.tar.bz2 tmwa-b6054caba250ed1af333604fb483d51d28a7aa90.tar.xz tmwa-b6054caba250ed1af333604fb483d51d28a7aa90.zip |
Added resist-poison skill that reduces the amount of time spent poisoned
-rw-r--r-- | src/map/skill.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 6cff936..5f0092a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8029,6 +8029,10 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) break; case SC_POISON: if(sc_data[SC_SLOWPOISON].timer == -1) { + const int resist_poison = skill_power_bl(bl, TMW_RESIST_POISON) >> 3; + if (resist_poison) + sc_data[type].val1 -= MRAND(resist_poison + 1); + if( (--sc_data[type].val1) > 0) { int hp = battle_get_max_hp(bl); |