CellCommons.gd 852 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. extends Object
  2. class_name CellCommons
  3. enum Type
  4. {
  5. ITEM = 0,
  6. EMOTE,
  7. SKILL,
  8. COUNT
  9. }
  10. static func CompareCell(cell : BaseCell, id : int, customfield : String) -> bool:
  11. return cell and \
  12. cell.id == id and \
  13. (
  14. cell is not ItemCell or \
  15. cell.customfield == customfield \
  16. )
  17. static func IsSameItem(cell : BaseCell, item : Item) -> bool:
  18. return item and CompareCell(cell, item.cellID, item.cellCustomfield)
  19. static func IsSameCell(cellA : BaseCell, cellB : BaseCell) -> bool:
  20. return cellB and CompareCell(cellA, cellB.id, cellB.customfield if cellB is ItemCell else "")
  21. enum Modifier {
  22. None = 0,
  23. Health,
  24. Mana,
  25. Stamina,
  26. MaxMana,
  27. RegenMana,
  28. CritRate,
  29. MAttack,
  30. MDefense,
  31. MaxStamina,
  32. RegenStamina,
  33. CooldownDelay,
  34. MaxHealth,
  35. RegenHealth,
  36. Defense,
  37. CastDelay,
  38. DodgeRate,
  39. AttackRange,
  40. WalkSpeed,
  41. WeightCapacity,
  42. Attack,
  43. Count
  44. }