Issue information

Issue ID
#153
Status
Fixed
Severity
Medium
Started
Hercules Elf Bot
Sep 29, 2007 21:35
Last Post
Hercules Elf Bot
Sep 29, 2007 21:35
Confirmation
N/A

Hercules Elf Bot - Sep 29, 2007 21:35

Originally posted by [b]Brainstorm[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=153

As originally posted here:
http://www.eathena.ws/board/index.php?showtopic=157322

Here are the fixes for both skills:
Change
CODE
case AM_SPHEREMINE:
    case AM_CANNIBALIZE:
        {
            int summons[5] = { 1589, 1579, 1575, 1555, 1590 };
            //int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
            int class_ = skillid==AM_SPHEREMINE?1142:summons[skilllv-1];
            struct mob_data *md;

            // Correct info, don't change any of this! [celest]
            md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src),class_,"");
            if (md) {
                md->master_id = src->id;
                md->special_state.ai = skillid==AM_SPHEREMINE?2:3;
                md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, md->bl.id, 0);
                mob_spawn (md); //Now it is ready for spawning.
            }
        }
        break;

To
CODE
    case AM_SPHEREMINE:
    case AM_CANNIBALIZE:
        {
            //Fixed skills variables [Brainstorm]
            int class_;
            int duration;
            int mob_hp;
            int summon_ai;
            struct mob_data *md;

            if( skillid == AM_SPHEREMINE ) {
                //summons 1142, lasts value on db (60 secs) and has skill*400+2000 hp [Brainstorm]
                class_ = 1142;
                summon_ai = 2;
                duration = skill_get_time(skillid,skilllv);
                mob_hp = (pc_checkskill(sd,AM_SPHEREMINE)*400)+2000;
            } else {
                //summons summon[5] var, lasts 60 seconds/level (passive) and has skill*200+2230 hp [Brainstorm]
                int summons[5] = { 1589, 1579, 1575, 1555, 1590 };
                class_ = summons[skilllv-1];
                summon_ai = 3;
                duration = 60000*skilllv;
                mob_hp = (pc_checkskill(sd,AM_CANNIBALIZE)*200)+2230;
            }
            // Correct info, don't change any of this! [celest]
            md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src),class_,"");
            if (md) {
                md->master_id = src->id;
                md->status.hp = mob_hp; //Reads a different hp value than the one in mob_db [Brainstorm]
                md->status.max_hp = md->status.hp; //Update the max hp
                md->special_state.ai = summon_ai;
                md->deletetimer = add_timer(gettick() + duration, mob_timer_delete, md->bl.id, 0);
                mob_spawn(md); //Now it is ready for spawning.
            }
        }
        break;

This will fix the duration and hp issue.
But there is a small issue, the geographers (1590) will keep healing themselves non-stop on the battleflag monster_ai|0x10 (cast friendly skills on themselves) since they have currently less HP (2000-4000) than the value on mob_db (8000). Since this is a custom setting, there isnt much to worry about. But is something worth a check by a core dev.

Test Screenshots:
(IMG:http://i163.photobucket.com/albums/t297/Brain1203/screenAnimixRO025.jpg)
Testing the durations. The hydras did last 2 minutes, while the geo and parasite (casted at lv5) lasted 5 minutes.
(IMG:http://i163.photobucket.com/albums/t297/Brain1203/screenAnimixRO026.jpg)
First marinesphere, casted at lv2 (2800 hp).
(IMG:http://i163.photobucket.com/albums/t297/Brain1203/screenAnimixRO027.jpg)
Second marinesphere, casted at lv5 (4000 hp).

This post has been edited by Brainstorm: Sep 29 2007, 10:03 PM