X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;ds=inline;f=plomrogue%2Ftasks.py;h=b408ea49636b582a3dcbe8fd505faa196270fe99;hb=97b606810ee702789497f9e842718441585ad545;hp=68ffb09d203055f4e2bd32126d1c609d103517be;hpb=7ca861abd3acab67ddf18c39dbaadd9b401f7892;p=plomrogue2 diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 68ffb09..b408ea4 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -205,6 +205,8 @@ class Task_DOOR(Task): t.type_ == 'Door' and t.position in action_radius] if len(reachable_doors) == 0: raise PlayError('not standing next to a door to open/close') + if len([d for d in reachable_doors if not d.portable]) == 0: + raise PlayError('can only open/close doors that are installed') for door in reachable_doors: if not door.blocks_movement: return