public void releaseSpellOnTarget(TargetWrapper target)
 {
     if (spell != null && (spell.CanTarget(target) || ignore_target_checkers))
     {
         Rulebook.Trigger <RuleCastSpell>(new RuleCastSpell(spell, target));
         Common.AddBattleLogMessage($"{this.Owner.CharacterName} released {spell.Blueprint.Name} from {this.Fact.Name}.");
         spell = null;
     }
 }
 public void releaseSpellOnTarget(TargetWrapper target)
 {
     if (spell != null && (spell.CanTarget(target) || ignore_target_checkers))
     {
         var rule_cast_spell = new RuleCastSpell(spell, target);
         rule_cast_spell.Context.AttackRoll = Rulebook.CurrentContext.AllEvents.LastOfType <RuleAttackWithWeapon>()?.AttackRoll;
         if (always_hit)
         {
             rule_cast_spell.Context.ForceAlwaysHit = true;
         }
         Rulebook.Trigger <RuleCastSpell>(rule_cast_spell);
         Common.AddBattleLogMessage($"{this.Owner.CharacterName} released {spell.Blueprint.Name} from {this.Fact.Name}.");
         spell = null;
     }
 }