summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-04 19:00:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-04 19:00:02 +0000
commit925974d3452293164ea62ca474182a87d5e3517d (patch)
treecd6ed15288e43afb305b76a2f180cf0df9825d1d /src/map
parentd181277287d7ee065ce8d07322477f449846249d (diff)
downloadhercules-925974d3452293164ea62ca474182a87d5e3517d.tar.gz
hercules-925974d3452293164ea62ca474182a87d5e3517d.tar.bz2
hercules-925974d3452293164ea62ca474182a87d5e3517d.tar.xz
hercules-925974d3452293164ea62ca474182a87d5e3517d.zip
- Implemented cooking chances. Chance of success is 70% - 7*(dish-lv)% + 12*(cooking set-lv)%. Exception: When using the legendary cooking set, success chance is 100% regardless of dish.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7518 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d9f6fbc62..775e8ca14 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9881,8 +9881,8 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
if(trigger>20) { // Non-weapon, non-food item (itemlv must match)
if(skill_produce_db[i].itemlv!=trigger)
return 0;
- } else if(trigger>10) { // Food (itemlv must be higher or equal)
- if(skill_produce_db[i].itemlv<=10 || skill_produce_db[i].itemlv>trigger)
+ } else if(trigger>10) { // Food (any item level between 10 and 20 will do)
+ if(skill_produce_db[i].itemlv<=10)
return 0;
} else { // Weapon (itemlv must be higher or equal)
if(skill_produce_db[i].itemlv>trigger)
@@ -10077,6 +10077,16 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
}
break;
default:
+ if (sd->menuskill_id == AM_PHARMACY &&
+ sd->menuskill_lv > 10 && sd->menuskill_lv <= 20)
+ { //Assume Cooking Dish
+ if (sd->menuskill_lv >= 15) //Legendary Cooking Set.
+ make_per = 10000; //100% Success
+ else
+ make_per = 12*(sd->menuskill_lv-10) //12% chance per set level.
+ + 700 - 70*(skill_produce_db[idx].itemlv-10); //70% - 7% per dish level
+ break;
+ }
make_per = 5000;
break;
}
@@ -10199,7 +10209,8 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
clif_misceffect(&sd->bl,3);
break;
default: //Those that don't require a skill?
- if (skill_produce_db[idx].itemlv==11) //Cooking items.
+ if (skill_produce_db[idx].itemlv>10 &&
+ skill_produce_db[idx].itemlv<= 20) //Cooking items.
clif_specialeffect(&sd->bl, 608, AREA);
break;
}
@@ -10239,7 +10250,8 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
clif_misceffect(&sd->bl,2);
break;
default:
- if (skill_produce_db[idx].itemlv==11)
+ if (skill_produce_db[idx].itemlv>10 &&
+ skill_produce_db[idx].itemlv<= 20) //Cooking items.
clif_specialeffect(&sd->bl, 609, AREA);
}
}