la-cosa-nostra
Version:
A Mafia bot designed to run in Discord - beware the traitors and the lies!
27 lines (14 loc) • 622 B
JavaScript
var rs = require("../../../rolesystem/rolesystem.js");
// Defaults to shooting
// Godfather can override
// See godfather/kill_vote
module.exports = function (actionable, game, params) {
rs.prototypes.basicAttack.reason = "shot by a member of the __Mafia__";
var outcome = rs.prototypes.basicAttack(...arguments);
var from = game.getPlayerByIdentifier(actionable.from);
if (!outcome) {
var to = game.getPlayerByIdentifier(actionable.to);
game.addMessage(from, ":exclamation: Your target could not be attacked last night!");
};
};
module.exports.TAGS = ["drivable", "roleblockable", "visit"];