Jump to content

Attack Speed Slow


Recommended Posts

M2 Download Center

Download Here ( Internal )

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.

 

 

 

  • Love 5
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.