summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-26 10:27:55 -0700
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-26 10:27:55 -0700
commit074662a4b30e5d380fda32fd7df2d3ae2de759e0 (patch)
treeb88beb72d9dfbe590c368adf80bb69c6a74f571b /src/map/skill.c
parent1b035a978d52bfc6c17c63bb7afd9210abd4983c (diff)
downloadhercules-074662a4b30e5d380fda32fd7df2d3ae2de759e0.tar.gz
hercules-074662a4b30e5d380fda32fd7df2d3ae2de759e0.tar.bz2
hercules-074662a4b30e5d380fda32fd7df2d3ae2de759e0.tar.xz
hercules-074662a4b30e5d380fda32fd7df2d3ae2de759e0.zip
Fixed Bug#7402
-Added some missing calc in re atk. Fixed Bug#7378 -PA_GOSPEL should now clear buffs upon casting. Fixed Bug#7399 -Neutral skills should work properly with ghost type monsters. RENEWAL UPDATES: Updated some ninja & gunslinger skills to there renewal formula. Added exploit fix(RE fixed) with hunter stacking trap trick. Added some misc skills more to follow.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c93
1 files changed, 72 insertions, 21 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 509de6f4a..a625fb9c1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3781,6 +3781,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
break;
case SR_TIGERCANNON:
+ case GC_COUNTERSLASH:
+ case GC_ROLLINGCUTTER:
flag |= SD_ANIMATION;
case LG_MOONSLASHER:
clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, 6);
@@ -5314,6 +5316,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
status_kill(bl);
break;
case SA_REVERSEORCISH:
+ case ALL_REVERSEORCISH:
clif->skill_nodamage(src,bl,skill_id,skill_lv,
sc_start(bl,type,100,skill_lv,skill->get_time(skill_id, skill_lv)));
break;
@@ -5460,7 +5463,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
src,skill_id,skill_lv,tick, flag|BCT_ENEMY|1, skill->castend_damage_id);
clif->skill_nodamage (src,src,skill_id,skill_lv,1);
// Initiate 10% of your damage becomes fire element.
- sc_start4(src,SC_WATK_ELEMENT,100,3,20,0,0,skill->get_time2(skill_id, skill_lv));
+ sc_start4(src,SC_SUB_WEAPONPROPERTY,100,3,20,0,0,skill->get_time2(skill_id, skill_lv));
if( sd )
skill->blockpc_start(sd, skill_id, skill->get_time(skill_id, skill_lv), false);
else if( bl->type == BL_MER )
@@ -5634,6 +5637,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
skill->blockpc_start (sd, skill_id, skill->get_time2(skill_id,skill_lv), false);
break;
+ case ALL_ANGEL_PROTECT:
+ if( dstsd )
+ clif->skill_nodamage(src,bl,skill_id,skill_lv,
+ sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));
+ else if( sd )
+ clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+ break;
case AS_ENCHANTPOISON: // Prevent spamming [Valaris]
if (sd && dstsd && dstsd->sc.count) {
if (dstsd->sc.data[SC_PROPERTYFIRE] ||
@@ -7703,6 +7713,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case NPC_TALK:
case ALL_WEWISH:
+ case ALL_CATCRY:
+ case ALL_DREAM_SUMMERNIGHT:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
break;
case ALL_BUYING_STORE:
@@ -10025,6 +10037,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
if (!sg) break;
if (sce)
status_change_end(src, type, INVALID_TIMER); //Was under someone else's Gospel. [Skotlex]
+ status_change_clear_buffs(src,3);
sc_start4(src,type,100,skill_lv,0,sg->group_id,BCT_SELF,skill->get_time(skill_id,skill_lv));
clif->skill_poseffect(src, skill_id, skill_lv, 0, 0, tick); // PA_GOSPEL music packet
}
@@ -11374,14 +11387,17 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if( bl->id == ss->id )// it won't trigger on caster
break;
case UNT_LANDMINE:
- case UNT_CLAYMORETRAP:
case UNT_BLASTMINE:
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
case UNT_FREEZINGTRAP:
case UNT_FIREPILLAR_ACTIVE:
- iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
+ case UNT_CLAYMORETRAP:
+ if( sg->unit_id == UNT_FIRINGTRAP || sg->unit_id == UNT_ICEBOUNDTRAP || sg->unit_id == UNT_CLAYMORETRAP )
+ iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &src->bl,tick);
+ else
+ iMap->foreachinrange(skill->trap_splash,&src->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick);
if (sg->unit_id != UNT_FIREPILLAR_ACTIVE)
clif->changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS);
sg->limit=DIFF_TICK(tick,sg->tick)+1500 +
@@ -14640,16 +14656,23 @@ int skill_detonator(struct block_list *bl, va_list ap)
case UNT_CLUSTERBOMB:
case UNT_FIRINGTRAP:
case UNT_ICEBOUNDTRAP:
- if( unit_id == UNT_TALKIEBOX ) {
- clif->talkiebox(bl,unit->group->valstr);
- unit->group->val2 = -1;
- } else
- iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag,bl,unit->group->tick);
-
- clif->changetraplook(bl,unit_id == UNT_FIRINGTRAP ? UNT_DUMMYSKILL : UNT_USED_TRAPS);
- unit->group->unit_id = UNT_USED_TRAPS;
+ switch(unit_id){
+ case UNT_TALKIEBOX:
+ clif->talkiebox(bl,unit->group->valstr);
+ unit->group->val2 = -1;
+ break;
+ case UNT_CLAYMORETRAP:
+ case UNT_FIRINGTRAP:
+ case UNT_ICEBOUNDTRAP:
+ iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag|BL_SKILL|~BCT_SELF,bl,unit->group->tick);
+ break;
+ default:
+ iMap->foreachinrange(skill->trap_splash,bl,skill->get_splash(unit->group->skill_id,unit->group->skill_lv),unit->group->bl_flag,bl,unit->group->tick);
+ }
+ clif->changetraplook(bl, UNT_USED_TRAPS);
unit->group->limit = DIFF_TICK(iTimer->gettick(),unit->group->tick) +
- (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : 1500) );
+ (unit_id == UNT_TALKIEBOX ? 5000 : (unit_id == UNT_CLUSTERBOMB || unit_id == UNT_ICEBOUNDTRAP? 2500 : (unit_id == UNT_FIRINGTRAP ? 0 : 1500)) );
+ unit->group->unit_id = UNT_USED_TRAPS;
break;
}
return 0;
@@ -14831,12 +14854,6 @@ int skill_trap_splash (struct block_list *bl, va_list ap) {
case UNT_ELECTRICSHOCKER:
clif->skill_damage(src,bl,tick,0,0,-30000,1,sg->skill_id,sg->skill_lv,5);
break;
- case UNT_FIRINGTRAP:
- case UNT_ICEBOUNDTRAP:
- case UNT_CLUSTERBOMB:
- if( ss != bl )
- skill->attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1|SD_LEVEL);
- break;
case UNT_MAGENTATRAP:
case UNT_COBALTTRAP:
case UNT_MAIZETRAP:
@@ -14848,6 +14865,38 @@ int skill_trap_splash (struct block_list *bl, va_list ap) {
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_FIRINGTRAP:
+ case UNT_ICEBOUNDTRAP:
+ if( src->id == bl->id ) break;
+ if( bl->type == BL_SKILL ){
+ struct skill_unit *su = (struct skill_unit *)bl;
+ if( su->group->unit_id == UNT_USED_TRAPS )
+ break;
+ }
+ case UNT_CLUSTERBOMB:
+ if( ss != bl )
+ skill->attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1|SD_LEVEL);
+ break;
+ case UNT_CLAYMORETRAP:
+ if( src->id == bl->id ) break;
+ if( bl->type == BL_SKILL ){
+ struct skill_unit *su = (struct skill_unit *)bl;
+ switch( su->group->unit_id ){
+ case UNT_CLAYMORETRAP:
+ case UNT_LANDMINE:
+ case UNT_BLASTMINE:
+ case UNT_SHOCKWAVE:
+ case UNT_SANDMAN:
+ case UNT_FLASHER:
+ case UNT_FREEZINGTRAP:
+ case UNT_FIRINGTRAP:
+ case UNT_ICEBOUNDTRAP:
+ clif->changetraplook(bl, UNT_USED_TRAPS);
+ su->group->limit = DIFF_TICK(iTimer->gettick(),su->group->tick) + 1500;
+ su->group->unit_id = UNT_USED_TRAPS;
+ }
+ break;
+ }
default:
skill->attack(skill->get_type(sg->skill_id),ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
@@ -16789,16 +16838,18 @@ int skill_destroy_trap( struct block_list *bl, va_list ap ) {
if (su->alive && (sg = su->group) && skill->get_inf2(sg->skill_id)&INF2_TRAP) {
switch( sg->unit_id ) {
- case UNT_LANDMINE:
case UNT_CLAYMORETRAP:
+ case UNT_FIRINGTRAP:
+ case UNT_ICEBOUNDTRAP:
+ iMap->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag|BL_SKILL|~BCT_SELF, &su->bl,tick);
+ break;
+ case UNT_LANDMINE:
case UNT_BLASTMINE:
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
case UNT_FREEZINGTRAP:
case UNT_CLUSTERBOMB:
- case UNT_FIRINGTRAP:
- case UNT_ICEBOUNDTRAP:
iMap->foreachinrange(skill->trap_splash,&su->bl, skill->get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &su->bl,tick);
break;
}