-
-
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.
Bomber from 2R1B and Lich Icon (#1765)
Bomber makes Everyone play 2R1B. Lich buff, Lich now has an Icon. --------- Co-authored-by: SawJester <[email protected]>
- Loading branch information
Showing
24 changed files
with
529 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
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"); | ||
|
||
// TODO this should semantically be an effect "SnowedIn" not item | ||
module.exports = class NoVillageMeeting extends Item { | ||
constructor() { | ||
super("NoVillageMeeting"); | ||
|
||
this.cannotBeStolen = true; | ||
this.cannotBeSnooped = true; | ||
this.lifespan = 1; | ||
/* | ||
this.meetings = { | ||
NoVillageMeeting: { | ||
actionName: "Done Waiting?", | ||
states: ["Day"], | ||
//flags: ["group", "speech", "voting", "mustAct", "noVeg"], | ||
//inputType: "boolean", | ||
passiveDead: true, | ||
whileDead: true, | ||
speakDead: true, | ||
}, | ||
}; | ||
*/ | ||
/* | ||
this.listeners = { | ||
state: function () { | ||
const state = this.game.getStateName(); | ||
if (state == "Day") { | ||
this.drop(); | ||
return; | ||
} | ||
if (state != "Night") { | ||
return; | ||
} | ||
if (this.holder.role.alignment != "Cult") { | ||
this.holder.queueAlert( | ||
":snowball: You're snowed in for the night… you cannot take any action!" | ||
); | ||
} | ||
}, | ||
}; | ||
*/ | ||
} | ||
|
||
shouldDisableMeeting(name) { | ||
// do not disable jailing, gov actions | ||
for(let x = 0; x < FACTION_WITH_MEETING.length; x++){ | ||
if(name == `Fake ${FACTION_WITH_MEETING[x]}`){ | ||
return true; | ||
} | ||
if(name == `${FACTION_WITH_MEETING[x]} Meeting`){ | ||
return true; | ||
} | ||
if(name == `${FACTION_WITH_MEETING[x]} Kill`){ | ||
return true; | ||
} | ||
} | ||
|
||
if (name == "Village") { | ||
return true; | ||
} | ||
|
||
if (name == "Magus Game") { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
}; |
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,43 @@ | ||
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_OVERTHROW_VOTE } = require("../const/Priority"); | ||
|
||
module.exports = class Room extends Item { | ||
constructor(meetingName) { | ||
super("Room"); | ||
|
||
//this.reveal = reveal; | ||
this.lifespan = 1; | ||
this.cannotBeStolen = true; | ||
this.meetings[meetingName] = { | ||
actionName: "Elect Leader", | ||
states: ["Day"], | ||
targets: { include: ["members"], exclude: ["dead"] }, | ||
flags: ["group", "voting", "speech", "mustAct"], | ||
whileDead: true, | ||
passiveDead: true, | ||
action: { | ||
labels: ["hidden"], | ||
priority: PRIORITY_OVERTHROW_VOTE, | ||
run: function () { | ||
if (meetingName == "Room 1") { | ||
this.game.RoomOneLeader = this.target; | ||
} else if (meetingName == "Room 2") { | ||
this.game.RoomTwoLeader = this.target; | ||
} else { | ||
this.game.RoomThreeLeader = this.target; | ||
} | ||
}, | ||
}, | ||
}; | ||
} | ||
}; |
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,74 @@ | ||
const Random = require("../../../../lib/Random"); | ||
const Item = require("../Item"); | ||
const { PRIORITY_SWAP_ROLES } = require("../const/Priority"); | ||
|
||
module.exports = class RoomLeader extends Item { | ||
constructor(game, room) { | ||
super("RoomLeader"); | ||
this.room = room; | ||
this.lifespan = 1; | ||
this.cannotBeStolen = true; | ||
if(this.room == 1){ | ||
this.targets = [isInRoom1]; | ||
} | ||
else{ | ||
this.targets = [isInRoom2]; | ||
} | ||
this.listeners = { | ||
meetingsMade: function () { | ||
this.holder.sendAlert( | ||
`Choose ${this.game.currentSwapAmt} hostage${ | ||
this.game.currentSwapAmt > 1 ? "s" : "" | ||
} to swap.` | ||
); | ||
}, | ||
}; | ||
this.meetings = { | ||
Leaders: { | ||
states: ["Night"], | ||
flags: ["group", "speech"], | ||
}, | ||
"Hostage Swap": { | ||
states: ["Night"], | ||
flags: ["voting", "multi", "mustAct"], | ||
targets: { include: this.targets, exclude: ["members"] }, | ||
multiMin: game.currentSwapAmt, | ||
multiMax: game.currentSwapAmt, | ||
action: { | ||
item: this, | ||
priority: PRIORITY_SWAP_ROLES, | ||
run: function () { | ||
//var fromRoom = this.room; | ||
if (!Array.isArray(this.target)) { | ||
this.target = [this.target]; | ||
} | ||
if(this.item.room == 1){ | ||
for (let player of this.target) { | ||
this.game.RoomOne.splice(this.game.RoomOne.indexOf(player),1); | ||
this.game.RoomTwo.push(player); | ||
this.game.events.emit("RoonSwitch",player,this.actor,this.room); | ||
} | ||
} | ||
else if(this.item.room == 2){ | ||
for (let player of this.target) { | ||
this.game.RoomTwo.splice(this.game.RoomTwo.indexOf(player),1); | ||
this.game.RoomOne.push(player); | ||
this.game.events.emit("RoonSwitch",player,this.actor,this.room); | ||
} | ||
} | ||
|
||
this.actor.dropItem("Leader"); | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
}; | ||
function isInRoom1(player) { | ||
return player.game.RoomOne.includes(player); | ||
// return this.room && player == this.role.data.prevTarget; | ||
} | ||
function isInRoom2(player) { | ||
return player.game.RoomTwo.includes(player); | ||
// return this.room && player == this.role.data.prevTarget; | ||
} |
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,17 @@ | ||
const Role = require("../../Role"); | ||
|
||
module.exports = class Bomber extends Role { | ||
constructor(player, data) { | ||
super("Bomber", player, data); | ||
|
||
this.alignment = "Mafia"; | ||
this.cards = [ | ||
"VillageCore", | ||
"WinWithFaction", | ||
"MeetingFaction", | ||
"ForceSplitDecision", | ||
"KillAllInRoom", | ||
"AddCopyOfRole", | ||
]; | ||
} | ||
}; |
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
Oops, something went wrong.