summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-06-01 13:33:23 +0000
committerFate <fate-tmw@googlemail.com>2009-06-01 13:33:23 +0000
commitff1868fb126f02cd94b7a7f72663621a4c34938f (patch)
tree5bad6189fd2621d557dac3300124e7f894cd04d6 /src/map
parented4c82279bb48950e072cdafcb1ea6bb0bcd4585 (diff)
downloadtmwa-ff1868fb126f02cd94b7a7f72663621a4c34938f.tar.gz
tmwa-ff1868fb126f02cd94b7a7f72663621a4c34938f.tar.bz2
tmwa-ff1868fb126f02cd94b7a7f72663621a4c34938f.tar.xz
tmwa-ff1868fb126f02cd94b7a7f72663621a4c34938f.zip
Factor poison severity and "protect" spell into determining mob poison attack success chance
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 255a7a2..c179f70 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -889,6 +889,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
int sc_def_mdef,sc_def_vit,sc_def_int,sc_def_luk;
int sc_def_mdef2,sc_def_vit2,sc_def_int2,sc_def_luk2;
+ int sc_def_phys_shield_spell;
nullpo_retr(0, src);
nullpo_retr(0, bl);
@@ -901,6 +902,10 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
nullpo_retr(0, md=(struct mob_data *)src); //未使用?
}
+ sc_def_phys_shield_spell = 0;
+ if (battle_get_sc_data(bl)[SC_PHYS_SHIELD].timer != -1)
+ sc_def_phys_shield_spell = battle_get_sc_data(bl)[SC_PHYS_SHIELD].val1;
+
//対象の耐性
luk = battle_get_luk(bl);
sc_def_mdef=100 - (3 + battle_get_mdef(bl) + luk/3);
@@ -1074,8 +1079,8 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
case NPC_POISON:
case NPC_SILENCEATTACK:
case NPC_STUNATTACK:
- if(rand()%100 < sc_def_vit)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv * skilllv * 5000,0);
+ if (MRAND(100) < 50 - (sc_def_vit >> 2) - (sc_def_phys_shield_spell) + (skilllv >> 2))
+ skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv,0);
break;
case NPC_CURSEATTACK:
if(rand()%100 < sc_def_luk)