Corrected Sling Item bonuses (#3845)
* Fixes #3810. * Partial revert of eae1161. * Removed the item database bonuses from Throwing Increase HP/SP Potions and moved them back to source as these items require the caster's Base Level. * Concentrated White Potion Z should only increase HP regeneration rate (not the interval). * Vitata 500 should increase SP regeneration rate (not the interval). Thanks to @Everade!
This commit is contained in:
parent
298cfefd2d
commit
fe12d6f016
@ -5462,12 +5462,12 @@
|
||||
13272,Cure_Free_To_Throw,Throwing Cure Free,10,100,,50,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_end SC_BLEEDING; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_POISON; sc_end SC_ORCISH; sc_end SC_CHANGEUNDEAD; sc_end SC_BLIND; sc_end SC_CONFUSION; sc_end SC_DPOISON; itemheal 500,0; },{},{}
|
||||
13273,Stamina_Up_M_To_Throw,Throwing Muramura M,10,100,,10,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_MUSTLE_M,500000,5; },{},{}
|
||||
13274,Digestive_F_To_Throw,Throwing Falmons F,10,100,,10,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_LIFE_FORCE_F,500000,5; },{},{}
|
||||
13275,HP_Inc_PotS_To_Throw,Throwing Increase HP Potion (Small),10,100,,20,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(500+(BaseLevel*10/3)); percentheal 1,0; },{},{}
|
||||
13276,HP_Inc_PotM_To_Throw,Throwing Increase HP Potion (Medium),10,100,,40,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(1500+(BaseLevel*10/3)); percentheal 2,0; },{},{}
|
||||
13277,HP_Inc_PotL_To_Throw,Throwing Increase HP Potion (Large),10,100,,80,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(2500+(BaseLevel*10/3)); percentheal 5,0; },{},{}
|
||||
13278,SP_Inc_PotS_To_Throw,Throwing Increase SP Potion (Small),10,100,,20,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)-5); percentheal 0,2; },{},{}
|
||||
13279,SP_Inc_PotM_To_Throw,Throwing Increase SP Potion (Medium),10,100,,40,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)); percentheal 0,4; },{},{}
|
||||
13280,SP_Inc_PotL_To_Throw,Throwing Increase SP Potion (Large),10,100,,80,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)+5); percentheal 0,8; },{},{}
|
||||
13275,HP_Inc_PotS_To_Throw,Throwing Increase HP Potion (Small),10,100,,20,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13276,HP_Inc_PotM_To_Throw,Throwing Increase HP Potion (Medium),10,100,,40,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13277,HP_Inc_PotL_To_Throw,Throwing Increase HP Potion (Large),10,100,,80,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13278,SP_Inc_PotS_To_Throw,Throwing Increase SP Potion (Small),10,100,,20,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13279,SP_Inc_PotM_To_Throw,Throwing Increase SP Potion (Medium),10,100,,40,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13280,SP_Inc_PotL_To_Throw,Throwing Increase SP Potion (Large),10,100,,80,0,,,,0x00040000,8,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13281,En_White_PotZ_To_Throw,Throwing Concentrated White Potion Z,10,100,,70,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,20; itemheal 1000,0; },{},{}
|
||||
13282,Vitata500_To_Throw,Throwing Vitata 500,10,100,,50,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start2 SC_VITATA_500,500000,20,5; itemheal 0,200; },{},{}
|
||||
13283,En_Cel_Juice_To_Throw,Throwing Ceromain Soup,10,100,,50,0,,,,0x00040000,8,2,32768,,99,,9,{ sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; },{},{}
|
||||
|
@ -7458,12 +7458,12 @@
|
||||
13272,Cure_Free_To_Throw,Throwing Cure Free,10,100,,50,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_end SC_BLEEDING; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_POISON; sc_end SC_ORCISH; sc_end SC_CHANGEUNDEAD; sc_end SC_BLIND; sc_end SC_CONFUSION; sc_end SC_DPOISON; itemheal 500,0; },{},{}
|
||||
13273,Stamina_Up_M_To_Throw,Throwing Muramura M,10,100,,10,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_MUSTLE_M,500000,5; },{},{}
|
||||
13274,Digestive_F_To_Throw,Throwing Falmons F,10,100,,10,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_LIFE_FORCE_F,500000,5; },{},{}
|
||||
13275,HP_Inc_PotS_To_Throw,Throwing Increase HP Potion (Small),10,100,,20,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(500+(BaseLevel*10/3)); percentheal 1,0; },{},{}
|
||||
13276,HP_Inc_PotM_To_Throw,Throwing Increase HP Potion (Medium),10,100,,40,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(1500+(BaseLevel*10/3)); percentheal 2,0; },{},{}
|
||||
13277,HP_Inc_PotL_To_Throw,Throwing Increase HP Potion (Large),10,100,,80,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_PROMOTE_HEALTH_RESERCH,500000,(2500+(BaseLevel*10/3)); percentheal 5,0; },{},{}
|
||||
13278,SP_Inc_PotS_To_Throw,Throwing Increase SP Potion (Small),10,100,,20,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)-5); percentheal 0,2; },{},{}
|
||||
13279,SP_Inc_PotM_To_Throw,Throwing Increase SP Potion (Medium),10,100,,40,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)); percentheal 0,4; },{},{}
|
||||
13280,SP_Inc_PotL_To_Throw,Throwing Increase SP Potion (Large),10,100,,80,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_ENERGY_DRINK_RESERCH,500000,((BaseLevel/10)+5); percentheal 0,8; },{},{}
|
||||
13275,HP_Inc_PotS_To_Throw,Throwing Increase HP Potion (Small),10,100,,20,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13276,HP_Inc_PotM_To_Throw,Throwing Increase HP Potion (Medium),10,100,,40,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13277,HP_Inc_PotL_To_Throw,Throwing Increase HP Potion (Large),10,100,,80,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13278,SP_Inc_PotS_To_Throw,Throwing Increase SP Potion (Small),10,100,,20,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13279,SP_Inc_PotM_To_Throw,Throwing Increase SP Potion (Medium),10,100,,40,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13280,SP_Inc_PotL_To_Throw,Throwing Increase SP Potion (Large),10,100,,80,0,,,,0x00040000,56,2,32768,,99,,9,{ /* Item bonus in source because of BaseLevel check */ },{},{}
|
||||
13281,En_White_PotZ_To_Throw,Throwing Concentrated White Potion Z,10,100,,70,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_EXTRACT_WHITE_POTION_Z,500000,20; itemheal 1000,0; },{},{}
|
||||
13282,Vitata500_To_Throw,Throwing Vitata 500,10,100,,50,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start2 SC_VITATA_500,500000,20,5; itemheal 0,200; },{},{}
|
||||
13283,En_Cel_Juice_To_Throw,Throwing Ceromain Soup,10,100,,50,0,,,,0x00040000,56,2,32768,,99,,9,{ sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; },{},{}
|
||||
|
@ -185,6 +185,12 @@ enum genetic_item_list
|
||||
ITEMID_BLACK_HARD_LUMP,
|
||||
ITEMID_VERY_HARD_LUMP,
|
||||
ITEMID_MYSTERIOUS_POWDER,
|
||||
ITEMID_HP_INC_POTS_TO_THROW = 13275,
|
||||
ITEMID_HP_INC_POTM_TO_THROW,
|
||||
ITEMID_HP_INC_POTL_TO_THROW,
|
||||
ITEMID_SP_INC_POTS_TO_THROW,
|
||||
ITEMID_SP_INC_POTM_TO_THROW,
|
||||
ITEMID_SP_INC_POTL_TO_THROW,
|
||||
};
|
||||
|
||||
///Guillotine Cross
|
||||
|
@ -529,8 +529,6 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk
|
||||
if (skill_id != NPC_EVILLAND && skill_id != BA_APPLEIDUN) {
|
||||
if (tsc->data[SC_INCHEALRATE])
|
||||
hp_bonus += tsc->data[SC_INCHEALRATE]->val1; //Only affects Heal, Sanctuary and PotionPitcher.(like bHealPower) [Inkfish]
|
||||
if (tsc->data[SC_EXTRACT_WHITE_POTION_Z])
|
||||
hp_bonus += tsc->data[SC_EXTRACT_WHITE_POTION_Z]->val1;
|
||||
if (tsc->data[SC_GLASTHEIM_HEAL])
|
||||
hp_bonus += tsc->data[SC_GLASTHEIM_HEAL]->val2;
|
||||
if (tsc->data[SC_ANCILLA])
|
||||
@ -10487,7 +10485,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
break;
|
||||
case GN_SLINGITEM:
|
||||
if( sd ) {
|
||||
short ammo_id;
|
||||
int ammo_id;
|
||||
|
||||
i = sd->equip_index[EQI_AMMO];
|
||||
if( i < 0 )
|
||||
break; // No ammo.
|
||||
@ -10503,9 +10502,38 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
||||
skill_attack(BF_WEAPON,src,src,bl,GN_SLINGITEM_RANGEMELEEATK,skill_lv,tick,flag);
|
||||
} else //Otherwise, it fails, shows animation and removes items.
|
||||
clif_skill_fail(sd,GN_SLINGITEM_RANGEMELEEATK,USESKILL_FAIL,0);
|
||||
} else if (itemdb_group_item_exists(IG_THROWABLE, ammo_id))
|
||||
if (dstsd)
|
||||
run_script(sd->inventory_data[i]->script, 0, dstsd->bl.id, fake_nd->bl.id);
|
||||
} else if (itemdb_group_item_exists(IG_THROWABLE, ammo_id)) {
|
||||
switch (ammo_id) {
|
||||
case ITEMID_HP_INC_POTS_TO_THROW: // MaxHP +(500 + Thrower BaseLv * 10 / 3) and heals 1% MaxHP
|
||||
sc_start2(src, bl, SC_PROMOTE_HEALTH_RESERCH, 100, 2, 1, 500000);
|
||||
status_percent_heal(bl, 1, 0);
|
||||
break;
|
||||
case ITEMID_HP_INC_POTM_TO_THROW: // MaxHP +(1500 + Thrower BaseLv * 10 / 3) and heals 2% MaxHP
|
||||
sc_start2(src, bl, SC_PROMOTE_HEALTH_RESERCH, 100, 2, 2, 500000);
|
||||
status_percent_heal(bl, 2, 0);
|
||||
break;
|
||||
case ITEMID_HP_INC_POTL_TO_THROW: // MaxHP +(2500 + Thrower BaseLv * 10 / 3) and heals 5% MaxHP
|
||||
sc_start2(src, bl, SC_PROMOTE_HEALTH_RESERCH, 100, 2, 3, 500000);
|
||||
status_percent_heal(bl, 5, 0);
|
||||
break;
|
||||
case ITEMID_SP_INC_POTS_TO_THROW: // MaxSP +(Thrower BaseLv / 10 - 5)% and recovers 2% MaxSP
|
||||
sc_start2(src, bl, SC_ENERGY_DRINK_RESERCH, 100, 2, 1, 500000);
|
||||
status_percent_heal(bl, 0, 2);
|
||||
break;
|
||||
case ITEMID_SP_INC_POTM_TO_THROW: // MaxSP +(Thrower BaseLv / 10)% and recovers 4% MaxSP
|
||||
sc_start2(src, bl, SC_ENERGY_DRINK_RESERCH, 100, 2, 2, 500000);
|
||||
status_percent_heal(bl, 0, 4);
|
||||
break;
|
||||
case ITEMID_SP_INC_POTL_TO_THROW: // MaxSP +(Thrower BaseLv / 10 + 5)% and recovers 8% MaxSP
|
||||
sc_start2(src, bl, SC_ENERGY_DRINK_RESERCH, 100, 2, 3, 500000);
|
||||
status_percent_heal(bl, 0, 8);
|
||||
break;
|
||||
default:
|
||||
if (dstsd)
|
||||
run_script(sd->inventory_data[i]->script, 0, dstsd->bl.id, fake_nd->bl.id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
|
||||
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);// This packet is received twice actually, I think it is to show the animation.
|
||||
|
@ -3068,7 +3068,7 @@ static int status_get_hpbonus(struct block_list *bl, enum e_status_bonus type) {
|
||||
if(sc->data[SC_LERADSDEW])
|
||||
bonus += sc->data[SC_LERADSDEW]->val3;
|
||||
if (sc->data[SC_PROMOTE_HEALTH_RESERCH])
|
||||
bonus += sc->data[SC_PROMOTE_HEALTH_RESERCH]->val4;
|
||||
bonus += sc->data[SC_PROMOTE_HEALTH_RESERCH]->val3;
|
||||
if(sc->data[SC_INSPIRATION])
|
||||
bonus += (600 * sc->data[SC_INSPIRATION]->val1);
|
||||
if(sc->data[SC_SOLID_SKIN_OPTION])
|
||||
@ -3245,7 +3245,7 @@ static int status_get_spbonus(struct block_list *bl, enum e_status_bonus type) {
|
||||
if(sc->data[SC_VITATA_500])
|
||||
bonus += sc->data[SC_VITATA_500]->val2;
|
||||
if (sc->data[SC_ENERGY_DRINK_RESERCH])
|
||||
bonus += sc->data[SC_ENERGY_DRINK_RESERCH]->val4;
|
||||
bonus += sc->data[SC_ENERGY_DRINK_RESERCH]->val3;
|
||||
}
|
||||
// Max rate reduce is -100%
|
||||
bonus = cap_value(bonus,-100,INT_MAX);
|
||||
@ -4727,6 +4727,10 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
|
||||
regen->hp += cap_value(regen->hp * sc->data[SC_GT_REVITALIZE]->val3/100, 1, SHRT_MAX);
|
||||
regen->state.walk = 1;
|
||||
}
|
||||
if (sc->data[SC_EXTRACT_WHITE_POTION_Z])
|
||||
regen->hp += cap_value(regen->hp * sc->data[SC_EXTRACT_WHITE_POTION_Z]->val1 / 100, 1, SHRT_MAX);
|
||||
if (sc->data[SC_VITATA_500])
|
||||
regen->sp += cap_value(regen->sp * sc->data[SC_VITATA_500]->val1 / 100, 1, SHRT_MAX);
|
||||
if (bl->type == BL_ELEM) { // Recovery bonus only applies to the Elementals.
|
||||
int ele_class = status_get_class(bl);
|
||||
|
||||
@ -4757,10 +4761,7 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sc->data[SC_EXTRACT_WHITE_POTION_Z])
|
||||
regen->rate.hp += (unsigned short)(regen->rate.hp * sc->data[SC_EXTRACT_WHITE_POTION_Z]->val1 / 100.);
|
||||
if (sc->data[SC_VITATA_500])
|
||||
regen->rate.sp += (unsigned short)(regen->rate.sp * sc->data[SC_VITATA_500]->val1 / 100.);
|
||||
|
||||
if (sc->data[SC_CATNIPPOWDER]) {
|
||||
regen->rate.hp *= 2;
|
||||
regen->rate.sp *= 2;
|
||||
@ -10875,26 +10876,24 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
case SC_PROMOTE_HEALTH_RESERCH:
|
||||
//val1: 1 = Regular Potion, 2 = Thrown Potion
|
||||
//val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion
|
||||
//val3: BaseLV of Thrower For Thrown Potions
|
||||
//val4: MaxHP Increase By Fixed Amount
|
||||
//val3: MaxHP Increase By Fixed Amount
|
||||
if (val1 == 1) // If potion was normally used, take the user's BaseLv
|
||||
val4 = 1000 * val2 - 500 + status_get_lv(bl) * 10 / 3;
|
||||
val3 = 1000 * val2 - 500 + status_get_lv(bl) * 10 / 3;
|
||||
else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv
|
||||
val4 = 1000 * val2 - 500 + val3 * 10 / 3;
|
||||
if (val4 <= 0) // Prevents a negeative value from happening
|
||||
val4 = 0;
|
||||
val3 = 1000 * val2 - 500 + status_get_lv(src) * 10 / 3;
|
||||
if (val3 <= 0) // Prevents a negeative value from happening
|
||||
val3 = 0;
|
||||
break;
|
||||
case SC_ENERGY_DRINK_RESERCH:
|
||||
//val1: 1 = Regular Potion, 2 = Thrown Potion
|
||||
//val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion
|
||||
//val3: BaseLV of Thrower For Thrown Potions
|
||||
//val4: MaxSP Increase By Percentage Amount
|
||||
//val3: MaxSP Increase By Percentage Amount
|
||||
if (val1 == 1) // If potion was normally used, take the user's BaseLv
|
||||
val4 = status_get_lv(bl) / 10 + 5 * val2 - 10;
|
||||
val3 = status_get_lv(bl) / 10 + 5 * val2 - 10;
|
||||
else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv
|
||||
val4 = val3 / 10 + 5 * val2 - 10;
|
||||
if (val4 <= 0) // Prevents a negeative value from happening
|
||||
val4 = 0;
|
||||
val3 = status_get_lv(src) / 10 + 5 * val2 - 10;
|
||||
if (val3 <= 0) // Prevents a negeative value from happening
|
||||
val3 = 0;
|
||||
break;
|
||||
case SC_KYOUGAKU:
|
||||
val2 = 2*val1 + rnd()%val1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user