From b6f1b6b9a11bdb8a5001dbc042d54fce0a963705 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Thu, 8 May 2008 16:58:57 +0000 Subject: - Added some new items and headgears. - Changed the way DEF Potion and MDEF potion works to official. - Cleanups to Barricade Engine. It now can be used in WoE 2.0, i will release optional scripts soon. - Fixes to @noks. Now if the mob is targeting someone else the protection get lost. - Added new status effects icons to cash items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12693 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index cdf7cca46..cb6d95b2a 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1943,6 +1943,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo else // BF_LONG (there's no other choice) cardfix=cardfix*(100-tsd->long_attack_def_rate)/100; + if( tsd->sc.data[SC_DEF_RATE] ) + cardfix=cardfix*(100-tsd->sc.data[SC_DEF_RATE]->val1)/100; + if (cardfix != 1000) ATK_RATE(cardfix/10); } @@ -2416,6 +2419,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list cardfix=cardfix*(100-tsd->magic_def_rate)/100; + if( tsd->sc.data[SC_MDEF_RATE] ) + cardfix=cardfix*(100-tsd->sc.data[SC_MDEF_RATE]->val1)/100; + if (cardfix != 1000) MATK_RATE(cardfix/10); } @@ -3133,9 +3139,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if (!(agit_flag && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id) return 0; //Disable guardians/emperiums owned by Guilds on non-woe times. - if( md->class_ == MOBID_BARRICADEA && md->barricade ) + if( md->barricade && !md->barricade->killable ) return 0; - break; } } -- cgit v1.2.3-70-g09d2