Skip to content

Commit

Permalink
Magnum Break damage fixed
Browse files Browse the repository at this point in the history
- The 20% fire damage bonus now only applies if the base damage is at least 1 (#108)
  (Note: The fix does not work for player damage in renewal.)
- Targets two cells away will now only take 100%+10%*level damage (#108)
  • Loading branch information
Playtester committed Nov 16, 2014
1 parent 08bf511 commit d9a9a02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/map/battle.c
Expand Up @@ -2621,7 +2621,7 @@ static struct Damage battle_calc_element_damage(struct Damage wd, struct block_l
}
if (is_attack_left_handed(src, skill_id) && wd.damage2 > 0)
wd.damage2 = battle_attr_fix(src, target, wd.damage2, left_element ,tstatus->def_ele, tstatus->ele_lv);
if (sc && sc->data[SC_WATK_ELEMENT]) {
if (sc && sc->data[SC_WATK_ELEMENT] && (wd.damage || wd.damage2)) {
// Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex]
int64 damage = battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, (is_skill_using_arrow(src, skill_id)?2:0)) * sc->data[SC_WATK_ELEMENT]->val2 / 100;

Expand Down Expand Up @@ -3194,7 +3194,10 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
break;
case SM_MAGNUM:
case MS_MAGNUM:
skillratio += 20*skill_lv;
if(wd.miscflag == 1)
skillratio += 20*skill_lv; //Inner 3x3 circle takes 100%+20%*level damage [Playtester]
else
skillratio += 10*skill_lv; //Outer 5x5 circle takes 100%+10%*level damage [Playtester]
break;
case MC_MAMMONITE:
skillratio += 50*skill_lv;
Expand Down
10 changes: 8 additions & 2 deletions src/map/skill.c
Expand Up @@ -4356,8 +4356,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
case NPC_SPLASHATTACK:
flag |= SD_PREAMBLE; // a fake packet will be sent for the first target to be hit
case AS_SPLASHER:
case SM_MAGNUM:
case MS_MAGNUM:
case HT_BLITZBEAT:
case AC_SHOWER:
case MA_SHOWER:
Expand Down Expand Up @@ -4471,6 +4469,14 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
if(!map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR)) // Nothing should happen if the target is on Land Protector
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
break;

case SM_MAGNUM:
case MS_MAGNUM:
if( flag&1 ) {
//Damage depends on distance, so add it to flag if it is > 1
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag|distance_bl(src, bl));
}
break;

case KN_BRANDISHSPEAR:
case ML_BRANDISH:
Expand Down

1 comment on commit d9a9a02

@tmav94
Copy link

@tmav94 tmav94 commented on d9a9a02 Nov 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx~*

Please sign in to comment.