mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Revisions to how charm works.
Optional SQL for rules
This commit is contained in:
parent
be57c66256
commit
7133357b1a
@ -1,5 +1,12 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 03/02/2014 ==
|
||||
Kayen: Revision to charm code to be consistent with live based on extensive personal parsing.
|
||||
*Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 200 CHA
|
||||
*Charisma DOES NOT extend charm durations.
|
||||
|
||||
Optional SQL: utils/sql/git/optional/2014_03_02_CharmRules.sql
|
||||
|
||||
|
||||
== 02/27/2014 ==
|
||||
cavedude: Exported TrainDisc to Lua.
|
||||
|
||||
@ -290,6 +290,8 @@ RULE_BOOL ( Spells, NPCIgnoreBaseImmunity, true) // Whether or not NPCs get to i
|
||||
RULE_REAL ( Spells, AvgSpellProcsPerMinute, 6.0) //Adjust rate for sympathetic spell procs
|
||||
RULE_INT ( Spells, ResistFalloff, 67) //Max that level that will adjust our resist chance based on level modifiers
|
||||
RULE_INT ( Spells, CharismaEffectiveness, 10) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod.
|
||||
RULE_INT ( Spells, CharismaEffectivenessCap, 200) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod.
|
||||
RULE_BOOL ( Spells, CharismaCharmDuration, false) // Allow CHA resist mod to extend charm duration.
|
||||
RULE_INT ( Spells, CharmBreakCheckChance, 25) //Determines chance for a charm break check to occur each buff tick.
|
||||
RULE_INT ( Spells, MaxCastTimeReduction, 50) //Max percent your spell cast time can be reduced by spell haste
|
||||
RULE_INT ( Spells, RootBreakFromSpells, 20) //Chance for root to break when cast on.
|
||||
|
||||
2
utils/sql/git/optional/2013_03_02_CharmRules.sql
Normal file
2
utils/sql/git/optional/2013_03_02_CharmRules.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:CharismaCharmDuration', 'false', 'Allow CHA to extend charm duration.');
|
||||
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:CharismaResistCap', '200', 'Maximium amount of CHA that will effect charm resist rate.');
|
||||
@ -1388,13 +1388,24 @@ void Mob::ClearFeignMemory() {
|
||||
|
||||
bool Mob::PassCharismaCheck(Mob* caster, Mob* spellTarget, uint16 spell_id) {
|
||||
|
||||
/*
|
||||
Charm formula is correct based on over 50 hours of personal live parsing - Kayen
|
||||
Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 200 CHA
|
||||
Charisma DOES NOT extend charm durations.
|
||||
Base effect value of charm spells in the spell file DOES NOT effect duration OR resist rate (unclear if does anything)
|
||||
*/
|
||||
|
||||
if(!caster) return false;
|
||||
|
||||
if(spells[spell_id].ResistDiff <= -600)
|
||||
return true;
|
||||
|
||||
//Applies additional Charisma bonus to resist rate
|
||||
float resist_check = ResistSpell(spells[spell_id].resisttype, spell_id, caster,0,0,1);
|
||||
float resist_check = 0;
|
||||
|
||||
if (RuleB(Spells, CharismaCharmDuration))
|
||||
resist_check = ResistSpell(spells[spell_id].resisttype, spell_id, caster,0,0,true);
|
||||
else
|
||||
resist_check = ResistSpell(spells[spell_id].resisttype, spell_id, caster);
|
||||
|
||||
if(IsCharmSpell(spell_id)) {
|
||||
|
||||
|
||||
@ -3417,7 +3417,11 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
||||
// not all unresistable, so changing this to only check certain spells
|
||||
if(IsResistableSpell(spell_id))
|
||||
{
|
||||
if (IsCharmSpell(spell_id))
|
||||
spell_effectiveness = spelltar->ResistSpell(spells[spell_id].resisttype, spell_id, this, use_resist_adjust, resist_adjust,true);
|
||||
else
|
||||
spell_effectiveness = spelltar->ResistSpell(spells[spell_id].resisttype, spell_id, this, use_resist_adjust, resist_adjust);
|
||||
|
||||
if(spell_effectiveness < 100)
|
||||
{
|
||||
if(spell_effectiveness == 0 || !IsPartialCapableSpell(spell_id) )
|
||||
@ -4245,10 +4249,15 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use
|
||||
|
||||
if (CharismaCheck)
|
||||
{
|
||||
//For charm chance to break checks, Default 10 CHA = -1 resist mod.
|
||||
int16 cha_resist_modifier = 0;
|
||||
cha_resist_modifier = caster->GetCHA()/RuleI(Spells, CharismaEffectiveness);
|
||||
resist_modifier -= cha_resist_modifier;
|
||||
//Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 200 CHA
|
||||
//Charisma DOES NOT extend charm durations.
|
||||
int16 charisma = caster->GetCHA();
|
||||
|
||||
if (charisma > RuleI(Spells, CharismaEffectivenessCap))
|
||||
charisma = RuleI(Spells, CharismaEffectivenessCap);
|
||||
|
||||
resist_modifier -= charisma/RuleI(Spells, CharismaEffectiveness);
|
||||
Shout("Resist MOD = %i", resist_modifier);
|
||||
}
|
||||
|
||||
//Add our level, resist and -spell resist modifier to our roll chance
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user