-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alien from One Night + Bug Fixes (#1744)
Diviner now can learn not in play roles as the fake role. Groundskeeper gets no info if no dead players. Vampires now appear as random non-vampire evils. Added Message for retired modifier if no one has the original role. Rival can now Win. Added Alien from One Night as Ringleader, If a Ringleader is possible in Setup, Some Indepantant roles join the mafia meeting and Mafia won't learn each other's roles", "The Ringleader grants the Mafia team+Independents in meeting an Ability.", "If a Ringleader is possible in Setup, Mafia cannot with any Independants that join the meeting." --------- Co-authored-by: SawJester <[email protected]>
- Loading branch information
Showing
21 changed files
with
600 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const Item = require("../Item"); | ||
const Action = require("../Action"); | ||
const { PRIORITY_EFFECT_GIVER_DEFAULT } = require("../const/Priority"); | ||
const { PRIORITY_REVEAL_DEFAULT } = require("../const/Priority"); | ||
const { MEETING_PRIORITY_HOT_SPRINGS } = require("../const/MeetingPriority"); | ||
|
||
module.exports = class WackyFactionRoleReveal extends Item { | ||
constructor(meetingName) { | ||
super("WackyFactionRoleReveal"); | ||
|
||
//this.reveal = reveal; | ||
this.lifespan = 1; | ||
this.meetingName = meetingName; | ||
this.meetings[this.meetingName] = { | ||
states: ["Night"], | ||
flags: ["group", "anonymous", "voting"], | ||
targets: { include: ["alive"]}, | ||
action: { | ||
labels: ["hidden", "absolute","reveal","group", "multiActor"], | ||
priority: PRIORITY_REVEAL_DEFAULT, | ||
item: this, | ||
run: function () { | ||
//this.target.role.revealToPlayer(this.actor); | ||
for(let p of this.game.players){ | ||
if (this.actor.faction == p.faction){ | ||
this.target.role.revealToPlayer(p); | ||
} | ||
} | ||
this.item.drop(); | ||
}, | ||
}, | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
const Item = require("../Item"); | ||
const { | ||
EVIL_FACTIONS, | ||
NOT_EVIL_FACTIONS, | ||
CULT_FACTIONS, | ||
MAFIA_FACTIONS, | ||
FACTION_LEARN_TEAM, | ||
FACTION_WIN_WITH_MAJORITY, | ||
FACTION_WITH_MEETING, | ||
FACTION_KILL, | ||
} = require("../const/FactionList"); | ||
const { PRIORITY_MAFIA_KILL } = require("../const/Priority"); | ||
|
||
module.exports = class WackyJoinFactionMeeting extends Item { | ||
constructor(reveal) { | ||
super("WackyJoinFactionMeeting"); | ||
|
||
//this.reveal = reveal; | ||
this.lifespan = 1; | ||
this.cannotBeStolen = true; | ||
this.meetings = { | ||
"Faction Kill": { | ||
meetingName: "Mafia", | ||
states: ["Night"], | ||
flags: ["group", "speech", "voting", "multiActor", "Important"], | ||
targets: { | ||
include: ["alive"], | ||
exclude: [excludeMafiaOnlyIfNotAnonymous], | ||
}, | ||
action: { | ||
labels: ["kill", "mafia"], | ||
priority: PRIORITY_MAFIA_KILL, | ||
run: function () { | ||
if (this.dominates()) { | ||
this.target.kill("basic", this.actor); | ||
} | ||
}, | ||
}, | ||
|
||
}, | ||
}; | ||
} | ||
}; | ||
|
||
function excludeMafiaOnlyIfNotAnonymous(player) { | ||
let mafiaMeeting = player.game.getMeetingByName("Faction Kill"); | ||
if ( | ||
mafiaMeeting && | ||
mafiaMeeting.anonymous && | ||
FACTION_KILL.includes(player.faction) | ||
) { | ||
return false; | ||
} | ||
|
||
if (player.faction && FACTION_KILL.includes(player.faction)) { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const Item = require("../Item"); | ||
const Random = require("../../../../lib/Random"); | ||
const { PRIORITY_INVESTIGATIVE_DEFAULT } = require("../const/Priority"); | ||
|
||
module.exports = class WackyRoleLearner extends Item { | ||
constructor(targetType) { | ||
super("WackyRoleLearner"); | ||
|
||
this.targetType = targetType; | ||
this.cannotBeStolen = true; | ||
this.cannotBeSnooped = true; | ||
|
||
this.meetings = { | ||
"Wacky Learn Role": { | ||
states: ["Night"], | ||
flags: ["voting", "mustAct"], | ||
targets: { include: [this.targetType], exclude: ["self"] }, | ||
action: { | ||
labels: ["hidden", "absolute"], | ||
priority: PRIORITY_INVESTIGATIVE_DEFAULT, | ||
item: this, | ||
run: function () { | ||
var role = this.target.getRoleAppearance(); | ||
var alert = `:invest: You learn that ${this.target.name}'s role is ${role}.`; | ||
this.actor.queueAlert(alert); | ||
this.item.drop(); | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const Role = require("../../Role"); | ||
|
||
module.exports = class Ringleader extends Role { | ||
constructor(player, data) { | ||
super("Ringleader", player, data); | ||
this.alignment = "Mafia"; | ||
this.cards = [ | ||
"VillageCore", | ||
"WinWithFaction", | ||
"MeetingFaction", | ||
"GiveFactionAbility", | ||
]; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.