diff options
author | Dastgir Pojee <dastgirp@gmail.com> | 2016-10-03 18:57:13 +0530 |
---|---|---|
committer | hemagx <ibrahem.h.basyone@gmail.com> | 2016-10-22 02:22:08 +0200 |
commit | 384ab01c3ea55f96277824b9c64d79dc060efcb3 (patch) | |
tree | 9a65e2ac4ea853296189fa3c2b38f6d7a2c3c597 /src/map/skill.c | |
parent | 8557afc9875ae5fcf46b17728cddab009aa5d472 (diff) | |
download | hercules-384ab01c3ea55f96277824b9c64d79dc060efcb3.tar.gz hercules-384ab01c3ea55f96277824b9c64d79dc060efcb3.tar.bz2 hercules-384ab01c3ea55f96277824b9c64d79dc060efcb3.tar.xz hercules-384ab01c3ea55f96277824b9c64d79dc060efcb3.zip |
Implemented SU_LUNATICCARROTBEAT Skill.
Atk +(200+100*SkillLv)%.
When 1 Carrot is consumed, Add's a chance to stun enemy.
Lv1-2: 3x3 AoE
Lv3-4: 5x5 AoE
Lv5: 7x7 AoE
Added Item Constants in itemdb.h
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index d3186e8ba..8d870881e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1433,6 +1433,10 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 case SU_SCAROFTAROU: sc_start(src, bl, SC_STUN, 10, skill_lv, skill->get_time2(skill_id, skill_lv)); // TODO: What's the chance/time? break; + case SU_LUNATICCARROTBEAT: + if (skill->area_temp[3] == 1) + sc_start(src, bl, SC_STUN, 10, skill_lv, skill_get_time(skill_id, skill_lv)); // TODO: What's the chance/time? + break; default: skill->additional_effect_unknown(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); break; @@ -4047,6 +4051,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case GN_ILLUSIONDOPING: case MH_XENO_SLASHER: case SU_SCRATCH: + case SU_LUNATICCARROTBEAT: if (flag&1) { //Recursive invocation // skill->area_temp[0] holds number of targets in area // skill->area_temp[1] holds the id of the original target @@ -4074,6 +4079,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case LG_EARTHDRIVE: case GN_CARTCANNON: case SU_SCRATCH: + case SU_LUNATICCARROTBEAT: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); break; case SR_TIGERCANNON: @@ -4092,13 +4098,19 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->area_temp[0] = 0; skill->area_temp[1] = bl->id; skill->area_temp[2] = 0; - if( skill_id == WL_CRIMSONROCK ) { + if (skill_id == WL_CRIMSONROCK) { skill->area_temp[4] = bl->x; skill->area_temp[5] = bl->y; } + if (skill_id == SU_LUNATICCARROTBEAT) { + skill->area_temp[3] = 0; + } - if( skill_id == NC_VULCANARM ) - if (sd) pc->overheat(sd,1); + if (skill_id == NC_VULCANARM) { + if (sd != NULL) { + pc->overheat(sd,1); + } + } // if skill damage should be split among targets, count them //SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets @@ -4108,6 +4120,15 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 // recursive invocation of skill->castend_damage_id() with flag|1 map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), skill->splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + + if (sd && skill_id == SU_LUNATICCARROTBEAT) { + short item_idx = pc->search_inventory(sd, ITEMID_CARROT); + + if (item_idx >= 0) { + pc->delitem(sd, item_idx, 1, 0, 1, LOG_TYPE_CONSUME); + skill->area_temp[3] = 1; + } + } } break; |