diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-18 06:56:43 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-18 06:56:43 +0000 |
commit | a6e632ae946475bbff3e0fbc703519dcf49bbf20 (patch) | |
tree | 763863431aecbd5f31346229df3bfc4718a5d0c1 /src/map | |
parent | 988b2d2bc46bbd567b329b982da90be3355b1ac0 (diff) | |
download | hercules-a6e632ae946475bbff3e0fbc703519dcf49bbf20.tar.gz hercules-a6e632ae946475bbff3e0fbc703519dcf49bbf20.tar.bz2 hercules-a6e632ae946475bbff3e0fbc703519dcf49bbf20.tar.xz hercules-a6e632ae946475bbff3e0fbc703519dcf49bbf20.zip |
Fixed Verkana and Turisus RK Runes, bugreport:5388
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15717 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index d31b10512..08fcceeb5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -436,6 +436,24 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag return 0; } + if( (sce = sc->data[SC_MILLENNIUMSHIELD]) && sce->val2 > 0 && damage > 0 ) { + clif_skill_nodamage(bl, bl, RK_MILLENNIUMSHIELD, 1, 1); + sce->val3 -= damage; // absorb damage + d->dmg_lv = ATK_BLOCK; + sc_start(bl,SC_STUN,15,0,skill_get_time2(RK_MILLENNIUMSHIELD,sce->val1)); // There is a chance to be stuned when one shield is broken. + if( sce->val3 <= 0 ) { // Shield Down + sce->val2--; + if( sce->val2 > 0 ) { + if( sd ) + clif_millenniumshield(sd,sce->val2); + sce->val3 = 1000; // Next Shield + } else + status_change_end(bl,SC_MILLENNIUMSHIELD,-1); // All shields down + } + return 0; + } + + if( (sce=sc->data[SC_PARRYING]) && flag&BF_WEAPON && skill_num != WS_CARTTERMINATION && rnd()%100 < sce->val2 ) { // attack blocked by Parrying clif_skill_nodamage(bl, bl, LK_PARRYING, sce->val1,1); @@ -4064,12 +4082,14 @@ 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 && sc->data[SC_EXEEDBREAK]) - { - wd.damage = wd.damage * sc->data[SC_EXEEDBREAK]->val1 / 100; - status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); + if(sc) { + 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_GIANTGROWTH] && (wd.flag&BF_SHORT) && rand()%100 < sc->data[SC_GIANTGROWTH]->val2 ) + wd.damage *= 3; // Triple Damage } - if (sd && sd->state.arrow_atk) //Consume arrow. battle_consume_ammo(sd, 0, 0); |