From 2b4f29931162cd748c07588fcae9220b02f672ed Mon Sep 17 00:00:00 2001 From: Inkfish Date: Fri, 5 Jun 2009 00:22:12 +0000 Subject: * Fixed turning off a skill needed to meet the requirements. (bugreport:3175) * Skills used through items not having aftercast delay or cast time now don't overwrite the former canact_tick. (topic:220921) * Multiple autoscripts now can trigger at once. * Applied a temp fix for autoscripts crashing server.(bugreport:3154) * Implemented SC_JEXPBOOST (thanks to GMJobbie for the diff). (bugreport:3177) * Implemented SC_IGNOREDEF. (topic:217330) * SC_DEFRATIOATK won't affect boss monsters. (topic:217330) * Fixed skip_teleport_lv1_menu made lv2 skip menu as well. (bugreport:3183) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13844 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 4b762a559..17f12741b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1759,7 +1759,10 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } - if( sc && sc->count && sc->data[SC_DEFRATIOATK] && skill_num != PA_SACRIFICE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN && !flag.cri ) + if( sc && sc->count && sc->data[SC_DEFRATIOATK] + && !is_boss(target) + && skill_num != PA_SACRIFICE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN + && !flag.cri ) flag.pdef = flag.pdef2 = sc->data[SC_DEFRATIOATK]->val1; // Occult Impact Effect if (!flag.idef || !flag.idef2) @@ -1780,6 +1783,15 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } + if( sc && sc->count && sc->data[SC_IGNOREDEF] + && !is_boss(target) + && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS ) + { + i = cap_value(sc->data[SC_IGNOREDEF]->val1,1,100); + def1 -= def1 * i / 100; + def2 -= def2 * i / 100; + } + if( battle_config.vit_penalty_type && battle_config.vit_penalty_target&target->type ) { unsigned char target_count; //256 max targets should be a sane max -- cgit v1.2.3-70-g09d2