summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-02 22:01:49 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:22:01 +0200
commit8647affb1ffbae9dc8aae34409cfd7cd47aa5dff (patch)
tree520c4e3cc2ee1e5533edeeef7ad11eeb2e7acec4
parent4291cc2aa8430c7a08c6a60f75590784ed64f98e (diff)
downloadhercules-8647affb1ffbae9dc8aae34409cfd7cd47aa5dff.tar.gz
hercules-8647affb1ffbae9dc8aae34409cfd7cd47aa5dff.tar.bz2
hercules-8647affb1ffbae9dc8aae34409cfd7cd47aa5dff.tar.xz
hercules-8647affb1ffbae9dc8aae34409cfd7cd47aa5dff.zip
Implemented SU_CN_METEOR:
Catnip Meteor: Increases Matk by 200+100*SkillLevel%. When 1 Catnip is consumed, Adds a Chance to curse target[Not Implemented].
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/skill.c26
-rw-r--r--src/map/status.c1
3 files changed, 26 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 4ad11e488..d3a499014 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1898,6 +1898,9 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case SU_SV_STEMSPEAR:
skillratio += 600;
break;
+ case SU_CN_METEOR:
+ skillratio += 100 + 100 * skill_lv;
+ break;
default:
battle->calc_skillratio_magic_unknown(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag);
break;
diff --git a/src/map/skill.c b/src/map/skill.c
index 57955e260..315d0f7f5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1427,6 +1427,9 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
case SU_SV_STEMSPEAR:
sc_start2(src, bl, SC_BLOODING, 10, skill_lv, src->id, skill->get_time(skill_id, skill_lv));
break;
+ case SU_CN_METEOR:
+ sc_start(src, bl, SC_CURSE, 10, skill_lv, skill->get_time2(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;
@@ -3457,7 +3460,8 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
break;
switch( skl->skill_id ) {
case WZ_METEOR:
- if( skl->type >= 0 ) {
+ case SU_CN_METEOR:
+ if (skl->type >= 0) {
int x = skl->type>>16, y = skl->type&0xFFFF;
if( path->search_long(NULL, src, src->m, src->x, src->y, x, y, CELL_CHKWALL) )
skill->unitsetting(src,skl->skill_id,skl->skill_lv,x,y,skl->flag);
@@ -10403,6 +10407,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case HW_GANBANTEIN:
case LG_EARTHDRIVE:
case SC_ESCAPE:
+ case SU_CN_METEOR:
break; //Effect is displayed on respective switch case.
default:
skill->castend_pos2_effect_unknown(src, &x, &y, &skill_id, &skill_lv, &tick, &flag);
@@ -10645,11 +10650,24 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
break;
case WZ_METEOR:
+ case SU_CN_METEOR:
{
int area = skill->get_splash(skill_id, skill_lv);
short tmpx = 0, tmpy = 0, x1 = 0, y1 = 0;
int i;
+#if 0
+ // The Meteor should inflict curse if Catnip fruit is consumed.
+ // Currently Catnip fruit is added as requirement.
+ if (sd && skill_id == SU_CN_METEOR) {
+ short item_idx = pc->search_inventory(sd, ITEMID_CATNIP_FRUIT);
+ if (item_idx >= 0) {
+ pc->delitem(sd, item_idx, 1, 0, 1, LOG_TYPE_SKILL);
+ flag |= 1;
+ }
+ }
+#endif
+
for( i = 0; i < 2 + (skill_lv>>1); i++ ) {
// Creates a random Cell in the Splash Area
tmpx = x - area + rnd()%(area * 2 + 1);
@@ -11297,7 +11315,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
nullpo_retr(NULL, st);
sc = status->get_sc(src); // for traps, firewall and fogwall - celest
- switch( skill_id ) {
+ switch (skill_id) {
case SO_ELEMENTAL_SHIELD:
val2 = 300 * skill_lv + 65 * (st->int_ + status->get_lv(src)) + st->max_sp;
break;
@@ -12243,12 +12261,12 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
tsc->sg_counter++; //SG hit counter.
if (skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0) <= 0 && tsc)
tsc->sg_counter=0; //Attack absorbed.
- break;
+ break;
#endif
case GS_DESPERADO:
if (rnd()%100 < src->val1)
skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- break;
+ break;
default:
skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
}
diff --git a/src/map/status.c b/src/map/status.c
index a532248e5..7a24a703b 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -728,6 +728,7 @@ void initChangeTables(void)
status->set_sc(SU_FRESHSHRIMP, SC_FRESHSHRIMP, SI_FRESHSHRIMP, SCB_NONE);
add_sc(SU_SV_STEMSPEAR, SC_BLOODING);
status->set_sc(SU_CN_POWDERING, SC_CATNIPPOWDER, SI_CATNIPPOWDER, SCB_WATK | SCB_SPEED | SCB_REGEN);
+ add_sc(SU_CN_METEOR, SC_CURSE);
// Elemental Spirit summoner's 'side' status changes.
status->set_sc( EL_CIRCLE_OF_FIRE , SC_CIRCLE_OF_FIRE_OPTION, SI_CIRCLE_OF_FIRE_OPTION, SCB_NONE );