Advertisement
Guest User

Unexpected end of file before comment at line '8' was closed

a guest
Oct 23rd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. /*
  2. /** © 2015 CD PROJEKT S.A. All rights reserved.
  3. /** THE WITCHER® is a trademark of CD PROJEKT S. A.
  4. /** The Witcher game is based on the prose of Andrzej Sapkowski.
  5. Copyright © CD Projekt RED 2015
  6. */
  7.  
  8. /** Copyright © 2012-2014
  9. /** Author : Tomek Kozera
  10.  
  11. class W3Effect_Burning extends W3CriticalDOTEffect
  12. {
  13. private var cachedMPAC : CMovingPhysicalAgentComponent;
  14.  
  15. default criticalStateType = ECST_BurnCritical;
  16. default effectType = EET_Burning;
  17. default powerStatType = CPS_SpellPower;
  18. default resistStat = CDS_BurningRes;
  19. default canBeAppliedOnDeadTarget = true;
  20.  
  21. public function CacheSettings()
  22. {
  23. super.CacheSettings();
  24.  
  25. allowedHits[EHRT_Igni] = false;
  26.  
  27. //blockedActions.PushBack(EIAB_Signs); needed for some quest with fire in a barn - you're burning and need to use aard to get out
  28. blockedActions.PushBack(EIAB_CallHorse);
  29. blockedActions.PushBack(EIAB_Jump);
  30. blockedActions.PushBack(EIAB_ThrowBomb);
  31. blockedActions.PushBack(EIAB_UsableItem);
  32. blockedActions.PushBack(EIAB_Parry);
  33. blockedActions.PushBack(EIAB_Counter);
  34.  
  35. //vibration strength
  36. vibratePadLowFreq = 0.1;
  37. vibratePadHighFreq = 0.2;
  38. }
  39.  
  40. event OnEffectAdded(optional customParams : W3BuffCustomParams)
  41. {
  42. if ( this.IsOnPlayer() && thePlayer.IsUsingVehicle() )
  43. {
  44. if ( blockedActions.Contains( EIAB_Crossbow ) )
  45. blockedActions.Remove(EIAB_Crossbow);
  46. }
  47. else
  48. blockedActions.PushBack(EIAB_Crossbow);
  49.  
  50. super.OnEffectAdded(customParams);
  51. cachedMPAC = ((CMovingPhysicalAgentComponent)target.GetMovingAgentComponent());
  52.  
  53. if (isOnPlayer )
  54. {
  55. if ( thePlayer.playerAiming.GetCurrentStateName() == 'Waiting' )
  56. thePlayer.AddCustomOrientationTarget(OT_CustomHeading, 'BurningEffect');
  57. }
  58.  
  59. //keep corpse burning for some time
  60. if(!target.IsAlive())
  61. timeLeft = 10;
  62.  
  63. //in case of player only signs use Spell Power, other sources don't use it
  64. if(EntityHandleGet(creatorHandle) == thePlayer && !isSignEffect)
  65. powerStatType = CPS_Undefined;
  66.  
  67. //cache glyphword 12
  68.  
  69. //surface post fx
  70. }
  71.  
  72. event OnEffectAddedPost()
  73. {
  74. super.OnEffectAddedPost();
  75.  
  76. target.AddTag(theGame.params.TAG_OPEN_FIRE);
  77. }
  78.  
  79. public function OnLoad(t : CActor, eff : W3EffectManager)
  80. {
  81. super.OnLoad(t, eff);
  82.  
  83. cachedMPAC = ((CMovingPhysicalAgentComponent)target.GetMovingAgentComponent());
  84. }
  85.  
  86. event OnUpdate(deltaTime : float)
  87. {
  88. var player : CR4Player = thePlayer;
  89.  
  90. if ( this.isOnPlayer )
  91. {
  92. if ( player.bLAxisReleased )
  93. player.SetOrientationTargetCustomHeading( player.GetHeading(), 'BurningEffect' );
  94. else if ( player.GetPlayerCombatStance() == PCS_AlertNear )
  95. player.SetOrientationTargetCustomHeading( VecHeading( player.moveTarget.GetWorldPosition() - player.GetWorldPosition() ), 'BurningEffect' );
  96. else
  97. player.SetOrientationTargetCustomHeading( VecHeading( theCamera.GetCameraDirection() ), 'BurningEffect' );
  98. }
  99.  
  100.  
  101. //glyphword 12 - enemies in close range get burning applied as well
  102. //try to add burning
  103. //add to ignored array
  104. //if 1m below water level remove all burnings
  105. if(cachedMPAC && cachedMPAC.GetSubmergeDepth() <= -1)
  106. target.RemoveAllBuffsOfType(effectType);
  107. else
  108. super.OnUpdate(deltaTime);
  109. }
  110.  
  111. event OnEffectRemoved()
  112. {
  113. if ( isOnPlayer )
  114. thePlayer.RemoveCustomOrientationTarget('BurningEffect');
  115.  
  116. target.RemoveTag(theGame.params.TAG_OPEN_FIRE);
  117.  
  118. super.OnEffectRemoved();
  119. }
  120.  
  121. //override
  122. public function OnTargetDeath()
  123. {
  124. //increase time left till death anim finishes
  125. timeLeft = 10;
  126. }
  127.  
  128. //override
  129. public function OnTargetDeathAnimFinished()
  130. {
  131. //keep fire for some time after death anim finished
  132. timeLeft = 10;
  133. }
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement