public bool CanRuleEventStart(ref InstantKillEvent context) { var success = RulesSystem.DiceRollSuccess(context.InstantKill.Chance); var logSystem = World.Get <GameLogSystem>(); logSystem.StartNewMessage(out var logMsg, out var hoverMsg); logMsg.Append(context.Origin.GetName()); logMsg.Append(" used instant kill on "); logMsg.Append(context.Target.GetName()); logMsg.Append(success ? " and succeeded" : " and failed"); hoverMsg.AppendNewLine(RulesSystem.LastQueryString.ToString()); logSystem.PostCurrentStrings(!success ? GameLogSystem.NormalColor : GameLogSystem.DeathColor); return(success); }
public void RuleEventRun(ref InstantKillEvent context) { context.Target.Post(new DeathEvent(context.Origin, context.Target, context.ImpactEvent, 100)); context.Target.Post(new CombatStatusUpdate(context.Target, "Lethal Hit!", GameLogSystem.DeathColor)); }