forked from UltiMafia/Ultimafia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Prettified Code! * Update TrackerInfo.js * Create BinaryTrackerInfo.js * Prettified Code! * Update TrackPlayerBoolean.js * Update MissingSupplies.js * Create WatcherInfo.js * Update WatchPlayer.js * Create BinaryWatcherInfo.js * Update WatchPlayerBoolean.js * Update WatcherInfo.js * Update WatcherInfo.js * Update WatcherInfo.js * Update ModifierLoud.js * Update TrackAndWatchPlayer.js * Update ModifierLoud.js * Update WatcherInfo.js * Update LearnVisitorsPerson.js * Update LearnVisitorsAndArm.js * Update BegumsSenses.js * Update RoleInfo.js * Update AlignmentInfo.js * Update Information.js * Create CompareAlignmentInfo.js * Create TwoPlayersOneEvilInfo.js * Update Information.js * Update modifiers.js * Update TwoPlayersOneEvilInfo.js * Update MakePlayerLearnOneOfTwoPlayersOnDeath.js * m- "Beguiler" * Prettified Code! * Update modifiers.js * Prettified Code! * Update LearnAndLifeLinkToPlayer.js * Prettified Code! * Create LearnTargetInfo.js * Update LearnTargetInfo.js * Update BegumsSenses.js * Update RevealRoleToTarget.js * Update RevealNameToTarget.js * Update ConfirmSelf.js * Update RoleDisguiser.js * Update IdentityStealer.js --------- Co-authored-by: SawJester <[email protected]>
- Loading branch information
Showing
6 changed files
with
122 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
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 LearnTargetInfo extends Information { | ||
constructor(creator, game, target) { | ||
super("Learn Target Info", creator, game); | ||
if (target == null) { | ||
this.randomTarget = true; | ||
target = Random.randArrayVal(this.game.alivePlayers()); | ||
} | ||
this.target = target; | ||
this.mainInfo = this.target; | ||
|
||
} | ||
|
||
getInfoRaw() { | ||
super.getInfoRaw(); | ||
return this.mainInfo; | ||
} | ||
|
||
getInfoFormated() { | ||
super.getInfoRaw(); | ||
|
||
return `You Learn ${this.mainInfo}`; | ||
|
||
//return `You Learn that your Target is ${this.mainInfo}` | ||
} | ||
|
||
isTrue() { | ||
if (this.mainInfo == this.target) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
isFalse() { | ||
if (this.isTrue()) { | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
isFavorable() { | ||
if(!this.isEvil(this.mainInfo)){ | ||
return false; | ||
} | ||
return true; | ||
} | ||
isUnfavorable() { | ||
if(this.isEvil(this.mainInfo)){ | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
makeTrue() { | ||
this.mainInfo = this.target; | ||
} | ||
makeFalse() { | ||
let players = this.game.alivePlayers().filter((p) => p != this.target && p != this.creator) | ||
this.mainInfo = Random.randArrayVal(players); | ||
} | ||
makeFavorable() { | ||
let players = this.game.alivePlayers().filter((p) => !this.isEvil(p)); | ||
this.mainInfo = Random.randArrayVal(players); | ||
} | ||
makeUnfavorable() { | ||
let players = this.game.alivePlayers().filter((p) => this.isEvil(p)); | ||
this.mainInfo = Random.randArrayVal(players); | ||
} | ||
}; |
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