public override CommandReply Action(CommandCaller caller, string[] args) { CheatCommandsPlayer player = caller.Player.GetModPlayer<CheatCommandsPlayer>(); PlayerDeathReason reason = new PlayerDeathReason() { SourceCustomReason = caller.Player.name + " killed " + (caller.Player.Male ? "him" : "her") + "self." }; bool godMode = GodMode.Enabled; GodMode.Enabled = false; caller.Player.KillMe(reason, caller.Player.statLifeMax, 0); GodMode.Enabled = godMode; return CommandReply.Empty; }
public override CommandReply Action(CommandCaller caller, string[] args) { CheatCommandsPlayer player = caller.Player.GetModPlayer <CheatCommandsPlayer>(); Enabled = !Enabled; if (Enabled) { player.RefillLife(); player.RefillMana(true); player.RemoveDebuffs(); } return(new CommandReply("God mode " + (Enabled ? "enabled" : "disabled") + "!")); }