subject.py 789B

1234567891011121314151617181920212223
  1. # coding: utf-8
  2. from opencc.const import COLLECTION_ALIVE, COMBAT_MODE_DEFENSE
  3. from opencc.simulation.base import BaseSubject
  4. from opencc.simulation.behaviour import MoveToBehaviour
  5. from opencc.simulation.behaviour import EngageOpponent
  6. from opencc.simulation.behaviour import LookAroundBehaviour
  7. from synergine2.share import shared
  8. class TileSubject(BaseSubject):
  9. start_collections = [
  10. COLLECTION_ALIVE,
  11. ]
  12. behaviours_classes = [
  13. MoveToBehaviour,
  14. LookAroundBehaviour,
  15. EngageOpponent,
  16. ]
  17. visible_opponent_ids = shared.create_self('visible_opponent_ids', lambda: [])
  18. combat_mode = shared.create_self('combat_mode', COMBAT_MODE_DEFENSE)
  19. # TODO: implement (copied from engulf)
  20. # behaviour_selector_class = CellBehaviourSelector