diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-08 16:58:57 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-08 16:58:57 +0000 |
commit | b6f1b6b9a11bdb8a5001dbc042d54fce0a963705 (patch) | |
tree | cd37827a952867c4dc561f2961d3687561582e31 /src/map/battle.c | |
parent | ffa877bd248a6f6a014dd29e4c158b7399cb0a98 (diff) | |
download | hercules-b6f1b6b9a11bdb8a5001dbc042d54fce0a963705.tar.gz hercules-b6f1b6b9a11bdb8a5001dbc042d54fce0a963705.tar.bz2 hercules-b6f1b6b9a11bdb8a5001dbc042d54fce0a963705.tar.xz hercules-b6f1b6b9a11bdb8a5001dbc042d54fce0a963705.zip |
- 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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; } } |