Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. // IN MoverAttack.cpp there are 2 functions to change
  2.  
  3. int CMover::GetMagicHitPower( int nChargeLevel )
  4. {
  5. ItemProp* pItemProp = GetActiveHandItemProp(); // µé°íÀÖ´Â ¹«±âÀÇ ÇÁ·ÎÆÛƼ ²¨³¿
  6. CItemElem *pWeapon = GetWeaponItem(); // ¼Õ¿¡µç ¾ÆÀÌÅÛÀÇ Æ÷ÀÎÅÍ.
  7.  
  8. int nMin, nMax;
  9. GetItemATKPower( &nMin, &nMax, pItemProp, pWeapon );
  10.  
  11. int nATK = GetWeaponATK( WT_MAGIC_WAND );
  12. nMin += nATK;
  13. nMax += nATK;
  14.  
  15. int nDamage = xRandom( nMin, nMax );
  16. nDamage += GetParam( DST_CHR_DMG, 0 );
  17. nDamage = (int)( nDamage * 1 );
  18. return nDamage;
  19. }
  20.  
  21.  
  22. // AND THIS
  23.  
  24. int CMover::ApplyDPC( int nATK, ATTACK_INFO* pInfo )
  25. {
  26. int nDamage;
  27. if( pInfo->CanIgnoreDEF() )
  28. nDamage = nATK;
  29. else
  30. {
  31. int nDefense = CalcDefense( pInfo );
  32. nDamage = nATK - nDefense;
  33. }
  34.  
  35. if( nDamage < 0 )
  36. nDamage = 0;
  37. if( nDamage >= 500000 ) // Set your desired Maximum Damage
  38. nDamage = 500000 ;
  39.  
  40. // 크리티컬 처리.
  41. if( pInfo->pAttacker->IsCriticalAttack( this, pInfo->dwAtkFlags ) )
  42. {
  43. pInfo->dwAtkFlags |= AF_CRITICAL;
  44.  
  45. int nChargeLevel = pInfo->GetChargeLevel(); // 완드충전량
  46.  
  47. if( nChargeLevel > 0 )
  48. nChargeLevel = 0;
  49.  
  50. if( (pInfo->pAttacker->m_pActMover->GetState() & OBJSTA_ATK4) ||
  51. nChargeLevel == MAX_CHARGE_LEVEL ) // 4패턴공격에 발생한 크리티컬.
  52. {
  53. nDamage = (int)(nDamage * 1.0f);
  54. if( CanFlyByAttack() && xRandom(100) < 90 )
  55. pInfo->dwAtkFlags |= AF_FLYING;
  56. }
  57. else
  58. {
  59. nDamage = (int)(nDamage * 1.0f);
  60. if( CanFlyByAttack() && xRandom(100) < 80 )
  61. pInfo->dwAtkFlags |= AF_FLYING;
  62. }
  63. float fCriticalBonus = 1 + (float)GetParam( DST_CRITICAL_BONUS, 0 ) / 100.0F;
  64. #ifdef __JEFF_11
  65. if( fCriticalBonus < 0.1F )
  66. fCriticalBonus = 0.1F;
  67. #endif // __JEFF_11
  68. nDamage = (int)( nDamage * fCriticalBonus );
  69. }
  70. return nDamage;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement