diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-01 18:37:16 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-01 18:37:16 +0000 |
commit | a0eb9095c25591758ece37f741d9936ae7c1df5d (patch) | |
tree | 4214c55b318e5a174e929ec99d66dcb72f40431f /src/map/skill.c | |
parent | c8d4b89b3de0e8db730fbd375c5b4abd38ac6dff (diff) | |
download | hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.gz hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.bz2 hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.tar.xz hercules-a0eb9095c25591758ece37f741d9936ae7c1df5d.zip |
- Made Deluge/volcano/v. gale be castable on top of each other again
- Modified unit_walktoxy and NPC_RUN to enable running even when the caster does not has the MD_CANMOVE bit on.
- PF_MINDBREAKER will now silently fail if you try to use it on someone who already has the status active.
- Cleaned up yet again skill_landprotector, now new cells of Deluge/Volcano/V.Gale will delete previous cells when they are recasted on top of each other.
- Summoned Marine Spheres no longer get the MD_CANMOVE bit.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8039 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 81 |
1 files changed, 47 insertions, 34 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index c7ea8ef5d..a78e7820a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2180,20 +2180,6 @@ static int skill_check_unit_range_sub (struct block_list *bl, va_list ap) if(g_skillid != MG_SAFETYWALL && g_skillid != AL_PNEUMA) return 0; break; - //Cannot stack among themselves. - case SA_VOLCANO: - case SA_DELUGE: - case SA_VIOLENTGALE: - switch (g_skillid) - { - case SA_VOLCANO: - case SA_DELUGE: - case SA_VIOLENTGALE: - break; - default: - return 0; - } - break; case AL_WARP: case HT_SKIDTRAP: case HT_LANDMINE: @@ -4916,8 +4902,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}}; int dir = (bl == src)?unit_getdir(src):map_calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. unit_stop_attack(src); - //Run skillv tiles. - unit_walktoxy(src, bl->x + skilllv * mask[dir][0], bl->y + skilllv * mask[dir][1], 0); + //Run skillv tiles overriding the can-move check. + unit_walktoxy(src, bl->x + skilllv * mask[dir][0], bl->y + skilllv * mask[dir][1], 2); } break; @@ -5114,6 +5100,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in return 1; } + if (tsc && tsc->data[type].timer != -1) + { //HelloKitty2 (?) explained that this silently fails when target is + //already inflicted. [Skotlex] + map_freeblock_unlock(); + return 1; + } + //Has a 55% + skilllv*5% success chance. if (!clif_skill_nodamage(src,bl,skillid,skilllv, sc_start(bl,type,55+5*skilllv,skilllv,skill_get_time(skillid,skilllv)))) @@ -9282,19 +9275,43 @@ int skill_landprotector (struct block_list *bl, va_list ap) if (unit == NULL || unit->group == NULL) return 0; - if (skillid == SA_LANDPROTECTOR && unit->group->skill_id == SA_LANDPROTECTOR - && battle_check_target(bl, src, BCT_ENEMY) > 0) - { //Check for offensive Land Protector to delete both. [Skotlex] - (*alive) = 0; - skill_delunit(unit); - return 1; - } - - if((skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN) && - skill_get_type(unit->group->skill_id) == BF_MAGIC) - { //Delete Magical effects - skill_delunit(unit); - return 1; + switch (skillid) + { + case SA_LANDPROTECTOR: + if (unit->group->skill_id == SA_LANDPROTECTOR && + battle_check_target(bl, src, BCT_ENEMY) > 0) + { //Check for offensive Land Protector to delete both. [Skotlex] + (*alive) = 0; + skill_delunit(unit); + return 1; + } + //Delete the rest of types. + case HW_GANBANTEIN: + if(skill_get_type(unit->group->skill_id) == BF_MAGIC) + { //Delete Magical effects + skill_delunit(unit); + return 1; + } + break; + case SA_VOLCANO: + case SA_DELUGE: + case SA_VIOLENTGALE: + switch (unit->group->skill_id) + { //These override each other. + case SA_VOLCANO: + case SA_DELUGE: + case SA_VIOLENTGALE: + skill_delunit(unit); + return 1; + } + break; + case HP_BASILICA: + if (unit->group->skill_id == HP_BASILICA) + { //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] + (*alive) = 0; + return 1; + } + break; } if (unit->group->skill_id == SA_LANDPROTECTOR && skill_get_type(skillid) == BF_MAGIC) @@ -9302,11 +9319,7 @@ int skill_landprotector (struct block_list *bl, va_list ap) (*alive) = 0; return 1; } - if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA) - { //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] - (*alive) = 0; - return 1; - } + return 0; } |