diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-25 13:54:57 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-25 13:54:57 +0000 |
commit | 72f0ef105972ddbf6c98973526b287bd0ebb4eb7 (patch) | |
tree | 798b2c46a65a676d1dbb9156609a3d56b1ff8b1a | |
parent | 5d6dd428a2994e9b482dc5946ed420ae0f3ad636 (diff) | |
download | hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.gz hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.bz2 hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.tar.xz hercules-72f0ef105972ddbf6c98973526b287bd0ebb4eb7.zip |
Fixed Wall of Thorn skill, all of its conditions should now be met.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15971 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/skill.c | 22 | ||||
-rw-r--r-- | src/map/status.c | 53 |
2 files changed, 51 insertions, 24 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 3eea211ca..810b5a0f9 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10583,6 +10583,15 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un skill_blown(ss,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv),unit_getdir(bl),0); break; + case UNT_WALLOFTHORN: + if( status_get_mode(bl)&MD_BOSS ) + break; // iRO Wiki says that this skill don't affect to Boss monsters. + if( battle_check_target(ss,bl,BCT_ENEMY) <= 0 ) + skill_blown(&src->bl,bl,skill_get_blewcount(sg->skill_id,sg->skill_lv),unit_getdir(bl),0); + else + skill_attack(skill_get_type(sg->skill_id), ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0); + break; + case UNT_GD_LEADERSHIP: case UNT_GD_GLORYWOUNDS: case UNT_GD_SOULCOLD: @@ -11416,6 +11425,7 @@ int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int dam case UNT_ANKLESNARE: case UNT_ICEWALL: case UNT_REVERBERATION: + case UNT_WALLOFTHORN: src->val1-=damage; break; case UNT_BLASTMINE: @@ -14552,6 +14562,12 @@ static int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) if( unit->val1 <= 0 ) unit->limit = DIFF_TICK(tick + 700,group->tick); break; + case UNT_WALLOFTHORN: + if( unit->val1 <= 0 ) { + group->unit_id = UNT_USED_TRAPS; + group->limit = DIFF_TICK(tick, group->tick) + 1500; + } + break; } } @@ -14762,9 +14778,9 @@ int skill_unit_move_unit_group (struct skill_unit_group *group, int m, int dx, i if (skill_get_unit_flag(group->skill_id)&UF_ENSEMBLE) return 0; //Ensembles may not be moved around. - if( group->unit_id == UNT_ICEWALL ) - return 0; //Icewalls don't get knocked back - + if( group->unit_id == UNT_ICEWALL || group->unit_id == UNT_WALLOFTHORN ) + return 0; //Icewalls and Wall of Thorns don't get knocked back + m_flag = (int *) aCalloc(group->unit_count, sizeof(int)); // m_flag // 0: Neither of the following (skill_unit_onplace & skill_unit_onout are needed) diff --git a/src/map/status.c b/src/map/status.c index ebb305fc0..e5448592f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1425,20 +1425,30 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int return 0; } - if (skill_num == PA_PRESSURE && flag && target) { - //Gloria Avoids pretty much everything.... - tsc = status_get_sc(target); - if(tsc && tsc->option&OPTION_HIDE) - return 0; - return 1; + switch( skill_num ) { + case PA_PRESSURE: + if( flag && target ) { + //Gloria Avoids pretty much everything.... + tsc = status_get_sc(target); + if(tsc && tsc->option&OPTION_HIDE) + return 0; + } + break; + case GN_WALLOFTHORN: + if( target && status_isdead(target) ) + return 0; + break; + case AL_TELEPORT: + //Should fail when used on top of Land Protector [Skotlex] + if (src && map_getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR) + && !(status->mode&MD_BOSS) + && (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_num)) + return 0; + break; + default: + break; } - //Should fail when used on top of Land Protector [Skotlex] - if (src && skill_num == AL_TELEPORT && map_getcell(src->m, src->x, src->y, CELL_CHKLANDPROTECTOR) - && !(status->mode&MD_BOSS) - && (src->type != BL_PC || ((TBL_PC*)src)->skillitem != skill_num)) - return 0; - if ( src ) sc = status_get_sc(src); if( sc && sc->count ) { @@ -1486,15 +1496,16 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int skill_get_inf2(skill_num)&(INF2_SONG_DANCE|INF2_ENSEMBLE_SKILL) ) return 0; - } else - switch (skill_num) { - case BD_ADAPTATION: - case CG_LONGINGFREEDOM: - case BA_MUSICALSTRIKE: - case DC_THROWARROW: - break; - default: - return 0; + } else { + switch (skill_num) { + case BD_ADAPTATION: + case CG_LONGINGFREEDOM: + case BA_MUSICALSTRIKE: + case DC_THROWARROW: + break; + default: + return 0; + } } if ((sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE && skill_num == BD_ADAPTATION) return 0; //Can't amp out of Wand of Hermode :/ [Skotlex] |