public EntityRules ToEntityRules() { var entity = new EntityRules(m_name, StringLookup.ToStringLookup()); entity.PreBattleEffects = m_preBattleEffectsNode.GetChildren().Select(x => x.ToEffectBase()).ToList().AsReadOnly(); entity.PostBattleEffects = m_postBattleEffectsNode.GetChildren().Select(x => x.ToEffectBase()).ToList().AsReadOnly(); entity.PreTurnEffects = m_preTurnEffectsNode.GetChildren().Select(x => x.ToEffectBase()).ToList().AsReadOnly(); entity.PostTurnEffects = m_postTurnEffectsNode.GetChildren().Select(x => x.ToEffectBase()).ToList().AsReadOnly(); entity.EliminationCondition = m_eliminationCondition.ToConditionBase(); entity.Actions = m_actionsNode.GetChildren().Select(x => x.ToAction()).ToList().AsReadOnly(); entity.Results = m_resultsNode.GetChildren().Select(x => x.ToResult()).ToList().AsReadOnly(); entity.SetActionMatrix(ActionMatrix.ToActionMatrixEntries()); return(entity); }