Implement bard song instrument mod caps

The maximum bard songs can be effected by instrument mods is 3.6.
This is set by the rule Character:BaseInstrumentSoftCap which defaults to 36
Also fix Echo of Taelosia and Ayonae's Tutelage to increase the mod cap.
This commit is contained in:
Michael Cook
2013-11-13 15:07:34 -05:00
parent 0c3c84d711
commit 3f8ee533d3
3 changed files with 16 additions and 3 deletions
+11 -3
View File
@@ -1796,6 +1796,7 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
return(10);
uint16 effectmod = 10;
int effectmodcap = RuleI(Character, BaseInstrumentSoftCap);
//this should never use spell modifiers...
//if a spell grants better modifers, they are copied into the item mods
@@ -1856,6 +1857,7 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
break;
}
// TODO: These shouldn't be hardcoded.
if(spells[spell_id].skill == SkillSinging)
{
effectmod += 2*GetAA(aaSingingMastery);
@@ -1866,14 +1868,20 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
effectmod += 2*GetAA(aaInstrumentMastery);
effectmod += 2*GetAA(aaImprovedInstrumentMastery);
}
effectmod += 2*GetAA(aaAyonaesTutelage); //singing & instruments
effectmod += 2*GetAA(aaEchoofTaelosia); //singing & instruments
// TODO: These shouldn't be hardcoded.
effectmodcap += GetAA(aaAyonaesTutelage);
effectmodcap += GetAA(aaEchoofTaelosia);
if(effectmod < 10)
effectmod = 10;
_log(SPELLS__BARDS, "%s::GetInstrumentMod() spell=%d mod=%d\n", GetName(), spell_id, effectmod);
if (effectmod > effectmodcap)
effectmod = effectmodcap;
_log(SPELLS__BARDS, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
GetName(), spell_id, effectmod, effectmodcap);
return(effectmod);
}