From b6741a82e54a01f417b52267ddadb205f08ac3f5 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sun, 12 Mar 2006 23:00:44 +0000 Subject: - 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 --- src/map/mob.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'src/map') 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; -- cgit v1.2.3-60-g2f50