summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-11 21:00:12 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-11 21:00:12 +0000
commit7685ceccfe593b9b06492e8eadc7f0a1fe30076f (patch)
tree6c86329efee7e56fabb83ad35cef6bcad23abcf8 /src/map/battle.c
parent5627e06649104c82bf836be3d848174b8152f8cf (diff)
downloadhercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.gz
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.bz2
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.tar.xz
hercules-7685ceccfe593b9b06492e8eadc7f0a1fe30076f.zip
Fixed bugreport:5963 AB_CHEAL should now work properly on immune targets(Mado, berserk, shield of deaf).
Fixed bugreport:5981 PA_SACRIFICE now won't be granted by bonus damage from cards(RENEWAL CHANGE). Fixed bugreport:5892 & bugreport:5900 SO_SPELLFIST is now working properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16268 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 112e8b723..1d794cc99 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3279,7 +3279,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case MG_COLDBOLT: {
struct status_change *sc = status_get_sc(src);
if ( sc && sc->count ) {
- if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) {
+ if ( sc->data[SC_SPELLFIST] && mflag&BF_SHORT ) {
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;
@@ -3293,7 +3293,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case MG_FIREBOLT: {
struct status_change *sc = status_get_sc(src);
if ( sc && sc->count ) {
- if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) {
+ if ( sc->data[SC_SPELLFIST] && mflag&BF_SHORT ) {
skillratio += (sc->data[SC_SPELLFIST]->val4 * 100) + (sc->data[SC_SPELLFIST]->val2 * 100) - 100;
ad.div_ = 1;
ad.flag = BF_WEAPON|BF_SHORT;
@@ -3307,7 +3307,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case MG_LIGHTNINGBOLT: {
struct status_change *sc = status_get_sc(src);
if ( sc && sc->count ) {
- if ( sc->data[SC_SPELLFIST] && (!sd || !sd->state.autocast) ) {
+ if ( sc->data[SC_SPELLFIST] && mflag&BF_SHORT ) {
skillratio += (sc->data[SC_SPELLFIST]->val4 * 100) + (sc->data[SC_SPELLFIST]->val2 * 100) - 100;
ad.div_ = 1;
ad.flag = BF_WEAPON|BF_SHORT;
@@ -4412,9 +4412,10 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
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
+ if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ){
+ struct Damage ad = battle_calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag|BF_SHORT);
+ wd.damage = ad.damage;
+ }else
status_change_end(src,SC_SPELLFIST,INVALID_TIMER);
}
if( sc->data[SC_GIANTGROWTH] && (wd.flag&BF_SHORT) && rnd()%100 < sc->data[SC_GIANTGROWTH]->val2 )