Implemented SE_SongModCap

Bard AAs Ayonaes Tutelage and Echo of Taelosia implemented as bonuses
Remember to run the SQL!
This commit is contained in:
Michael Cook (mackal) 2014-01-04 19:20:59 -05:00
parent d128ef1b97
commit e7032bc2c2
6 changed files with 27 additions and 11 deletions

View File

@ -407,7 +407,7 @@ typedef enum {
#define SE_TripleBackstab 258 // implemented[AA] - chance to perform a triple backstab #define SE_TripleBackstab 258 // implemented[AA] - chance to perform a triple backstab
#define SE_CombatStability 259 // implemented[AA] - damage mitigation #define SE_CombatStability 259 // implemented[AA] - damage mitigation
#define SE_AddSingingMod 260 // implemented[AA] - Instrument/Singing Mastery, base1 is the mod, base2 is the ItemType #define SE_AddSingingMod 260 // implemented[AA] - Instrument/Singing Mastery, base1 is the mod, base2 is the ItemType
//#define SE_SongModCap 261 // not used #define SE_SongModCap 261 // implemented[AA] - Song Mod cap increase (no longer used on live)
#define SE_RaiseStatCap 262 // implemented #define SE_RaiseStatCap 262 // implemented
#define SE_TradeSkillMastery 263 // implemented - lets you raise more than one tradeskill above master. #define SE_TradeSkillMastery 263 // implemented - lets you raise more than one tradeskill above master.
#define SE_HastenedAASkill 264 // not implemented as bonus - Use redux field in aa_actions table for this effect #define SE_HastenedAASkill 264 // not implemented as bonus - Use redux field in aa_actions table for this effect

View File

@ -0,0 +1,9 @@
-- Ayonaes Tutelage
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('571', '1', '261', '1', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('572', '1', '261', '2', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('573', '1', '261', '3', '0');
-- Echo of Taelosia
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('707', '1', '261', '1', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('708', '1', '261', '2', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('709', '1', '261', '3', '0');

View File

@ -904,6 +904,9 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
break; break;
} }
break; break;
case SE_SongModCap:
newbon->songModCap += base1;
break;
case SE_PetCriticalHit: case SE_PetCriticalHit:
newbon->PetCriticalHit += base1; newbon->PetCriticalHit += base1;
break; break;
@ -2327,6 +2330,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
} }
break; break;
case SE_SongModCap:
newbon->songModCap += effect_value;
break;
case SE_PetAvoidance: case SE_PetAvoidance:
newbon->PetAvoidance += effect_value; newbon->PetAvoidance += effect_value;
break; break;

View File

@ -1792,9 +1792,10 @@ int16 Client::CalcATK() {
return(ATK); return(ATK);
} }
uint16 Mob::GetInstrumentMod(uint16 spell_id) const { uint16 Mob::GetInstrumentMod(uint16 spell_id) const
if(GetClass() != BARD) {
return(10); if (GetClass() != BARD)
return 10;
uint16 effectmod = 10; uint16 effectmod = 10;
int effectmodcap = RuleI(Character, BaseInstrumentSoftCap); int effectmodcap = RuleI(Character, BaseInstrumentSoftCap);
@ -1804,7 +1805,7 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
//because the spells are supposed to act just like having the intrument. //because the spells are supposed to act just like having the intrument.
//item mods are in 10ths of percent increases //item mods are in 10ths of percent increases
switch(spells[spell_id].skill) { switch (spells[spell_id].skill) {
case SkillPercussionInstruments: case SkillPercussionInstruments:
if(itembonuses.percussionMod == 0 && spellbonuses.percussionMod == 0) if(itembonuses.percussionMod == 0 && spellbonuses.percussionMod == 0)
effectmod = 10; effectmod = 10;
@ -1863,12 +1864,9 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
break; break;
} }
// TODO: These shouldn't be hardcoded. effectmodcap += aabonuses.songModCap + spellbonuses.songModCap;
effectmodcap += GetAA(aaAyonaesTutelage);
effectmodcap += GetAA(aaEchoofTaelosia);
if (effectmod < 10)
if(effectmod < 10)
effectmod = 10; effectmod = 10;
if (effectmod > effectmodcap) if (effectmod > effectmodcap)
@ -1877,7 +1875,7 @@ uint16 Mob::GetInstrumentMod(uint16 spell_id) const {
_log(SPELLS__BARDS, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n", _log(SPELLS__BARDS, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n",
GetName(), spell_id, effectmod, effectmodcap); GetName(), spell_id, effectmod, effectmodcap);
return(effectmod); return effectmod;
} }
void Client::CalcMaxEndurance() void Client::CalcMaxEndurance()

View File

@ -230,6 +230,7 @@ struct StatBonuses {
uint16 percussionMod; uint16 percussionMod;
uint16 windMod; uint16 windMod;
uint16 stringedMod; uint16 stringedMod;
uint16 songModCap;
int8 hatemod; int8 hatemod;
int32 EnduranceReduction; int32 EnduranceReduction;

View File

@ -2890,6 +2890,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
case SE_MaxBindWound: case SE_MaxBindWound:
case SE_CombatStability: case SE_CombatStability:
case SE_AddSingingMod: case SE_AddSingingMod:
case SE_SongModCap:
case SE_PetAvoidance: case SE_PetAvoidance:
case SE_GiveDoubleRiposte: case SE_GiveDoubleRiposte:
case SE_Ambidexterity: case SE_Ambidexterity: