public static Player attachToPlayerAIPreferences(AbilityFactory af, final SpellAbility sa, boolean mandatory){
		Target tgt = sa.getTarget();
		Player p;
		if (tgt.canOnlyTgtOpponent()){
			// If can Only Target Opponent, do so.
			p = AllZone.getHumanPlayer();
			if (p.canTarget(sa.getSourceCard()))
				return p;
			else
				return null;
		}
		
		if (af.isCurse())
			p = AllZone.getHumanPlayer();
		else
			p = AllZone.getComputerPlayer();

		if (p.canTarget(sa.getSourceCard()))
			return p;
		
		if (!mandatory)
			return null;
		
		p = p.getOpponent();
		if (p.canTarget(sa.getSourceCard()))
			return p;
		
		return null;
	}