diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 3388393a24..fc4ae0548a 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -1090,7 +1090,7 @@ 1761,Curse_Arrow,Cursed Arrow,10,10,,3,1,,,,0x000A1848,63,2,32768,,1,,1,{ bonus2 bAddEff,Eff_Curse,1000; },{},{} 1762,Rusty_Arrow,Rusty Arrow,10,3,,2,30,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bAtkEle,Ele_Poison; },{},{} 1763,Poison_Arrow,Poison Arrow,10,10,,3,1,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,2000; },{},{} -1764,Incisive_Arrow,Sharp Arrow,10,20,,3,10,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bCritical,20; },{},{} +1764,Incisive_Arrow,Sharp Arrow,10,20,,3,10,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bCriticalLong,20; },{},{} 1765,Oridecon_Arrow,Oridecon Arrow,10,30,,3,50,,,,0x000A1848,63,2,32768,,1,,1,{},{},{} 1766,Arrow_Of_Counter_Evil,Arrow of Counter Evil,10,40,,3,50,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bAtkEle,Ele_Holy; },{},{} 1767,Arrow_Of_Shadow,Arrow of Shadow,10,3,,2,30,,,,0x000A1848,63,2,32768,,1,,1,{ bonus bAtkEle,Ele_Dark; },{},{} @@ -2563,7 +2563,7 @@ 4418,Gazeti_Card,Gazeti Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"MG_COLDBOLT",2,100; },{},{} 4419,Ktullanux_Card,Ktullanux Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEle,Ele_Fire,50; bonus5 bAutoSpellWhenHit,"WZ_FROSTNOVA",10,20,BF_WEAPON|BF_MAGIC,0; },{},{} 4420,Muscipular_Card,Muscipular Card,6,20,,10,,,,,,,,32,,,,,{ bonus3 bAutoSpellWhenHit,"AL_HEAL",1,100; bonus3 bAutoSpellWhenHit,"AL_INCAGI",1,100; },{},{} -4421,Drosera_Card,Drosera Card,6,20,,10,,,,,,,,2,,,,,{ if(getiteminfo(getequipid(EQI_HAND_R),9)>3) bonus bCritical,15; },{},{} +4421,Drosera_Card,Drosera Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCriticalLong,15; },{},{} 4422,Roween_Card,Roween Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee,5; bonus bFlee2,3; bonus2 bAddEle,Ele_Water,10; bonus2 bCriticalAddRace,RC_Fish,15; },{},{} 4423,Galion_Card,Galion Card,6,20,,10,,,,,,,,136,,,,,{ bonus bHit,5; bonus2 bAddEle,Ele_Water,5; },{},{} 4424,Stapo_Card,Stapo Card,6,20,,10,,,,,,,,136,,,,,{ skill "TF_PICKSTONE",1; skill "TF_THROWSTONE",1; },{},{} @@ -2689,7 +2689,7 @@ 4544,SLD_Dark_Snake_Card,Sealed Evil Snake Lord Card,6,20,,10,,,,,,,,769,,,,,{ bonus bInt,3; .@i = (getrefine()>14?7500:5000); bonus2 bResEff,Eff_Blind,.@i; bonus2 bResEff,Eff_Curse,.@i; },{},{} 4545,Novice_Poring_Card,Novice Poring Card,6,20,,10,,,,,,,,769,,,,,{ bonus bLuk,1; },{},{} 4549,Upd_Maya_Puple_Card,Upd Maya Puple Card,6,20,,10,,,,,,,,769,,,,,{ bonus bIntravision,1; bonus bAllStats,1; skill "AL_RUWACH",1; },{},{} -4550,Upd_Bow_Guardian_Card,Upd Bow Guardian Card,6,20,,10,,,,,,,,2,,,,,{ if(getiteminfo(getequipid(EQI_HAND_R),11)==11) { bonus2 bSkillAtk,"RA_ARROWSTORM",50; bonus bCritical,25+10*(getequiprefinerycnt(EQI_HAND_R)/4); bonus bHit,5; bonus3 bAutoSpell,"HT_PHANTASMIC",1,100; } },{},{} +4550,Upd_Bow_Guardian_Card,Upd Bow Guardian Card,6,20,,10,,,,,,,,2,,,,,{ if(getiteminfo(getequipid(EQI_HAND_R),11)==11) { bonus2 bSkillAtk,"RA_ARROWSTORM",50; bonus bCriticalLong,25+10*(getequiprefinerycnt(EQI_HAND_R)/4); bonus bHit,5; bonus3 bAutoSpell,"HT_PHANTASMIC",1,100; } },{},{} 4552,Manny_Card,Manny Card,6,20,,10,,,,,,,,136,,,,,{ bonus bMaxHP,10; },{},{} 4553,Sid_Card,Sid Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,100; },{},{} 4554,Diego_Card,Diego Card,6,20,,10,,,,,,,,4,,,,,{ bonus bMaxHP,100; },{},{} diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index a156343492..f2760fe617 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -125,6 +125,7 @@ Additional stats bonus bHit,n; Hit + n bonus bHitRate,n; Hit + n% bonus bCritical,n; Critical + n +bonus bCriticalLong,n; Critical + n for normal long ranged attack (won't be shown in status window) bonus2 bCriticalAddRace,r,n; Critical + n against enemies of race r bonus bCriticalRate,n; Critical + n% bonus bFlee,n; Flee + n diff --git a/src/map/battle.c b/src/map/battle.c index c1828dba94..e1cff94956 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2335,8 +2335,11 @@ static bool is_attack_critical(struct Damage wd, struct block_list *src, struct if (sd) { cri += sd->critaddrace[tstatus->race] + sd->critaddrace[RC_ALL]; - if(is_skill_using_arrow(src, skill_id)) + if(is_skill_using_arrow(src, skill_id)) { cri += sd->bonus.arrow_cri; + if (!skill_id) + cri += sd->bonus.critical_rangeatk; + } } if(sc && sc->data[SC_CAMOUFLAGE]) diff --git a/src/map/map.h b/src/map/map.h index 4ce0b8e327..e8a26cae4e 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -517,7 +517,7 @@ enum _sp { SP_WEAPON_COMA_CLASS, SP_IGNORE_MDEF_CLASS_RATE, SP_EXP_ADDCLASS, SP_ADD_CLASS_DROP_ITEM, //2067-2070 SP_ADD_CLASS_DROP_ITEMGROUP, SP_ADDMAXWEIGHT, SP_ADD_ITEMGROUP_HEAL_RATE, // 2071-2073 SP_HP_VANISH_RACE_RATE, SP_SP_VANISH_RACE_RATE, SP_ABSORB_DMG_MAXHP, SP_SUB_SKILL, SP_SUBDEF_ELE, // 2074-2078 - SP_STATE_NORECOVER_RACE, // 2079 + SP_STATE_NORECOVER_RACE, SP_CRITICAL_RANGEATK, // 2079-2080 }; enum _look { diff --git a/src/map/pc.c b/src/map/pc.c index 15fc41ae71..6a249aab64 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2978,6 +2978,12 @@ void pc_bonus(struct map_session_data *sd,int type,int val) case SP_ABSORB_DMG_MAXHP: // bonus bAbsorbDmgMaxHP,n; sd->bonus.absorb_dmg_maxhp = max(sd->bonus.absorb_dmg_maxhp, val); break; + case SP_CRITICAL_RANGEATK: // bonus bCriticalLong,n; + if (sd->state.lr_flag != 2) + sd->bonus.critical_rangeatk += val*10; + else + sd->bonus.arrow_cri += val*10; + break; default: ShowWarning("pc_bonus: unknown type %d %d !\n",type,val); break; diff --git a/src/map/pc.h b/src/map/pc.h index afcfffef66..fcaf5c09c2 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -451,6 +451,7 @@ struct map_session_data { int ematk; // matk bonus from equipment int eatk; // atk bonus from equipment uint8 absorb_dmg_maxhp; // [Cydh] + short critical_rangeatk; } bonus; // zeroed vars end here. diff --git a/src/map/script_constants.h b/src/map/script_constants.h index 9b1e5e1441..b42cbf9c79 100644 --- a/src/map/script_constants.h +++ b/src/map/script_constants.h @@ -651,6 +651,7 @@ script_set_constant("bSubSkill",SP_SUB_SKILL,false); script_set_constant("bSubDefEle",SP_SUBDEF_ELE,false); script_set_constant("bStateNoRecoverRace",SP_STATE_NORECOVER_RACE,false); + script_set_constant("bCriticalLong",SP_CRITICAL_RANGEATK,false); /* equip positions */ // Disabled as long as we did not clean the EQI_/EQP_ mess up [Lemongrass]