summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-03 17:17:45 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-03 17:17:45 +0000
commit3c79da4ecd74527c85d7efed818ac02692263975 (patch)
treedc3497e3ec9159d0adf42a0acaf67f3c1742dd71 /src/map/battle.c
parent221bb965d8cd319d244832871de27adc60f3bc2f (diff)
downloadhercules-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/battle.c')
-rw-r--r--src/map/battle.c44
1 files changed, 24 insertions, 20 deletions
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;
+ }
}
}