diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-22 10:23:41 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-22 10:23:41 +0000 |
commit | 8d932d204b88f41da8ada6502b706fcbba3734ab (patch) | |
tree | 063dc60e6ecb5313dfb31ce98f034553e210ed19 /src/map | |
parent | 653fd6a600f9a07105b17f9e71e2b430f4aae8e0 (diff) | |
download | hercules-8d932d204b88f41da8ada6502b706fcbba3734ab.tar.gz hercules-8d932d204b88f41da8ada6502b706fcbba3734ab.tar.bz2 hercules-8d932d204b88f41da8ada6502b706fcbba3734ab.tar.xz hercules-8d932d204b88f41da8ada6502b706fcbba3734ab.zip |
Fixed bugreport:5605 Spell Fist should now work properly. Also Added missing Elemental SC damage boosts
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15920 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 76 |
1 files changed, 66 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index cb470f938..2482da47c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3202,17 +3202,67 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list if (battle_check_undead(tstatus->race,tstatus->def_ele)) skillratio += 5*skill_lv; break; - case MG_FIREWALL: - skillratio -= 50; + case MG_FIREWALL: { + struct status_change *sc = status_get_sc(src); + skillratio -= 50; + if( sc && sc->data[SC_PYROTECHNIC_OPTION] ) + skillratio += skillratio * sc->data[SC_PYROTECHNIC_OPTION]->val3 / 100; + } break; - /** - * in Renewal Thunder Storm boost is 100% (in pre-re, 80%) - **/ - #ifndef RENEWAL - case MG_THUNDERSTORM: - skillratio -= 20; + case MG_COLDBOLT: { + struct status_change *sc = status_get_sc(src); + if ( sc && sc->count ) { + if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) { + skillratio += (sc->data[SC_SPELLFIST]->val4 * 100) + (sc->data[SC_SPELLFIST]->val2 * 100) - 100;// val4 = used bolt level, val2 = used spellfist level. [Rytech] + ad.div_ = 1;// ad mods, to make it work similar to regular hits [Xazax] + ad.flag = BF_WEAPON|BF_SHORT; + ad.type = 0; + } + if( sc->data[SC_AQUAPLAY_OPTION] ) + skillratio += skillratio * sc->data[SC_AQUAPLAY_OPTION]->val3 / 100; + } + } + break; + case MG_FIREBOLT: { + struct status_change *sc = status_get_sc(src); + if ( sc && sc->count ) { + if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) { + skillratio += (sc->data[SC_SPELLFIST]->val4 * 100) + (sc->data[SC_SPELLFIST]->val2 * 100) - 100; + ad.div_ = 1; + ad.flag = BF_WEAPON|BF_SHORT; + ad.type = 0; + } + if( sc->data[SC_PYROTECHNIC_OPTION] ) + skillratio += skillratio * sc->data[SC_PYROTECHNIC_OPTION]->val3 / 100; + } + } + break; + case MG_LIGHTNINGBOLT: { + struct status_change *sc = status_get_sc(src); + if ( sc && sc->count ) { + if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) { + skillratio += (sc->data[SC_SPELLFIST]->val4 * 100) + (sc->data[SC_SPELLFIST]->val2 * 100) - 100; + ad.div_ = 1; + ad.flag = BF_WEAPON|BF_SHORT; + ad.type = 0; + } + if( sc->data[SC_GUST_OPTION] ) + skillratio += skillratio * sc->data[SC_GUST_OPTION]->val2 / 100; + } + } + break; + case MG_THUNDERSTORM: { + struct status_change *sc = status_get_sc(src); + /** + * in Renewal Thunder Storm boost is 100% (in pre-re, 80%) + **/ + #ifndef RENEWAL + skillratio -= 20; + #endif + if( sc && sc->data[SC_GUST_OPTION] ) + skillratio += skillratio * sc->data[SC_GUST_OPTION]->val2 / 100; + } break; - #endif case MG_FROSTDIVER: skillratio += 10*skill_lv; break; @@ -4285,11 +4335,17 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t wd = battle_calc_attack(BF_WEAPON, src, target, 0, 0, flag); - if(sc) { + if( sc && sc->count ) { if (sc->data[SC_EXEEDBREAK]) { wd.damage = wd.damage * sc->data[SC_EXEEDBREAK]->val1 / 100; status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); } + if( sc->data[SC_SPELLFIST] ) { + if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ) + wd = battle_calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag); + else + status_change_end(src,SC_SPELLFIST,-1); + } if( sc->data[SC_GIANTGROWTH] && (wd.flag&BF_SHORT) && rand()%100 < sc->data[SC_GIANTGROWTH]->val2 ) wd.damage *= 3; // Triple Damage } |