summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 15:10:07 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 15:10:07 +0000
commitaa2704d3cc98ef565a24f3e59d6f8ee3bffcbfe7 (patch)
treed4138ae2654f476f6d7674c94d5bfd263ab06f17 /src/map/skill.c
parenta673d5b975c6e2fa3fc2984dcaa833b17e0e0dfe (diff)
downloadhercules-aa2704d3cc98ef565a24f3e59d6f8ee3bffcbfe7.tar.gz
hercules-aa2704d3cc98ef565a24f3e59d6f8ee3bffcbfe7.tar.bz2
hercules-aa2704d3cc98ef565a24f3e59d6f8ee3bffcbfe7.tar.xz
hercules-aa2704d3cc98ef565a24f3e59d6f8ee3bffcbfe7.zip
Fixed bugreport:6178 where SR_CRESCENTELBOW doesn't work with skills and WM_POEMOFNETHERWORLD should now work with single target and show proper animation.
Fixed bugreport:6182 Cloaking skills should now be reveal by AOE skills and additional to that is TF_HIDING should now be only reveal by ground skills(earth) and revealing skills. Fixed bugreport:6188 Leech End should now show flinching damage and updated its damage formula Fixed Guillotine Cross poisons where the effect should not stack to each other, updated Oblivion Curse status def formula and Pyrexia's blinding effect. Fixed Fighting spirit's ASPD bonus thanks to Igniz for pointing it out.. Fixed WM_REVERBERATION display animation when triggers and activated by WM_DOMINION_IMPULSE. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16399 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c84
1 files changed, 38 insertions, 46 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 122a3fb8d..98bb181a3 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2620,7 +2620,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
battle_delay_damage(tick, dmg.amotion,bl,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,0);
else
status_fix_damage(bl,src,rdamage,0);
- clif_damage(src,src,tick, dmg.amotion,0,rdamage,dmg.div_>1?dmg.div_:1,4,0);
+ clif_damage(src,src,tick, dmg.amotion,0,rdamage,1,4,0); // in aegis damage reflected is shown in single hit.
//Use Reflect Shield to signal this kind of skill trigger. [Skotlex]
if( tsd && src != bl )
battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src));
@@ -2638,7 +2638,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
case GC_VENOMPRESSURE: {
struct status_change *ssc = status_get_sc(src);
if( ssc && ssc->data[SC_POISONINGWEAPON] && rnd()%100 < 70 + 5*skilllv ) {
- sc_start(bl,ssc->data[SC_POISONINGWEAPON]->val2,100,ssc->data[SC_POISONINGWEAPON]->val1,skill_get_time2(GC_POISONINGWEAPON,ssc->data[SC_POISONINGWEAPON]->val1));
+ sc_start(bl,ssc->data[SC_POISONINGWEAPON]->val2,100,ssc->data[SC_POISONINGWEAPON]->val1,skill_get_time2(GC_POISONINGWEAPON, 1));
status_change_end(src,SC_POISONINGWEAPON,INVALID_TIMER);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
@@ -3234,9 +3234,8 @@ static int skill_ative_reverberation( struct block_list *bl, va_list ap) {
if( bl->type != BL_SKILL )
return 0;
if( su->alive && (sg = su->group) && sg->skill_id == WM_REVERBERATION ) {
- clif_changetraplook(bl, UNT_USED_TRAPS);
map_foreachinrange(skill_trap_splash, bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, bl, gettick());
- su->limit=DIFF_TICK(gettick(),sg->tick)+1500;
+ su->limit=DIFF_TICK(gettick(),sg->tick);
sg->unit_id = UNT_USED_TRAPS;
}
return 0;
@@ -3388,7 +3387,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case NPC_HELLPOWER:
case RK_SONICWAVE:
case RK_HUNDREDSPEAR:
- case RK_WINDCUTTER:
case AB_DUPLELIGHT_MELEE:
case RA_AIMEDBOLT:
case NC_AXEBOOMERANG:
@@ -3402,7 +3400,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case LG_RAGEBURST:
case LG_RAYOFGENESIS:
case LG_HESPERUSLIT:
- case SR_SKYNETBLOW:
case SR_FALLENEMPIRE:
case SR_CRESCENTELBOW_AUTOSPELL:
case SR_GATEOFHELL:
@@ -3423,7 +3420,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case NC_COLDSLOWER:
case NC_ARMSCANNON:
if (sd) pc_overheat(sd,1);
- skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+ case RK_WINDCUTTER:
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag|SD_ANIMATION);
break;
case LK_JOINTBEAT: // decide the ailment first (affects attack damage and effect)
@@ -3620,6 +3618,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case WL_SOULEXPANSION:
case WL_CRIMSONROCK:
case WL_COMET:
+ case WL_JACKFROST:
case RA_ARROWSTORM:
case RA_WUGDASH:
case NC_SELFDESTRUCTION:
@@ -3630,6 +3629,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case LG_EARTHDRIVE:
case SR_TIGERCANNON:
case SR_RAMPAGEBLASTER:
+ case SR_SKYNETBLOW:
case SR_WINDMILL:
case SR_RIDEINLIGHTNING:
case WM_SOUND_OF_DESTRUCTION:
@@ -3666,7 +3666,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
break;
case NPC_EARTHQUAKE://FIXME: Isn't EarthQuake a ground skill after all?
skill_addtimerskill(src,tick+250,src->id,0,0,skillid,skilllv,2,flag|BCT_ENEMY|SD_SPLASH|1);
- break;
default:
break;
}
@@ -3678,6 +3677,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
skill_area_temp[4] = bl->x;
skill_area_temp[5] = bl->y;
}
+ if( skillid == WM_REVERBERATION_MELEE || skillid == WM_REVERBERATION_MAGIC )
+ skill_area_temp[1] = 0;
// if skill damage should be split among targets, count them
//SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets
//special case: Venom Splasher uses a different range for searching than for splashing
@@ -4185,24 +4186,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
}
break;
case WL_FROSTMISTY:
- {
- struct status_change *tsc = status_get_sc(bl);
- if( tsc && (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY]) )
- break; // Doesn't hit/cause Freezing to invisible enemy
// Causes Freezing status through walls.
sc_start(bl,status_skill2sc(skillid),20+12*skilllv+(sd ? sd->status.job_level : 50)/5,skilllv,skill_get_time(skillid,skilllv));
// Doesn't deal damage through non-shootable walls.
if( path_search(NULL,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKWALL) )
- skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
- }
- break;
-
- case WL_JACKFROST: {
- struct status_change *tsc = status_get_sc(bl);
- if( tsc && (tsc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || tsc->data[SC__INVISIBILITY]) )
- break; // Do not hit invisible enemy
- skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag);
- }
+ skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag|SD_ANIMATION);
break;
case WL_HELLINFERNO:
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
@@ -4325,7 +4313,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER);
status_change_end(bl, SC_BEYONDOFWARCRY, INVALID_TIMER);
status_change_end(bl, SC_UNLIMITEDHUMMINGVOICE, INVALID_TIMER);
- skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
+ skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag|SD_ANIMATION);
break;
case SR_EARTHSHAKER:
@@ -9579,7 +9567,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
}
clif_skill_damage(src,src,tick,status_get_amotion(src),0,-30000,1,skillid,skilllv,6);
skill_unitsetting(src, skillid, skilllv, x, y, flag);
- status_change_end(src,SC_POISONINGWEAPON,INVALID_TIMER);
+ //status_change_end(src,SC_POISONINGWEAPON,INVALID_TIMER); // 08/31/2011 - When using poison smoke, you no longer lose the poisoning weapon effect.
break;
/**
* Arch Bishop
@@ -10312,7 +10300,6 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli
case GC_POISONSMOKE:
if( !(sc && sc->data[SC_POISONINGWEAPON]) )
return NULL;
- val1 = sc->data[SC_POISONINGWEAPON]->val1; // Level of Poison, to determine poisoning time
val2 = sc->data[SC_POISONINGWEAPON]->val2; // Type of Poison
limit = 4000 + 2000 * skilllv;
break;
@@ -11161,7 +11148,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
**/
case UNT_POISONSMOKE:
if( battle_check_target(ss,bl,BCT_ENEMY) > 0 && !(tsc && tsc->data[sg->val2]) && rnd()%100 < 20 )
- sc_start(bl,sg->val2,100,sg->val1,skill_get_time2(GC_POISONINGWEAPON,sg->val1));
+ sc_start(bl,sg->val2,100,sg->val1,skill_get_time2(GC_POISONINGWEAPON, 1));
break;
case UNT_EPICLESIS:
@@ -11209,7 +11196,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case UNT_REVERBERATION:
clif_changetraplook(&src->bl,UNT_USED_TRAPS);
map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
- sg->limit = DIFF_TICK(tick,sg->tick) + 1500;
+ sg->limit = DIFF_TICK(tick,sg->tick)+1000;
sg->unit_id = UNT_USED_TRAPS;
break;
@@ -11218,9 +11205,12 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
skill_attack(BF_WEAPON,ss,&src->bl,bl,WM_SEVERE_RAINSTORM_MELEE,sg->skill_lv,tick,0);
break;
case UNT_NETHERWORLD:
- if( !(status_get_mode(bl)&MD_BOSS) ) {
- if( !(tsc && tsc->data[type]) )
+ if( !(status_get_mode(bl)&MD_BOSS) && ss != bl && battle_check_target(&src->bl, bl, BCT_PARTY) ) {
+ if( !(tsc && tsc->data[type]) ){
sc_start(bl, type, 100, sg->skill_lv, skill_get_time2(sg->skill_id,sg->skill_lv));
+ sg->limit = DIFF_TICK(tick,sg->tick);
+ sg->unit_id = UNT_USED_TRAPS;
+ }
}
break;
case UNT_THORNS_TRAP:
@@ -12317,9 +12307,10 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
if( !(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_DRAGONCOMBO) )
return 0;
break;
+
case SR_CRESCENTELBOW:
if( sc && sc->data[SC_CRESCENTELBOW] ) {
- clif_skill_fail(sd,skill,0,0);
+ clif_skill_fail(sd, skill, USESKILL_FAIL_DUPLICATE, 0);
return 0;
}
break;
@@ -14037,8 +14028,8 @@ static int skill_trap_splash (struct block_list *bl, va_list ap)
clif_skill_damage(src,bl,tick,0,0,-30000,1,sg->skill_id,sg->skill_lv,5);
break;
case UNT_REVERBERATION:
- skill_addtimerskill(ss,tick+50,bl->id,0,0,WM_REVERBERATION_MELEE,sg->skill_lv,BF_WEAPON,SD_LEVEL); // for proper skill delay animation when use with Dominion Impulse
- skill_addtimerskill(ss,tick+250,bl->id,0,0,WM_REVERBERATION_MAGIC,sg->skill_lv,BF_MAGIC,SD_LEVEL);
+ skill_addtimerskill(ss,tick+50,bl->id,0,0,WM_REVERBERATION_MELEE,sg->skill_lv,BF_WEAPON,0); // for proper skill delay animation when use with Dominion Impulse
+ skill_addtimerskill(ss,tick+250,bl->id,0,0,WM_REVERBERATION_MAGIC,sg->skill_lv,BF_MAGIC,0);
break;
case UNT_SEVERE_RAINSTORM:
skill_attack(BF_WEAPON,ss,ss,bl,WM_SEVERE_RAINSTORM_MELEE,sg->skill_lv,tick,0);
@@ -14687,8 +14678,8 @@ static int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap)
}
clif_changetraplook(bl,UNT_USED_TRAPS);
map_foreachinrange(skill_trap_splash, bl, skill_get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick);
- group->limit = DIFF_TICK(tick,group->tick) + 1500;
- unit->limit = DIFF_TICK(tick,group->tick) + 1500;
+ group->limit = DIFF_TICK(tick,group->tick)+1000;
+ unit->limit = DIFF_TICK(tick,group->tick)+1000;
group->unit_id = UNT_USED_TRAPS;
break;
@@ -14753,8 +14744,8 @@ static int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap)
if( unit->val1 <= 0 ){
clif_changetraplook(bl,UNT_USED_TRAPS);
map_foreachinrange(skill_trap_splash, bl, skill_get_splash(group->skill_id, group->skill_lv), group->bl_flag, bl, tick);
- group->limit = DIFF_TICK(tick,group->tick) + 1500;
- unit->limit = DIFF_TICK(tick,group->tick) + 1500;
+ group->limit = DIFF_TICK(tick,group->tick)+1000;
+ unit->limit = DIFF_TICK(tick,group->tick)+1000;
group->unit_id = UNT_USED_TRAPS;
}
break;
@@ -15668,7 +15659,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
}
int skill_poisoningweapon( struct map_session_data *sd, int nameid) {
sc_type type;
- int t_lv = 0, chance, i;
+ int chance, i;
nullpo_ret(sd);
if( nameid <= 0 || (i = pc_search_inventory(sd,nameid)) < 0 || pc_delitem(sd,i,1,0,0,LOG_TYPE_CONSUME) ) {
clif_skill_fail(sd,GC_POISONINGWEAPON,USESKILL_FAIL_LEVEL,0);
@@ -15676,21 +15667,22 @@ int skill_poisoningweapon( struct map_session_data *sd, int nameid) {
}
switch( nameid )
{ // t_lv used to take duration from skill_get_time2
- case PO_PARALYSE: type = SC_PARALYSE; t_lv = 1; break;
- case PO_PYREXIA: type = SC_PYREXIA; t_lv = 2; break;
- case PO_DEATHHURT: type = SC_DEATHHURT; t_lv = 3; break;
- case PO_LEECHESEND: type = SC_LEECHESEND; t_lv = 4; break;
- case PO_VENOMBLEED: type = SC_VENOMBLEED; t_lv = 6; break;
- case PO_TOXIN: type = SC_TOXIN; t_lv = 7; break;
- case PO_MAGICMUSHROOM: type = SC_MAGICMUSHROOM; t_lv = 8; break;
- case PO_OBLIVIONCURSE: type = SC_OBLIVIONCURSE; t_lv = 9; break;
+ case PO_PARALYSE: type = SC_PARALYSE; break;
+ case PO_PYREXIA: type = SC_PYREXIA; break;
+ case PO_DEATHHURT: type = SC_DEATHHURT; break;
+ case PO_LEECHESEND: type = SC_LEECHESEND; break;
+ case PO_VENOMBLEED: type = SC_VENOMBLEED; break;
+ case PO_TOXIN: type = SC_TOXIN; break;
+ case PO_MAGICMUSHROOM: type = SC_MAGICMUSHROOM; break;
+ case PO_OBLIVIONCURSE: type = SC_OBLIVIONCURSE; break;
default:
clif_skill_fail(sd,GC_POISONINGWEAPON,USESKILL_FAIL_LEVEL,0);
return 0;
}
chance = 2 + 2 * sd->menuskill_val; // 2 + 2 * skill_lv
- sc_start4(&sd->bl,SC_POISONINGWEAPON,100,t_lv,type,chance,0,skill_get_time(GC_POISONINGWEAPON,sd->menuskill_val));
+ sc_start4(&sd->bl, SC_POISONINGWEAPON, 100, pc_checkskill(sd, GC_RESEARCHNEWPOISON), //in Aegis it store the level of GC_RESEARCHNEWPOISON in val1
+ type, chance, 0, skill_get_time(GC_POISONINGWEAPON, sd->menuskill_val));
return 0;
}