summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 00:40:34 +0100
committerHaru <haru@dotalux.com>2015-12-28 18:35:59 +0100
commit758fe288628bf13d3c45ac35d9c51199d35af652 (patch)
tree8bc8265b9bdea746b2a12a01424f24cf3d4dcd6b /src
parentb871e0e9e360ede025dc25e500a9a4e85cc2d377 (diff)
downloadhercules-758fe288628bf13d3c45ac35d9c51199d35af652.tar.gz
hercules-758fe288628bf13d3c45ac35d9c51199d35af652.tar.bz2
hercules-758fe288628bf13d3c45ac35d9c51199d35af652.tar.xz
hercules-758fe288628bf13d3c45ac35d9c51199d35af652.zip
Added Alchemist-related monsters to the enum mob_id
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.h17
-rw-r--r--src/map/skill.c39
2 files changed, 48 insertions, 8 deletions
diff --git a/src/map/mob.h b/src/map/mob.h
index 3510030f7..8232b726a 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -272,6 +272,17 @@ enum {
* Mob IDs
*/
enum mob_id {
+ MOBID_RED_PLANT = 1078, ///< RED_PLANT / Red Plant
+ MOBID_BLUE_PLANT = 1079, ///< BLUE_PLANT / Blue Plant
+ MOBID_GREEN_PLANT = 1080, ///< GREEN_PLANT / Green Plant
+ MOBID_YELLOW_PLANT = 1081, ///< YELLOW_PLANT / Yellow Plant
+ MOBID_WHITE_PLANT = 1082, ///< WHITE_PLANT / White Plant
+ MOBID_SHINING_PLANT = 1083, ///< SHINING_PLANT / Shining Plant
+ MOBID_BLACK_MUSHROOM = 1084, ///< BLACK_MUSHROOM / Black Mushroom
+ MOBID_RED_MUSHROOM = 1085, ///< RED_MUSHROOM / Red Mushroom
+
+ MOBID_MARINE_SPHERE = 1142, ///< MARINE_SPHERE / Marine Sphere
+
MOBID_EMPELIUM = 1288, ///< EMPELIUM / Emperium
MOBID_TREASURE_BOX1 = 1324, ///< TREASURE_BOX1 / Treasure Chest
@@ -315,6 +326,12 @@ enum mob_id {
MOBID_TREASURE_BOX39 = 1362, ///< TREASURE_BOX39 / Treasure Chest
MOBID_TREASURE_BOX40 = 1363, ///< TREASURE_BOX40 / Treasure Chest
+ MOBID_G_PARASITE = 1555, ///< G_PARASITE / Parasite
+ MOBID_G_FLORA = 1575, ///< G_FLORA / Flora
+ MOBID_G_HYDRA = 1579, ///< G_HYDRA / Hydra
+ MOBID_G_MANDRAGORA = 1589, ///< G_MANDRAGORA / Mandragora
+ MOBID_G_GEOGRAPHER = 1590, ///< G_GEOGRAPHER / Geographer
+
MOBID_BARRICADE = 1905, ///< BARRICADE / Barricade
MOBID_BARRICADE_ = 1906, ///< BARRICADE_ / Barricade
MOBID_S_EMPEL_1 = 1907, ///< S_EMPEL_1 / Guardian Stone
diff --git a/src/map/skill.c b/src/map/skill.c
index 2e3d7957d..260bc47db 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -10520,10 +10520,20 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case AM_SPHEREMINE:
case AM_CANNIBALIZE:
{
- int summons[5] = { 1589, 1579, 1575, 1555, 1590 };
- //int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
- int class_ = skill_id==AM_SPHEREMINE?1142:summons[skill_lv-1];
struct mob_data *md;
+ int class_ = 0;
+ if (skill_id == AM_SPHEREMINE) {
+ class_ = MOBID_MARINE_SPHERE;
+ } else {
+ Assert_retb(skill_lv > 0 && skill_lv <= 5);
+ switch (skill_lv) {
+ case 1: class_ = MOBID_G_MANDRAGORA; break;
+ case 2: class_ = MOBID_G_HYDRA; break;
+ case 3: class_ = MOBID_G_FLORA; break;
+ case 4: class_ = MOBID_G_PARASITE; break;
+ case 5: class_ = MOBID_G_GEOGRAPHER; break;
+ }
+ }
// Correct info, don't change any of this! [Celest]
md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_SMALL, AI_NONE);
@@ -10624,7 +10634,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
if (rnd()%100 < 50) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
} else {
- TBL_MOB* md = mob->once_spawn_sub(src, src->m, x, y, "--ja--",(skill_lv < 2 ? 1084+rnd()%2 : 1078+rnd()%6),"", SZ_SMALL, AI_NONE);
+ int mob_id = skill_lv < 2 ? MOBID_BLACK_MUSHROOM + rnd()%2 : MOBID_RED_PLANT + rnd()%6;
+ TBL_MOB* md = mob->once_spawn_sub(src, src->m, x, y, "--ja--", mob_id, "", SZ_SMALL, AI_NONE);
int i;
if (!md) break;
if ((i = skill->get_time(skill_id, skill_lv)) > 0)
@@ -14018,10 +14029,22 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id,
case AM_CANNIBALIZE:
case AM_SPHEREMINE: {
int c=0;
- int summons[5] = { 1589, 1579, 1575, 1555, 1590 };
- //int summons[5] = { 1020, 1068, 1118, 1500, 1368 };
- int maxcount = (skill_id==AM_CANNIBALIZE)? 6-skill_lv : skill->get_maxcount(skill_id,skill_lv);
- int mob_class = (skill_id==AM_CANNIBALIZE)? summons[skill_lv-1] :1142;
+ int maxcount = 0;
+ int mob_class = 0;
+ if (skill_id == AM_CANNIBALIZE) {
+ Assert_retb(skill_lv > 0 && skill_lv <= 5);
+ maxcount = 6-skill_lv;
+ switch (skill_lv) {
+ case 1: mob_class = MOBID_G_MANDRAGORA; break;
+ case 2: mob_class = MOBID_G_HYDRA; break;
+ case 3: mob_class = MOBID_G_FLORA; break;
+ case 4: mob_class = MOBID_G_PARASITE; break;
+ case 5: mob_class = MOBID_G_GEOGRAPHER; break;
+ }
+ } else {
+ maxcount = skill->get_maxcount(skill_id,skill_lv);
+ mob_class = MOBID_MARINE_SPHERE;
+ }
if(battle_config.land_skill_limit && maxcount>0 && (battle_config.land_skill_limit&BL_PC)) {
i = map->foreachinmap(skill->check_condition_mob_master_sub ,sd->bl.m, BL_MOB, sd->bl.id, mob_class, skill_id, &c);
if( c >= maxcount