summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/battle.c30
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);