From fc694ecbe6734d01c0a1626beb96f514fb06aa5e Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 5 May 2006 15:03:53 +0000 Subject: - Kaupe now will only block all skills of players, for non-players, only normal attacks can be missed. - Moved the Kaite spell-reflect code after the damage calculation function, so the reflected damage is exactly the damage the original target would have received. Will only trigger if the damage to be reflected is above 0. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6489 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 8a66cbedf..b8426214a 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -461,8 +461,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i && rand()%100 < 75 && !(skill_get_inf(skill_num)&INF_GROUND_SKILL)) return 0; - if(sc->data[SC_KAUPE].timer != -1 && rand()%100 < sc->data[SC_KAUPE].val2) - { + if(sc->data[SC_KAUPE].timer != -1 && + rand()%100 < sc->data[SC_KAUPE].val2 && + (bl->type == BL_PC || !skill_num)) + { //Kaupe only blocks all skills of players. clif_skill_nodamage(bl,bl,SL_KAUPE,1,1); if (--sc->data[SC_KAUPE].val3 <= 0) //We make it work like Safety Wall, even though it only blocks 1 time. status_change_end(bl, SC_KAUPE, -1); -- cgit v1.2.3-70-g09d2