public ArgumentFeedback doArgument(SoMDependentArgument arg, CharacterData attacker, CharacterData defender, CharacterData world) { if (!Argument.checkCharactersValid(attacker, defender)) { return(null); } //Reset feedback atts arg.ArgFeedback = new ArgumentFeedback(); arg.ArgFeedback.argumentName = arg.ToString(); arg.reset(attacker, defender, world);//Reset this so old values of numerator and property names are deleted //Set Characters arg.Attacker = attacker; arg.Defender = defender; arg.World = world; arg.result = arg.RollBehavior.doRoll(arg, attacker, defender, world, arg.ArgFeedback); if (arg.result == Result.Failure) { arg.ArgFeedback.result = arg.result; arg.doEffects(); return(arg.ArgFeedback); } else { arg.Selector.acquireSoM(arg.allowed, arg.result); } return(null); }
public ArgumentFeedback SoMSelected(SoMDependentArgument arg, int jsValue, int afValue) { if (jsValue != 0)//Chose js SoM { arg.DefenderAffectedPropertySuccess = "StateOfMindJoySorrow"; arg.DefenderAffectedPropertyGreatSuccess = "StateOfMindJoySorrow"; arg.AttackerAffectedPropertySuccess = "StateOfMindJoySorrow"; arg.AttackerAffectedPropertyGreatSuccess = "StateOfMindJoySorrow"; if (jsValue < 0)//Go back so multiply value by -1 { arg.DefenderSuccessValue.Numerator *= -1; arg.DefenderGreatSuccessValue.Numerator *= -1; arg.AttackerSuccessValue.Numerator *= -1; arg.AttackerGreatSuccessValue.Numerator *= -1; } } else { arg.DefenderAffectedPropertySuccess = "StateOfMindAngerFear"; arg.DefenderAffectedPropertyGreatSuccess = "StateOfMindAngerFear"; arg.AttackerAffectedPropertySuccess = "StateOfMindAngerFear"; arg.AttackerAffectedPropertyGreatSuccess = "StateOfMindAngerFear"; if (afValue < 0)//Go back so multiply value by -1 { arg.DefenderSuccessValue.Numerator *= -1; arg.DefenderGreatSuccessValue.Numerator *= -1; arg.AttackerSuccessValue.Numerator *= -1; arg.AttackerGreatSuccessValue.Numerator *= -1; } } arg.doEffects(); return(arg.ArgFeedback); }