16 [
Serialize(
true,
IsPropertySaveable.Yes, description:
"Should the skill check be probability-based (i.e. if you have half the required skill level, the chance of success is 50%), or should the check always fail when under the required level and always succeed when above? ")]
19 [
Serialize(
"",
IsPropertySaveable.Yes, description:
"Tag of the character(s) whose skill to check. If there are multiple targets, the action succeeds if any of their skill checks succeeds.")]
26 DebugConsole.ThrowError($
"Error in event \"{parentEvent.Prefab.Identifier}\": SkillCheckAction without a target tag (the action needs to know whose skill to check).",
37 return potentialTargets.Any(chr => chr.GetSkillLevel(
RequiredSkill) /
RequiredLevel > Rand.Range(0.0f, 1.0f, Rand.RandSync.Unsynced));
47 return $
"{ToolBox.GetDebugSymbol(HasBeenDetermined())} {nameof(SkillCheckAction)} -> (Target: {TargetTag.ColorizeObject()}, " +
48 $
"Skill: {RequiredSkill.ColorizeObject()}, Level: {RequiredLevel.ColorizeObject()}, " +
49 $
"Succeeded: {succeeded.ColorizeObject()})";
ContentPackage? ContentPackage
readonly ScriptedEvent ParentEvent
IEnumerable< Entity > GetTargets(Identifier tag)
Performs a skill check and executes either the Success or Failure child actions depending on whether ...
override? bool DetermineSuccess()
override string ToDebugString()
Rich test to display in debugdraw
SkillCheckAction(ScriptedEvent parentEvent, ContentXElement element)