示例#1
0
 def on_take(self, room, player):
     if self.takeable:
         player.score += self.value
         self.value = 0
         remove_and_move(player.items, self, room)
         return True
     return False
示例#2
0
 def on_drop(self, player, room):
     if self.droppable:
         remove_and_move(room.items, self, player)
         return True
     return False
示例#3
0
 def on_take(self, room, player):
     if self.takeable:
         remove_and_move(player.items, self, room)
         return True
     return False