Skip to content

Commit e624b20

Browse files
authored
Create LearnRoleOfVisits.js
1 parent 91b2532 commit e624b20

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
};

0 commit comments

Comments
 (0)