Merge pull request #1099 from rathena/bonus/bCriticalLong
Implemented Official Long Range Critical Bonus * Fixed #1098 * Added bonus `bonus bCriticalLong,n;`. * Add critical rate for normal long range attack. * Bonus value won't be showed in status window. * Updated item script following official (Aegis) script for: * Sharp Arrow (1764/Incisive_Arrow) * Drosera Card (4421/Drosera_Card) * Upd Bow Guardian Card (4550/Upd_Bow_Guardian_Card)
This commit is contained in:
commit
7a7ba75369
@ -1090,7 +1090,7 @@
|
|||||||
1761,Curse_Arrow,Cursed Arrow,10,10,,3,1,,,,0x000A1848,63,2,32768,,1,,1,{ bonus2 bAddEff,Eff_Curse,1000; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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,{},{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
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; },{},{}
|
4552,Manny_Card,Manny Card,6,20,,10,,,,,,,,136,,,,,{ bonus bMaxHP,10; },{},{}
|
||||||
4553,Sid_Card,Sid Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,100; },{},{}
|
4553,Sid_Card,Sid Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,100; },{},{}
|
||||||
4554,Diego_Card,Diego Card,6,20,,10,,,,,,,,4,,,,,{ bonus bMaxHP,100; },{},{}
|
4554,Diego_Card,Diego Card,6,20,,10,,,,,,,,4,,,,,{ bonus bMaxHP,100; },{},{}
|
||||||
|
@ -125,6 +125,7 @@ Additional stats
|
|||||||
bonus bHit,n; Hit + n
|
bonus bHit,n; Hit + n
|
||||||
bonus bHitRate,n; Hit + n%
|
bonus bHitRate,n; Hit + n%
|
||||||
bonus bCritical,n; Critical + 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
|
bonus2 bCriticalAddRace,r,n; Critical + n against enemies of race r
|
||||||
bonus bCriticalRate,n; Critical + n%
|
bonus bCriticalRate,n; Critical + n%
|
||||||
bonus bFlee,n; Flee + n
|
bonus bFlee,n; Flee + n
|
||||||
|
@ -2335,8 +2335,11 @@ static bool is_attack_critical(struct Damage wd, struct block_list *src, struct
|
|||||||
|
|
||||||
if (sd) {
|
if (sd) {
|
||||||
cri += sd->critaddrace[tstatus->race] + sd->critaddrace[RC_ALL];
|
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;
|
cri += sd->bonus.arrow_cri;
|
||||||
|
if (!skill_id)
|
||||||
|
cri += sd->bonus.critical_rangeatk;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sc && sc->data[SC_CAMOUFLAGE])
|
if(sc && sc->data[SC_CAMOUFLAGE])
|
||||||
|
@ -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_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_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_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 {
|
enum _look {
|
||||||
|
@ -2978,6 +2978,12 @@ void pc_bonus(struct map_session_data *sd,int type,int val)
|
|||||||
case SP_ABSORB_DMG_MAXHP: // bonus bAbsorbDmgMaxHP,n;
|
case SP_ABSORB_DMG_MAXHP: // bonus bAbsorbDmgMaxHP,n;
|
||||||
sd->bonus.absorb_dmg_maxhp = max(sd->bonus.absorb_dmg_maxhp, val);
|
sd->bonus.absorb_dmg_maxhp = max(sd->bonus.absorb_dmg_maxhp, val);
|
||||||
break;
|
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:
|
default:
|
||||||
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
|
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
|
||||||
break;
|
break;
|
||||||
|
@ -451,6 +451,7 @@ struct map_session_data {
|
|||||||
int ematk; // matk bonus from equipment
|
int ematk; // matk bonus from equipment
|
||||||
int eatk; // atk bonus from equipment
|
int eatk; // atk bonus from equipment
|
||||||
uint8 absorb_dmg_maxhp; // [Cydh]
|
uint8 absorb_dmg_maxhp; // [Cydh]
|
||||||
|
short critical_rangeatk;
|
||||||
} bonus;
|
} bonus;
|
||||||
// zeroed vars end here.
|
// zeroed vars end here.
|
||||||
|
|
||||||
|
@ -651,6 +651,7 @@
|
|||||||
script_set_constant("bSubSkill",SP_SUB_SKILL,false);
|
script_set_constant("bSubSkill",SP_SUB_SKILL,false);
|
||||||
script_set_constant("bSubDefEle",SP_SUBDEF_ELE,false);
|
script_set_constant("bSubDefEle",SP_SUBDEF_ELE,false);
|
||||||
script_set_constant("bStateNoRecoverRace",SP_STATE_NORECOVER_RACE,false);
|
script_set_constant("bStateNoRecoverRace",SP_STATE_NORECOVER_RACE,false);
|
||||||
|
script_set_constant("bCriticalLong",SP_CRITICAL_RANGEATK,false);
|
||||||
|
|
||||||
/* equip positions */
|
/* equip positions */
|
||||||
// Disabled as long as we did not clean the EQI_/EQP_ mess up [Lemongrass]
|
// Disabled as long as we did not clean the EQI_/EQP_ mess up [Lemongrass]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user