async def execute(self,game:MUD, player:MPlayer): player.add_temp_condition(mud.Condition.RESTRAINED,self.speed+2) player.special_desc="%s is being scanned." % player.mname await self.notify(player,"is scanning themselves.") await asyncio.sleep(self.speed) if not player.dead: await self.notify(player,"is an Impostor!" if player.role.name=="Impostor" else "is not an impostor.") player.conditions.append(mud.Condition.SCANNED) player.special_desc=""
async def execute(self,game:MUD, player:MPlayer): self.target.add_temp_condition(mud.Condition.RESTRAINED,self.speed+2) player.special_desc="%s is trying to eat %s." % (player.mname,self.target.mname) await self.notify(player, "is trying to eat %s!" % self.target.mname) await asyncio.sleep(self.speed) if not player.immobile: await game.kill(self.target, "eaten by an imposter", False) await player.dm("You successfully ate %s!" % self.target.mname) await self.notify(player, "ate %s!" % self.target.mname) player.special_desc="" else: await player.dm("Your feeding was interrupted...")
async def execute(self,game:MUD, player:MPlayer): await player.dm("You look through the various camera feeds...") await self.notify(player,"is looking at the cameras") await asyncio.sleep(10) if player.be(mud.Condition.BLINDED): await player.dm("You can't see ANYTHING!") elif not player.dead: await player.dm("\n".join("You can't find %s." % p.mname if p.dead else "%s is in the %s." % (p.mname, p.area.name) for p in game.players if p is not player))
def valid(self,game:mud.MUD, player:mud.MPlayer,args:typing.List[str]): if player.area.name!="Morgue": return "You need to be in the morgue to investigate bodies!" if player.immobile: return "You can't investigate bodies while you can't move!" if player.be(mud.Condition.BLINDED): return "You can't see what you're doing!" if any(isinstance(i,mud.Corpse) for i in player.area.entities): return True return "There aren't any corpses to investigate"
async def execute(self,game:MUD, player:MPlayer): player.conditions.append(mud.Condition.DRUGGED) player.conditions.append(mud.Condition.STUNNED) await self.notify(player,"took some drugs.") await player.dm("Wow, these drugs are stronger than you thought! You black out...") player.special_desc="%s is drugged out on the floor." % player.mname
async def valid(self,game:MUD, player:MPlayer,args:typing.List[str]): if player.immobile: return "You're in no condition to activate anything!" if player.be(mud.Condition.BLINDED): return "You can't see what you're doing..." return super().valid(game, player, args)
def valid(self,game:MUD, player:MPlayer,args:typing.List[str]): if player.immobile: return "You can't hit the broadcast button atm..." if player.be(mud.Condition.BLINDED): return "You can't see the broadcast button atm..." return super().valid(game,player,args)
def valid(self,game:MUD, player:MPlayer,args:typing.List[str]): if player.immobile: return "You can't write notes while immobile!" if player.be(mud.Condition.BLINDED): return "You can't see what you're writing!" return super().valid(game,player,args)
def valid(self,game:MUD, player:MPlayer,args:typing.List[str]): if player.be(mud.Condition.BLINDED): return "You can't see anything, especially camera feeds!" return super().valid(game,player,args)
def did_win(self,game:MUD,player:MPlayer): return not player.dead and player.be(Condition.DRUGGED)