Jump to content
  • Register Now

    Sign up and take advantage of the features of our community! Some forums are only accessible to our members!

Attack Speed Slow


Recommended Posts

With this change, slow effect will also reduce attack speed, and will reduce movement speed more than before, making it a good bonus (and slow immunity relevant).

Video: https://imgur.com/a/4jBwGWx

1. Client Source/UserInterface/InstanceBase.h

Search:

AFFECT_NUM = 64,

Add above:

			AFFECT_SLOW_AS = 45,

Search:

NEW_AFFECT_BOW_DISTANCE,

Add below:			
			
			NEW_AFFECT_SLOW_AS = 227,

PythonCharacterModule.cpp:
Search:

PyModule_AddIntConstant(poModule, "AFFECT_SLOW",						CInstanceBase::AFFECT_SLOW);

Add below:

	PyModule_AddIntConstant(poModule, "AFFECT_SLOW_AS",						CInstanceBase::AFFECT_SLOW_AS);

2. 
game/src/affect.h

Cauta:

AFFECT_DEF_GRADE,		

Add below:

	AFFECT_SLOW_AS = 227,
	
Cauta:

AFF_BITS_MAX

Add above:

	AFF_SLOW_AS=45,
	
battle.cpp:
Search:

	AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW,  AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20,		"SLOW");
	
Replace with:

	if (pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsAffectFlag(AFF_SLOW))
	{
		if (number(1, 100) <= pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsImmune(IMMUNE_SLOW))
		{
			pkVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true);
			pkVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);
		}
	}

char_affect.cpp:
Search:

RemoveAffect(AFFECT_SLOW);

Add below:

RemoveAffect(AFFECT_SLOW_AS);

char_skill.cpp:
Search:

else if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_SLOW))

Replace the content with:

				{
					if (iPct && !pkChrVictim->IsAffectFlag(AFF_SLOW))
					{
						if (number(1, 1000) <= iPct && !pkChrVictim->IsImmune(IMMUNE_SLOW))
						{
							pkChrVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true);
							pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);
						}
					}
				}

Note: to modify the values, change the values inside the AddAffect function call. Example:

 

pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true);

 

-40 is the value reduced, 10 is the duration of the debuff.

 

 

 

Edited by semoka10 (see edit history)
  • Love 6
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.