diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-05 00:22:12 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-05 00:22:12 +0000 |
commit | 2b4f29931162cd748c07588fcae9220b02f672ed (patch) | |
tree | 1aac3b94d3e39aa9e52f5887e179b354699c0926 /src/map/battle.c | |
parent | 2f526028369f0fb0148ced3d9d6d6b970307421d (diff) | |
download | hercules-2b4f29931162cd748c07588fcae9220b02f672ed.tar.gz hercules-2b4f29931162cd748c07588fcae9220b02f672ed.tar.bz2 hercules-2b4f29931162cd748c07588fcae9220b02f672ed.tar.xz hercules-2b4f29931162cd748c07588fcae9220b02f672ed.zip |
* 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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 |