SkillFeaturesData.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using Fort23.Core;
  3. using GameLogic.Player;
  4. namespace GameLogic.Combat.Skill
  5. {
  6. public class SkillFeaturesData : CObject
  7. {
  8. /// <summary>
  9. /// 生命值
  10. /// </summary>
  11. public long hp;
  12. public bool isEnemy;
  13. public WuXingType WuXingType;
  14. public int GetRestrained(WuXingType targetWuXingType)
  15. {
  16. int c = 0;
  17. if (WuXingType.HasFlag(WuXingType.Gold))
  18. {
  19. if (targetWuXingType.HasFlag(WuXingType.Wood))
  20. {
  21. c++;
  22. }
  23. }
  24. if (WuXingType.HasFlag(WuXingType.Wood))
  25. {
  26. if (targetWuXingType.HasFlag(WuXingType.Earth))
  27. {
  28. c++;
  29. }
  30. }
  31. if (WuXingType.HasFlag(WuXingType.Water))
  32. {
  33. if (targetWuXingType.HasFlag(WuXingType.Fire))
  34. {
  35. c++;
  36. }
  37. }
  38. if (WuXingType.HasFlag(WuXingType.Fire))
  39. {
  40. if (targetWuXingType.HasFlag(WuXingType.Gold))
  41. {
  42. c++;
  43. }
  44. }
  45. if (WuXingType.HasFlag(WuXingType.Earth))
  46. {
  47. if (targetWuXingType.HasFlag(WuXingType.Wood))
  48. {
  49. c++;
  50. }
  51. }
  52. return c;
  53. }
  54. public SkillFeaturesData CapyFeaturesData()
  55. {
  56. SkillFeaturesData skillFeaturesData = CObjectPool.Instance.Fetch<SkillFeaturesData>();
  57. skillFeaturesData.hp = hp;
  58. skillFeaturesData.isEnemy = isEnemy;
  59. skillFeaturesData.WuXingType = WuXingType;
  60. return skillFeaturesData;
  61. }
  62. public override void ActiveObj()
  63. {
  64. }
  65. public override void DormancyObj()
  66. {
  67. }
  68. }
  69. }