internal static bool canUseSpellForSpellCombat(UnitPartMagus unit_part_magus, AbilityData ability) { if (unit_part_magus.Owner.HasFact(ray_spell_combat)) { return(unit_part_magus.IsSuitableForEldritchArcherSpellStrike(ability)); } else { return(unit_part_magus.IsSpellFromMagusSpellList(ability)); } }
public static bool PreparedSpellStrike(this UnitEntityData unit) { UnitPartMagus unitPartMagus = unit.Get <UnitPartMagus>(); return(unitPartMagus != null && unitPartMagus.IsCastMagusSpellInThisRound && unitPartMagus.LastCastedMagusSpellTime > unitPartMagus.LastAttackTime && unitPartMagus.Spellstrike.Active && (unitPartMagus.EldritchArcherSpell != null || (unit.Get <UnitPartTouch>()?.Ability.Data is AbilityData abilityData && unitPartMagus.IsSpellFromMagusSpellList(abilityData)))); }
static void Postfix(UnitPartMagus __instance, AbilityData spell, ref bool __result) { if (__result == true) { return; } if (spell.Blueprint.GetComponent <AbilityDeliverTouch>() != null && (spell.HasMetamagic(Metamagic.Reach) || ((spell.Blueprint.AvailableMetamagic & Metamagic.Reach) != 0) && __instance.Owner.HasFact(reach_spellstrike)) ) { __result = __instance.IsSpellFromMagusSpellList(spell); } }
internal static bool canUseSpellForSpellCombat(UnitPartMagus unit_part_magus, AbilityData ability) { if (ability.ActionType != CommandType.Standard || ability.RequireFullRoundAction) { return(false); } if (unit_part_magus.Owner.HasFact(ray_spell_combat)) { return(unit_part_magus.IsSuitableForEldritchArcherSpellStrike(ability)); } else { return(unit_part_magus.IsSpellFromMagusSpellList(ability)); } }