diff options
-rw-r--r-- | Changelog-Trunk.txt | 6 | ||||
-rw-r--r-- | src/map/battle.c | 44 | ||||
-rw-r--r-- | src/map/skill.c | 40 | ||||
-rw-r--r-- | src/map/status.c | 2 |
4 files changed, 56 insertions, 36 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 3ef2a8165..a37a6d8f1 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,12 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/02/03
+ * Grand Cross/Grand Darkness can no longer get the ignore defense -armor
+ piercing bonuses from cards. [Skotlex]
+ * Loki's weil is now ignored by bosses. [Skotlex]
+ * Land Protector and Gantantein should now ignore traps. [Skotlex]
+ * Fixed Shinobi card so that it fails when you aren't next to a wall.
+ [Skotlex]
* After a guild master change, the new guild master has his guild skills
blocked for 5 minutes to prevent abuse. [Skotlex]
* Fixed txt-converter compilation errors [Komurka]
diff --git a/src/map/battle.c b/src/map/battle.c index 1f22f6c79..8431a6c16 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1877,7 +1877,9 @@ static struct Damage battle_calc_weapon_attack( ATK_RATE(skillratio);
if(sd)
{
- if (skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE && !flag.cri)
+ if (skill_num != PA_SACRIFICE && skill_num != MO_INVESTIGATE
+ && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS
+ && !flag.cri)
{ //Elemental/Racial adjustments
char raceele_flag=0, raceele_flag_=0;
if(sd->right_weapon.def_ratio_atk_ele & (1<<t_ele) ||
@@ -1900,25 +1902,27 @@ static struct Damage battle_calc_weapon_attack( ATK_RATE2(raceele_flag?(def1 + def2):100, raceele_flag_?(def1 + def2):100);
}
- //Ignore Defense?
- if (!flag.idef && (
- (tmd && sd->right_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
- sd->right_weapon.ignore_def_ele & (1<<t_ele) ||
- sd->right_weapon.ignore_def_race & (1<<t_race) ||
- sd->right_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
- ))
- flag.idef = 1;
-
- if (!flag.idef2 && (
- (tmd && sd->left_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
- sd->left_weapon.ignore_def_ele & (1<<t_ele) ||
- sd->left_weapon.ignore_def_race & (1<<t_race) ||
- sd->left_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
- )) {
- if(battle_config.left_cardfix_to_right && flag.rh) //Move effect to right hand. [Skotlex]
- flag.idef = 1;
- else
- flag.idef2 = 1;
+ if (skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS)
+ { //Ignore Defense?
+ if (!flag.idef && (
+ (tmd && sd->right_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
+ sd->right_weapon.ignore_def_ele & (1<<t_ele) ||
+ sd->right_weapon.ignore_def_race & (1<<t_race) ||
+ sd->right_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
+ ))
+ flag.idef = 1;
+
+ if (!flag.idef2 && (
+ (tmd && sd->left_weapon.ignore_def_mob & (is_boss(target)?2:1)) ||
+ sd->left_weapon.ignore_def_ele & (1<<t_ele) ||
+ sd->left_weapon.ignore_def_race & (1<<t_race) ||
+ sd->left_weapon.ignore_def_race & (is_boss(target)?1<<10:1<<11)
+ )) {
+ if(battle_config.left_cardfix_to_right && flag.rh) //Move effect to right hand. [Skotlex]
+ flag.idef = 1;
+ else
+ flag.idef2 = 1;
+ }
}
}
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;
}
/*==========================================
diff --git a/src/map/status.c b/src/map/status.c index 7729ee152..2d749236f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -681,7 +681,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int if (skill_num)
{ //Skills blocked through status changes...
if ((sc->data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
- (sc->data[SC_ROKISWEIL].timer != -1 && skill_num != BD_ADAPTATION) ||
+ (sc->data[SC_ROKISWEIL].timer != -1 && skill_num != BD_ADAPTATION && !(mode&MD_BOSS)) ||
(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
(sc->data[SC_HERMODE].timer != -1 && skill_get_inf(skill_num) & INF_SUPPORT_SKILL) ||
|