-
-
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.
More Info Files + New Mafia Role (#1795)
Beguiler- At night chooses two players, The 1st Player will appear to visit the 2nd Player to Investigative Roles. --------- Co-authored-by: SawJester <[email protected]>
- Loading branch information
Showing
38 changed files
with
1,152 additions
and
414 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,9 @@ | ||
const Effect = require("../Effect"); | ||
|
||
module.exports = class FakeVisit extends Effect { | ||
constructor(lifespan, info) { | ||
super("FakeVisit"); | ||
this.lifespan = lifespan || Infinity; | ||
this.Visits = info; | ||
} | ||
}; |
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,108 @@ | ||
const Information = require("../Information"); | ||
const Random = require("../../../../lib/Random"); | ||
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"); | ||
|
||
module.exports = class BinaryTrackerInfo extends Information { | ||
constructor(creator, game, target) { | ||
super("Binary Tracker Info", creator, game); | ||
if (target == null) { | ||
this.randomTarget = true; | ||
target = Random.randArrayVal(this.game.alivePlayers()); | ||
} | ||
this.target = target; | ||
let visits = this.getVisitsAppearance(this.target); | ||
if (visits.length > 0) { | ||
this.mainInfo = "visited somebody"; | ||
} else { | ||
this.mainInfo = "did not visit anybody"; | ||
} | ||
} | ||
|
||
getInfoRaw() { | ||
super.getInfoRaw(); | ||
return this.mainInfo; | ||
} | ||
|
||
getInfoFormated() { | ||
super.getInfoRaw(); | ||
return `You learn that ${this.target.name} ${this.mainInfo} during the night.`; | ||
//return `You Learn that your Target is ${this.mainInfo}` | ||
} | ||
|
||
isTrue() { | ||
let visits = this.getVisits(this.target); | ||
let temp; | ||
if (visits.length > 0) { | ||
temp = "visited somebody"; | ||
} else { | ||
temp = "did not visit anybody"; | ||
} | ||
if (temp == this.mainInfo) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
isFalse() { | ||
if (this.isTrue()) { | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
isFavorable() { | ||
if (this.mainInfo == "did not visit anybody") { | ||
return true; | ||
} else { | ||
return; | ||
} | ||
} | ||
isUnfavorable() { | ||
let badVisits = this.getKillVictims(); | ||
|
||
if (badVisits.length <= 0 && this.mainInfo == "did not visit anybody") { | ||
return true; | ||
} else if (this.mainInfo == "visited somebody") { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
makeTrue() { | ||
let visits = this.getVisits(this.target); | ||
if (visits.length > 0) { | ||
this.mainInfo = "visited somebody"; | ||
} else { | ||
this.mainInfo = "did not visit anybody"; | ||
} | ||
} | ||
makeFalse() { | ||
let visits = this.getVisits(this.target); | ||
if (visits.length > 0) { | ||
this.mainInfo = "did not visit anybody"; | ||
} else { | ||
this.mainInfo = "visited somebody"; | ||
} | ||
} | ||
makeFavorable() { | ||
this.mainInfo = "did not visit anybody"; | ||
} | ||
makeUnfavorable() { | ||
let badVisits = this.getKillVictims(); | ||
badVisits = badVisits.filter((p) => p != this.target); | ||
if (badVisits.length <= 0) { | ||
this.mainInfo = "did not visit anybody"; | ||
} else { | ||
this.mainInfo = "visited somebody"; | ||
} | ||
} | ||
}; |
Oops, something went wrong.