summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-12 23:00:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-12 23:00:44 +0000
commitb6741a82e54a01f417b52267ddadb205f08ac3f5 (patch)
tree4f8341a6533f8f055fba4347e0c2698e65034d1c /src/map
parent5f3d4a8dd08e6d29dc331c40d3f0fce20f910ca8 (diff)
downloadhercules-b6741a82e54a01f417b52267ddadb205f08ac3f5.tar.gz
hercules-b6741a82e54a01f417b52267ddadb205f08ac3f5.tar.bz2
hercules-b6741a82e54a01f417b52267ddadb205f08ac3f5.tar.xz
hercules-b6741a82e54a01f417b52267ddadb205f08ac3f5.zip
- Updated clone skill copy to consider combo-skills.
- no_spawn_on_player won't work on mobs with no respawn delays now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5581 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 50bd3fe1c..202728102 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1078,6 +1078,7 @@ int mob_spawn (int id)
//Avoid spawning on the view-range of players. [Skotlex]
if (battle_config.no_spawn_on_player &&
+ !(md->spawndelay1 == -1 && md->spawndelay2 == -1) &&
c++ < battle_config.no_spawn_on_player &&
map_foreachinarea(mob_count_sub, md->m,
x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE, BL_PC)
@@ -4124,18 +4125,25 @@ int mob_clone_spawn(struct map_session_data *sd, char *map, int x, int y, const
ms[i].cond2 = 95;
}
} else if (inf&INF_SELF_SKILL) {
- if (!(skill_get_nk(skill_id)&NK_NO_DAMAGE)) { //Offensive skill
+ if (skill_get_inf2(skill_id)&INF2_NO_TARGET_SELF) { //auto-select target skill.
ms[i].target = MST_TARGET;
- ms[i].state = MSS_BERSERK;
- } else //Self skill
+ ms[i].cond1 = MSC_ALWAYS;
+ if (skill_get_range(skill_id, ms[i].skill_lv) > 3) {
+ ms[i].state = MSS_RUSH;
+ } else {
+ ms[i].state = MSS_BERSERK;
+ ms[i].permillage = 2500;
+ }
+ } else { //Self skill
ms[i].target = MST_SELF;
- ms[i].cond1 = MSC_MYHPLTMAXRATE;
- ms[i].cond2 = 90;
- ms[i].permillage = 2000;
- //Delay: Remove the stock 5 secs and add half of the support time.
- ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
- if (ms[i].delay < 5000)
- ms[i].delay = 5000; //With a minimum of 5 secs.
+ ms[i].cond1 = MSC_MYHPLTMAXRATE;
+ ms[i].cond2 = 90;
+ ms[i].permillage = 2000;
+ //Delay: Remove the stock 5 secs and add half of the support time.
+ ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
+ if (ms[i].delay < 5000)
+ ms[i].delay = 5000; //With a minimum of 5 secs.
+ }
} else if (inf&INF_SUPPORT_SKILL) {
ms[i].target = MST_FRIEND;
ms[i].cond1 = MSC_FRIENDHPLTMAXRATE;