AttributeStatus.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. using System;
  4. using Sirenix.OdinInspector;
  5. using DG.Tweening;
  6. //各个状态
  7. public enum SpecialState
  8. {
  9. Null = -1,
  10. FloatState = 0,
  11. BlownUp = 1,
  12. ShotDown = 2,
  13. Weak = 3,
  14. }
  15. public class AttributeStatus : MonoBehaviour
  16. {
  17. //组件
  18. private MoveCharacter character;
  19. private Rigidbody rb;
  20. private Foot foot;
  21. private HitFeedbackSystem hitFeedbackSystem;
  22. //behit参数
  23. [DisplayOnly] public SpecialState curSpecialStates = SpecialState.Null;
  24. public AttackController.AttackMethod attackMethod;
  25. [LabelText("控制时间")] [DisplayOnly] public float attributeTime;
  26. [TabGroup("漂浮")]
  27. [DisplayOnly] public int floatingState; //0:不漂浮;1:漂浮中;2:飘着;3:掉下去
  28. private Vector3 origPos; //初始位置
  29. private float curHeight; //当前所在高度
  30. private float riseTime; //上升时间
  31. private float backSpeed; //返回速度
  32. private float rotateSpeed; //旋转速度
  33. private float rotateDir; //旋转方向
  34. private float height; //漂浮高度
  35. private float rise = 1;
  36. private float normalFallSpeed = 15f;
  37. [TabGroup("击飞击落")] [DisplayOnly] public int hitState;
  38. [TabGroup("击飞击落")] [DisplayOnly] public bool isFly;
  39. [TabGroup("击飞击落")] [LabelText("X方向阻力")] public float decelerationRatioX = 2f;
  40. [TabGroup("击飞击落")] [LabelText("Y方向重力")] public float decelerationRatioY = 15f;
  41. public Character landingDamageFrom;
  42. private Vector3 startFlyPos;
  43. [TabGroup("击飞击落")] [LabelText("旋转中心高度")] public float rotateCenterHeight = 1f;
  44. [TabGroup("击飞击落")] [LabelText("起飞预设角度")] public float startFlyAngle = 15f;
  45. [Tooltip("x为最小值,y为最大值")]
  46. [TabGroup("击飞击落")] [LabelText("飞行预设角速度随机范围")] public Vector2 flyingRotateSpeedRange = new Vector2(15, 45);
  47. private float flyingRotateSpeed;
  48. private Vector3 scale;
  49. [TabGroup("击飞击落")] [LabelText("压缩程度")] public float compressionDegree = 0.8f;
  50. [Tooltip("x为向下压缩经过的时间,y为回弹经过的时间")]
  51. [TabGroup("击飞击落")] [LabelText("压缩速度")] public Vector2 compressionSpeed = new Vector2(0.2f, 0.4f);
  52. [TabGroup("击飞击落")] [LabelText("弹跳速度")] public float jumpVel = 5f;
  53. [TabGroup("易伤")]
  54. [DisplayOnly] public bool haveVulnerable = false;
  55. [TabGroup("易伤")]
  56. [DisplayOnly] public float vulnerableRate = 0f;
  57. [DisplayOnly] public float vulnerableTime;
  58. [TabGroup("累伤")] [DisplayOnly] public float stackingWoudsTime;
  59. [TabGroup("累伤")] [DisplayOnly] public float stackingWords;
  60. //抗性
  61. [Serializable]
  62. public struct Resistances
  63. {
  64. [LabelText("控制层级")] public int controlOrder;
  65. //控制效果抗性
  66. [Range(0, 1)]
  67. [LabelText("漂浮抗性")]
  68. public float Float;
  69. [Range(0, 1)]
  70. [LabelText("击飞抗性")]
  71. public float BlowUp;
  72. [Range(0, 1)]
  73. [LabelText("击落抗性")]
  74. public float ShotDown;
  75. [Range(0, 1)]
  76. [LabelText("击晕抗性")]
  77. public float Weak;
  78. [Space]
  79. //非控制效果抗性
  80. [LabelText("护甲值")] public int armor;
  81. [LabelText("闪避")] public int dodge;
  82. }
  83. [LabelText("抗性")] public Resistances resistances;
  84. private void Awake()
  85. {
  86. character = GetComponentInParent<MoveCharacter>();
  87. rb = character.rb;
  88. foot = character.foot;
  89. hitFeedbackSystem = GetComponent<HitFeedbackSystem>();
  90. scale = character.mecanim.transform.localScale;
  91. }
  92. public void Update()
  93. {
  94. //易伤
  95. if (haveVulnerable)
  96. {
  97. vulnerableTime -= Time.deltaTime;
  98. if (vulnerableTime <= 0)
  99. {
  100. vulnerableRate = 0f;
  101. haveVulnerable = false;
  102. }
  103. }
  104. //累伤
  105. if (stackingWords > 0)
  106. {
  107. stackingWoudsTime -= Time.deltaTime;
  108. if (stackingWoudsTime <= 0)
  109. {
  110. stackingWords = 0;
  111. }
  112. }
  113. }
  114. public void AddSpecialState(AttackController.AttackMethod attackMethod, Character attackFrom)
  115. {
  116. if (attackMethod.attackInfo.attackEffect.Count > 0)
  117. {
  118. AttackEffect attackEffect = AttackEffect.Null;
  119. foreach (AttackEffect ae in attackMethod.attackInfo.attackEffect)
  120. {
  121. switch (attackMethod.attackInfo.attackEffect[0])
  122. {
  123. /*控制*/
  124. //漂浮
  125. case AttackEffect.FloatState:
  126. if (resistances.Float == 1)
  127. {
  128. break;
  129. }
  130. if (PriorityOrder(SpecialState.FloatState, attackMethod.attackInfo.floatState.ControlOrder))
  131. {
  132. attackEffect = AttackEffect.FloatState;
  133. }
  134. break;
  135. //击飞
  136. case AttackEffect.BlowUp:
  137. if (resistances.BlowUp == 1)
  138. {
  139. break;
  140. }
  141. if (!character.nowCanFly)
  142. {
  143. if (PriorityOrder(SpecialState.BlownUp,attackMethod.attackInfo.blowUp.ControlOrder))
  144. {
  145. attackEffect = AttackEffect.BlowUp;
  146. }
  147. }
  148. break;
  149. //击落
  150. case AttackEffect.ShotDown:
  151. if (resistances.ShotDown == 1)
  152. {
  153. break;
  154. }
  155. if (character.nowCanFly || !character.canNotShotDown)
  156. {
  157. if (PriorityOrder(SpecialState.ShotDown,attackMethod.attackInfo.shotDown.ControlOrder))
  158. {
  159. attackEffect = AttackEffect.ShotDown;
  160. }
  161. }
  162. break;
  163. //击晕
  164. case AttackEffect.Weak:
  165. if (resistances.Weak == 1)
  166. {
  167. break;
  168. }
  169. if (PriorityOrder(SpecialState.Weak,attackMethod.attackInfo.weak.ControlOrder))
  170. {
  171. attackEffect = AttackEffect.Weak;
  172. }
  173. break;
  174. }
  175. }
  176. if (attackEffect != AttackEffect.Null)
  177. {
  178. switch (attackEffect)
  179. {
  180. /*控制*/
  181. //漂浮
  182. case AttackEffect.FloatState:
  183. AddFloat(attackMethod);
  184. break;
  185. //击飞
  186. case AttackEffect.BlowUp:
  187. AddBlowUp(attackMethod, attackFrom.bodyTrans);
  188. if (attackMethod.attackInfo.blowUp.haveLandingDamage)
  189. {
  190. landingDamageFrom = attackFrom;
  191. }
  192. break;
  193. //击落
  194. case AttackEffect.ShotDown:
  195. AddShotDown(attackMethod, attackFrom.bodyTrans);
  196. if (attackMethod.attackInfo.shotDown.haveLandingDamage)
  197. {
  198. landingDamageFrom = attackFrom;
  199. }
  200. break;
  201. //击晕
  202. case AttackEffect.Weak:
  203. AddWeak(attackMethod);
  204. break;
  205. }
  206. return;
  207. }
  208. }
  209. if (curSpecialStates == SpecialState.Null)
  210. {
  211. hitFeedbackSystem.EnterHitStun(attackFrom);
  212. }
  213. }
  214. //CharacterState为SpecialStatus时调用此函数
  215. public void SpecialStateEffect(SpecialState specialState)
  216. {
  217. switch (specialState)
  218. {
  219. //漂浮
  220. case SpecialState.FloatState:
  221. switch (floatingState)
  222. {
  223. case 1:
  224. character.transform.localEulerAngles += new Vector3(0, 0, 1) * rotateDir * rotateSpeed * Time.deltaTime;
  225. curHeight = Mathf.SmoothDamp(curHeight, height, ref rise, riseTime);
  226. character.transform.position = new Vector3(origPos.x, curHeight, origPos.z);
  227. if (curHeight >= height - 0.02f)
  228. {
  229. floatingState = 2;
  230. height = character.transform.position.y;
  231. }
  232. break;
  233. case 2:
  234. character.transform.localEulerAngles += new Vector3(0, 0, 1) * rotateDir * rotateSpeed * Time.deltaTime;
  235. break;
  236. case 3:
  237. if (character.transform.position.y >= origPos.y + 0.05f)
  238. {
  239. curHeight -= normalFallSpeed * Time.deltaTime;
  240. character.transform.position = new Vector3(origPos.x, curHeight, origPos.z);
  241. }
  242. else if (foot.TrigGround || curHeight <= origPos.y + 0.05f)
  243. {
  244. floatingState = 0;
  245. character.bodyCollider.layer = character.gameObject.layer;
  246. character.isAdjustHeight = 1;
  247. OutSpecialState();
  248. return;
  249. }
  250. break;
  251. }
  252. PlayerController playerController = GetComponent<PlayerController>();
  253. if (playerController != null)
  254. {
  255. if (playerController.mp > 0)
  256. {
  257. playerController.lostMp += playerController.mpReplySpeed * Time.deltaTime;
  258. playerController.mp -= playerController.mpReplySpeed * Time.deltaTime;
  259. }
  260. if (playerController.lostMp >= playerController.addMp)
  261. {
  262. PoolManager.Instantiate(playerController.soul, character.transform.position, new Quaternion(0, 0, 0, 0), null);
  263. playerController.lostMp = 0;
  264. }
  265. }
  266. attributeTime -= Time.deltaTime;
  267. if (attributeTime <= 0)
  268. {
  269. character.transform.localEulerAngles = Vector3.zero;
  270. floatingState = 3;
  271. rb.useGravity = true;
  272. }
  273. break;
  274. //击飞
  275. case SpecialState.BlownUp:
  276. //击落
  277. case SpecialState.ShotDown:
  278. Vector3 vel = rb.velocity;
  279. switch (hitState)
  280. {
  281. case -1:
  282. break;
  283. case 0:
  284. if (isFly && foot.TrigGround && vel.y < 0.1f)
  285. {
  286. if (!foot.haveGravity)
  287. {
  288. character.transform.position = new Vector3(transform.position.x, character.platformPosY, transform.position.z);
  289. }
  290. character.ani.Play(AnimatorHash.ANIMATOR_weak, 0, 0);
  291. character.bodyCollider.layer = character.gameObject.layer;
  292. vel = vel / 5f;
  293. vel.y = jumpVel;
  294. character.mecanim.transform.localPosition = Vector3.zero;
  295. character.mecanim.transform.localRotation = Quaternion.Euler(0, 0, 0);
  296. character.transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y, character.platformRotZ);
  297. hitState = 1;
  298. int landingDamage;
  299. if (specialState == SpecialState.BlownUp)
  300. {
  301. if (attackMethod.attackInfo.blowUp.haveLandingDamage)
  302. {
  303. landingDamage = (int)(Mathf.Abs(transform.position.x - startFlyPos.x) * attackMethod.attackInfo.blowUp.landingDamageRate);
  304. if (landingDamage > 0)
  305. {
  306. character.BeHit(attackMethod, landingDamageFrom, landingDamage);
  307. }
  308. }
  309. }
  310. else
  311. {
  312. if (attackMethod.attackInfo.shotDown.haveLandingDamage)
  313. {
  314. landingDamage = attackMethod.attackInfo.shotDown.landingDamage;
  315. character.BeHit(attackMethod, landingDamageFrom, landingDamage);
  316. }
  317. }
  318. BounceEffect();
  319. }
  320. else
  321. {
  322. if (vel.x > 0)
  323. {
  324. vel.x -= decelerationRatioX * Time.deltaTime;
  325. }
  326. else
  327. {
  328. vel.x += decelerationRatioX * Time.deltaTime;
  329. }
  330. vel.y -= decelerationRatioY * Time.deltaTime;
  331. character.mecanim.transform.RotateAround(
  332. character.transform.position + rotateCenterHeight * Vector3.up,
  333. Vector3.forward,
  334. flyingRotateSpeed * Time.deltaTime);
  335. isFly = true;
  336. }
  337. break;
  338. case 1:
  339. //眩晕状态
  340. if (attributeTime <= 0)
  341. {
  342. character.isAdjustHeight = 1;
  343. character.nowCanFly = character.canFly;
  344. OutSpecialState();
  345. }
  346. else
  347. {
  348. if (vel.x > 0)
  349. {
  350. vel.x -= decelerationRatioX * Time.deltaTime;
  351. }
  352. else
  353. {
  354. vel.x += decelerationRatioX * Time.deltaTime;
  355. }
  356. if (!foot.TrigGround || vel.y > 0.1f)
  357. {
  358. vel.y -= decelerationRatioY * Time.deltaTime;
  359. }
  360. attributeTime -= Time.deltaTime;
  361. }
  362. break;
  363. }
  364. rb.velocity = vel;
  365. break;
  366. //眩晕
  367. case SpecialState.Weak:
  368. if (attributeTime <= 0)
  369. {
  370. OutSpecialState();
  371. }
  372. else
  373. {
  374. if (!character.isFrozen) rb.velocity = Vector3.zero;
  375. attributeTime -= Time.deltaTime;
  376. }
  377. break;
  378. }
  379. }
  380. void BounceEffect()
  381. {
  382. Transform spine = character.mecanim.transform;
  383. Sequence landSequence = DOTween.Sequence();
  384. landSequence.Append(spine.DOScaleY(scale.y * compressionDegree, compressionSpeed.x));
  385. landSequence.Append(spine.DOScaleY(scale.y, compressionSpeed.y));
  386. }
  387. public void OutSpecialState()
  388. {
  389. character.mecanim.transform.localRotation = Quaternion.Euler(0, 0, 0);
  390. curSpecialStates = SpecialState.Null;
  391. if (character.canFly)
  392. {
  393. rb.useGravity = false;
  394. character.isAdjustHeight = 1;
  395. }
  396. character.ChangeState(CharacterState.Idle);
  397. }
  398. //判断优先级,ture为优先级高于当前控制
  399. public bool PriorityOrder(SpecialState specialState, int controlOrder)
  400. {
  401. //控制层级小于控制抗性层级,该控制效果无效
  402. if (controlOrder < resistances.controlOrder)
  403. {
  404. return false;
  405. }
  406. if (curSpecialStates == SpecialState.Null)
  407. {
  408. curSpecialStates = specialState;
  409. return true;
  410. }
  411. else
  412. {
  413. if (curSpecialStates >= specialState)
  414. {
  415. curSpecialStates = specialState;
  416. return true;
  417. }
  418. }
  419. return false;
  420. }
  421. //受到漂浮
  422. public void AddFloat(AttackController.AttackMethod attackMethod)
  423. {
  424. if (resistances.Float == 1)
  425. {
  426. return;
  427. }
  428. this.attackMethod = attackMethod;
  429. AttackInfo.FloatState floatState = attackMethod.attackInfo.floatState;
  430. rb.isKinematic = false;
  431. rb.useGravity = false;
  432. floatingState = 1;
  433. origPos = character.transform.position;
  434. curHeight = origPos.y;
  435. riseTime = UnityEngine.Random.Range(floatState.upTime.x, floatState.upTime.y);
  436. backSpeed = UnityEngine.Random.Range(floatState.backSpeed.x, floatState.backSpeed.y);
  437. if (gameObject.tag == "Enemy" || gameObject.tag == "Player")
  438. {
  439. backSpeed = -backSpeed;
  440. }
  441. rotateSpeed = UnityEngine.Random.Range(floatState.rotateSpeed.x, floatState.rotateSpeed.y);
  442. rotateDir = (1.5f - UnityEngine.Random.Range(1, 3)) * 2;
  443. height = UnityEngine.Random.Range(floatState.height.x, floatState.height.y);
  444. attributeTime = floatState.time * (1 - resistances.Float);
  445. character.ChangeState(CharacterState.SpecialStatus_Float);
  446. character.ChangeStateText(CharacterState.SpecialStatus_Float);
  447. }
  448. //受到击飞
  449. public void AddBlowUp(AttackController.AttackMethod attackMethod, Transform attackFrom)
  450. {
  451. if (resistances.BlowUp == 1)
  452. {
  453. return;
  454. }
  455. this.attackMethod = attackMethod;
  456. AttackInfo.BlowUp blowUp = attackMethod.attackInfo.blowUp;
  457. attributeTime = blowUp.time * (1 - resistances.BlowUp);
  458. Vector3 vec3 = new Vector3(
  459. blowUp.dir.x + UnityEngine.Random.Range(-blowUp.dirRandom.x / 2f, blowUp.dirRandom.x / 2f),
  460. blowUp.dir.y + UnityEngine.Random.Range(-blowUp.dirRandom.y / 2f, blowUp.dirRandom.y / 2f),
  461. 0).normalized;
  462. int attackDir = 0;
  463. switch (blowUp.directionType)
  464. {
  465. case AttackInfo.BlowUp.DirectionType.Common:
  466. attackDir = attackFrom.localScale.x < 0 ? -1 : 1;
  467. break;
  468. case AttackInfo.BlowUp.DirectionType.Spread:
  469. attackDir = attackFrom.position.x < transform.position.x ? -1 : 1;
  470. break;
  471. }
  472. if (attackDir < 0)
  473. {
  474. vec3.x = -vec3.x;
  475. }
  476. hitState = -1;
  477. character.ChangeState(CharacterState.SpecialStatus_BlowUp);
  478. character.ChangeStateText(CharacterState.SpecialStatus_BlowUp);
  479. rb.useGravity = true;
  480. rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
  481. rb.velocity = Vector3.zero;
  482. rb.AddForce(vec3 * blowUp.force * (1 - resistances.BlowUp), ForceMode.Impulse);
  483. rb.transform.rotation = Quaternion.Euler(0, 0, 0);
  484. character.mecanim.transform.RotateAround(
  485. character.transform.position + rotateCenterHeight * Vector3.up,
  486. Vector3.forward,
  487. startFlyAngle * attackDir);
  488. flyingRotateSpeed = UnityEngine.Random.Range(flyingRotateSpeedRange.x, flyingRotateSpeedRange.y) * attackDir;
  489. startFlyPos = transform.position;
  490. hitState = 0;
  491. isFly = false;
  492. character.ani.Play("hitted", 0, 0);
  493. }
  494. //受到击落
  495. public void AddShotDown(AttackController.AttackMethod attackMethod, Transform attackFrom)
  496. {
  497. if (resistances.ShotDown == 1)
  498. {
  499. return;
  500. }
  501. this.attackMethod = attackMethod;
  502. AttackInfo.ShotDown shotDown = attackMethod.attackInfo.shotDown;
  503. attributeTime = shotDown.time * (1 - resistances.ShotDown);
  504. Vector3 vec3 = new Vector3(
  505. shotDown.dir.x + UnityEngine.Random.Range(-shotDown.dirRandom.x / 2f, shotDown.dirRandom.x / 2f),
  506. shotDown.dir.y + UnityEngine.Random.Range(-shotDown.dirRandom.y / 2f, shotDown.dirRandom.y / 2f),
  507. 0).normalized;
  508. int attackDir = 0;
  509. switch (shotDown.directionType)
  510. {
  511. case AttackInfo.ShotDown.DirectionType.Common:
  512. attackDir = attackFrom.localScale.x < 0 ? -1 : 1;
  513. break;
  514. case AttackInfo.ShotDown.DirectionType.Spread:
  515. attackDir = attackFrom.position.x < transform.position.x ? -1 : 1;
  516. break;
  517. }
  518. if (attackDir < 0)
  519. {
  520. vec3.x = -vec3.x;
  521. }
  522. rb.useGravity = true;
  523. rb.constraints = RigidbodyConstraints.FreezeRotation | RigidbodyConstraints.FreezePositionZ;
  524. rb.velocity = Vector3.zero;
  525. rb.AddForce(vec3 * shotDown.force * (1 - resistances.ShotDown), ForceMode.Impulse);
  526. rb.transform.rotation = Quaternion.Euler(0, 0, 0);
  527. character.ani.Play("hitted", 0, 0);
  528. character.nowCanFly = false;
  529. hitState = 0;
  530. isFly = false;
  531. character.ChangeState(CharacterState.SpecialStatus_ShotDown);
  532. character.ChangeStateText(CharacterState.SpecialStatus_ShotDown);
  533. }
  534. //受到击晕
  535. public void AddWeak(AttackController.AttackMethod attackMethod)
  536. {
  537. if (resistances.Weak == 1)
  538. {
  539. return;
  540. }
  541. this.attackMethod = attackMethod;
  542. AttackInfo.Weak weak = attackMethod.attackInfo.weak;
  543. attributeTime = weak.time * (1 - resistances.Weak);
  544. character.ani.Play("weak", 0, 0);
  545. character.ChangeState(CharacterState.SpecialStatus_Weak);
  546. character.ChangeStateText(CharacterState.SpecialStatus_Weak);
  547. }
  548. public void AddWeak(float _attributeTime)
  549. {
  550. if (resistances.Weak == 1 || character.isDie)
  551. {
  552. return;
  553. }
  554. attributeTime = _attributeTime;
  555. character.ani.Play("weak", 0, 0);
  556. character.ChangeState(CharacterState.SpecialStatus_Weak);
  557. character.ChangeStateText(CharacterState.SpecialStatus_Weak);
  558. }
  559. //受到穿甲
  560. public int AddArmorPiercing(AttackController.AttackMethod attackMethod)
  561. {
  562. this.attackMethod = attackMethod;
  563. AttackInfo.ArmorPiercing armor = attackMethod.attackInfo.armorPiercing;
  564. //计算护甲减免
  565. int am = resistances.armor;
  566. if (am > 0)
  567. {
  568. am = am - armor.rate;
  569. if (am < 0)
  570. {
  571. am = 0;
  572. }
  573. }
  574. return am;
  575. }
  576. //受到易伤
  577. public void AddVulnerable(float _vulnerableRate,float _vulnerableTime)
  578. {
  579. vulnerableRate += _vulnerableRate;
  580. vulnerableTime = _vulnerableTime;
  581. haveVulnerable = true;
  582. Debug.Log("添加易伤,vulnerableTime:" + vulnerableTime + ",vulnerableRate:" + vulnerableRate);
  583. }
  584. //受到累伤
  585. public void AddStackingWouds(AttackController.AttackMethod attackMethod)
  586. {
  587. this.attackMethod = attackMethod;
  588. AttackInfo.StackingWounds stackingWounds = attackMethod.attackInfo.stackingWounds;
  589. if(stackingWoudsTime > 0)
  590. {
  591. stackingWords += attackMethod.attackInfo.stackingWounds.damage;
  592. }
  593. stackingWoudsTime = stackingWounds.time;
  594. }
  595. }