sopel-eftaios

sopel module to play ESCAPE FROM THE ALIENS IN OUTER SPACE
git clone git://tx.god.jp/sopel-eftaios.git
Log | Files | Refs | README | LICENSE

commit 2a4574b9cc5da93c18f63959b354f5c0167f8e9b
parent 38c50b3d830672fc25a26af29cfe82c6c4c4ecf6
Author: tx <trqx@goat.si>
Date:   Tue, 27 Feb 2018 17:25:57 +0100

use same deck for items and dangerous sectors

not tested yet

Diffstat:
eftaios.py | 645++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 609 insertions(+), 36 deletions(-)

diff --git a/eftaios.py b/eftaios.py @@ -1,12 +1,616 @@ -from sopel import module +fitemrom sopel import module import random import json -hide_cards = False chan = '#styx' jsondecks = ''' -{"items":[{"title":"Attack","description":"This item allows you to attack, using the same rules as aliens.","image":"item_attack.jpg"},{"title":"Teleport","description":"This item allows you to move DIRECTLY TO THE HUMAN SECTOR from any part of the ship. This is in addition to your normal movement which can happen before or after you use the item.","image":"item_teleport.jpg"},{"title":"Adrenaline","description":"This item allows you to MOVE ONE EXTRA SECTOR this turn. Play it at the begining of your turn. Note: you only draw a dangerous sector if your move end on a dangerous sector.","image":"item_adrenaline.jpg"},{"title":"Sedatives","description":"When you use this item you DO NOT DRAW A DANGEROUS SECTOR CARD this turn, even if you move into a Dangerous Sector. Use it at the begining of your turn.","image":"item_other"},{"title":"Defence","description":"Use this item immediately when an Alien attacks you. You are NOT AFFECTED BY THE ATTACK.","image":"item_other"},{"title":"Spotlight","description":"When you use this item, name any Sector. Any player, including you, that are in the named Sector or any of the six adjacent Sectors must immediately ANNOUNCE THEIR EXACT LOCATION COORDINATES.","image":"item_other"},{"title":"Clone","description":"Use this item immediatly when an alien attacks you. DO NOT TURN INTO AN ALIEN. Instead, you begin the next turn in the human sector. Your clone is activated after the alien kills you, so you'll discard any silence and item cards you might be carrying.","image":"item_adrenaline.jpg"},{"title":"Sensor","description":"Use this item on another player. That player must immediatly announce their exact location coordinates. This item affects both humans and aliens.","image":"item_spotlight.jpg"},{"title":"Mutation","description":"This card has the effect of turning the Human player into an Alien if used.Continue to play from the sector you were in when you used the Mutation card. You must now PLAY AS AN ALIEN and try to kill the remaining Human players.","image":"item_mutation.jpg"},{"title":"Cat","description":"Use this item before drawing a dangerous sector. You must then DECLARE NOISE IN TWO DIFFERENT SECTORS. If you drew a noise in your sector then one of them must be the coordinates of the sector you just moved into, otherwise they can both be the coordinates of any sector you choose, even if you drew a Silence or Item. You must then discard any Silence or Item you just drew as if they were a Noise in your sector or Noise in Any Sector.","image":"dangerous_silence.jpg"}],"dangerous":[{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":true,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":true,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":true,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":true,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in your sector","description":"Announce your current location: NOISE IN SECTOR [XY]","item":false,"type":"red","image":"dangerous_noise.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":true,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":true,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":true,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":true,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Noise in any sector","description":"Fake your location: NOISE IN SECTOR [XY]","item":false,"type":"green","image":"dangerous_noise_any.jpg"},{"title":"Silence","description":"Announce: SILENT IN ALL SECTORS","item":false,"image":"dangerous_silence.jpg"},{"title":"Silence","description":"Announce: SILENT IN ALL SECTORS","item":false,"image":"dangerous_silence.jpg"},{"title":"Silence","description":"Announce: SILENT IN ALL SECTORS","item":false,"image":"dangerous_silence.jpg"},{"title":"Silence","description":"Announce: SILENT IN ALL SECTORS","item":false,"image":"dangerous_silence.jpg"},{"title":"Silence","description":"Announce: SILENT IN ALL SECTORS","item":false,"image":"dangerous_silence.jpg"}],"hatch":[{"title":"Damaged escape hatch","description":"This hatch cannot be used for the rest of the game, attempt to use another one.","type":"red","image":"hatch_damaged.png"},{"title":"Damaged escape hatch","description":"This hatch cannot be used for the rest of the game, attempt to use another one.","type":"red","image":"hatch_damaged.png"},{"title":"Damaged escape hatch","description":"This hatch cannot be used for the rest of the game, attempt to use another one.","type":"red","image":"hatch_damaged.png"},{"title":"Working escape hatch","description":"You succesfully escaped, tell other players that this escape hatch cannot be used anymore.","type":"green","image":"hatch_ok.png"},{"title":"Working escape hatch","description":"You succesfully escaped, tell other players that this escape hatch cannot be used anymore.","type":"green","image":"hatch_ok.png"},{"title":"Working escape hatch","description":"You succesfully escaped, tell other players that this escape hatch cannot be used anymore.","type":"green","image":"hatch_ok.png"}],"chars":{"humans":[{"title":"The capitain","description":"does not draw a Dangerous Sector Card the first time he moves into a Dangerous Sector","image":"char_capitain.jpg","type":"human"},{"title":"The pilot","description":"can announce two noises upon drawing a Dangerous Sector Card ONCE, as if he had used a Cat card and without needing one.","image":"char_pilot.jpg","type":"human"},{"title":"The Psychologist","description":"begins the game in the Alien Sector.","image":"char_psychologist.jpg","type":"human"},{"title":"The soldier","description":"can Attack ONCE in the game, as if he had used an Attack card and without needing one. NOTE: this power is very useful if trying to pass as an Alien early in the game.","image":"char_soldier.jpg","type":"human"},{"title":"The executive officer","description":"can stay still and not move during his turn ONCE during the game, without announcing it. Take a Dangerous Sector card or declare ‘Silent Sector’ as normal.","image":"char_other.jpg","type":"human"},{"title":"The co-pilot","description":"can Teleport ONCE in the game, as if she had used a Teleport card and without needing one. She must disclose her identity and show her character card when doing so.","image":"char_other.jpg","type":"human"},{"title":"The engineer","description":"draws two Escape Pod Cards when he reaches an Escape Pod Sector and chooses which one to use. The unused Escape Pod Card is reshuffled with the remaining Escape Pod Cards","image":"char_other.jpg","type":"human"},{"title":"The medic","description":"can force another player to reveal their identity once during the game. The medic discloses his identity and reveals his character card when doing so.","image":"char_other.jpg","type":"human"}],"aliens":[{"title":"The blink alien","description":"can use the Teleport Item Cards, when found, following the rules for Item Card play and without revealing his identity.","image":"char_alien_blink.jpg","type":"alien"},{"title":"The silent alien","description":"can use the Sedatives Item Cards, when found, following the rules for Item Card play and without revealing his identity.","image":"char_alien_silent.jpg","type":"alien"},{"title":"The surge alien","description":"can use the Adrenaline Item Cards, when found, following the rules for Item Card play and without revealing her identity.","image":"char_alien_surge.jpg","type":"alien"},{"title":"The brute alien","description":"is immune to all Attacks, Human and Alien. He must disclose his identity and reveal his character card when Attacked.","image":"char_alien_brute.jpg","type":"alien"},{"title":"The invisible alien","description":"is immune to the Sensor Item and the Spotlight Item. Instead of revealing his location, he must disclose his identity and reveal his character card when targeted with those cards.","image":"char_alien_other.jpg","type":"alien"},{"title":"The lurking alien","description":"can choose to directly attack in his Sector, instead of moving. If he does, he will not move at all in that turn.","image":"char_alien_other.jpg","type":"alien"},{"title":"The fast alien","description":"can move up to three sectors on his first movement of the game.","image":"char_alien_other.jpg","type":"alien"},{"title":"The psychic alien","description":"always behaves as if he had drawn a Noise In Any Sector card when drawing a Silence Card.","image":"char_alien_other.jpg","type":"alien"}]}} +{ + "dangerous": [ + { + "title": "Teleport", + "description": "This item allows you to move DIRECTLY TO THE HUMAN SECTOR from any part of the ship. This is in addition to your normal movement which can happen before or after you use the item.", + "type": "item", + "image": "item_teleport.jpg" + }, + { + "title": "Defense", + "description": "Use this item immediately when an Alien attacks you. You are NOT AFFECTED BY THE ATTACK.", + "type": "item", + "image": "item_other" + }, + { + "title": "Mutation", + "description": "This card has the effect of turning the Human player into an Alien if used.Continue to play from the sector you were in when you used the Mutation card. You must now PLAY AS AN ALIEN and try to kill the remaining Human players.", + "type": "item", + "image": "item_mutation.jpg" + }, + { + "title": "Clone", + "description": "Use this item immediatly when an alien attacks you. DO NOT TURN INTO AN ALIEN. Instead, you begin the next turn in the human sector. Your clone is activated after the alien kills you, so you'll discard any silence and item cards you might be carrying.", + "type": "item", + "image": "item_adrenaline.jpg" + }, + { + "title": "Spotlight", + "description": "When you use this item, name any Sector. Any player, including you, that are in the named Sector or any of the six adjacent Sectors must immediately ANNOUNCE THEIR EXACT LOCATION COORDINATES.", + "type": "item", + "image": "item_other" + }, + { + "title": "Spotlight", + "description": "When you use this item, name any Sector. Any player, including you, that are in the named Sector or any of the six adjacent Sectors must immediately ANNOUNCE THEIR EXACT LOCATION COORDINATES.", + "type": "item", + "image": "item_other" + }, + { + "title": "Attack", + "description": "This item allows you to attack, using the same rules as aliens.", + "type": "item", + "image": "item_attack.jpg" + }, + { + "title": "Attack", + "description": "This item allows you to attack, using the same rules as aliens.", + "type": "item", + "image": "item_attack.jpg" + }, + { + "title": "Sedatives", + "description": "When you use this item you DO NOT DRAW A DANGEROUS SECTOR CARD this turn, even if you move into a Dangerous Sector. Use it at the begining of your turn.", + "type": "item", + "image": "item_other" + }, + { + "title": "Sedatives", + "description": "When you use this item you DO NOT DRAW A DANGEROUS SECTOR CARD this turn, even if you move into a Dangerous Sector. Use it at the begining of your turn.", + "type": "item", + "image": "item_other" + }, + { + "title": "Sedatives", + "description": "When you use this item you DO NOT DRAW A DANGEROUS SECTOR CARD this turn, even if you move into a Dangerous Sector. Use it at the begining of your turn.", + "type": "item", + "image": "item_other" + }, + { + "title": "Adrenaline", + "description": "This item allows you to MOVE ONE EXTRA SECTOR this turn. Play it at the begining of your turn. Note: you only draw a dangerous sector if your move end on a dangerous sector.", + "type": "item", + "image": "item_adrenaline.jpg" + }, + { + "title": "Adrenaline", + "description": "This item allows you to MOVE ONE EXTRA SECTOR this turn. Play it at the begining of your turn. Note: you only draw a dangerous sector if your move end on a dangerous sector.", + "type": "item", + "image": "item_adrenaline.jpg" + }, + { + "title": "Adrenaline", + "description": "This item allows you to MOVE ONE EXTRA SECTOR this turn. Play it at the begining of your turn. Note: you only draw a dangerous sector if your move end on a dangerous sector.", + "type": "item", + "image": "item_adrenaline.jpg" + }, + { + "title": "Cat", + "description": "Use this item before drawing a dangerous sector. You must then DECLARE NOISE IN TWO DIFFERENT SECTORS. If you drew a noise in your sector then one of them must be the coordinates of the sector you just moved into, otherwise they can both be the coordinates of any sector you choose, even if you drew a Silence or Item. You must then discard any Silence or Item you just drew as if they were a Noise in your sector or Noise in Any Sector.", + "type": "item", + "image": "dangerous_silence.jpg" + }, + { + "title": "Cat", + "description": "Use this item before drawing a dangerous sector. You must then DECLARE NOISE IN TWO DIFFERENT SECTORS. If you drew a noise in your sector then one of them must be the coordinates of the sector you just moved into, otherwise they can both be the coordinates of any sector you choose, even if you drew a Silence or Item. You must then discard any Silence or Item you just drew as if they were a Noise in your sector or Noise in Any Sector.", + "type": "item", + "image": "dangerous_silence.jpg" + }, + { + "title": "Sensor", + "description": "Use this item on another player. That player must immediatly announce their exact location coordinates. This item affects both humans and aliens.", + "type": "item", + "image": "item_spotlight.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in your sector", + "description": "Announce your current location: NOISE IN SECTOR [XY]", + "type": "red", + "image": "dangerous_noise.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Noise in any sector", + "description": "Fake your location: NOISE IN SECTOR [XY]", + "type": "green", + "image": "dangerous_noise_any.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + }, + { + "title": "Silence", + "description": "Announce: SILENT IN ALL SECTORS", + "type": "silence", + "image": "dangerous_silence.jpg" + } + ], + "hatch": [ + { + "title": "Damaged escape hatch", + "description": "This hatch cannot be used for the rest of the game, attempt to use another one.", + "type": "red", + "image": "hatch_damaged.png" + }, + { + "title": "Damaged escape hatch", + "description": "This hatch cannot be used for the rest of the game, attempt to use another one.", + "type": "red", + "image": "hatch_damaged.png" + }, + { + "title": "Damaged escape hatch", + "description": "This hatch cannot be used for the rest of the game, attempt to use another one.", + "type": "red", + "image": "hatch_damaged.png" + }, + { + "title": "Working escape hatch", + "description": "You succesfully escaped, tell other players that this escape hatch cannot be used anymore.", + "type": "green", + "image": "hatch_ok.png" + }, + { + "title": "Working escape hatch", + "description": "You succesfully escaped, tell other players that this escape hatch cannot be used anymore.", + "type": "green", + "image": "hatch_ok.png" + }, + { + "title": "Working escape hatch", + "description": "You succesfully escaped, tell other players that this escape hatch cannot be used anymore.", + "type": "green", + "image": "hatch_ok.png" + } + ], + "chars": { + "humans": [ + { + "title": "The capitain", + "description": "does not draw a Dangerous Sector Card the first time he moves into a Dangerous Sector", + "image": "char_capitain.jpg", + "type": "human" + }, + { + "title": "The pilot", + "description": "can announce two noises upon drawing a Dangerous Sector Card ONCE, as if he had used a Cat card and without needing one.", + "image": "char_pilot.jpg", + "type": "human" + }, + { + "title": "The Psychologist", + "description": "begins the game in the Alien Sector.", + "image": "char_psychologist.jpg", + "type": "human" + }, + { + "title": "The soldier", + "description": "can Attack ONCE in the game, as if he had used an Attack card and without needing one. NOTE: this power is very useful if trying to pass as an Alien early in the game.", + "image": "char_soldier.jpg", + "type": "human" + }, + { + "title": "The executive officer", + "description": "can stay still and not move during his turn ONCE during the game, without announcing it. Take a Dangerous Sector card or declare ‘Silent Sector’ as normal.", + "image": "char_other.jpg", + "type": "human" + }, + { + "title": "The co-pilot", + "description": "can Teleport ONCE in the game, as if she had used a Teleport card and without needing one. She must disclose her identity and show her character card when doing so.", + "image": "char_other.jpg", + "type": "human" + }, + { + "title": "The engineer", + "description": "draws two Escape Pod Cards when he reaches an Escape Pod Sector and chooses which one to use. The unused Escape Pod Card is reshuffled with the remaining Escape Pod Cards", + "image": "char_other.jpg", + "type": "human" + }, + { + "title": "The medic", + "description": "can force another player to reveal their identity once during the game. The medic discloses his identity and reveals his character card when doing so.", + "image": "char_other.jpg", + "type": "human" + } + ], + "aliens": [ + { + "title": "The blink alien", + "description": "can use the Teleport Item Cards, when found, following the rules for Item Card play and without revealing his identity.", + "image": "char_alien_blink.jpg", + "type": "alien" + }, + { + "title": "The silent alien", + "description": "can use the Sedatives Item Cards, when found, following the rules for Item Card play and without revealing his identity.", + "image": "char_alien_silent.jpg", + "type": "alien" + }, + { + "title": "The surge alien", + "description": "can use the Adrenaline Item Cards, when found, following the rules for Item Card play and without revealing her identity.", + "image": "char_alien_surge.jpg", + "type": "alien" + }, + { + "title": "The brute alien", + "description": "is immune to all Attacks, Human and Alien. He must disclose his identity and reveal his character card when Attacked.", + "image": "char_alien_brute.jpg", + "type": "alien" + }, + { + "title": "The invisible alien", + "description": "is immune to the Sensor Item and the Spotlight Item. Instead of revealing his location, he must disclose his identity and reveal his character card when targeted with those cards.", + "image": "char_alien_other.jpg", + "type": "alien" + }, + { + "title": "The lurking alien", + "description": "can choose to directly attack in his Sector, instead of moving. If he does, he will not move at all in that turn.", + "image": "char_alien_other.jpg", + "type": "alien" + }, + { + "title": "The fast alien", + "description": "can move up to three sectors on his first movement of the game.", + "image": "char_alien_other.jpg", + "type": "alien" + }, + { + "title": "The psychic alien", + "description": "always behaves as if he had drawn a Noise In Any Sector card when drawing a Silence Card.", + "image": "char_alien_other.jpg", + "type": "alien" + } + ] + } +} ''' basedecks = json.loads(jsondecks) @@ -16,19 +620,6 @@ for t in decks: if type(decks[t]) is list: random.shuffle(decks[t]) -@module.commands('item') -@module.example(".item") -@module.require_privmsg(message='Use private messages for picking cards') -def cmd_item(bot, trigger): - """pick an item card""" - if len(decks['items']) < 1: - bot.reply('no more items') - return - card = deck['items'].pop() - bot.reply(card['title'] + ': ' + card['description']) - if not hide_cards: - bot.say('{} picked an item'.format(trigger.nick), chan) - @module.commands('danger') @module.example(".danger") @module.require_privmsg(message='Use private messages for picking cards') @@ -43,8 +634,8 @@ def cmd_danger(bot, trigger): card = deck['dangerous'].pop() bot.reply(card['title']) bot.reply(card['description']) - if card['item']: - bot.reply('You may pick an item') + if card['type'] == 'item': + bot.reply('Announce: SILENT IN ALL SECTORS') bot.say('{} picked a dangerous sector card'.format(trigger.nick), chan) @module.commands('escape') @@ -114,24 +705,6 @@ def cmd_chars(bot, trigger): bot.say('Someone is {} ({}), he {}'.format(ch['title'], ch['type'], ch['description'])) i += 1 -@module.commands('hide') -@module.example('.hide') -@module.require_chanmsg(message='do it in public channel') -def cmd_hide(bot, trigger): - """hide the fact that a player picked an item card""" - global hide_cards - hide_cards = True - bot.say('picking an item cards will be hidden now') - -@module.commands('reveal') -@module.example('.reveal') -@module.require_chanmsg(message='do it in public channel') -def cmd_reveal(bot, trigger): - """reveal the fact that a player picked an item card""" - global hide_cards - hide_cards = False - bot.say('picking an item cards will be revealed now') - @module.commands('resetdecks') @module.example('.resetdecks')