diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-03 17:17:45 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-03 17:17:45 +0000 |
commit | 3c79da4ecd74527c85d7efed818ac02692263975 (patch) | |
tree | dc3497e3ec9159d0adf42a0acaf67f3c1742dd71 /src/map/skill.c | |
parent | 221bb965d8cd319d244832871de27adc60f3bc2f (diff) | |
download | hercules-3c79da4ecd74527c85d7efed818ac02692263975.tar.gz hercules-3c79da4ecd74527c85d7efed818ac02692263975.tar.bz2 hercules-3c79da4ecd74527c85d7efed818ac02692263975.tar.xz hercules-3c79da4ecd74527c85d7efed818ac02692263975.zip |
- Grand Cross/Grand Darkness can no longer get the ignore defense -armor piercing bonuses.
- Loki's weil is now ignored by bosses.
- Land Protector and Gantantein should now ignore traps.
- Fixed Shinobi card so that it fails when you aren't next to a wall.
- Cleaned up the function skill_landprotector.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5174 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 22a0ac5dc..2abf2fb76 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4272,7 +4272,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in else
/* •t‰Á‚·‚é */
{ //Avoid cloaking with no wall and low skill level. [Skotlex]
- if (sd && skilllv < 3 && skill_check_cloaking(bl))
+ //Due to the cloaking card, we have to check the wall versus to known skill level rather than the used one. [Skotlex]
+// if (sd && skilllv < 3 && skill_check_cloaking(bl))
+ if (sd && pc_checkskill(sd, AS_CLOAKING)< 3 && skill_check_cloaking(bl))
clif_skill_fail(sd,skillid,0,0);
else
status_change_start(bl,sci,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
@@ -9839,31 +9841,36 @@ int skill_landprotector(struct block_list *bl, va_list ap ) struct skill_unit *unit;
struct block_list *src;
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
-
skillid = va_arg(ap,int);
alive = va_arg(ap,int *);
src = va_arg(ap,struct block_list *);
-
- if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
+ unit = (struct skill_unit *)bl;
+ if (unit == NULL || unit->group == NULL)
return 0;
- if (alive && skillid == SA_LANDPROTECTOR && unit->group->skill_id == SA_LANDPROTECTOR
+ 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 0;
+ return 1;
}
- if (skillid == SA_LANDPROTECTOR ||
- skillid == HW_GANBANTEIN)
+
+ if (skill_get_inf2(unit->group->skill_id)&INF2_TRAP)
+ return 0; //Traps cannot be removed by Land Protector/Ganbantein
+
+ if (skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN ) {
skill_delunit(unit);
- else if (alive && unit->group->skill_id == SA_LANDPROTECTOR)
+ } else
+ if (unit->group->skill_id == SA_LANDPROTECTOR) {
(*alive) = 0;
- else if (alive && skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA)
- (*alive) = 0; //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
- return 0;
+ } else
+ 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;
+ } else
+ return 0;
+ return 1;
}
/*==========================================
@@ -9879,11 +9886,14 @@ int skill_ganbatein(struct block_list *bl, va_list ap ) if ((unit = (struct skill_unit *)bl) == NULL || unit->group == NULL)
return 0;
+ if (skill_get_inf2(unit->group->skill_id)&INF2_TRAP)
+ return 0; //Do not remove traps.
+
if (unit->group->skill_id == SA_LANDPROTECTOR)
skill_delunit(unit);
else skill_delunitgroup(unit->group);
- return 0;
+ return 1;
}
/*==========================================
|