summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-11 19:19:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-11 19:19:06 +0000
commit06c4c2f94c63ccfc5b2e1a297325f5a3c304f2a0 (patch)
tree935a53c77dcfe9e4cc4a451449c0c57d4e6f193c /src/map/mob.c
parent73ca183f23958dbf803233bff65c2a3ef4e2bf07 (diff)
downloadhercules-06c4c2f94c63ccfc5b2e1a297325f5a3c304f2a0.tar.gz
hercules-06c4c2f94c63ccfc5b2e1a297325f5a3c304f2a0.tar.bz2
hercules-06c4c2f94c63ccfc5b2e1a297325f5a3c304f2a0.tar.xz
hercules-06c4c2f94c63ccfc5b2e1a297325f5a3c304f2a0.zip
- When a mob fails to use the selected skill, it will now move on to the next one in the list, rather than return from the function with fail status.
- Mobs won't try to run away when rude-attacked if they have a locked-on target already. - Moved the teleport on LP fail check from castend_nodamageid to status_check_skilluse, this way unit_useskill will return failed when trying to use it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10221 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 11d44955f..f4e30e51f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1160,7 +1160,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
) { //Rude attacked
if (md->state.attacked_count++ >= RUDE_ATTACKED_COUNT &&
!mobskill_use(md, tick, MSC_RUDEATTACKED) && can_move &&
- unit_escape(bl, abl, rand()%10 +1))
+ !tbl && unit_escape(bl, abl, rand()%10 +1))
{ //Escaped.
//TODO: Maybe it shouldn't attempt to run if it has another, valid target?
md->attacked_id = 0;
@@ -2855,7 +2855,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
if (!flag)
{ //Skill failed.
md->skillidx = -1;
- return 0;
+ continue;
}
if(battle_config.mob_ai&0x200)
{ //pass on delay to same skill.