summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-15 20:13:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-15 20:13:07 +0000
commit7f4e1417b9cae61f65b74c98c1ef4613544ad1a3 (patch)
tree1ce38a72bc26c68124b27cd3f77192f0ce1bdc65 /src/map/battle.c
parent268fdec11b1eea604dc5dec385645b9769ecc634 (diff)
downloadhercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.gz
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.bz2
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.tar.xz
hercules-7f4e1417b9cae61f65b74c98c1ef4613544ad1a3.zip
- Fixed battle_getenemy picking dead characters.
- Adjusted Spiral Pierce, Shield Boomerang and Shield Chain to use atk2 instead of weight when used by non-players. - Adjusted skills blindAttack, SilenceAttack, StunAttack, PetrifyAttack, CurseAttack, SleepAttack, Lex Divina and Dispell to be area effect skills, if the used skill level has a splash-range different from 0. - Mob used Meteor Assault (and by extension Spread Attack) is able to hit icewalls now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10264 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index e29e9d86a..f1679024e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -118,7 +118,8 @@ static int battle_getenemy_sub(struct block_list *bl, va_list ap)
return 0;
if (*c >= 24)
return 0;
-
+ if (status_isdead(bl))
+ return 0;
if (battle_check_target(target, bl, BCT_ENEMY) > 0) {
bl_list[(*c)++] = bl;
return 1;
@@ -1207,36 +1208,37 @@ static struct Damage battle_calc_weapon_attack(
sd->inventory_data[index] &&
sd->inventory_data[index]->type == IT_WEAPON)
wd.damage = sd->inventory_data[index]->weight*8/100; //80% of weight
-
- ATK_ADDRATE(50*skill_lv); //Skill modifier applies to weight only.
- index = sstatus->str/10;
- index = index*index;
- ATK_ADD(index); //Add str bonus.
-
- switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection?
- case 0: //Small: 125%
- ATK_RATE(125);
- break;
- //case 1: //Medium: 100%
- case 2: //Large: 75%
- ATK_RATE(75);
- break;
- }
- break;
+ } else
+ wd.damage = sstatus->rhw.atk2*8/10; //Else use Atk2
+
+ ATK_ADDRATE(50*skill_lv); //Skill modifier applies to weight only.
+ i = sstatus->str/10;
+ i*=i;
+ ATK_ADD(i); //Add str bonus.
+ switch (tstatus->size) { //Size-fix. Is this modified by weapon perfection?
+ case 0: //Small: 125%
+ ATK_RATE(125);
+ break;
+ //case 1: //Medium: 100%
+ case 2: //Large: 75%
+ ATK_RATE(75);
+ break;
}
+ break;
case CR_SHIELDBOOMERANG:
case PA_SHIELDCHAIN:
+ wd.damage = sstatus->batk;
if (sd) {
short index = sd->equip_index[EQI_HAND_L];
- wd.damage = sstatus->batk;
-
if (index >= 0 &&
sd->inventory_data[index] &&
sd->inventory_data[index]->type == IT_ARMOR)
ATK_ADD(sd->inventory_data[index]->weight/10);
break;
- }
+ } else
+ ATK_ADD(sstatus->rhw.atk2); //Else use Atk2
+ break;
case HFLI_SBR44: //[orn]
if(src->type == BL_HOM) {
wd.damage = ((TBL_HOM*)src)->homunculus.intimacy ;
@@ -3106,9 +3108,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
}
} else if (su->group->skill_id==WZ_ICEWALL)
- { //Icewall can be hit by anything except skills.
- if (src->type == BL_SKILL)
- return 0;
+ {
state |= BCT_ENEMY;
strip_enemy = 0;
} else //Excepting traps and icewall, you should not be able to target skills.