def get_action(self, consumer: Actor) -> AreaRangedAttackHandler: self.engine.message_log.add_message("Select a target location.", color.needs_target) return AreaRangedAttackHandler( self.engine, radius=self.radius, callback=lambda xy: actions.ItemAction(consumer, self.parent, xy))
def get_action(self, consumer: Actor) -> Optional[ActionOrHandler]: self.engine.message_log.add_message("Select a target location", color.NEEDS_TARGET) return AreaRangedAttackHandler( self.engine, radius=self.radius, callback=lambda xy: actions.ItemAction(consumer, self.parent, xy), )
def get_action(self, consumer: Actor) -> AreaRangedAttackHandler: """Chooses the location that the action should be perforemd at""" self.engine.message_log.add_message("Select a target location", color.needs_target) return AreaRangedAttackHandler( self.engine, radius=self.radius, callback=lambda xy: actions.ItemAction(consumer, self.parent, xy), )
def get_action(self, consumer: Actor) -> Optional[actions.Action]: self.engine.message_log.add_message("Select a target location.", color.needs_target) self.engine.event_handler = AreaRangedAttackHandler( self.engine, radius=self.radius, callback=lambda xy: actions.ReadItem(consumer, self.parent, xy), ) return None