File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Games/types/Mafia/roles/cards Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ const Card = require ( "../../Card" ) ;
2+ const Action = require ( "../../Action" ) ;
3+ const {
4+ PRIORITY_INVESTIGATIVE_DEFAULT ,
5+ } = require ( "../../const/Priority" ) ;
6+
7+ module . exports = class LearnRoleOfVisits extends Card {
8+ constructor ( role ) {
9+ super ( role ) ;
10+
11+ this . passiveActions = [
12+ {
13+ ability : [ "Information" , "Modifier" ] ,
14+ actor : role . player ,
15+ state : "Night" ,
16+ game : role . game ,
17+ role : role ,
18+ priority : PRIORITY_INVESTIGATIVE_DEFAULT ,
19+ labels : [ "investigate" ] ,
20+ run : function ( ) {
21+ let visits = this . getSecondaryActions ( this . actor ) ;
22+ for ( let v of visits ) {
23+ if ( this . dominates ( v ) ) {
24+ let info = this . game . createInformation (
25+ "RoleInfo" ,
26+ this . actor ,
27+ this . game ,
28+ v
29+ ) ;
30+ info . processInfo ( ) ;
31+ this . actor . queueAlert ( `:invest: ${ info . getInfoFormated ( ) } .` ) ;
32+ }
33+ }
34+ } ,
35+ } ,
36+ ] ;
37+ }
38+ } ;
You can’t perform that action at this time.
0 commit comments