Change filter implementation

This commit is contained in:
amevarashi 2022-07-09 12:07:59 +05:00
parent 54ba77f17c
commit 20c7b303c0
10 changed files with 286 additions and 190 deletions

View File

@ -9,14 +9,8 @@ namespace RJWSexperience.Ideology.HistoryEvents
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public HistoryEventDef historyEventDef; public HistoryEventDef historyEventDef;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public PartnerFilter filter; public TwoPawnFilter filter;
public bool Applies(Pawn pawn, Pawn partner) public bool Applies(Pawn pawn, Pawn partner) => filter?.Applies(pawn, partner) == true;
{
if (filter == null)
return false;
return filter.Applies(pawn, partner);
}
} }
} }

View File

@ -1,6 +1,4 @@
using RimWorld; using System.Collections.Generic;
using rjw;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Verse; using Verse;
@ -25,7 +23,7 @@ namespace RJWSexperience.Ideology.Precepts
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public float multiplier = 1f; public float multiplier = 1f;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public PartnerFilter filter; public TwoPawnFilter filter;
public bool Applies(Pawn pawn, Pawn partner) public bool Applies(Pawn pawn, Pawn partner)
{ {

View File

@ -1,22 +1,15 @@
using RimWorld; using RimWorld;
using rjw;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Verse; using Verse;
namespace RJWSexperience.Ideology namespace RJWSexperience.Ideology
{ {
public class PartnerFilter public class RelationFilter
{ {
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isAnimal;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isVeneratedAnimal; public bool? isVeneratedAnimal;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isSlave;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isPrisoner;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isAlien; public bool? isAlien;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public List<PawnRelationDef> hasOneOfRelations; public List<PawnRelationDef> hasOneOfRelations;
@ -29,18 +22,9 @@ namespace RJWSexperience.Ideology
public bool Applies(Pawn pawn, Pawn partner) public bool Applies(Pawn pawn, Pawn partner)
{ {
if (isAnimal != null && isAnimal != partner.IsAnimal())
return false;
if (isVeneratedAnimal != null && isVeneratedAnimal != pawn.Ideo.IsVeneratedAnimal(partner)) if (isVeneratedAnimal != null && isVeneratedAnimal != pawn.Ideo.IsVeneratedAnimal(partner))
return false; return false;
if (isSlave != null && isSlave != partner.IsSlave)
return false;
if (isPrisoner != null && isPrisoner != partner.IsPrisoner)
return false;
//if (isAlien != null && isAlien != partner) //if (isAlien != null && isAlien != partner)
// return false; // return false;

View File

@ -0,0 +1,30 @@
using rjw;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology
{
public class SinglePawnFilter
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isAnimal;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isSlave;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public bool? isPrisoner;
public bool Applies(Pawn pawn)
{
if (isAnimal != null && isAnimal != pawn.IsAnimal())
return false;
if (isSlave != null && isSlave != pawn.IsSlave)
return false;
if (isPrisoner != null && isPrisoner != pawn.IsPrisoner)
return false;
return true;
}
}
}

View File

@ -0,0 +1,30 @@
using rjw;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience.Ideology
{
public class TwoPawnFilter
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public SinglePawnFilter doer;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public SinglePawnFilter partner;
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public RelationFilter relations;
public bool Applies(Pawn pawn, Pawn partner)
{
if (doer?.Applies(pawn) == false)
return false;
if (this.partner?.Applies(pawn) == false)
return false;
if (relations?.Applies(pawn, partner) == false)
return false;
return true;
}
}
}

View File

@ -52,6 +52,9 @@
<Compile Include="Ideology\HistoryEvents\ArgsNamesCustom.cs" /> <Compile Include="Ideology\HistoryEvents\ArgsNamesCustom.cs" />
<Compile Include="Ideology\IssueUtility.cs" /> <Compile Include="Ideology\IssueUtility.cs" />
<Compile Include="Ideology\Keyed.cs" /> <Compile Include="Ideology\Keyed.cs" />
<Compile Include="Ideology\RelationFilter.cs" />
<Compile Include="Ideology\TwoPawnFilter.cs" />
<Compile Include="Ideology\SinglePawnFilter.cs" />
<Compile Include="Ideology\Precepts\Comp_SelfTookMemoryThought_Gendered.cs" /> <Compile Include="Ideology\Precepts\Comp_SelfTookMemoryThought_Gendered.cs" />
<Compile Include="Ideology\Precepts\Comp_KnowsMemoryThought_Gendered.cs" /> <Compile Include="Ideology\Precepts\Comp_KnowsMemoryThought_Gendered.cs" />
<Compile Include="Ideology\RJWUtility_Ideo.cs" /> <Compile Include="Ideology\RJWUtility_Ideo.cs" />
@ -63,7 +66,6 @@
<Compile Include="Ideology\Precepts\DefExtension_ModifyBestialityMtb.cs" /> <Compile Include="Ideology\Precepts\DefExtension_ModifyBestialityMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyPreference.cs" /> <Compile Include="Ideology\Precepts\DefExtension_ModifyPreference.cs" />
<Compile Include="Ideology\Precepts\DefExtension_MultipleMemesRequired.cs" /> <Compile Include="Ideology\Precepts\DefExtension_MultipleMemesRequired.cs" />
<Compile Include="Ideology\PartnerFilter.cs" />
<Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" /> <Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" />
<Compile Include="Ideology\Rituals\LordJob_Rituals.cs" /> <Compile Include="Ideology\Rituals\LordJob_Rituals.cs" />
<Compile Include="Ideology\Patches\RJW_Patch_Ideo.cs" /> <Compile Include="Ideology\Patches\RJW_Patch_Ideo.cs" />

View File

@ -16,32 +16,46 @@
<generationRules> <generationRules>
<li> <li>
<filter> <filter>
<isVeneratedAnimal>true</isVeneratedAnimal> <relations>
<isVeneratedAnimal>true</isVeneratedAnimal>
</relations>
</filter> </filter>
<historyEventDef>RSI_SexWithVeneratedAnimal</historyEventDef> <historyEventDef>RSI_SexWithVeneratedAnimal</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isVeneratedAnimal>false</isVeneratedAnimal> <isAnimal>true</isAnimal>
</partner>
<relations>
<isVeneratedAnimal>false</isVeneratedAnimal>
</relations>
</filter> </filter>
<historyEventDef>RSI_SexWithNonVeneratedAnimal</historyEventDef> <historyEventDef>RSI_SexWithNonVeneratedAnimal</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<hasOneOfRelations> <isAnimal>true</isAnimal>
<li>Bond</li> </partner>
</hasOneOfRelations> <relations>
<hasOneOfRelations>
<li>Bond</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_SexWithBondedAnimal</historyEventDef> <historyEventDef>RSI_SexWithBondedAnimal</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<hasNoneOfRelations> <isAnimal>true</isAnimal>
<li>Bond</li> </partner>
</hasNoneOfRelations> <relations>
<hasNoneOfRelations>
<li>Bond</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_SexWithNonBondAnimal</historyEventDef> <historyEventDef>RSI_SexWithNonBondAnimal</historyEventDef>
</li> </li>
@ -113,7 +127,9 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isAnimal>true</isAnimal>
</partner>
</filter> </filter>
<multiplier>0.05</multiplier> <multiplier>0.05</multiplier>
</li> </li>
@ -160,7 +176,9 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isAnimal>true</isAnimal>
</partner>
</filter> </filter>
<multiplier>0.1</multiplier> <multiplier>0.1</multiplier>
</li> </li>
@ -210,7 +228,9 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isAnimal>true</isAnimal>
</partner>
</filter> </filter>
<multiplier>0.5</multiplier> <multiplier>0.5</multiplier>
</li> </li>
@ -279,14 +299,20 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isVeneratedAnimal>true</isVeneratedAnimal> <relations>
<isVeneratedAnimal>true</isVeneratedAnimal>
</relations>
</filter> </filter>
<multiplier>2.0</multiplier> <multiplier>2.0</multiplier>
</li> </li>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isVeneratedAnimal>false</isVeneratedAnimal> <isAnimal>true</isAnimal>
</partner>
<relations>
<isVeneratedAnimal>false</isVeneratedAnimal>
</relations>
</filter> </filter>
<multiplier>0.05</multiplier> <multiplier>0.05</multiplier>
</li> </li>
@ -342,19 +368,27 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<hasOneOfRelations> <isAnimal>true</isAnimal>
<li>Bond</li> </partner>
</hasOneOfRelations> <relations>
<hasOneOfRelations>
<li>Bond</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<multiplier>2.0</multiplier> <multiplier>2.0</multiplier>
</li> </li>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<hasNoneOfRelations> <isAnimal>true</isAnimal>
<li>Bond</li> </partner>
</hasNoneOfRelations> <relations>
<hasNoneOfRelations>
<li>Bond</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<multiplier>0.1</multiplier> <multiplier>0.1</multiplier>
</li> </li>
@ -409,7 +443,9 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<isAnimal>true</isAnimal> <partner>
<isAnimal>true</isAnimal>
</partner>
</filter> </filter>
<multiplier>2.0</multiplier> <multiplier>2.0</multiplier>
</li> </li>

View File

@ -26,39 +26,43 @@
<overrideRules> <overrideRules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
</hasOneOfRelations> <li>UncleOrAunt</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_CloseRelativeMarriage</historyEventDef> <historyEventDef>RSI_CloseRelativeMarriage</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
<li>GreatGrandparent</li> <li>UncleOrAunt</li>
<li>GreatGrandchild</li> <li>GreatGrandparent</li>
<li>GranduncleOrGrandaunt</li> <li>GreatGrandchild</li>
<li>GrandnephewOrGrandniece</li> <li>GranduncleOrGrandaunt</li>
<li>CousinOnceRemoved</li> <li>GrandnephewOrGrandniece</li>
<li>SecondCousin</li> <li>CousinOnceRemoved</li>
<li>Cousin</li> <li>SecondCousin</li>
<li>Kin</li> <li>Cousin</li>
</hasOneOfRelations> <li>Kin</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_IncestuosMarriage</historyEventDef> <historyEventDef>RSI_IncestuosMarriage</historyEventDef>
</li> </li>
@ -85,39 +89,43 @@
<overrideRules> <overrideRules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
</hasOneOfRelations> <li>UncleOrAunt</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_CloseRelativeSex</historyEventDef> <historyEventDef>RSI_CloseRelativeSex</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
<li>GreatGrandparent</li> <li>UncleOrAunt</li>
<li>GreatGrandchild</li> <li>GreatGrandparent</li>
<li>GranduncleOrGrandaunt</li> <li>GreatGrandchild</li>
<li>GrandnephewOrGrandniece</li> <li>GranduncleOrGrandaunt</li>
<li>CousinOnceRemoved</li> <li>GrandnephewOrGrandniece</li>
<li>SecondCousin</li> <li>CousinOnceRemoved</li>
<li>Cousin</li> <li>SecondCousin</li>
<li>Kin</li> <li>Cousin</li>
</hasOneOfRelations> <li>Kin</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_IncestuosSex</historyEventDef> <historyEventDef>RSI_IncestuosSex</historyEventDef>
</li> </li>
@ -163,19 +171,21 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
</hasOneOfRelations> <li>UncleOrAunt</li>
<hasNoneOfRelations> </hasOneOfRelations>
<li>Spouse</li> <hasNoneOfRelations>
</hasNoneOfRelations> <li>Spouse</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<multiplier>0.5</multiplier> <multiplier>0.5</multiplier>
</li> </li>
@ -212,27 +222,29 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
<li>GreatGrandparent</li> <li>UncleOrAunt</li>
<li>GreatGrandchild</li> <li>GreatGrandparent</li>
<li>GranduncleOrGrandaunt</li> <li>GreatGrandchild</li>
<li>GrandnephewOrGrandniece</li> <li>GranduncleOrGrandaunt</li>
<li>CousinOnceRemoved</li> <li>GrandnephewOrGrandniece</li>
<li>SecondCousin</li> <li>CousinOnceRemoved</li>
<li>Cousin</li> <li>SecondCousin</li>
<li>Kin</li> <li>Cousin</li>
</hasOneOfRelations> <li>Kin</li>
<hasNoneOfRelations> </hasOneOfRelations>
<li>Spouse</li> <hasNoneOfRelations>
</hasNoneOfRelations> <li>Spouse</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<multiplier>0.5</multiplier> <multiplier>0.5</multiplier>
</li> </li>
@ -269,27 +281,29 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
<li>GreatGrandparent</li> <li>UncleOrAunt</li>
<li>GreatGrandchild</li> <li>GreatGrandparent</li>
<li>GranduncleOrGrandaunt</li> <li>GreatGrandchild</li>
<li>GrandnephewOrGrandniece</li> <li>GranduncleOrGrandaunt</li>
<li>CousinOnceRemoved</li> <li>GrandnephewOrGrandniece</li>
<li>SecondCousin</li> <li>CousinOnceRemoved</li>
<li>Cousin</li> <li>SecondCousin</li>
<li>Kin</li> <li>Cousin</li>
</hasOneOfRelations> <li>Kin</li>
<hasNoneOfRelations> </hasOneOfRelations>
<li>Spouse</li> <hasNoneOfRelations>
</hasNoneOfRelations> <li>Spouse</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<multiplier>0.1</multiplier> <multiplier>0.1</multiplier>
</li> </li>
@ -324,24 +338,26 @@
<rules> <rules>
<li> <li>
<filter> <filter>
<hasOneOfRelations> <relations>
<li>Parent</li> <hasOneOfRelations>
<li>Child</li> <li>Parent</li>
<li>Sibling</li> <li>Child</li>
<li>HalfSibling</li> <li>Sibling</li>
<li>Grandparent</li> <li>HalfSibling</li>
<li>Grandchild</li> <li>Grandparent</li>
<li>NephewOrNiece</li> <li>Grandchild</li>
<li>UncleOrAunt</li> <li>NephewOrNiece</li>
<li>GreatGrandparent</li> <li>UncleOrAunt</li>
<li>GreatGrandchild</li> <li>GreatGrandparent</li>
<li>GranduncleOrGrandaunt</li> <li>GreatGrandchild</li>
<li>GrandnephewOrGrandniece</li> <li>GranduncleOrGrandaunt</li>
<li>CousinOnceRemoved</li> <li>GrandnephewOrGrandniece</li>
<li>SecondCousin</li> <li>CousinOnceRemoved</li>
<li>Cousin</li> <li>SecondCousin</li>
<li>Kin</li> <li>Cousin</li>
</hasOneOfRelations> <li>Kin</li>
</hasOneOfRelations>
</relations>
</filter> </filter>
<multiplier>2.0</multiplier> <multiplier>2.0</multiplier>
</li> </li>

View File

@ -16,13 +16,17 @@
<overrideRules> <overrideRules>
<li> <li>
<filter> <filter>
<isSlave>true</isSlave> <partner>
<isSlave>true</isSlave>
</partner>
</filter> </filter>
<historyEventDef>RSI_RapedSlave</historyEventDef> <historyEventDef>RSI_RapedSlave</historyEventDef>
</li> </li>
<li> <li>
<filter> <filter>
<isPrisoner>true</isPrisoner> <partner>
<isPrisoner>true</isPrisoner>
</partner>
</filter> </filter>
<historyEventDef>RSI_RapedPrisoner</historyEventDef> <historyEventDef>RSI_RapedPrisoner</historyEventDef>
</li> </li>

View File

@ -21,9 +21,11 @@
<generationRules> <generationRules>
<li> <li>
<filter> <filter>
<hasNoneOfRelations> <relations>
<li>Spouse</li> <hasNoneOfRelations>
</hasNoneOfRelations> <li>Spouse</li>
</hasNoneOfRelations>
</relations>
</filter> </filter>
<historyEventDef>RSI_VirginTakenNotSpouse</historyEventDef> <historyEventDef>RSI_VirginTakenNotSpouse</historyEventDef>
</li> </li>