summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c162
1 files changed, 81 insertions, 81 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e31e8f61e..ca93a51aa 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -439,8 +439,8 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b
else if( sd->sc.data[SC__REPRODUCE] && !skill->reproduce_db[skill->get_index(skill_id)] )
return 0;
- //Never copy new 3rd class skills By OmegaRed
- if(skill_id >= GC_DARKCROW && skill_id <= ALL_FULL_THROTTLE)
+ //Never copy new 3rd class skills By OmegaRed
+ if(skill_id >= GC_DARKCROW && skill_id <= ALL_FULL_THROTTLE)
return 0;
return 1;
@@ -1388,13 +1388,13 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
if( rate )
skill->break_equip(bl, EQP_ARMOR, rate, BCT_ENEMY);
}
- if (sd && !skill_id && bl->type == BL_PC) { // This effect does not work with skills.
- if (sd->def_set_race[tstatus->race].rate)
- status->change_start(src,bl, SC_DEFSET, sd->def_set_race[tstatus->race].rate, sd->def_set_race[tstatus->race].value,
- 0, 0, 0, sd->def_set_race[tstatus->race].tick, 2);
- if (sd->def_set_race[tstatus->race].rate)
- status->change_start(src,bl, SC_MDEFSET, sd->mdef_set_race[tstatus->race].rate, sd->mdef_set_race[tstatus->race].value,
- 0, 0, 0, sd->mdef_set_race[tstatus->race].tick, 2);
+ if (sd && !skill_id && bl->type == BL_PC) { // This effect does not work with skills.
+ if (sd->def_set_race[tstatus->race].rate)
+ status->change_start(src,bl, SC_DEFSET, sd->def_set_race[tstatus->race].rate, sd->def_set_race[tstatus->race].value,
+ 0, 0, 0, sd->def_set_race[tstatus->race].tick, 2);
+ if (sd->def_set_race[tstatus->race].rate)
+ status->change_start(src,bl, SC_MDEFSET, sd->mdef_set_race[tstatus->race].rate, sd->mdef_set_race[tstatus->race].value,
+ 0, 0, 0, sd->mdef_set_race[tstatus->race].tick, 2);
}
}
@@ -3858,78 +3858,78 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
break;
- case KN_BOWLINGBASH:
- case MS_BOWLINGBASH:
- {
- int min_x,max_x,min_y,max_y,i,c,dir,tx,ty;
- // Chain effect and check range gets reduction by recursive depth, as this can reach 0, we don't use blowcount
- c = (skill_lv-(flag&0xFFF)+1)/2;
- // Determine the Bowling Bash area depending on configuration
- if (battle_config.bowling_bash_area == 0) {
- // Gutter line system
- min_x = ((src->x)-c) - ((src->x)-c)%40;
- if(min_x < 0) min_x = 0;
- max_x = min_x + 39;
- min_y = ((src->y)-c) - ((src->y)-c)%40;
- if(min_y < 0) min_y = 0;
- max_y = min_y + 39;
- } else if (battle_config.bowling_bash_area == 1) {
- // Gutter line system without demi gutter bug
- min_x = src->x - (src->x)%40;
- max_x = min_x + 39;
- min_y = src->y - (src->y)%40;
- max_y = min_y + 39;
- } else {
- // Area around caster
- min_x = src->x - battle_config.bowling_bash_area;
- max_x = src->x + battle_config.bowling_bash_area;
- min_y = src->y - battle_config.bowling_bash_area;
- max_y = src->y + battle_config.bowling_bash_area;
- }
- // Initialization, break checks, direction
- if((flag&0xFFF) > 0) {
- // Ignore monsters outside area
- if(bl->x < min_x || bl->x > max_x || bl->y < min_y || bl->y > max_y)
- break;
- // Ignore monsters already in list
- if(idb_exists(skill->bowling_db, bl->id))
- break;
- // Random direction
- dir = rnd()%8;
- } else {
- // Create an empty list of already hit targets
- db_clear(skill->bowling_db);
- // Direction is walkpath
- dir = (unit->getdir(src)+4)%8;
- }
- // Add current target to the list of already hit targets
- idb_put(skill->bowling_db, bl->id, bl);
- // Keep moving target in direction square by square
- tx = bl->x;
- ty = bl->y;
- for(i=0;i<c;i++) {
- // Target coordinates (get changed even if knockback fails)
- tx -= dirx[dir];
- ty -= diry[dir];
- // If target cell is a wall then break
- if(map->getcell(bl->m,tx,ty,CELL_CHKWALL))
- break;
- skill_blown(src,bl,1,dir,0);
- // Splash around target cell, but only cells inside area; we first have to check the area is not negative
- if((max(min_x,tx-1) <= min(max_x,tx+1)) &&
- (max(min_y,ty-1) <= min(max_y,ty+1)) &&
- (map->foreachinarea(skill->area_sub, bl->m, max(min_x,tx-1), max(min_y,ty-1), min(max_x,tx+1), min(max_y,ty+1), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->area_sub_count))) {
- // Recursive call
- map->foreachinarea(skill->area_sub, bl->m, max(min_x,tx-1), max(min_y,ty-1), min(max_x,tx+1), min(max_y,ty+1), splash_target(src), src, skill_id, skill_lv, tick, (flag|BCT_ENEMY)+1, skill->castend_damage_id);
- // Self-collision
- if(bl->x >= min_x && bl->x <= max_x && bl->y >= min_y && bl->y <= max_y)
- skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,(flag&0xFFF)>0?SD_ANIMATION:0);
- break;
- }
- }
- // Original hit or chain hit depending on flag
- skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,(flag&0xFFF)>0?SD_ANIMATION:0);
- }
+ case KN_BOWLINGBASH:
+ case MS_BOWLINGBASH:
+ {
+ int min_x,max_x,min_y,max_y,i,c,dir,tx,ty;
+ // Chain effect and check range gets reduction by recursive depth, as this can reach 0, we don't use blowcount
+ c = (skill_lv-(flag&0xFFF)+1)/2;
+ // Determine the Bowling Bash area depending on configuration
+ if (battle_config.bowling_bash_area == 0) {
+ // Gutter line system
+ min_x = ((src->x)-c) - ((src->x)-c)%40;
+ if(min_x < 0) min_x = 0;
+ max_x = min_x + 39;
+ min_y = ((src->y)-c) - ((src->y)-c)%40;
+ if(min_y < 0) min_y = 0;
+ max_y = min_y + 39;
+ } else if (battle_config.bowling_bash_area == 1) {
+ // Gutter line system without demi gutter bug
+ min_x = src->x - (src->x)%40;
+ max_x = min_x + 39;
+ min_y = src->y - (src->y)%40;
+ max_y = min_y + 39;
+ } else {
+ // Area around caster
+ min_x = src->x - battle_config.bowling_bash_area;
+ max_x = src->x + battle_config.bowling_bash_area;
+ min_y = src->y - battle_config.bowling_bash_area;
+ max_y = src->y + battle_config.bowling_bash_area;
+ }
+ // Initialization, break checks, direction
+ if((flag&0xFFF) > 0) {
+ // Ignore monsters outside area
+ if(bl->x < min_x || bl->x > max_x || bl->y < min_y || bl->y > max_y)
+ break;
+ // Ignore monsters already in list
+ if(idb_exists(skill->bowling_db, bl->id))
+ break;
+ // Random direction
+ dir = rnd()%8;
+ } else {
+ // Create an empty list of already hit targets
+ db_clear(skill->bowling_db);
+ // Direction is walkpath
+ dir = (unit->getdir(src)+4)%8;
+ }
+ // Add current target to the list of already hit targets
+ idb_put(skill->bowling_db, bl->id, bl);
+ // Keep moving target in direction square by square
+ tx = bl->x;
+ ty = bl->y;
+ for(i=0;i<c;i++) {
+ // Target coordinates (get changed even if knockback fails)
+ tx -= dirx[dir];
+ ty -= diry[dir];
+ // If target cell is a wall then break
+ if(map->getcell(bl->m,tx,ty,CELL_CHKWALL))
+ break;
+ skill_blown(src,bl,1,dir,0);
+ // Splash around target cell, but only cells inside area; we first have to check the area is not negative
+ if((max(min_x,tx-1) <= min(max_x,tx+1)) &&
+ (max(min_y,ty-1) <= min(max_y,ty+1)) &&
+ (map->foreachinarea(skill->area_sub, bl->m, max(min_x,tx-1), max(min_y,ty-1), min(max_x,tx+1), min(max_y,ty+1), splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY, skill->area_sub_count))) {
+ // Recursive call
+ map->foreachinarea(skill->area_sub, bl->m, max(min_x,tx-1), max(min_y,ty-1), min(max_x,tx+1), min(max_y,ty+1), splash_target(src), src, skill_id, skill_lv, tick, (flag|BCT_ENEMY)+1, skill->castend_damage_id);
+ // Self-collision
+ if(bl->x >= min_x && bl->x <= max_x && bl->y >= min_y && bl->y <= max_y)
+ skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,(flag&0xFFF)>0?SD_ANIMATION:0);
+ break;
+ }
+ }
+ // Original hit or chain hit depending on flag
+ skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,(flag&0xFFF)>0?SD_ANIMATION:0);
+ }
break;
case KN_SPEARSTAB: