Skip to content

Commit

Permalink
bomber to assassin
Browse files Browse the repository at this point in the history
  • Loading branch information
Golbolco authored Nov 13, 2024
1 parent 0f3e923 commit 82ab6ab
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Role = require("../../Role");

module.exports = class Bomber extends Role {
module.exports = class Assassin extends Role {
constructor(player, data) {
super("Bomber", player, data);
super("Assassin", player, data);

this.alignment = "Mafia";
this.cards = [
Expand Down
4 changes: 2 additions & 2 deletions Games/types/Mafia/roles/Village/President.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module.exports = class President extends Role {
if (player !== this.player) {
return;
}
const bomberInGame = this.game.players.filter((p) => p.role.name === "Bomber");
if(bomberInGame.length <= 0){
const assassinInGame = this.game.players.filter((p) => p.role.name === "Assassin");
if(assassinInGame.length <= 0){
this.game.queueAlert(
`President ${this.player.name}'s motorcade has broken down on the outskirts of town… the Villagers must protect them from assassination by the Mafia!`,
0,
Expand Down
2 changes: 1 addition & 1 deletion Games/types/Mafia/roles/cards/AddCopyOfRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = class AddCopyOfRole extends Card {
shuffledPlayers[0].setRole("Templar", undefined, false, true);
shuffledPlayers[0].role.data.reroll = true;
shuffledPlayers[0].role.data.hasCopied = true;
} else if (this.player.role.name == "Vice President" || this.player.role.name == "Bomber") {
} else if (this.player.role.name == "Vice President" || this.player.role.name == "Assassin") {
let players = this.game.players.filter(
(p) =>
p.role.alignment == "Village" || p.role.alignment == "Independent"
Expand Down
26 changes: 13 additions & 13 deletions Games/types/Mafia/roles/cards/WinWithFaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module.exports = class WinWithFaction extends Card {
const clownInGame = this.game.players.filter(
(p) => p.role.name === "Clown" && p.role.clownCondemned != true
);
const bomberInGame = this.game.players.filter((p) => p.role.name === "Bomber");
const assassinInGame = this.game.players.filter((p) => p.role.name === "Assassin");

//Special Win Cons
// win by Zealot
Expand Down Expand Up @@ -222,7 +222,7 @@ module.exports = class WinWithFaction extends Card {
}
}

//win by killing Bomber
//win by killing Assassin
if (this.player.faction == "Village") {
var hasSenators = false;
var senatorCount = 0;
Expand All @@ -233,7 +233,7 @@ module.exports = class WinWithFaction extends Card {
}
}
if (hasSenators && senatorCount <= 0) return;
if (this.killedBomber) {
if (this.killedAssassin) {
factionWin(this);
return;
}
Expand Down Expand Up @@ -307,10 +307,10 @@ module.exports = class WinWithFaction extends Card {
return;
}
}
//Bomber conditional
//Assassin conditional
if (MAFIA_FACTIONS.includes(this.player.faction) || this.player.faction == "Village") {
if (bomberInGame.length > 0) {
//if bomber exist is not condemned, Mafia will not win by Majority and Village Will Not Win by killing all mafia.
if (assassinInGame.length > 0) {
//if assassin is not condemned, Mafia will not win by Majority and Village Will Not Win by killing all mafia.
return;
}
}
Expand Down Expand Up @@ -599,8 +599,8 @@ module.exports = class WinWithFaction extends Card {

if (this.oblivious["Faction"]) return;

const bomberInGame = this.game.players.filter((p) => p.role.name === "Bomber");
if(bomberInGame.length > 0) return;
const assassinInGame = this.game.players.filter((p) => p.role.name === "Assassin");
if(assassinInGame.length > 0) return;

if (
this.game.started == true &&
Expand Down Expand Up @@ -664,16 +664,16 @@ module.exports = class WinWithFaction extends Card {
}
this.killedPresident = true;
}
if (player.role.name == "Bomber") {
const otherBombers = this.game.players.filter(
if (player.role.name == "Assassin") {
const otherAssassins = this.game.players.filter(
(p) =>
p.alive &&
(p.role.name == "Bomber")
(p.role.name == "Assassin")
);
if (otherBombers.length > 0 || this.killedPresident == true) {
if (otherAssassins.length > 0 || this.killedPresident == true) {
return;
}
this.killedBomber = true;
this.killedAssassin = true;
}
if (player.role.name == "Clown") {
if (deathType == "condemn") {
Expand Down
18 changes: 9 additions & 9 deletions data/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ const roleData = {
category: "Essential",
tags: ["Essential", "Selective Revealing"],
description: [
"All villagers will know who the President is. Unless a Bomber is present.",
"All villagers will know who the President is, unless an Assassin is present.",
"When the President dies, the Mafia will win.",
],
},
Expand Down Expand Up @@ -2107,17 +2107,17 @@ const roleData = {
"Can not be seen as a Villager, Impersonator or Imposter",
],
},
Bomber: {
Assassin: {
alignment: "Mafia",
tags: ["Mini-game", "Essential", "Split Decision", "Killing","Setup Changes", "Dusk", "Pregame Actions", "Dawn"],
description: [
"Splits All Players into 2 Rooms.",
"During the Day each room will meet and choose a Leader",
"At Night the Leaders will Meet and choose players to switch rooms.",
"After 3 Rounds of Switching, Will kill All Players who are in the same room as them.",
"Bomber will Force a President to spawn unless Senators are Present",
"Village Wins if a Bomber dies before a President dies or Majority of the Senators die.",
"Mafia will Not win by Majority if Bomber exists",
"Splits all players into two rooms.",
"During the Day, each room will meet and choose a city leader.",
"At Night the city leaders will Meet and choose players to switch rooms.",
"After three rounds of switching, the Assassin will kill all players who are in the same room as them.",
"The presence of an Assassin will force a President to spawn in the setup (unless Senators are present).",
"Village wins if an Assassin dies before a President or majority of the Senators die.",
"Mafia will not win by majority if an Assassin is present.",
],
},

Expand Down

0 comments on commit 82ab6ab

Please sign in to comment.