summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-16 14:45:42 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-16 14:45:42 +0000
commit32ea0d89b449710473aab78d83840d22fccfd5b4 (patch)
tree39862506e041505aa576b33aebd71f5e8b077a53
parent2905b80803313112e951e2d1e32f2c2e1252c170 (diff)
downloadhercules-32ea0d89b449710473aab78d83840d22fccfd5b4.tar.gz
hercules-32ea0d89b449710473aab78d83840d22fccfd5b4.tar.bz2
hercules-32ea0d89b449710473aab78d83840d22fccfd5b4.tar.xz
hercules-32ea0d89b449710473aab78d83840d22fccfd5b4.zip
Fixed bugreport:7182 where GN_MIX_COOKING is limited in creating 1 food item.
Fixed bugreport:7172 missing elemental resistance bonus of NC_RESEARCHFE. Recoded RA_FEARBREEZE.(bugreport:7188). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17101 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/battle.c34
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/status.c4
3 files changed, 30 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7b6bf5869..0959ea858 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1857,19 +1857,35 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
wd.div_ = skill_get_num(GS_CHAINACTION,skill_lv);
wd.type = 0x08;
}
- else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){
- short rate[] = { 4, 4, 7, 9, 10 };
- if(sc->data[SC_FEARBREEZE]->val1 > 0 && sc->data[SC_FEARBREEZE]->val1 < 6 && rand()%100 < rate[sc->data[SC_FEARBREEZE]->val1-1]) {
+ else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW
+ && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){
+ int chance = rand()%100;
wd.type = 0x08;
- wd.div_ = 2;
- if(sc->data[SC_FEARBREEZE]->val1 > 2){
- int chance = rand()%100;
- wd.div_ += (chance >= 40) + (chance >= 70) + (chance >= 90);
- wd.div_ = min(wd.div_,sc->data[SC_FEARBREEZE]->val1);
+ switch(sc->data[SC_FEARBREEZE]->val1){
+ case 5:
+ if( chance < 3){// 3 % chance to attack 5 times.
+ wd.div_ = 5;
+ break;
+ }
+ case 4:
+ if( chance < 7){// 6 % chance to attack 4 times.
+ wd.div_ = 4;
+ break;
+ }
+ case 3:
+ if( chance < 10){// 9 % chance to attack 3 times.
+ wd.div_ = 3;
+ break;
+ }
+ case 2:
+ case 1:
+ if( chance < 13){// 12 % chance to attack 2 times.
+ wd.div_ = 2;
+ break;
+ }
}
wd.div_ = min(wd.div_,sd->status.inventory[i].amount);
sc->data[SC_FEARBREEZE]->val4 = wd.div_-1;
- }
}
}
diff --git a/src/map/clif.c b/src/map/clif.c
index a47a98891..31c3cc53c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11057,7 +11057,7 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) {
return;
}
if( skill_can_produce_mix(sd,nameid,sd->menuskill_val, amount) )
- skill_produce_mix(sd,0,nameid,0,0,0,amount);
+ skill_produce_mix(sd,(type>1?sd->menuskill_id:0),nameid,0,0,0,amount);
clif_menuskill_clear(sd);
}
diff --git a/src/map/status.c b/src/map/status.c
index 2c2c2ae83..8a173f611 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2995,6 +2995,10 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
sd->subele[ELE_NEUTRAL] += skill;
sd->subele[ELE_FIRE] += skill*4;
}
+ if((skill=pc_checkskill(sd,NC_RESEARCHFE))>0) {
+ sd->subele[ELE_EARTH] += skill*10;
+ sd->subele[ELE_FIRE] += skill*10;
+ }
if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){
skill = skill*4;
sd->right_weapon.addrace[RC_DRAGON]+=skill;