UNPKG

la-cosa-nostra

Version:

A Mafia bot designed to run in Discord - beware the traitors and the lies!

25 lines (16 loc) 794 B
var lcn = require("../../../../../source/lcn.js"); var rs = lcn.rolesystem; module.exports = function (actionable, game, params) { // Suicide var from = game.getPlayerByIdentifier(actionable.from); var killed = game.getPlayerByIdentifier(actionable.to); /* Remove other lovers' suicide action, no need to create a loop */ game.actions.delete(x => x.from === actionable.to && x.identifier === "twin_love_god/matched_suicide"); /* Downright kill - this attack is absolute and unpreventable by ANY role or action */ // Set 1 to broadcast offset game.silentKill(from, "found dead, having committed suicide over the loss of their matched lover", "found dead, having committed suicide over the loss of your matched lover", 2); // Destroy this instance return true; };