actionfoldmap.c 618 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //dummy action. Unfold 'looped action' canceled from elswhere
  2. class ActionFoldMap: ActionBase
  3. {
  4. void ActionFoldMap()
  5. {
  6. m_Text = "#fold_map";
  7. }
  8. override bool IsInstant()
  9. {
  10. return true;
  11. }
  12. override void CreateConditionComponents()
  13. {
  14. m_ConditionItem = new CCINonRuined;
  15. m_ConditionTarget = new CCTNone;
  16. }
  17. override bool HasTarget()
  18. {
  19. return false;
  20. }
  21. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  22. {
  23. if (player.m_hac && player.IsMapOpen())
  24. {
  25. return true;
  26. }
  27. return false;
  28. }
  29. override int GetActionCategory()
  30. {
  31. return AC_SINGLE_USE;
  32. }
  33. };