private static List <Marshaled_TargetEntityInfo> GetMarshaledEntitiesInPlay()
    {
        List <Marshaled_TargetEntityInfo> list = new List <Marshaled_TargetEntityInfo>();

        foreach (Zone zone in ZoneMgr.Get().FindZonesForTag(TAG_ZONE.PLAY))
        {
            foreach (Card card in zone.GetCards())
            {
                Entity entity = card.GetEntity();
                if (entity.GetZone() == TAG_ZONE.PLAY)
                {
                    list.Add(Marshaled_TargetEntityInfo.ConvertFromTargetEntityInfo(entity.ConvertToTargetInfo()));
                }
            }
        }
        return(list);
    }
    public static ErrorType GetTargetEntityError(Entity source, Entity target)
    {
        if (!s_initialized)
        {
            return(ErrorType.NONE);
        }
        Player owningPlayer = GetOwningPlayer(source);

        if (owningPlayer == null)
        {
            return(ErrorType.NONE);
        }
        SourceEntityInfo                  sourceInfo              = source.ConvertToSourceInfo(GetPlayRequirementInfo(source), null);
        PlayerInfo                        playerInfo              = owningPlayer.ConvertToPlayerInfo();
        GameStateInfo                     gameInfo                = GameState.Get().ConvertToGameStateInfo();
        Marshaled_PlayErrorsParams        playErrorsParams        = new Marshaled_PlayErrorsParams(sourceInfo, playerInfo, gameInfo);
        Marshaled_TargetEntityInfo        info4                   = Marshaled_TargetEntityInfo.ConvertFromTargetEntityInfo(target.ConvertToTargetInfo());
        List <Marshaled_TargetEntityInfo> marshaledEntitiesInPlay = GetMarshaledEntitiesInPlay();

        return(DLL_GetTargetEntityError(playErrorsParams, info4, marshaledEntitiesInPlay.ToArray(), marshaledEntitiesInPlay.Count));
    }