Updated Cultivation plant spawn formula (#2910)
* Fixes #2892. * Corrected level 2 Cultivation formula for spawning plants. Thanks to @mrjnumber1!
This commit is contained in:
parent
2ecb30abb2
commit
a40b1da4d0
@ -44,6 +44,11 @@ struct guardian_data;
|
|||||||
enum MOBID {
|
enum MOBID {
|
||||||
MOBID_PORING = 1002,
|
MOBID_PORING = 1002,
|
||||||
MOBID_RED_PLANT = 1078,
|
MOBID_RED_PLANT = 1078,
|
||||||
|
MOBID_BLUE_PLANT,
|
||||||
|
MOBID_GREEN_PLANT,
|
||||||
|
MOBID_YELLOW_PLANT,
|
||||||
|
MOBID_WHITE_PLANT,
|
||||||
|
MOBID_SHINING_PLANT,
|
||||||
MOBID_BLACK_MUSHROOM = 1084,
|
MOBID_BLACK_MUSHROOM = 1084,
|
||||||
MOBID_MARINE_SPHERE = 1142,
|
MOBID_MARINE_SPHERE = 1142,
|
||||||
MOBID_EMPERIUM = 1288,
|
MOBID_EMPERIUM = 1288,
|
||||||
|
@ -11981,9 +11981,31 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
|
|||||||
if (rnd()%100 < 50) {
|
if (rnd()%100 < 50) {
|
||||||
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
|
||||||
} else {
|
} else {
|
||||||
TBL_MOB* md = mob_once_spawn_sub(src, src->m, x, y, "--ja--",(skill_lv < 2 ? MOBID_BLACK_MUSHROOM + rnd()%2 : MOBID_RED_PLANT + rnd()%6),"", SZ_SMALL, AI_NONE);
|
TBL_MOB* md = NULL;
|
||||||
int t;
|
int t, mob_id;
|
||||||
if (!md) break;
|
|
||||||
|
if (skill_lv == 1)
|
||||||
|
mob_id = MOBID_BLACK_MUSHROOM + rnd() % 2;
|
||||||
|
else {
|
||||||
|
int rand_val = rnd() % 100;
|
||||||
|
|
||||||
|
if (rand_val < 30)
|
||||||
|
mob_id = MOBID_GREEN_PLANT;
|
||||||
|
else if (rand_val < 55)
|
||||||
|
mob_id = MOBID_RED_PLANT;
|
||||||
|
else if (rand_val < 80)
|
||||||
|
mob_id = MOBID_YELLOW_PLANT;
|
||||||
|
else if (rand_val < 90)
|
||||||
|
mob_id = MOBID_WHITE_PLANT;
|
||||||
|
else if (rand_val < 98)
|
||||||
|
mob_id = MOBID_BLUE_PLANT;
|
||||||
|
else
|
||||||
|
mob_id = MOBID_SHINING_PLANT;
|
||||||
|
}
|
||||||
|
|
||||||
|
md = mob_once_spawn_sub(src, src->m, x, y, "--ja--", mob_id, "", SZ_SMALL, AI_NONE);
|
||||||
|
if (!md)
|
||||||
|
break;
|
||||||
if ((t = skill_get_time(skill_id, skill_lv)) > 0)
|
if ((t = skill_get_time(skill_id, skill_lv)) > 0)
|
||||||
{
|
{
|
||||||
if( md->deletetimer != INVALID_TIMER )
|
if( md->deletetimer != INVALID_TIMER )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user