diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-24 15:10:51 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-24 15:10:51 +0000 |
commit | bcfd26477585eb8de9ec336cd201688e9314150e (patch) | |
tree | 69ace2996d9385022b8d5501fd9c3df78f3e62d5 /src/map | |
parent | 1e629a763c308781b17c03bc64e937006b568bac (diff) | |
download | hercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.gz hercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.bz2 hercules-bcfd26477585eb8de9ec336cd201688e9314150e.tar.xz hercules-bcfd26477585eb8de9ec336cd201688e9314150e.zip |
- Changed Land Protector's range back to 3.
- fixed unban unblocking players as well.
- Fixed Volcano/Deluge/Violent Gale increasing damage based on element of attack instead of defense element of attacker.
- Cleaned up the code of Magic Rod, fixed it not giving SP.
- Moved the code of Hermod and Basilica to castend_pos2 so it should work now.
- Modified the code of Ankle Snare so the status ends on unit's time-limit rather than when the snared object moves away.
- Re-worded the water check of ST_WATER skills.
- Allowed sc-cast reductions to be processed even when cast-time is instant (to let suffragium end even on instant-cast skills)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7855 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 6 | ||||
-rw-r--r-- | src/map/skill.c | 97 |
2 files changed, 42 insertions, 61 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index bbee2fe24..acd5d547d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -198,11 +198,11 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag ratio = attr_fix_table[def_lv-1][atk_elem][def_type]; if (sc && sc->count) { - if(sc->data[SC_VOLCANO].timer!=-1 && atk_elem == ELE_FIRE) + if(sc->data[SC_VOLCANO].timer!=-1 && status_get_element(src) == ELE_FIRE) ratio += enchant_eff[sc->data[SC_VOLCANO].val1-1]; - if(sc->data[SC_VIOLENTGALE].timer!=-1 && atk_elem == ELE_WIND) + if(sc->data[SC_VIOLENTGALE].timer!=-1 && status_get_element(src) == ELE_WIND) ratio += enchant_eff[sc->data[SC_VIOLENTGALE].val1-1]; - if(sc->data[SC_DELUGE].timer!=-1 && atk_elem == ELE_WATER) + if(sc->data[SC_DELUGE].timer!=-1 && status_get_element(src) == ELE_WATER) ratio += enchant_eff[sc->data[SC_DELUGE].val1-1]; } if (tsc && tsc->count) diff --git a/src/map/skill.c b/src/map/skill.c index d665950dd..46280601e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1856,22 +1856,18 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds } if(sc && sc->data[SC_MAGICROD].timer != -1 && src == dsrc) { + struct unit_data *ud; + int sp = skill_get_sp(skillid,skilllv); dmg.damage = dmg.damage2 = 0; dmg.dmg_lv = ATK_FLEE; //This will prevent skill additional effect from taking effect. [Skotlex] - if(tsd) { - int sp = skill_get_sp(skillid,skilllv); - sp = sp * sc->data[SC_MAGICROD].val2 / 100; - if(skillid == WZ_WATERBALL && skilllv > 1) - sp = sp/((skilllv|1)*(skilllv|1)); //Estimate SP cost of a single water-ball - if(sp > SHRT_MAX) sp = SHRT_MAX; - else if(sp < 1) sp = 1; - if(sp > tsd->status.max_sp - tsd->status.sp) - sp = tsd->status.max_sp - tsd->status.sp; - tsd->status.sp += sp; - clif_heal(tsd->fd,SP_SP,sp); - tsd->ud.canact_tick = tick + skill_delayfix(bl, SA_MAGICROD, sc->data[SC_MAGICROD].val1); - } + sp = sp * sc->data[SC_MAGICROD].val2 / 100; + if(skillid == WZ_WATERBALL && skilllv > 1) + sp = sp/((skilllv|1)*(skilllv|1)); //Estimate SP cost of a single water-ball + status_heal(bl, 0, sp, 2); clif_skill_nodamage(bl,bl,SA_MAGICROD,sc->data[SC_MAGICROD].val1,1); + ud = unit_bl2ud(bl); + if (ud) ud->canact_tick = tick + + skill_delayfix(bl, SA_MAGICROD, sc->data[SC_MAGICROD].val1); } } @@ -4248,24 +4244,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in clif_skill_fail(sd,skillid,0,0); break; - case HP_BASILICA: /* バジリカ */ - case CG_HERMODE: // Wand of Hermode - { - struct skill_unit_group *sg; - unit_stop_walking(src,1); - skill_clear_unitgroup(src); - sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0); - if(skillid == CG_HERMODE) - i = sc_start4(src,SC_DANCING,100, - skillid,0,0,sg->group_id,skill_get_time(skillid,skilllv)); - else - i = sc_start4(src,type,100, - skilllv,0,BCT_SELF,sg->group_id, - skill_get_time(skillid,skilllv)); - clif_skill_nodamage(src,bl,skillid,skilllv,i); - } - break; - case BD_ADAPTATION: /* アドリブ */ if(tsc && tsc->data[SC_DANCING].timer!=-1){ clif_skill_nodamage(src,bl,skillid,skilllv,1); @@ -5120,11 +5098,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in } } } - if(su->group->unit_id == UNT_ANKLESNARE && su->group->val2){ - struct block_list *target=map_id2bl(su->group->val2); - if(target) - status_change_end(target,SC_ANKLE,-1); - } skill_delunit(su); } } @@ -6158,7 +6131,21 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s skill_unitsetting(src,skillid,skilllv,x,y,0); flag|=1; break; - + case HP_BASILICA: + skill_clear_unitgroup(src); + sg = skill_unitsetting(src,skillid,skilllv,x,y,0); + sc_start4(src,type,100, + skilllv,0,BCT_SELF,sg->group_id, + skill_get_time(skillid,skilllv)); + flag|=1; + break; + case CG_HERMODE: + skill_clear_unitgroup(src); + sg = skill_unitsetting(src,skillid,skilllv,x,y,0); + sc_start4(src,SC_DANCING,100, + skillid,0,0,sg->group_id,skill_get_time(skillid,skilllv)); + flag|=1; + break; case RG_CLEANER: // [Valaris] i = skill_get_splash(skillid, skilllv); map_foreachinarea(skill_graffitiremover,src->m,x-i,y-i,x+i,y+i,BL_SKILL); @@ -6337,6 +6324,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv)); skill_unitsetting(src,skillid,skilllv,src->x,src->y,0); break; + default: ShowWarning("skill_castend_pos2: Unknown skill used:%d\n",skillid); return 1; @@ -7409,18 +7397,6 @@ int skill_unit_onout (struct skill_unit *src, struct block_list *bl, unsigned in if (sc && sc->data[type].timer!=-1) status_change_end(bl,type,-1); break; - case UNT_ANKLESNARE: - { - struct block_list *target = map_id2bl(sg->val2); - if(target && target == bl){ - status_change_end(bl,SC_ANKLE,-1); - sg->limit=DIFF_TICK(tick,sg->tick)+1000; - sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex] - } - else - return 0; - break; - } case UNT_BASILICA: //Clear basilica if the owner moved [Skotlex] case UNT_HERMODE: //Clear Hermode if the owner moved. if (sc && sc->data[type].timer!=-1 && sc->data[type].val3 == BCT_SELF && sc->data[type].val4 == sg->group_id) @@ -7604,6 +7580,13 @@ int skill_unit_onlimit (struct skill_unit *src, unsigned int tick) } } break; + case UNT_ANKLESNARE: + { + struct block_list *target = map_id2bl(sg->val2); + if(target) + status_change_end(target,SC_ANKLE,-1); + } + break; } return 0; @@ -8474,14 +8457,12 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t } break; case ST_WATER: - if ( - (!sc || (sc->data[SC_DELUGE].timer == -1 && sc->data[SC_SUITON].timer == -1)) && - (!map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER)) - ) { - clif_skill_fail(sd,skill,0,0); - return 0; - } - break; + if (sc && (sc->data[SC_DELUGE].timer != -1 || sc->data[SC_SUITON].timer != -1)) + break; + if (map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKWATER)) + break; + clif_skill_fail(sd,skill,0,0); + return 0; } if (checkitem_flag) { @@ -8587,7 +8568,7 @@ int skill_castfix_sc (struct block_list *bl, int time) { struct status_change *sc = status_get_sc(bl); - if (time <= 0) return 0; +// if (time <= 0) return 0; //Reports say that Suffragium should be consumed even on instant cast skills [Skotlex] if (sc && sc->count) { if (sc->data[SC_SUFFRAGIUM].timer != -1) { |